- Preparing search index...
- The search index is not available
@tornado/sdk
Constructors
constructor
- new Chain(provider, signer?): Chain
-
Parameters
-
provider: Provider
-
Optional
signer: Signer
Properties
Private
Optional
_chainId
_chainId?: any
Private
_emptySigner
_emptySigner: any
Private
_fetched
_fetched: any
Private
_propertiesFetched
_propertiesFetched: any
Private
Optional
_signer
_signer?: any
Private
_signerConnected
_signerConnected: any
Private
Optional
_symbol
_symbol?: any
provider
provider: Provider
Accessors
id
- get id(): number
-
Returns number
signer
- get signer(): Signer
-
Returns Signer
symbol
- get symbol(): string
-
Returns string
Methods
batchCall
- batchCall(callStruct): Promise<ContractTransaction>
-
Parameters
-
callStruct: (Omit<Call3ValueStruct, "value"> & Partial<Pick<Call3ValueStruct, "value">>)[]
Returns Promise<ContractTransaction>
connectSigner
- connectSigner(signer): void
-
Returns void
fetchChainData
- fetchChainData(): Promise<void>
-
Returns Promise<void>
getAccountBalance
- getAccountBalance(account): Promise<BigNumber>
-
Returns Promise<BigNumber>
getGasPrice
- getGasPrice(): Promise<BigNumber>
-
Returns Promise<BigNumber>
getTokenBalance
- getTokenBalance(account, token, normalized?): Promise<BigNumber>
-
Parameters
-
account: string
-
token: string
-
Optional
normalized: boolean
Returns Promise<BigNumber>
getTokenContract
- getTokenContract(tokenAddress): ERC20
-
Returns ERC20
getTokenDecimals
- getTokenDecimals(token): Promise<BigNumber>
-
Returns Promise<BigNumber>
latestBlockNum
- latestBlockNum(): Promise<number>
-
Returns Promise<number>
populateBatchCall
- populateBatchCall(callStruct): Promise<TransactionRequest>
-
Parameters
-
callStruct: (Omit<Call3ValueStruct, "value"> & Partial<Pick<Call3ValueStruct, "value">>)[]
Returns Promise<TransactionRequest>
The Chain class stores Tornado-agnostic chain data and also handles such interactions.