Skip to main content

EthersAdapter

@bosonprotocol/ethers-sdk / Exports / EthersAdapter

Class: EthersAdapter

Web3LibAdapter implementation targeting ethers.

Implements

  • Web3LibAdapter

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new EthersAdapter(provider, signer?)

Parameters

NameType
providerProvider
signer?Signer

Defined in

src/ethers-adapter.ts:33

Properties

_provider

Private _provider: Provider

Defined in

src/ethers-adapter.ts:31


_signer

Private _signer: Signer

Defined in

src/ethers-adapter.ts:30

Methods

call

call(transactionRequest): Promise<string>

Parameters

NameType
transactionRequestPartial<{ data: string ; from: string ; gasLimit: BigNumberish ; gasPrice: BigNumberish ; nonce: number ; to: string ; value: BigNumberish }>

Returns

Promise<string>

Implementation of

Web3LibAdapter.call

Defined in

src/ethers-adapter.ts:62


getBalance

getBalance(addressOrName, blockNumber?): Promise<BigNumberish>

Parameters

NameType
addressOrNamestring
blockNumber?string | number

Returns

Promise<BigNumberish>

Implementation of

Web3LibAdapter.getBalance

Defined in

src/ethers-adapter.ts:49


getChainId

getChainId(): Promise<number>

Returns

Promise<number>

Implementation of

Web3LibAdapter.getChainId

Defined in

src/ethers-adapter.ts:45


getSignerAddress

getSignerAddress(): Promise<string>

Returns

Promise<string>

Implementation of

Web3LibAdapter.getSignerAddress

Defined in

src/ethers-adapter.ts:41


getTransactionReceipt

getTransactionReceipt(txHash): Promise<TransactionReceipt>

Parameters

NameType
txHashany

Returns

Promise<TransactionReceipt>

Defined in

src/ethers-adapter.ts:70


send

send(rpcMethod, payload): Promise<string>

Parameters

NameType
rpcMethodstring
payloadunknown[]

Returns

Promise<string>

Implementation of

Web3LibAdapter.send

Defined in

src/ethers-adapter.ts:66


sendTransaction

sendTransaction(transactionRequest): Promise<TransactionResponse>

Parameters

NameType
transactionRequestPartial<{ data: string ; from: string ; gasLimit: BigNumberish ; gasPrice: BigNumberish ; nonce: number ; to: string ; value: BigNumberish }>

Returns

Promise<TransactionResponse>

Implementation of

Web3LibAdapter.sendTransaction

Defined in

src/ethers-adapter.ts:56