Current wallet provider address.
Readonly
web3Instance of web3, initialized with ethereum wallet, e.g. Metamask, WalletConnect.
Token address you want to approve for spending
Addres of permit2 contract
Contract address spending your tokens
Approved amount
Ms number added to current time (Date.now()) until approve expiration
Executes approve method in ERC-20 token contract.
Approval transaction receipt.
Address of the smart-contract corresponding to the token.
Wallet or contract address to approve.
Token amount to approve in wei.
Optional
options: EvmTransactionOptions = {}Additional options.
Checks, that selected blockchain in wallet is equal to passed blockchain.
Build encoded approve transaction config.
Encoded approve transaction config.
Address of the smart-contract corresponding to the token.
Wallet or contract address to approve.
Amount of tokens in approval window in spending cap field
Optional
options: EvmTransactionOptions = {}Additional options.
Executes method of smart-contract and resolve the promise when the transaction is included in the block.
Smart-contract method returned value.
Address of smart-contract which method is to be executed.
Abi of smart-contract which method is to be executed.
Method name to execute.
Method arguments.
Optional
options: EvmTransactionOptions = {}Additional options.
Gets currently selected blockchain in wallet.
Sends Eth in transaction and resolve the promise when the transaction is included in the block.
Transaction receipt.
Eth receiver address.
Optional
options: EvmTransactionOptions = {}Additional options.
Tries to execute method of smart-contract and resolve the promise when the transaction is included in the block or rejects the error.
Address of smart-contract which method is to be executed.
Abi of smart-contract which method is to be executed.
Method name to execute.
Method arguments.
Optional
options: EvmTransactionOptions = {}Additional options.
Optional
allowError: ((err: Web3Error) => boolean)Check error and decides to execute contact if error is allowed.
Tries to send Eth in transaction and resolve the promise when the transaction is included in the block or rejects the error.
Transaction receipt.
Eth receiver address.
Optional
options: EvmTransactionOptionsAdditional options.
Static
parseParses web3 error by its code or message.
Web3 error to parse.
Static
stringifyGenerated using TypeDoc
Class containing methods for executing the functions of contracts and sending transactions in order to change the state of the blockchain. To get information from the blockchain use Web3Public.