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 declare namespace ERCHandlerHelpers { type DecimalsStruct = { isSet: boolean; externalDecimals: BigNumberish; }; type DecimalsStructOutput = [boolean, number] & { isSet: boolean; externalDecimals: number; }; } export interface ERC1155HandlerInterface extends utils.Interface { contractName: "ERC1155Handler"; functions: { "_bridgeAddress()": FunctionFragment; "_resourceIDToTokenContractAddress(bytes32)": FunctionFragment; "_tokenContractAddressToTokenProperties(address)": FunctionFragment; "defaultDecimals()": FunctionFragment; "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; "setBurnable(address)": FunctionFragment; "supportsInterface(bytes4)": FunctionFragment; "deposit(bytes32,address,bytes)": FunctionFragment; "executeProposal(bytes32,bytes)": FunctionFragment; "withdraw(bytes)": FunctionFragment; "setResource(bytes32,address,bytes)": FunctionFragment; }; encodeFunctionData(functionFragment: "_bridgeAddress", values?: undefined): string; encodeFunctionData(functionFragment: "_resourceIDToTokenContractAddress", values: [BytesLike]): string; encodeFunctionData(functionFragment: "_tokenContractAddressToTokenProperties", values: [string]): string; encodeFunctionData(functionFragment: "defaultDecimals", values?: undefined): string; encodeFunctionData(functionFragment: "onERC1155BatchReceived", values: [string, string, BigNumberish[], BigNumberish[], BytesLike]): string; encodeFunctionData(functionFragment: "onERC1155Received", values: [string, string, BigNumberish, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "setBurnable", values: [string]): string; encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; encodeFunctionData(functionFragment: "deposit", values: [BytesLike, string, BytesLike]): string; encodeFunctionData(functionFragment: "executeProposal", values: [BytesLike, BytesLike]): string; encodeFunctionData(functionFragment: "withdraw", values: [BytesLike]): string; encodeFunctionData(functionFragment: "setResource", values: [BytesLike, string, BytesLike]): string; decodeFunctionResult(functionFragment: "_bridgeAddress", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_resourceIDToTokenContractAddress", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_tokenContractAddressToTokenProperties", data: BytesLike): Result; decodeFunctionResult(functionFragment: "defaultDecimals", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155BatchReceived", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setBurnable", data: BytesLike): Result; decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; decodeFunctionResult(functionFragment: "executeProposal", data: BytesLike): Result; decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setResource", data: BytesLike): Result; events: {}; } export interface ERC1155Handler extends BaseContract { contractName: "ERC1155Handler"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: ERC1155HandlerInterface; 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: { _bridgeAddress(overrides?: CallOverrides): Promise<[string]>; /** * Exposing getter for {_resourceIDToTokenContractAddress}. */ _resourceIDToTokenContractAddress(arg0: BytesLike, overrides?: CallOverrides): Promise<[string]>; _tokenContractAddressToTokenProperties(arg0: string, overrides?: CallOverrides): Promise<[ string, boolean, boolean, ERCHandlerHelpers.DecimalsStructOutput ] & { resourceID: string; isWhitelisted: boolean; isBurnable: boolean; decimals: ERCHandlerHelpers.DecimalsStructOutput; }>; defaultDecimals(overrides?: CallOverrides): Promise<[number]>; onERC1155BatchReceived(arg0: string, arg1: string, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * First verifies {contractAddress} is whitelisted, then sets {_tokenContractAddressToTokenProperties[contractAddress].isBurnable} to true. * @param contractAddress Address of contract to be used when making or executing deposits. */ setBurnable(contractAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; /** * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded arrays of tokenIDs and amounts. * @param depositor Address of account making the deposit in the Bridge contract. * @param resourceID ResourceID used to find address of token to be used for deposit. */ deposit(resourceID: BytesLike, depositor: string, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded {tokenIDs}, {amounts}, {recipient}, and {transferData} of types uint[], uint[], bytes, bytes. * @param resourceID ResourceID to be used when making deposits. */ executeProposal(resourceID: BytesLike, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Used to manually release ERC1155 tokens from ERC1155Safe. * @param data Consists of ABI-encoded {tokenAddress}, {recipient}, {tokenIDs}, {amounts}, and {transferData} of types address, address, uint[], uint[], bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[tokenAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[tokenAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. Reverts if {contractAddress} doesn't support {IERC1155}. * @param args Additional data to be passed to specified handler. * @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed. * @param resourceID ResourceID to be used when making deposits. */ setResource(resourceID: BytesLike, contractAddress: string, args: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; }; _bridgeAddress(overrides?: CallOverrides): Promise; /** * Exposing getter for {_resourceIDToTokenContractAddress}. */ _resourceIDToTokenContractAddress(arg0: BytesLike, overrides?: CallOverrides): Promise; _tokenContractAddressToTokenProperties(arg0: string, overrides?: CallOverrides): Promise<[ string, boolean, boolean, ERCHandlerHelpers.DecimalsStructOutput ] & { resourceID: string; isWhitelisted: boolean; isBurnable: boolean; decimals: ERCHandlerHelpers.DecimalsStructOutput; }>; defaultDecimals(overrides?: CallOverrides): Promise; onERC1155BatchReceived(arg0: string, arg1: string, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * First verifies {contractAddress} is whitelisted, then sets {_tokenContractAddressToTokenProperties[contractAddress].isBurnable} to true. * @param contractAddress Address of contract to be used when making or executing deposits. */ setBurnable(contractAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded arrays of tokenIDs and amounts. * @param depositor Address of account making the deposit in the Bridge contract. * @param resourceID ResourceID used to find address of token to be used for deposit. */ deposit(resourceID: BytesLike, depositor: string, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded {tokenIDs}, {amounts}, {recipient}, and {transferData} of types uint[], uint[], bytes, bytes. * @param resourceID ResourceID to be used when making deposits. */ executeProposal(resourceID: BytesLike, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Used to manually release ERC1155 tokens from ERC1155Safe. * @param data Consists of ABI-encoded {tokenAddress}, {recipient}, {tokenIDs}, {amounts}, and {transferData} of types address, address, uint[], uint[], bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[tokenAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[tokenAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. Reverts if {contractAddress} doesn't support {IERC1155}. * @param args Additional data to be passed to specified handler. * @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed. * @param resourceID ResourceID to be used when making deposits. */ setResource(resourceID: BytesLike, contractAddress: string, args: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; callStatic: { _bridgeAddress(overrides?: CallOverrides): Promise; /** * Exposing getter for {_resourceIDToTokenContractAddress}. */ _resourceIDToTokenContractAddress(arg0: BytesLike, overrides?: CallOverrides): Promise; _tokenContractAddressToTokenProperties(arg0: string, overrides?: CallOverrides): Promise<[ string, boolean, boolean, ERCHandlerHelpers.DecimalsStructOutput ] & { resourceID: string; isWhitelisted: boolean; isBurnable: boolean; decimals: ERCHandlerHelpers.DecimalsStructOutput; }>; defaultDecimals(overrides?: CallOverrides): Promise; onERC1155BatchReceived(arg0: string, arg1: string, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike, overrides?: CallOverrides): Promise; onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; /** * First verifies {contractAddress} is whitelisted, then sets {_tokenContractAddressToTokenProperties[contractAddress].isBurnable} to true. * @param contractAddress Address of contract to be used when making or executing deposits. */ setBurnable(contractAddress: string, overrides?: CallOverrides): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded arrays of tokenIDs and amounts. * @param depositor Address of account making the deposit in the Bridge contract. * @param resourceID ResourceID used to find address of token to be used for deposit. */ deposit(resourceID: BytesLike, depositor: string, data: BytesLike, overrides?: CallOverrides): Promise; /** * Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded {tokenIDs}, {amounts}, {recipient}, and {transferData} of types uint[], uint[], bytes, bytes. * @param resourceID ResourceID to be used when making deposits. */ executeProposal(resourceID: BytesLike, data: BytesLike, overrides?: CallOverrides): Promise; /** * Used to manually release ERC1155 tokens from ERC1155Safe. * @param data Consists of ABI-encoded {tokenAddress}, {recipient}, {tokenIDs}, {amounts}, and {transferData} of types address, address, uint[], uint[], bytes. */ withdraw(data: BytesLike, overrides?: CallOverrides): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[tokenAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[tokenAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. Reverts if {contractAddress} doesn't support {IERC1155}. * @param args Additional data to be passed to specified handler. * @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed. * @param resourceID ResourceID to be used when making deposits. */ setResource(resourceID: BytesLike, contractAddress: string, args: BytesLike, overrides?: CallOverrides): Promise; }; filters: {}; estimateGas: { _bridgeAddress(overrides?: CallOverrides): Promise; /** * Exposing getter for {_resourceIDToTokenContractAddress}. */ _resourceIDToTokenContractAddress(arg0: BytesLike, overrides?: CallOverrides): Promise; _tokenContractAddressToTokenProperties(arg0: string, overrides?: CallOverrides): Promise; defaultDecimals(overrides?: CallOverrides): Promise; onERC1155BatchReceived(arg0: string, arg1: string, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * First verifies {contractAddress} is whitelisted, then sets {_tokenContractAddressToTokenProperties[contractAddress].isBurnable} to true. * @param contractAddress Address of contract to be used when making or executing deposits. */ setBurnable(contractAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded arrays of tokenIDs and amounts. * @param depositor Address of account making the deposit in the Bridge contract. * @param resourceID ResourceID used to find address of token to be used for deposit. */ deposit(resourceID: BytesLike, depositor: string, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded {tokenIDs}, {amounts}, {recipient}, and {transferData} of types uint[], uint[], bytes, bytes. * @param resourceID ResourceID to be used when making deposits. */ executeProposal(resourceID: BytesLike, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Used to manually release ERC1155 tokens from ERC1155Safe. * @param data Consists of ABI-encoded {tokenAddress}, {recipient}, {tokenIDs}, {amounts}, and {transferData} of types address, address, uint[], uint[], bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[tokenAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[tokenAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. Reverts if {contractAddress} doesn't support {IERC1155}. * @param args Additional data to be passed to specified handler. * @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed. * @param resourceID ResourceID to be used when making deposits. */ setResource(resourceID: BytesLike, contractAddress: string, args: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; }; populateTransaction: { _bridgeAddress(overrides?: CallOverrides): Promise; /** * Exposing getter for {_resourceIDToTokenContractAddress}. */ _resourceIDToTokenContractAddress(arg0: BytesLike, overrides?: CallOverrides): Promise; _tokenContractAddressToTokenProperties(arg0: string, overrides?: CallOverrides): Promise; defaultDecimals(overrides?: CallOverrides): Promise; onERC1155BatchReceived(arg0: string, arg1: string, arg2: BigNumberish[], arg3: BigNumberish[], arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * First verifies {contractAddress} is whitelisted, then sets {_tokenContractAddressToTokenProperties[contractAddress].isBurnable} to true. * @param contractAddress Address of contract to be used when making or executing deposits. */ setBurnable(contractAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded arrays of tokenIDs and amounts. * @param depositor Address of account making the deposit in the Bridge contract. * @param resourceID ResourceID used to find address of token to be used for deposit. */ deposit(resourceID: BytesLike, depositor: string, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain.Data passed into the function should be constructed as ABI encoding of: tokenIDs uint256[] bytes amounts uint256[] bytes destinationRecipientAddress bytes bytes transferData bytes bytes * @param data Consists of ABI-encoded {tokenIDs}, {amounts}, {recipient}, and {transferData} of types uint[], uint[], bytes, bytes. * @param resourceID ResourceID to be used when making deposits. */ executeProposal(resourceID: BytesLike, data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Used to manually release ERC1155 tokens from ERC1155Safe. * @param data Consists of ABI-encoded {tokenAddress}, {recipient}, {tokenIDs}, {amounts}, and {transferData} of types address, address, uint[], uint[], bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[tokenAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[tokenAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. Reverts if {contractAddress} doesn't support {IERC1155}. * @param args Additional data to be passed to specified handler. * @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed. * @param resourceID ResourceID to be used when making deposits. */ setResource(resourceID: BytesLike, contractAddress: string, args: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; }; }