ContractERC1155 class

Dart Class for ERC1155 Contract, A standard API for fungibility-agnostic and gas-efficient tokens within smart contracts.

Implementers

Constructors

ContractERC1155(String address, dynamic providerOrSigner, [dynamic abi])
Instantiate ERC1155 Contract using default abi if abi is not null.

Properties

contract Contract
Ethers Contract object.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

approvalForAllEvents([List? args, dynamic startBlock, dynamic endBlock]) Future<List<Event>>
Log of ApprovalForAll events.
balanceOf(String address, int id) Future<BigInt>
Returns the amount of tokens id owned by address
balanceOfBatch(List<String> addresses, List<int> ids) Future<List<BigInt>>
Returns the amount of tokens ids owned by addresses
balanceOfBatchSingleAddress(String address, List<int> ids) Future<List<BigInt>>
Returns the amount of tokens ids owned by address
connect(dynamic providerOrSigner) → void
Connect current contract with providerOrSigner
isApprovedForAll(String owner, String spender) Future<bool>
Returns true if spender is approved to transfer owner tokens
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onApprovalForAll(void callback(String account, String operator, Event event)) → void
Emitted when account grants or revokes permission to operator to transfer their tokens, according to approved.
onTransferBatch(void callback(String operator, String from, String to, Event event)) → void
Equivalent to multiple TransferSingle events, where operator, from and to are the same for all transfers.
onTransferSingle(void callback(String operator, String from, String to, Event event)) → void
Emitted when value tokens of token type id are transferred from from to to by operator.
safeBatchTransferFrom(String from, String to, List<int> id, List<BigInt> amount, String data) Future<TransactionResponse>
Batched version of safeTransferFrom.
safeTransferFrom(String from, String to, int id, BigInt amount, String data) Future<TransactionResponse>
Transfers amount tokens of token type id from from to to.
setApprovedForAll(String spender, bool approved) Future<TransactionResponse>
Grants or revokes permission to spender to transfer the caller's tokens, according to approved,
toString() String
A string representation of this object.
inherited
transferBatchEvents([List? args, dynamic startBlock, dynamic endBlock]) Future<List<Event>>
Log of TransferBatch events.
transferSingleEvents([List? args, dynamic startBlock, dynamic endBlock]) Future<List<Event>>
Log of TransferSingle events.
uri(int id) FutureOr<String>
Returns the URI for token type id.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

abi → const List<String>
Minimal abi interface of ERC1155