mirror of
https://github.com/logos-storage/nim-ethers.git
synced 2026-01-05 07:03:14 +00:00
Merge pull request #106 from codex-storage/fix/update-to-nim-2-x
Fix/update to nim 2 x
This commit is contained in:
commit
7d285f2443
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
||||
@ -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
|
||||
-----
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user