diff --git a/ethers/provider.nim b/ethers/provider.nim index 5524dca..97f6fee 100644 --- a/ethers/provider.nim +++ b/ethers/provider.nim @@ -59,56 +59,56 @@ type const EthersDefaultConfirmations* {.intdefine.} = 12 const EthersReceiptTimeoutBlks* {.intdefine.} = 50 # in blocks -method getBlockNumber*(provider: Provider): Future[UInt256] {.base.} = +method getBlockNumber*(provider: Provider): Future[UInt256] {.base, gcsafe.} = doAssert false, "not implemented" -method getBlock*(provider: Provider, tag: BlockTag): Future[?Block] {.base.} = +method getBlock*(provider: Provider, tag: BlockTag): Future[?Block] {.base, gcsafe.} = doAssert false, "not implemented" method call*(provider: Provider, tx: Transaction, - blockTag = BlockTag.latest): Future[seq[byte]] {.base.} = + blockTag = BlockTag.latest): Future[seq[byte]] {.base, gcsafe.} = doAssert false, "not implemented" -method getGasPrice*(provider: Provider): Future[UInt256] {.base.} = +method getGasPrice*(provider: Provider): Future[UInt256] {.base, gcsafe.} = doAssert false, "not implemented" method getTransactionCount*(provider: Provider, address: Address, blockTag = BlockTag.latest): - Future[UInt256] {.base.} = + Future[UInt256] {.base, gcsafe.} = doAssert false, "not implemented" method getTransactionReceipt*(provider: Provider, txHash: TransactionHash): - Future[?TransactionReceipt] {.base.} = + Future[?TransactionReceipt] {.base, gcsafe.} = doAssert false, "not implemented" method sendTransaction*(provider: Provider, rawTransaction: seq[byte]): - Future[TransactionResponse] {.base.} = + Future[TransactionResponse] {.base, gcsafe.} = doAssert false, "not implemented" method getLogs*(provider: Provider, - filter: EventFilter): Future[seq[Log]] {.base.} = + filter: EventFilter): Future[seq[Log]] {.base, gcsafe.} = doAssert false, "not implemented" method estimateGas*(provider: Provider, - transaction: Transaction): Future[UInt256] {.base.} = + transaction: Transaction): Future[UInt256] {.base, gcsafe.} = doAssert false, "not implemented" -method getChainId*(provider: Provider): Future[UInt256] {.base.} = +method getChainId*(provider: Provider): Future[UInt256] {.base, gcsafe.} = doAssert false, "not implemented" method subscribe*(provider: Provider, filter: EventFilter, callback: LogHandler): - Future[Subscription] {.base.} = + Future[Subscription] {.base, gcsafe.} = doAssert false, "not implemented" method subscribe*(provider: Provider, callback: BlockHandler): - Future[Subscription] {.base.} = + Future[Subscription] {.base, gcsafe.} = doAssert false, "not implemented" method unsubscribe*(subscription: Subscription) {.base, async.} = diff --git a/ethers/signer.nim b/ethers/signer.nim index 3405056..4208c6d 100644 --- a/ethers/signer.nim +++ b/ethers/signer.nim @@ -9,10 +9,10 @@ type SignerError* = object of EthersError template raiseSignerError(message: string) = raise newException(SignerError, message) -method provider*(signer: Signer): Provider {.base.} = +method provider*(signer: Signer): Provider {.base, gcsafe.} = doAssert false, "not implemented" -method getAddress*(signer: Signer): Future[Address] {.base.} = +method getAddress*(signer: Signer): Future[Address] {.base, gcsafe.} = doAssert false, "not implemented" method signMessage*(signer: Signer, @@ -23,7 +23,7 @@ method sendTransaction*(signer: Signer, transaction: Transaction): Future[TransactionResponse] {.base, async.} = doAssert false, "not implemented" -method getGasPrice*(signer: Signer): Future[UInt256] {.base.} = +method getGasPrice*(signer: Signer): Future[UInt256] {.base, gcsafe.} = signer.provider.getGasPrice() method getTransactionCount*(signer: Signer, @@ -38,7 +38,7 @@ method estimateGas*(signer: Signer, transaction.sender = some(await signer.getAddress) return await signer.provider.estimateGas(transaction) -method getChainId*(signer: Signer): Future[UInt256] {.base.} = +method getChainId*(signer: Signer): Future[UInt256] {.base, gcsafe.} = signer.provider.getChainId() method populateTransaction*(signer: Signer,