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 XC20HandlerInterface extends utils.Interface { contractName: "XC20Handler"; functions: { "_bridgeAddress()": FunctionFragment; "_resourceIDToTokenContractAddress(bytes32)": FunctionFragment; "_tokenContractAddressToTokenProperties(address)": FunctionFragment; "defaultDecimals()": FunctionFragment; "setBurnable(address)": 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: "setBurnable", values: [string]): 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: "setBurnable", 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 XC20Handler extends BaseContract { contractName: "XC20Handler"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: XC20HandlerInterface; 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]>; /** * 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; /** * Depending if the corresponding {tokenAddress} for the parsed {resourceID} is marked true in {_tokenContractAddressToTokenProperties[tokenAddress].isBurnable}, deposited tokens will be burned, if not, they will be locked. * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {amount} padded to 32 bytes. * @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 follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {resourceID}, {amount}, {lenDestinationRecipientAddress}, and {destinationRecipientAddress} all padded to 32 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 ERC20 tokens from ERC20Safe.Data passed into the function should be constructed as follows: tokenAddress address bytes 0 - 32 recipient address bytes 32 - 64 amount uint bytes 64 - 96 * @param data Consists of {tokenAddress}, {recipient}, and {amount} all padded to 32 bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[contractAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[contractAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. * @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; /** * 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; /** * Depending if the corresponding {tokenAddress} for the parsed {resourceID} is marked true in {_tokenContractAddressToTokenProperties[tokenAddress].isBurnable}, deposited tokens will be burned, if not, they will be locked. * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {amount} padded to 32 bytes. * @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 follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {resourceID}, {amount}, {lenDestinationRecipientAddress}, and {destinationRecipientAddress} all padded to 32 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 ERC20 tokens from ERC20Safe.Data passed into the function should be constructed as follows: tokenAddress address bytes 0 - 32 recipient address bytes 32 - 64 amount uint bytes 64 - 96 * @param data Consists of {tokenAddress}, {recipient}, and {amount} all padded to 32 bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[contractAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[contractAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. * @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; /** * 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; /** * Depending if the corresponding {tokenAddress} for the parsed {resourceID} is marked true in {_tokenContractAddressToTokenProperties[tokenAddress].isBurnable}, deposited tokens will be burned, if not, they will be locked. * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {amount} padded to 32 bytes. * @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 follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {resourceID}, {amount}, {lenDestinationRecipientAddress}, and {destinationRecipientAddress} all padded to 32 bytes. * @param resourceID ResourceID to be used when making deposits. */ executeProposal(resourceID: BytesLike, data: BytesLike, overrides?: CallOverrides): Promise; /** * Used to manually release ERC20 tokens from ERC20Safe.Data passed into the function should be constructed as follows: tokenAddress address bytes 0 - 32 recipient address bytes 32 - 64 amount uint bytes 64 - 96 * @param data Consists of {tokenAddress}, {recipient}, and {amount} all padded to 32 bytes. */ withdraw(data: BytesLike, overrides?: CallOverrides): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[contractAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[contractAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. * @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; /** * 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; /** * Depending if the corresponding {tokenAddress} for the parsed {resourceID} is marked true in {_tokenContractAddressToTokenProperties[tokenAddress].isBurnable}, deposited tokens will be burned, if not, they will be locked. * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {amount} padded to 32 bytes. * @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 follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {resourceID}, {amount}, {lenDestinationRecipientAddress}, and {destinationRecipientAddress} all padded to 32 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 ERC20 tokens from ERC20Safe.Data passed into the function should be constructed as follows: tokenAddress address bytes 0 - 32 recipient address bytes 32 - 64 amount uint bytes 64 - 96 * @param data Consists of {tokenAddress}, {recipient}, and {amount} all padded to 32 bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[contractAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[contractAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. * @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; /** * 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; /** * Depending if the corresponding {tokenAddress} for the parsed {resourceID} is marked true in {_tokenContractAddressToTokenProperties[tokenAddress].isBurnable}, deposited tokens will be burned, if not, they will be locked. * A deposit is initiated by making a deposit in the Bridge contract.Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {amount} padded to 32 bytes. * @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 follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END * @param data Consists of {resourceID}, {amount}, {lenDestinationRecipientAddress}, and {destinationRecipientAddress} all padded to 32 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 ERC20 tokens from ERC20Safe.Data passed into the function should be constructed as follows: tokenAddress address bytes 0 - 32 recipient address bytes 32 - 64 amount uint bytes 64 - 96 * @param data Consists of {tokenAddress}, {recipient}, and {amount} all padded to 32 bytes. */ withdraw(data: BytesLike, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets {_resourceIDToContractAddress} with {contractAddress}, {_tokenContractAddressToTokenProperties[contractAddress].resourceID} with {resourceID} and {_tokenContractAddressToTokenProperties[contractAddress].isWhitelisted} to true for {contractAddress} in ERCHandlerHelpers contract. * @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; }; }