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 declare namespace DefaultMessageReceiver { type ActionStruct = { nativeValue: BigNumberish; callTo: string; approveTo: string; tokenSend: string; tokenReceive: string; data: BytesLike; }; type ActionStructOutput = [ BigNumber, string, string, string, string, string ] & { nativeValue: BigNumber; callTo: string; approveTo: string; tokenSend: string; tokenReceive: string; data: string; }; } export interface DefaultMessageReceiverInterface extends utils.Interface { contractName: "DefaultMessageReceiver"; functions: { "DEFAULT_ADMIN_ROLE()": FunctionFragment; "SYGMA_HANDLER_ROLE()": FunctionFragment; "_recoverGas()": FunctionFragment; "getRoleAdmin(bytes32)": FunctionFragment; "getRoleMember(bytes32,uint256)": FunctionFragment; "getRoleMemberCount(bytes32)": FunctionFragment; "getRoleMemberIndex(bytes32,address)": FunctionFragment; "grantRole(bytes32,address)": FunctionFragment; "hasRole(bytes32,address)": FunctionFragment; "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": FunctionFragment; "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; "onERC721Received(address,address,uint256,bytes)": FunctionFragment; "renounceRole(bytes32,address)": FunctionFragment; "revokeRole(bytes32,address)": FunctionFragment; "supportsInterface(bytes4)": FunctionFragment; "handleSygmaMessage(address,uint256,bytes)": FunctionFragment; "performActions(address,address,uint256,(uint256,address,address,address,address,bytes)[])": FunctionFragment; "transferBalanceAction(address,address)": FunctionFragment; }; encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string; encodeFunctionData(functionFragment: "SYGMA_HANDLER_ROLE", values?: undefined): string; encodeFunctionData(functionFragment: "_recoverGas", values?: undefined): string; encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string; encodeFunctionData(functionFragment: "getRoleMember", values: [BytesLike, BigNumberish]): string; encodeFunctionData(functionFragment: "getRoleMemberCount", values: [BytesLike]): string; encodeFunctionData(functionFragment: "getRoleMemberIndex", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "onERC1155BatchReceived", values: [string, string, BigNumberish[], BigNumberish[], BytesLike]): string; encodeFunctionData(functionFragment: "onERC1155Received", values: [string, string, BigNumberish, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "onERC721Received", values: [string, string, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; encodeFunctionData(functionFragment: "handleSygmaMessage", values: [string, BigNumberish, BytesLike]): string; encodeFunctionData(functionFragment: "performActions", values: [ string, string, BigNumberish, DefaultMessageReceiver.ActionStruct[] ]): string; encodeFunctionData(functionFragment: "transferBalanceAction", values: [string, string]): string; decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result; decodeFunctionResult(functionFragment: "SYGMA_HANDLER_ROLE", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_recoverGas", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getRoleMember", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getRoleMemberCount", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getRoleMemberIndex", data: BytesLike): Result; decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155BatchReceived", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; decodeFunctionResult(functionFragment: "onERC721Received", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; decodeFunctionResult(functionFragment: "handleSygmaMessage", data: BytesLike): Result; decodeFunctionResult(functionFragment: "performActions", data: BytesLike): Result; decodeFunctionResult(functionFragment: "transferBalanceAction", data: BytesLike): Result; events: { "Executed(bytes32,address,address,uint256)": EventFragment; "RoleGranted(bytes32,address,address)": EventFragment; "RoleRevoked(bytes32,address,address)": EventFragment; "TransferRecovered(bytes32,address,address,uint256)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "Executed"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; getEvent(nameOrSignatureOrTopic: "TransferRecovered"): EventFragment; } export declare type ExecutedEvent = TypedEvent<[ string, string, string, BigNumber ], { transactionId: string; tokenSend: string; receiver: string; amount: BigNumber; }>; export declare type ExecutedEventFilter = 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 TransferRecoveredEvent = TypedEvent<[ string, string, string, BigNumber ], { transactionId: string; tokenSend: string; receiver: string; amount: BigNumber; }>; export declare type TransferRecoveredEventFilter = TypedEventFilter; export interface DefaultMessageReceiver extends BaseContract { contractName: "DefaultMessageReceiver"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: DefaultMessageReceiverInterface; 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]>; SYGMA_HANDLER_ROLE(overrides?: CallOverrides): Promise<[string]>; _recoverGas(overrides?: CallOverrides): Promise<[BigNumber]>; /** * 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]>; /** * Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information. */ getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise<[string]>; /** * Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role. */ getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise<[BigNumber]>; /** * Returns the index of the account that have `role`. */ getRoleMemberIndex(role: BytesLike, account: string, overrides?: CallOverrides): Promise<[BigNumber]>; /** * 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]>; 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; /** * See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`. */ onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: Overrides & { from?: string | Promise; }): 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 granted `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]>; /** * Users have to understand the design and limitations behind the Actions processing. The contract will try to return all the leftover tokens and native token to the receiver address. This logic is applied to the native token if there was a balance increase during the message processing, then to the tokenSent which is received from Sygma proposal and finally to every Action.tokenReceive. In the vast majority of cases that would be enough, though user can come up with a scenario where an Action produces results in a receival of more than one token, while only one could be specified in this particular Action.tokenReceive property. In such a case it is a users responsibility to either send it all with a transferBalanceAction() Action or to include an extra action[s] with tokenReceive set to each of the tokens received. * @param amount Amount of the token sent along or prior to calling this function. * @param message User generated execution command which consists of {transactionId} an arbitrary identifier. {actions} array of Action items that allow generic logic execution. {receiver} a fallback address that will receive any leftovers after either success of fail. * @param tokenSent Optional address of the token sent along or prior to calling this function. */ handleSygmaMessage(tokenSent: string, amount: BigNumberish, message: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; performActions(tokenSent: string, receiver: string, startingNativeBalance: BigNumberish, actions: DefaultMessageReceiver.ActionStruct[], overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Helper function that could be used as an Action to itself to transfer whole balance of a particular token. * @param receiver Address that should receive the whole balance. * @param token Address of the ERC20 token or 0x0 for native token. */ transferBalanceAction(token: string, receiver: string, overrides?: Overrides & { from?: string | Promise; }): Promise; }; DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; SYGMA_HANDLER_ROLE(overrides?: CallOverrides): Promise; _recoverGas(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; /** * Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information. */ getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role. */ getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise; /** * Returns the index of the account that have `role`. */ getRoleMemberIndex(role: BytesLike, account: string, 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; 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; /** * See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`. */ onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: Overrides & { from?: string | Promise; }): 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 granted `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; /** * Users have to understand the design and limitations behind the Actions processing. The contract will try to return all the leftover tokens and native token to the receiver address. This logic is applied to the native token if there was a balance increase during the message processing, then to the tokenSent which is received from Sygma proposal and finally to every Action.tokenReceive. In the vast majority of cases that would be enough, though user can come up with a scenario where an Action produces results in a receival of more than one token, while only one could be specified in this particular Action.tokenReceive property. In such a case it is a users responsibility to either send it all with a transferBalanceAction() Action or to include an extra action[s] with tokenReceive set to each of the tokens received. * @param amount Amount of the token sent along or prior to calling this function. * @param message User generated execution command which consists of {transactionId} an arbitrary identifier. {actions} array of Action items that allow generic logic execution. {receiver} a fallback address that will receive any leftovers after either success of fail. * @param tokenSent Optional address of the token sent along or prior to calling this function. */ handleSygmaMessage(tokenSent: string, amount: BigNumberish, message: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; performActions(tokenSent: string, receiver: string, startingNativeBalance: BigNumberish, actions: DefaultMessageReceiver.ActionStruct[], overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Helper function that could be used as an Action to itself to transfer whole balance of a particular token. * @param receiver Address that should receive the whole balance. * @param token Address of the ERC20 token or 0x0 for native token. */ transferBalanceAction(token: string, receiver: string, overrides?: Overrides & { from?: string | Promise; }): Promise; callStatic: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; SYGMA_HANDLER_ROLE(overrides?: CallOverrides): Promise; _recoverGas(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; /** * Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information. */ getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role. */ getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise; /** * Returns the index of the account that have `role`. */ getRoleMemberIndex(role: BytesLike, account: string, 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; 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; /** * See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`. */ onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, 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 granted `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; /** * Users have to understand the design and limitations behind the Actions processing. The contract will try to return all the leftover tokens and native token to the receiver address. This logic is applied to the native token if there was a balance increase during the message processing, then to the tokenSent which is received from Sygma proposal and finally to every Action.tokenReceive. In the vast majority of cases that would be enough, though user can come up with a scenario where an Action produces results in a receival of more than one token, while only one could be specified in this particular Action.tokenReceive property. In such a case it is a users responsibility to either send it all with a transferBalanceAction() Action or to include an extra action[s] with tokenReceive set to each of the tokens received. * @param amount Amount of the token sent along or prior to calling this function. * @param message User generated execution command which consists of {transactionId} an arbitrary identifier. {actions} array of Action items that allow generic logic execution. {receiver} a fallback address that will receive any leftovers after either success of fail. * @param tokenSent Optional address of the token sent along or prior to calling this function. */ handleSygmaMessage(tokenSent: string, amount: BigNumberish, message: BytesLike, overrides?: CallOverrides): Promise; performActions(tokenSent: string, receiver: string, startingNativeBalance: BigNumberish, actions: DefaultMessageReceiver.ActionStruct[], overrides?: CallOverrides): Promise; /** * Helper function that could be used as an Action to itself to transfer whole balance of a particular token. * @param receiver Address that should receive the whole balance. * @param token Address of the ERC20 token or 0x0 for native token. */ transferBalanceAction(token: string, receiver: string, overrides?: CallOverrides): Promise; }; filters: { "Executed(bytes32,address,address,uint256)"(transactionId?: null, tokenSend?: null, receiver?: null, amount?: null): ExecutedEventFilter; Executed(transactionId?: null, tokenSend?: null, receiver?: null, amount?: null): ExecutedEventFilter; "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; "TransferRecovered(bytes32,address,address,uint256)"(transactionId?: null, tokenSend?: null, receiver?: null, amount?: null): TransferRecoveredEventFilter; TransferRecovered(transactionId?: null, tokenSend?: null, receiver?: null, amount?: null): TransferRecoveredEventFilter; }; estimateGas: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; SYGMA_HANDLER_ROLE(overrides?: CallOverrides): Promise; _recoverGas(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; /** * Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information. */ getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role. */ getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise; /** * Returns the index of the account that have `role`. */ getRoleMemberIndex(role: BytesLike, account: string, 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; 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; /** * See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`. */ onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: Overrides & { from?: string | Promise; }): 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 granted `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; /** * Users have to understand the design and limitations behind the Actions processing. The contract will try to return all the leftover tokens and native token to the receiver address. This logic is applied to the native token if there was a balance increase during the message processing, then to the tokenSent which is received from Sygma proposal and finally to every Action.tokenReceive. In the vast majority of cases that would be enough, though user can come up with a scenario where an Action produces results in a receival of more than one token, while only one could be specified in this particular Action.tokenReceive property. In such a case it is a users responsibility to either send it all with a transferBalanceAction() Action or to include an extra action[s] with tokenReceive set to each of the tokens received. * @param amount Amount of the token sent along or prior to calling this function. * @param message User generated execution command which consists of {transactionId} an arbitrary identifier. {actions} array of Action items that allow generic logic execution. {receiver} a fallback address that will receive any leftovers after either success of fail. * @param tokenSent Optional address of the token sent along or prior to calling this function. */ handleSygmaMessage(tokenSent: string, amount: BigNumberish, message: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; performActions(tokenSent: string, receiver: string, startingNativeBalance: BigNumberish, actions: DefaultMessageReceiver.ActionStruct[], overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Helper function that could be used as an Action to itself to transfer whole balance of a particular token. * @param receiver Address that should receive the whole balance. * @param token Address of the ERC20 token or 0x0 for native token. */ transferBalanceAction(token: string, receiver: string, overrides?: Overrides & { from?: string | Promise; }): Promise; }; populateTransaction: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; SYGMA_HANDLER_ROLE(overrides?: CallOverrides): Promise; _recoverGas(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; /** * Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information. */ getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise; /** * Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role. */ getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise; /** * Returns the index of the account that have `role`. */ getRoleMemberIndex(role: BytesLike, account: string, 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; 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; /** * See {IERC721Receiver-onERC721Received}. Always returns `IERC721Receiver.onERC721Received.selector`. */ onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: Overrides & { from?: string | Promise; }): 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 granted `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; /** * Users have to understand the design and limitations behind the Actions processing. The contract will try to return all the leftover tokens and native token to the receiver address. This logic is applied to the native token if there was a balance increase during the message processing, then to the tokenSent which is received from Sygma proposal and finally to every Action.tokenReceive. In the vast majority of cases that would be enough, though user can come up with a scenario where an Action produces results in a receival of more than one token, while only one could be specified in this particular Action.tokenReceive property. In such a case it is a users responsibility to either send it all with a transferBalanceAction() Action or to include an extra action[s] with tokenReceive set to each of the tokens received. * @param amount Amount of the token sent along or prior to calling this function. * @param message User generated execution command which consists of {transactionId} an arbitrary identifier. {actions} array of Action items that allow generic logic execution. {receiver} a fallback address that will receive any leftovers after either success of fail. * @param tokenSent Optional address of the token sent along or prior to calling this function. */ handleSygmaMessage(tokenSent: string, amount: BigNumberish, message: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; performActions(tokenSent: string, receiver: string, startingNativeBalance: BigNumberish, actions: DefaultMessageReceiver.ActionStruct[], overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Helper function that could be used as an Action to itself to transfer whole balance of a particular token. * @param receiver Address that should receive the whole balance. * @param token Address of the ERC20 token or 0x0 for native token. */ transferBalanceAction(token: string, receiver: string, overrides?: Overrides & { from?: string | Promise; }): Promise; }; }