Class: EtherAdapter
@orderly.network/core.EtherAdapterImplements
Table of contents
Constructors
Properties
Accessors
Methods
- call
- callOnChain
- deposit
- estimateGas
- formatUnits
- getBalance
- getContract
- getTransactionRecipect
- off
- on
- parseUnits
- pollTransactionReceiptWithBackoff
- send
- sendTransaction
- signTypedData
- verify
Constructors
constructor
• new EtherAdapter(options)
Parameters
Defined in
packages/core/src/wallet/etherAdapter.ts:22Properties
_address
•Private _address: string
Defined in
packages/core/src/wallet/etherAdapter.ts:21_chainId
•Private _chainId: number
Defined in
packages/core/src/wallet/etherAdapter.ts:20provider
•Private Optional provider: BrowserProvider
Defined in
packages/core/src/wallet/etherAdapter.ts:19Accessors
addresses
•get addresses(): string
Returns
string
Implementation of
IWalletAdapter.addressesDefined in
packages/core/src/wallet/etherAdapter.ts:101chainId
•get chainId(): number
Returns
number
Implementation of
IWalletAdapter.chainIdDefined in
packages/core/src/wallet/etherAdapter.ts:93 •set chainId(chainId): void
Set the chain id
Parameters
Returns
void
Implementation of
IWalletAdapter.chainIdDefined in
packages/core/src/wallet/etherAdapter.ts:97Methods
call
▸ call(address, method, params, options): Promise<any>
Parameters
Returns
Promise<any>
Implementation of
WalletAdapter.callDefined in
packages/core/src/wallet/etherAdapter.ts:51callOnChain
▸ callOnChain(chain, address, method, params, options): Promise<any>
Parameters
Returns
Promise<any>
Implementation of
WalletAdapter.callOnChainDefined in
packages/core/src/wallet/etherAdapter.ts:70deposit
▸ deposit(from, to, amount): Promise<any>
Parameters
Returns
Promise<any>
Defined in
packages/core/src/wallet/etherAdapter.ts:47estimateGas
▸Private estimateGas(tx): Promise<number>
Parameters
Returns
Promise<number>
Defined in
packages/core/src/wallet/etherAdapter.ts:194formatUnits
▸ formatUnits(amount): string
Parameters
Returns
string
Implementation of
WalletAdapter.formatUnitsDefined in
packages/core/src/wallet/etherAdapter.ts:34getBalance
▸ getBalance(userAddress): Promise<any>
Parameters
Returns
Promise<any>
Implementation of
WalletAdapter.getBalanceDefined in
packages/core/src/wallet/etherAdapter.ts:37getContract
▸ getContract(address, abi): Contract
Parameters
Returns
Contract
Defined in
packages/core/src/wallet/etherAdapter.ts:221getTransactionRecipect
▸ getTransactionRecipect(txHash): Promise<void>
Parameters
Returns
Promise<void>
Implementation of
WalletAdapter.getTransactionRecipectDefined in
packages/core/src/wallet/etherAdapter.ts:164off
▸ off(eventName, listener): void
Parameters
Returns
void
Implementation of
WalletAdapter.offDefined in
packages/core/src/wallet/etherAdapter.ts:217on
▸ on(eventName, listener): void
Parameters
Returns
void
Implementation of
WalletAdapter.onDefined in
packages/core/src/wallet/etherAdapter.ts:213parseUnits
▸ parseUnits(amount): string
Parameters
Returns
string
Implementation of
WalletAdapter.parseUnitsDefined in
packages/core/src/wallet/etherAdapter.ts:31pollTransactionReceiptWithBackoff
▸ pollTransactionReceiptWithBackoff(txHash, baseInterval?, maxInterval?, maxRetries?): Promise<TransactionReceipt>
Parameters
Returns
Promise<TransactionReceipt>
Implementation of
WalletAdapter.pollTransactionReceiptWithBackoffDefined in
packages/core/src/wallet/etherAdapter.ts:170send
▸ send(method, params): Promise<any>
Parameters
Returns
Promise<any>
Implementation of
WalletAdapter.sendDefined in
packages/core/src/wallet/etherAdapter.ts:105sendTransaction
▸ sendTransaction(contractAddress, method, payload, options): Promise<TransactionResponse>
Parameters
Returns
Promise<TransactionResponse>
Implementation of
WalletAdapter.sendTransactionDefined in
packages/core/src/wallet/etherAdapter.ts:112signTypedData
▸ signTypedData(address, data): Promise<any>
Parameters
Returns
Promise<any>
Implementation of
WalletAdapter.signTypedDataDefined in
packages/core/src/wallet/etherAdapter.ts:200verify
▸ verify(data, signature): Promise<void>
Parameters
Returns
Promise<void>