Skip to main content

ERC1155

Constructor

new ERC1155(config: IContractConfig);
ParamTypeDescription
configIContractConfig





Properties

address

Returns

Type: Address



Methods

balanceOf(account, id)

Parameters

NameTypeDescription
accountstring
idnumber

Returns

Type: Promise<number>

balanceOfBatch(accounts, ids)

Parameters

NameTypeDescription
accountsstring[]
idsnumber[]

Returns

Type: Promise<number[]>

isApprovedForAll(account, operator)

Parameters

NameTypeDescription
accountstring
operatorstring

Returns

Type: Promise<boolean>

safeBatchTransferFrom(args)

Parameters

NameTypeDescription
argsIERC1155SafeBatchTransferFromParams

Returns

Type: ContractOperation

safeTransferFrom(args)

Parameters

NameTypeDescription
argsIERC1155SafeTransferFromParams

Returns

Type: ContractOperation

setApprovalForAll(args)

Parameters

NameTypeDescription
argsIERC1155SetApprovalForAllParams

Returns

Type: ContractOperation

supportsInterface(interfaceId)

Parameters

NameTypeDescription
interfaceIdstring

Returns

Type: Promise<boolean>

uri(id)

See IERC1155MetadataURI-uri.

This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155\#metadata\[defined in the EIP].

Clients calling this function must replace the id substring with the actual token type ID.

Parameters

NameTypeDescription
idnumber

Returns

Type: Promise<string>



Events

ApprovalForAll

Emits

Type: Log & { args: IERC1155ApprovalForAllEventParams }

TransferBatch

Emits

Type: Log & { args: IERC1155TransferBatchEventParams }

TransferSingle

Emits

Type: Log & { args: IERC1155TransferSingleEventParams }

URI

Emits

Type: Log & { args: IERC1155URIEventParams }