import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; import { Listener, Provider } from "@ethersproject/providers"; import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; export interface GmpTransferAdapterInterface extends utils.Interface { contractName: "GmpTransferAdapter"; functions: { "DEFAULT_ADMIN_ROLE()": FunctionFragment; "_bridge()": FunctionFragment; "_resourceID()": FunctionFragment; "crossChainTokenPairs(address,uint256)": FunctionFragment; "getRoleAdmin(bytes32)": FunctionFragment; "grantRole(bytes32,address)": FunctionFragment; "hasRole(bytes32,address)": FunctionFragment; "renounceRole(bytes32,address)": FunctionFragment; "revokeRole(bytes32,address)": FunctionFragment; "supportsInterface(bytes4)": FunctionFragment; "deposit(uint8,address,address,uint256)": FunctionFragment; "executeProposal(address,address,address,uint256)": FunctionFragment; "setTokenPairAddress(address,uint8,address)": FunctionFragment; "prepareDepositData(address,address,uint256)": FunctionFragment; }; encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string; encodeFunctionData(functionFragment: "_bridge", values?: undefined): string; encodeFunctionData(functionFragment: "_resourceID", values?: undefined): string; encodeFunctionData(functionFragment: "crossChainTokenPairs", values: [string, BigNumberish]): string; encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string; encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; encodeFunctionData(functionFragment: "deposit", values: [BigNumberish, string, string, BigNumberish]): string; encodeFunctionData(functionFragment: "executeProposal", values: [string, string, string, BigNumberish]): string; encodeFunctionData(functionFragment: "setTokenPairAddress", values: [string, BigNumberish, string]): string; encodeFunctionData(functionFragment: "prepareDepositData", values: [string, string, BigNumberish]): string; decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_bridge", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_resourceID", data: BytesLike): Result; decodeFunctionResult(functionFragment: "crossChainTokenPairs", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result; decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; decodeFunctionResult(functionFragment: "executeProposal", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setTokenPairAddress", data: BytesLike): Result; decodeFunctionResult(functionFragment: "prepareDepositData", data: BytesLike): Result; events: { "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment; "RoleGranted(bytes32,address,address)": EventFragment; "RoleRevoked(bytes32,address,address)": EventFragment; "Withdrawal(address,uint256)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; } export declare type RoleAdminChangedEvent = TypedEvent<[ string, string, string ], { role: string; previousAdminRole: string; newAdminRole: string; }>; export declare type RoleAdminChangedEventFilter = TypedEventFilter; export declare type RoleGrantedEvent = TypedEvent<[ string, string, string ], { role: string; account: string; sender: string; }>; export declare type RoleGrantedEventFilter = TypedEventFilter; export declare type RoleRevokedEvent = TypedEvent<[ string, string, string ], { role: string; account: string; sender: string; }>; export declare type RoleRevokedEventFilter = TypedEventFilter; export declare type WithdrawalEvent = TypedEvent<[ string, BigNumber ], { recipient: string; amount: BigNumber; }>; export declare type WithdrawalEventFilter = TypedEventFilter; export interface GmpTransferAdapter extends BaseContract { contractName: "GmpTransferAdapter"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: GmpTransferAdapterInterface; 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: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>; _bridge(overrides?: CallOverrides): Promise<[string]>; _resourceID(overrides?: CallOverrides): Promise<[string]>; crossChainTokenPairs(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise<[string]>; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<[boolean]>; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; /** * Initiates a transfer using Gmp handler. * @param XERC20Address Address of the tokens that shoul be transferred and burned on source chain. * @param destinationDomainID ID of chain deposit will be bridged to. * @param recipientAddress Address that will receive tokens on destination chain. * @param tokenAmount Amount of tokens that should be transferred. */ deposit(destinationDomainID: BigNumberish, recipientAddress: string, XERC20Address: string, tokenAmount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Executes a GMP deposit proposal on GMP transfer adapter contract. * @param XERC20Address Address of XERC20 contract that will mint tokens on destination chain. * @param amount Amount of tones that should be minted to the recipinet. * @param gmpAdapter Address of the adapter on soruce chain (should be the same address across all chains). * @param recipient Address that will receive tokens. */ executeProposal(gmpAdapter: string, recipient: string, XERC20Address: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; setTokenPairAddress(sourceTokenAddress: string, destinationDomainID: BigNumberish, destinationTokenAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; prepareDepositData(recipientAddress: string, XERC20Address: string, bridgingAmount: BigNumberish, overrides?: CallOverrides): Promise<[string]>; }; DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridge(overrides?: CallOverrides): Promise; _resourceID(overrides?: CallOverrides): Promise; crossChainTokenPairs(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Initiates a transfer using Gmp handler. * @param XERC20Address Address of the tokens that shoul be transferred and burned on source chain. * @param destinationDomainID ID of chain deposit will be bridged to. * @param recipientAddress Address that will receive tokens on destination chain. * @param tokenAmount Amount of tokens that should be transferred. */ deposit(destinationDomainID: BigNumberish, recipientAddress: string, XERC20Address: string, tokenAmount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Executes a GMP deposit proposal on GMP transfer adapter contract. * @param XERC20Address Address of XERC20 contract that will mint tokens on destination chain. * @param amount Amount of tones that should be minted to the recipinet. * @param gmpAdapter Address of the adapter on soruce chain (should be the same address across all chains). * @param recipient Address that will receive tokens. */ executeProposal(gmpAdapter: string, recipient: string, XERC20Address: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; setTokenPairAddress(sourceTokenAddress: string, destinationDomainID: BigNumberish, destinationTokenAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; prepareDepositData(recipientAddress: string, XERC20Address: string, bridgingAmount: BigNumberish, overrides?: CallOverrides): Promise; callStatic: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridge(overrides?: CallOverrides): Promise; _resourceID(overrides?: CallOverrides): Promise; crossChainTokenPairs(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Initiates a transfer using Gmp handler. * @param XERC20Address Address of the tokens that shoul be transferred and burned on source chain. * @param destinationDomainID ID of chain deposit will be bridged to. * @param recipientAddress Address that will receive tokens on destination chain. * @param tokenAmount Amount of tokens that should be transferred. */ deposit(destinationDomainID: BigNumberish, recipientAddress: string, XERC20Address: string, tokenAmount: BigNumberish, overrides?: CallOverrides): Promise; /** * Executes a GMP deposit proposal on GMP transfer adapter contract. * @param XERC20Address Address of XERC20 contract that will mint tokens on destination chain. * @param amount Amount of tones that should be minted to the recipinet. * @param gmpAdapter Address of the adapter on soruce chain (should be the same address across all chains). * @param recipient Address that will receive tokens. */ executeProposal(gmpAdapter: string, recipient: string, XERC20Address: string, amount: BigNumberish, overrides?: CallOverrides): Promise; setTokenPairAddress(sourceTokenAddress: string, destinationDomainID: BigNumberish, destinationTokenAddress: string, overrides?: CallOverrides): Promise; prepareDepositData(recipientAddress: string, XERC20Address: string, bridgingAmount: BigNumberish, overrides?: CallOverrides): Promise; }; filters: { "RoleAdminChanged(bytes32,bytes32,bytes32)"(role?: BytesLike | null, previousAdminRole?: BytesLike | null, newAdminRole?: BytesLike | null): RoleAdminChangedEventFilter; RoleAdminChanged(role?: BytesLike | null, previousAdminRole?: BytesLike | null, newAdminRole?: BytesLike | null): RoleAdminChangedEventFilter; "RoleGranted(bytes32,address,address)"(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleGrantedEventFilter; RoleGranted(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleGrantedEventFilter; "RoleRevoked(bytes32,address,address)"(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleRevokedEventFilter; RoleRevoked(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleRevokedEventFilter; "Withdrawal(address,uint256)"(recipient?: null, amount?: null): WithdrawalEventFilter; Withdrawal(recipient?: null, amount?: null): WithdrawalEventFilter; }; estimateGas: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridge(overrides?: CallOverrides): Promise; _resourceID(overrides?: CallOverrides): Promise; crossChainTokenPairs(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Initiates a transfer using Gmp handler. * @param XERC20Address Address of the tokens that shoul be transferred and burned on source chain. * @param destinationDomainID ID of chain deposit will be bridged to. * @param recipientAddress Address that will receive tokens on destination chain. * @param tokenAmount Amount of tokens that should be transferred. */ deposit(destinationDomainID: BigNumberish, recipientAddress: string, XERC20Address: string, tokenAmount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Executes a GMP deposit proposal on GMP transfer adapter contract. * @param XERC20Address Address of XERC20 contract that will mint tokens on destination chain. * @param amount Amount of tones that should be minted to the recipinet. * @param gmpAdapter Address of the adapter on soruce chain (should be the same address across all chains). * @param recipient Address that will receive tokens. */ executeProposal(gmpAdapter: string, recipient: string, XERC20Address: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; setTokenPairAddress(sourceTokenAddress: string, destinationDomainID: BigNumberish, destinationTokenAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; prepareDepositData(recipientAddress: string, XERC20Address: string, bridgingAmount: BigNumberish, overrides?: CallOverrides): Promise; }; populateTransaction: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridge(overrides?: CallOverrides): Promise; _resourceID(overrides?: CallOverrides): Promise; crossChainTokenPairs(arg0: string, arg1: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}. */ getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; /** * Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. */ grantRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Returns `true` if `account` has been granted `role`. */ hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise; /** * Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. */ renounceRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. */ revokeRole(role: BytesLike, account: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * See {IERC165-supportsInterface}. */ supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise; /** * Initiates a transfer using Gmp handler. * @param XERC20Address Address of the tokens that shoul be transferred and burned on source chain. * @param destinationDomainID ID of chain deposit will be bridged to. * @param recipientAddress Address that will receive tokens on destination chain. * @param tokenAmount Amount of tokens that should be transferred. */ deposit(destinationDomainID: BigNumberish, recipientAddress: string, XERC20Address: string, tokenAmount: BigNumberish, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; /** * Executes a GMP deposit proposal on GMP transfer adapter contract. * @param XERC20Address Address of XERC20 contract that will mint tokens on destination chain. * @param amount Amount of tones that should be minted to the recipinet. * @param gmpAdapter Address of the adapter on soruce chain (should be the same address across all chains). * @param recipient Address that will receive tokens. */ executeProposal(gmpAdapter: string, recipient: string, XERC20Address: string, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; setTokenPairAddress(sourceTokenAddress: string, destinationDomainID: BigNumberish, destinationTokenAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; prepareDepositData(recipientAddress: string, XERC20Address: string, bridgingAmount: BigNumberish, overrides?: CallOverrides): Promise; }; }