Skip to content

Commit

Permalink
Add old packages back for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Oct 6, 2024
1 parent 486982d commit 9ca47c5
Show file tree
Hide file tree
Showing 80 changed files with 3,474 additions and 47 deletions.
1 change: 0 additions & 1 deletion packages/drift-ethers/src/stubs.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/drift-viem/src/stubs.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@delvtech/drift-ethers",
"version": "0.0.0",
"name": "@delvtech/evm-client-ethers",
"version": "0.5.1",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -33,7 +33,7 @@
"ethers": "^6"
},
"dependencies": {
"@delvtech/drift": "0.0.0"
"@delvtech/evm-client": "0.5.1"
},
"devDependencies": {
"@repo/typescript-config": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type CachedReadContract,
type SimpleCache,
createCachedReadContract as baseFactory,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import type { Abi } from "abitype";
import {
type CreateReadContractOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type CachedReadWriteContract,
type SimpleCache,
createCachedReadWriteContract as baseFactory,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import type { Abi } from "abitype";
import {
type ReadWriteContractOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ import {
arrayToFriendly,
arrayToObject,
objectToArray,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import type { Abi } from "abitype";
import {
Contract,
type EventLog,
type InterfaceAbi,
type Provider,
type Signer,
} from "ethers";
import { Contract, type EventLog, type InterfaceAbi, type Provider, type Signer } from "ethers";
import { createReadWriteContract } from "src/contract/createReadWriteContract";

export interface CreateReadContractOptions<TAbi extends Abi = Abi> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import {
objectToArray,
type ReadContract,
type ReadWriteContract,
objectToArray,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import type { Abi } from "abitype";
import {
Contract,
type InterfaceAbi,
type Provider,
type Signer,
} from "ethers";
import { Contract, type InterfaceAbi, type Provider, type Signer } from "ethers";
import { createReadContract } from "src/contract/createReadContract";

export interface ReadWriteContractOptions<TAbi extends Abi = Abi> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export {
export { createNetwork } from "src/network/createNetwork";

// Re-exports
export * from "@delvtech/drift/cache";
export * from "@delvtech/evm-client/cache";

export {
arrayToFriendly,
arrayToObject,
getAbiEntry,
objectToArray,
} from "@delvtech/drift/contract";
} from "@delvtech/evm-client/contract";
export type {
AbiArrayType,
AbiEntry,
Expand Down Expand Up @@ -57,7 +57,7 @@ export type {
FunctionReturn,
ReadContract,
ReadWriteContract,
} from "@delvtech/drift/contract";
} from "@delvtech/evm-client/contract";

export * from "@delvtech/drift/errors";
export * from "@delvtech/drift/network";
export * from "@delvtech/evm-client/errors";
export * from "@delvtech/evm-client/network";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Network } from "@delvtech/drift";
import type { Network } from "@delvtech/evm-client";
import type { Provider } from "ethers";

export function createNetwork(provider: Provider): Network {
Expand Down
1 change: 1 addition & 0 deletions packages/evm-client-ethers/src/stubs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "@delvtech/evm-client/stubs";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@delvtech/drift-viem",
"version": "0.0.0",
"name": "@delvtech/evm-client-viem",
"version": "0.6.3",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -39,7 +39,7 @@
}
},
"dependencies": {
"@delvtech/drift": "0.0.0"
"@delvtech/evm-client": "0.5.1"
},
"devDependencies": {
"@repo/typescript-config": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type CachedReadContract,
type SimpleCache,
createCachedReadContract as baseFactory,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import {
type CreateReadContractOptions,
createReadContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type CachedReadWriteContract,
type SimpleCache,
createCachedReadWriteContract as baseFactory,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import {
type ReadWriteContractOptions,
createReadWriteContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type ReadWriteContract,
arrayToObject,
objectToArray,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import { createSimulateContractParameters } from "src/contract/utils/createSimulateContractParameters";
import {
type Abi,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
objectToArray,
type ReadContract,
type ReadWriteContract,
objectToArray,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import {
type CreateReadContractOptions,
createReadContract,
type CreateReadContractOptions,
} from "src/contract/createReadContract";
import { createSimulateContractParameters } from "src/contract/utils/createSimulateContractParameters";
import type { Abi, WalletClient } from "viem";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ContractWriteOptions } from "@delvtech/drift";
import type { ContractWriteOptions } from "@delvtech/evm-client";

/**
* Get parameters for `simulateContract` from `ContractWriteOptions`
Expand Down Expand Up @@ -40,5 +40,6 @@ type SimulateContractParameters = {
value?: bigint;
} & (
| { gasPrice?: bigint }
| { maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint }
| { maxFeePerGas?: bigint }
| { maxPriorityFeePerGas?: bigint }
);
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type FunctionReturn,
arrayToFriendly,
getAbiEntry,
} from "@delvtech/drift";
} from "@delvtech/evm-client";
import type { Abi } from "viem";

export function outputToFriendly<TAbi extends Abi>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export {
export { createNetwork } from "src/network/createNetwork";

// Re-exports
export * from "@delvtech/drift/cache";
export * from "@delvtech/evm-client/cache";

export {
arrayToFriendly,
arrayToObject,
getAbiEntry,
objectToArray,
} from "@delvtech/drift/contract";
} from "@delvtech/evm-client/contract";
export type {
AbiArrayType,
AbiEntry,
Expand Down Expand Up @@ -57,7 +57,7 @@ export type {
FunctionReturn,
ReadContract,
ReadWriteContract,
} from "@delvtech/drift/contract";
} from "@delvtech/evm-client/contract";

export * from "@delvtech/drift/errors";
export * from "@delvtech/drift/network";
export * from "@delvtech/evm-client/errors";
export * from "@delvtech/evm-client/network";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Network } from "@delvtech/drift";
import type { Network } from "@delvtech/evm-client";
import {
type GetBalanceParameters,
type PublicClient,
Expand Down
1 change: 1 addition & 0 deletions packages/evm-client-viem/src/stubs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "@delvtech/evm-client/stubs";
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions packages/evm-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
157 changes: 157 additions & 0 deletions packages/evm-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# @delvtech/evm-client

## 0.5.1

### Patch Changes

- 66d9dc3: Added `ConstructorArgs` type

## 0.5.0

### Minor Changes

- 919f525: Renamed `deleteReadMatch` to `deleteReadsMatching`

### Patch Changes

- 93531e6: Added getChainId method to the Network interface.

## 0.4.2

### Patch Changes

- 52edea9: Add deleteReadMatch method to CachedReadContract

## 0.4.1

### Patch Changes

- 4609a60: Export TransactionReceipt type

## 0.4.0

### Minor Changes

- 51fd2e4: Add status field to Transaction

## 0.3.1

### Patch Changes

- 5c35487: Fix error with `NamedEventInput` type which was broken and causing broken downstream types such as `EventFilter`

## 0.3.0

### Minor Changes

- 91106f8: Add a getBalance method to the Network interface for fetching native currency balances (e.g. ETH)

## 0.2.4

### Patch Changes

- 322edf5: Remove onTransactionMined

## 0.2.3

### Patch Changes

- e3880c8: Add txHash to onTransactionMined

## 0.2.2

### Patch Changes

- 01ec0b1: Add onTransactionMined callback to ReadWriteContract
- 01ec0b1: Make onTransactionMined optional

## 0.2.1

### Patch Changes

- 5f6a374: Add `waitForTransaction` method to `Network` type.

## 0.2.0

### Minor Changes

- affd95f: Add `entries` property to the `SimpleCache` type.

## 0.1.1

### Patch Changes

- eb6575b: Added a `cache` property to the `CachedReadContract` type and ensured the factories preserve the prototypes of the contract's they're given.

## 0.1.0

### Minor Changes

- cc17b3c: Changed the type of all inputs to objects. This means that functions with a single argument (e.g., `balanceOf` will now expect ``{ owner: `0x${string}` }``, not `` `0x${string}` ``). Outputs remain the "Friendly" type which deconstructs to a single primitive type for single outputs values (e.g., `symbol` will return a `string`, not `{ "0": string }`) since many single output return values are unnamed

## 0.0.11

### Patch Changes

- 1098f69: Fix bug causing stub lookups to fail

## 0.0.10

### Patch Changes

- 5cf2921: Add ability to stub options to stubRead

## 0.0.9

### Patch Changes

- dd129be: Use stable stringify for stub keys

## 0.0.8

### Patch Changes

- 593a286: Add ability to stub events for dynamic filter args

## 0.0.7

### Patch Changes

- 9db4f0f: Fix argument handling for parameters that have empty strings as names

## 0.0.6

### Patch Changes

- a2edb5a: Fix handling of single params

## 0.0.5

### Patch Changes

- 6307e1b: Fix the last fix...

## 0.0.4

### Patch Changes

- cfdf0db: Fix param prep for contract calls with single params

## 0.0.3

### Patch Changes

- 76b1bc8: Fix type resolutions by adding a `typeVersions` field to the `package.json`s
- fdcc9ef: Modify exports

## 0.0.2

### Patch Changes

- 6d60418: Added NetworkGetBlockOptions type

## 0.0.1

### Patch Changes

- e2f697f: Initial release! 🚀
Loading

0 comments on commit 9ca47c5

Please sign in to comment.