Skip to content

Latest commit

 

History

History
213 lines (117 loc) · 4.9 KB

BaseL2TBTCToken.md

File metadata and controls

213 lines (117 loc) · 4.9 KB

Class: BaseL2TBTCToken

Implementation of the Base L2TBTCToken handle.

See

for reference.

Hierarchy

  • EthersContractHandle<L2TBTCTypechain>

    BaseL2TBTCToken

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BaseL2TBTCToken(config, chainId): BaseL2TBTCToken

Parameters

Name Type
config EthereumContractConfig
chainId Base

Returns

BaseL2TBTCToken

Overrides

EthersContractHandle&lt;L2TBTCTypechain&gt;.constructor

Defined in

src/lib/base/l2-tbtc-token.ts:23

Properties

_deployedAtBlockNumber

Protected Readonly _deployedAtBlockNumber: number

Number of a block within which the contract was deployed. Value is read from the contract deployment artifact. It can be overwritten by setting a EthersContractConfig.deployedAtBlockNumber property.

Inherited from

EthersContractHandle._deployedAtBlockNumber

Defined in

src/lib/ethereum/adapter.ts:80


_instance

Protected Readonly _instance: L2TBTC

Ethers instance of the deployed contract.

Inherited from

EthersContractHandle._instance

Defined in

src/lib/ethereum/adapter.ts:74


_totalRetryAttempts

Protected Readonly _totalRetryAttempts: number

Number of retries for ethereum requests.

Inherited from

EthersContractHandle._totalRetryAttempts

Defined in

src/lib/ethereum/adapter.ts:84

Methods

balanceOf

balanceOf(identifier): Promise<BigNumber>

Parameters

Name Type
identifier ChainIdentifier

Returns

Promise<BigNumber>

See

Implementation of

L2TBTCToken.balanceOf

Defined in

src/lib/base/l2-tbtc-token.ts:53


getAddress

getAddress(): EthereumAddress

Get address of the contract instance.

Returns

EthereumAddress

Address of this contract instance.

Inherited from

EthersContractHandle.getAddress

Defined in

src/lib/ethereum/adapter.ts:112


getChainIdentifier

getChainIdentifier(): ChainIdentifier

Returns

ChainIdentifier

See

Implementation of

L2TBTCToken.getChainIdentifier

Defined in

src/lib/base/l2-tbtc-token.ts:45


getEvents

getEvents(eventName, options?, ...filterArgs): Promise<Event[]>

Get events emitted by the Ethereum contract. It starts searching from provided block number. If the GetEvents.Options#fromBlock option is missing it looks for a contract's defined property _deployedAtBlockNumber. If the property is missing starts searching from block 0.

Parameters

Name Type Description
eventName string Name of the event.
options? Options Options for events fetching.
...filterArgs unknown[] Arguments for events filtering.

Returns

Promise<Event[]>

Array of found events.

Inherited from

EthersContractHandle.getEvents

Defined in

src/lib/ethereum/adapter.ts:127