import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; import { FunctionFragment, Result } from "@ethersproject/abi"; import { Listener, Provider } from "@ethersproject/providers"; import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; export interface IERC1155ReceiverInterface extends utils.Interface { contractName: "IERC1155Receiver"; functions: { "supportsInterface(bytes4)": FunctionFragment; "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; }; encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; encodeFunctionData(functionFragment: "onERC1155Received", values: [string, string, BigNumberish, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "onERC1155BatchReceived", values: [string, string, BigNumberish[], BigNumberish[], BytesLike]): string; decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155BatchReceived", data: BytesLike): Result; events: {}; } export interface IERC1155Receiver extends BaseContract { contractName: "IERC1155Receiver"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: IERC1155ReceiverInterface; queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; listeners(eventFilter?: TypedEventFilter): Array>; listeners(eventName?: string): Array; removeAllListeners(eventFilter: TypedEventFilter): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; once: OnEvent; removeListener: OnEvent; functions: { /** * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; /** * Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param operator The address which initiated the transfer (i.e. msg.sender) * @param value The amount of tokens being transferred */ onERC1155Received(operator: string, from: string, id: BigNumberish, value: BigNumberish, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param values An array containing amounts of each token being transferred (order and length must match ids array) */ onERC1155BatchReceived(operator: string, from: string, ids: BigNumberish[], values: BigNumberish[], data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; }; /** * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param operator The address which initiated the transfer (i.e. msg.sender) * @param value The amount of tokens being transferred */ onERC1155Received(operator: string, from: string, id: BigNumberish, value: BigNumberish, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param values An array containing amounts of each token being transferred (order and length must match ids array) */ onERC1155BatchReceived(operator: string, from: string, ids: BigNumberish[], values: BigNumberish[], data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; callStatic: { /** * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param operator The address which initiated the transfer (i.e. msg.sender) * @param value The amount of tokens being transferred */ onERC1155Received(operator: string, from: string, id: BigNumberish, value: BigNumberish, data: BytesLike, overrides?: CallOverrides): Promise; /** * Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param values An array containing amounts of each token being transferred (order and length must match ids array) */ onERC1155BatchReceived(operator: string, from: string, ids: BigNumberish[], values: BigNumberish[], data: BytesLike, overrides?: CallOverrides): Promise; }; filters: {}; estimateGas: { /** * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param operator The address which initiated the transfer (i.e. msg.sender) * @param value The amount of tokens being transferred */ onERC1155Received(operator: string, from: string, id: BigNumberish, value: BigNumberish, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param values An array containing amounts of each token being transferred (order and length must match ids array) */ onERC1155BatchReceived(operator: string, from: string, ids: BigNumberish[], values: BigNumberish[], data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; }; populateTransaction: { /** * Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param operator The address which initiated the transfer (i.e. msg.sender) * @param value The amount of tokens being transferred */ onERC1155Received(operator: string, from: string, id: BigNumberish, value: BigNumberish, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). * @param data Additional data with no specified format * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param values An array containing amounts of each token being transferred (order and length must match ids array) */ onERC1155BatchReceived(operator: string, from: string, ids: BigNumberish[], values: BigNumberish[], data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; }; }