diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7814d11..66325e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: run: npm start & - name: Build - run: nimble install -y + run: nimble install -y --maximumtaggedversions=2 - name: Test run: nimble test -y diff --git a/Readme.md b/Readme.md index b8f02f1..9952cee 100644 --- a/Readme.md +++ b/Readme.md @@ -17,6 +17,12 @@ project. Add the following to its .nimble file: requires "ethers >= 1.1.0 & < 2.0.0" ``` +To avoid conflicts with previous versions of `contractabi`, use the following command to install dependencies: + +```bash +nimble install --maximumtaggedversions=2 +``` + Usage ----- diff --git a/ethers.nimble b/ethers.nimble index ebc7f18..ebd0d94 100644 --- a/ethers.nimble +++ b/ethers.nimble @@ -5,19 +5,14 @@ license = "MIT" requires "nim >= 2.0.14" requires "chronicles >= 0.10.3 & < 0.11.0" -requires "chronos >= 4.0.0 & < 4.1.0" - -# Branch update-to-nim-2-x -requires "contractabi#842f48910be4f388bcbf8abf1f02aba1d5e2ee64" - +requires "chronos >= 4.0.4 & < 4.1.0" +requires "contractabi >= 0.7.0 & < 0.8.0" requires "questionable >= 0.10.2 & < 0.11.0" requires "json_rpc >= 0.5.0 & < 0.6.0" requires "serde >= 1.2.1 & < 1.3.0" -requires "stint >= 0.8.0 & < 0.9.0" +requires "stint >= 0.8.1 & < 0.9.0" requires "stew >= 0.2.0 & < 0.3.0" - -# Branch update-to-nim-2-x -requires "https://github.com/codex-storage/nim-eth-versioned#98c65e74ff5a5e9647a5043b5784e5c8dc4f9fbc" +requires "eth >= 0.5.0 & < 0.6.0" task test, "Run the test suite": # exec "nimble install -d -y" diff --git a/ethers/providers/jsonrpc.nim b/ethers/providers/jsonrpc.nim index dd3e464..b89b87e 100644 --- a/ethers/providers/jsonrpc.nim +++ b/ethers/providers/jsonrpc.nim @@ -1,7 +1,7 @@ import std/tables import std/uri import pkg/chronicles -import pkg/eth/common/eth_types except Block, Log, Address +import pkg/eth/common/eth_types except Block, Log, Address, Transaction import pkg/json_rpc/rpcclient import pkg/json_rpc/errors import pkg/serde @@ -136,7 +136,7 @@ method getBlock*( method call*( provider: JsonRpcProvider, - tx: transaction.Transaction, + tx: Transaction, blockTag = BlockTag.latest): Future[seq[byte]] {.async: (raises:[ProviderError]).} = convertError: @@ -197,7 +197,7 @@ method getLogs*( method estimateGas*( provider: JsonRpcProvider, - transaction: transaction.Transaction, + transaction: Transaction, blockTag = BlockTag.latest): Future[UInt256] {.async: (raises:[ProviderError]).} = try: @@ -324,7 +324,7 @@ method signMessage*( method sendTransaction*( signer: JsonRpcSigner, - transaction: transaction.Transaction): Future[TransactionResponse] + transaction: Transaction): Future[TransactionResponse] {.async: (raises:[SignerError, ProviderError]).} = convertError: