Implementation of the Base L2TBTCToken handle.
See
for reference.
-
EthersContractHandle
<L2TBTCTypechain
>↳
BaseL2TBTCToken
• new BaseL2TBTCToken(config
, chainId
): BaseL2TBTCToken
Name | Type |
---|---|
config |
EthereumContractConfig |
chainId |
Base |
EthersContractHandle<L2TBTCTypechain>.constructor
src/lib/base/l2-tbtc-token.ts:23
• 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.
EthersContractHandle._deployedAtBlockNumber
src/lib/ethereum/adapter.ts:80
• Protected
Readonly
_instance: L2TBTC
Ethers instance of the deployed contract.
EthersContractHandle._instance
src/lib/ethereum/adapter.ts:74
• Protected
Readonly
_totalRetryAttempts: number
Number of retries for ethereum requests.
EthersContractHandle._totalRetryAttempts
src/lib/ethereum/adapter.ts:84
▸ balanceOf(identifier
): Promise
<BigNumber
>
Name | Type |
---|---|
identifier |
ChainIdentifier |
Promise
<BigNumber
>
See
src/lib/base/l2-tbtc-token.ts:53
▸ getAddress(): EthereumAddress
Get address of the contract instance.
Address of this contract instance.
EthersContractHandle.getAddress
src/lib/ethereum/adapter.ts:112
▸ getChainIdentifier(): ChainIdentifier
See
L2TBTCToken.getChainIdentifier
src/lib/base/l2-tbtc-token.ts:45
▸ 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
.
Name | Type | Description |
---|---|---|
eventName |
string |
Name of the event. |
options? |
Options |
Options for events fetching. |
...filterArgs |
unknown [] |
Arguments for events filtering. |
Promise
<Event
[]>
Array of found events.
EthersContractHandle.getEvents