Table of Contents

Interface IEvmSwapRpc

Namespace
NArk.ArkadeIntents.Evm
Assembly
NArk.ArkadeIntents.dll

Read-only EVM operations required to prove and verify an ERC20Swap claim.

public interface IEvmSwapRpc

Methods

CallAsync(string, byte[], BigInteger?, CancellationToken)

Executes an eth_call, optionally at a historical height.

Task<byte[]> CallAsync(string to, byte[] data, BigInteger? blockNumber = null, CancellationToken cancellationToken = default)

Parameters

to string
data byte[]
blockNumber BigInteger?
cancellationToken CancellationToken

Returns

Task<byte[]>

GetBlockNumberAsync(CancellationToken)

Reads the current block height.

Task<BigInteger> GetBlockNumberAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<BigInteger>

GetBlockTimestampAsync(BigInteger, CancellationToken)

Reads one block's unix timestamp.

Task<long> GetBlockTimestampAsync(BigInteger blockNumber, CancellationToken cancellationToken = default)

Parameters

blockNumber BigInteger
cancellationToken CancellationToken

Returns

Task<long>

GetChainIdAsync(CancellationToken)

Reads the connected chain identifier.

Task<BigInteger> GetChainIdAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<BigInteger>

WaitForReceiptAsync(string, CancellationToken)

Waits for a transaction receipt.

Task<EvmTransactionReceipt> WaitForReceiptAsync(string transactionHash, CancellationToken cancellationToken = default)

Parameters

transactionHash string
cancellationToken CancellationToken

Returns

Task<EvmTransactionReceipt>