ERC1155Contract class
ERC-1155 multi-token contract implementation.
Constructors
- ERC1155Contract({required String address, required PublicClient publicClient, WalletClient? walletClient})
Properties
- address → String
-
The contract address.
finalinherited
-
errors
→ List<
AbiError> -
The contract errors.
finalinherited
-
events
→ List<
AbiEvent> -
The contract events.
finalinherited
-
functions
→ List<
AbiFunction> -
The contract functions.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- publicClient → PublicClient
-
The public client for read operations.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- walletClient → WalletClient?
-
The wallet client for write operations (optional).
finalinherited
Methods
-
approvalForAllFilter(
{String? account, String? operator}) → EventFilter - Creates a filter for ApprovalForAll events.
-
balanceOf(
String account, BigInt id) → Future< BigInt> - Gets the balance of a token type for an account.
-
balanceOfBatch(
List< String> accounts, List<BigInt> ids) → Future<List< BigInt> > - Gets the balances of multiple token types for multiple accounts.
-
createEventFilter(
String eventName, {Map< String, dynamic> ? indexedArgs, String? fromBlock, String? toBlock}) → EventFilter -
Creates an event filter for the specified event.
inherited
-
decodeError(
Uint8List data) → String? -
Decodes an error from revert data.
inherited
-
decodeEventLog(
Log log) → Map< String, dynamic> ? -
Decodes an event log.
inherited
-
estimateGas(
String functionName, List args, {String? from, BigInt? value}) → Future< BigInt> -
Estimates gas for a contract function call.
inherited
-
isApprovedForAll(
String account, String operator) → Future< bool> - Checks if an operator is approved for all tokens of an account.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String functionName, List args, [String block = 'latest']) → Future< List> -
Executes a read-only contract function call.
inherited
-
safeBatchTransferFrom(
String from, String to, List< BigInt> ids, List<BigInt> amounts, [String data = '0x']) → Future<String> - Safely transfers multiple token types in batch.
-
safeTransferFrom(
String from, String to, BigInt id, BigInt amount, [String data = '0x']) → Future< String> - Safely transfers a single token type.
-
setApprovalForAll(
String operator, bool approved) → Future< String> - Sets approval for all tokens.
-
simulate(
String functionName, List args, {String? from, BigInt? value, String block = 'latest'}) → Future< SimulateResult> -
Simulates a contract function call.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transferBatchFilter(
{String? operator, String? from, String? to}) → EventFilter - Creates a filter for TransferBatch events.
-
transferSingleFilter(
{String? operator, String? from, String? to}) → EventFilter - Creates a filter for TransferSingle events.
-
uri(
BigInt id) → Future< String> - Gets the URI for a token type.
-
uriFilter(
{BigInt? id}) → EventFilter - Creates a filter for URI events.
-
write(
String functionName, List args, {BigInt? value, BigInt? gasLimit, BigInt? gasPrice, BigInt? maxFeePerGas, BigInt? maxPriorityFeePerGas}) → Future< String> -
Executes a state-changing contract function.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited