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 TwapGenericFeeHandlerInterface extends utils.Interface { contractName: "TwapGenericFeeHandler"; functions: { "DEFAULT_ADMIN_ROLE()": FunctionFragment; "_bridgeAddress()": FunctionFragment; "_feeHandlerRouterAddress()": FunctionFragment; "_gasUsed()": FunctionFragment; "calculateFee(address,uint8,uint8,bytes32,bytes,bytes)": FunctionFragment; "collectFee(address,uint8,uint8,bytes32,bytes,bytes)": FunctionFragment; "destinationFee(uint8)": FunctionFragment; "destinationNativeCoinWrap(uint8)": FunctionFragment; "feeHandlerType()": FunctionFragment; "getRoleAdmin(bytes32)": FunctionFragment; "getRoleMember(bytes32,uint256)": FunctionFragment; "getRoleMemberCount(bytes32)": FunctionFragment; "getRoleMemberIndex(bytes32,address)": FunctionFragment; "grantRole(bytes32,address)": FunctionFragment; "hasRole(bytes32,address)": FunctionFragment; "protocolFeeType()": FunctionFragment; "renounceAdmin(address)": FunctionFragment; "renounceRole(bytes32,address)": FunctionFragment; "revokeRole(bytes32,address)": FunctionFragment; "setFeeOracle(address)": FunctionFragment; "setFeeProperties(uint32)": FunctionFragment; "setGasPrice(uint8,uint256,uint8,uint248)": FunctionFragment; "setWrapTokenAddress(uint8,address)": FunctionFragment; "transferFee(address[],uint256[])": FunctionFragment; "twapOracle()": FunctionFragment; }; encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string; encodeFunctionData(functionFragment: "_bridgeAddress", values?: undefined): string; encodeFunctionData(functionFragment: "_feeHandlerRouterAddress", values?: undefined): string; encodeFunctionData(functionFragment: "_gasUsed", values?: undefined): string; encodeFunctionData(functionFragment: "calculateFee", values: [ string, BigNumberish, BigNumberish, BytesLike, BytesLike, BytesLike ]): string; encodeFunctionData(functionFragment: "collectFee", values: [ string, BigNumberish, BigNumberish, BytesLike, BytesLike, BytesLike ]): string; encodeFunctionData(functionFragment: "destinationFee", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "destinationNativeCoinWrap", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "feeHandlerType", 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: "protocolFeeType", values?: undefined): string; encodeFunctionData(functionFragment: "renounceAdmin", values: [string]): string; encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, string]): string; encodeFunctionData(functionFragment: "setFeeOracle", values: [string]): string; encodeFunctionData(functionFragment: "setFeeProperties", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "setGasPrice", values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]): string; encodeFunctionData(functionFragment: "setWrapTokenAddress", values: [BigNumberish, string]): string; encodeFunctionData(functionFragment: "transferFee", values: [string[], BigNumberish[]]): string; encodeFunctionData(functionFragment: "twapOracle", values?: undefined): string; decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_bridgeAddress", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_feeHandlerRouterAddress", data: BytesLike): Result; decodeFunctionResult(functionFragment: "_gasUsed", data: BytesLike): Result; decodeFunctionResult(functionFragment: "calculateFee", data: BytesLike): Result; decodeFunctionResult(functionFragment: "collectFee", data: BytesLike): Result; decodeFunctionResult(functionFragment: "destinationFee", data: BytesLike): Result; decodeFunctionResult(functionFragment: "destinationNativeCoinWrap", data: BytesLike): Result; decodeFunctionResult(functionFragment: "feeHandlerType", 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: "protocolFeeType", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceAdmin", data: BytesLike): Result; decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setFeeOracle", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setFeeProperties", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setGasPrice", data: BytesLike): Result; decodeFunctionResult(functionFragment: "setWrapTokenAddress", data: BytesLike): Result; decodeFunctionResult(functionFragment: "transferFee", data: BytesLike): Result; decodeFunctionResult(functionFragment: "twapOracle", data: BytesLike): Result; events: { "FeeCollected(address,uint8,uint8,bytes32,uint256,address)": EventFragment; "FeeDistributed(address,address,uint256)": EventFragment; "FeeOracleAddressSet(address)": EventFragment; "FeePropertySet(uint32)": EventFragment; "GasPriceSet(uint8,uint256)": EventFragment; "RoleGranted(bytes32,address,address)": EventFragment; "RoleRevoked(bytes32,address,address)": EventFragment; "WrapTokenAddressSet(uint8,address)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "FeeCollected"): EventFragment; getEvent(nameOrSignatureOrTopic: "FeeDistributed"): EventFragment; getEvent(nameOrSignatureOrTopic: "FeeOracleAddressSet"): EventFragment; getEvent(nameOrSignatureOrTopic: "FeePropertySet"): EventFragment; getEvent(nameOrSignatureOrTopic: "GasPriceSet"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; getEvent(nameOrSignatureOrTopic: "WrapTokenAddressSet"): EventFragment; } export declare type FeeCollectedEvent = TypedEvent<[ string, number, number, string, BigNumber, string ], { sender: string; fromDomainID: number; destinationDomainID: number; resourceID: string; fee: BigNumber; tokenAddress: string; }>; export declare type FeeCollectedEventFilter = TypedEventFilter; export declare type FeeDistributedEvent = TypedEvent<[ string, string, BigNumber ], { tokenAddress: string; recipient: string; amount: BigNumber; }>; export declare type FeeDistributedEventFilter = TypedEventFilter; export declare type FeeOracleAddressSetEvent = TypedEvent<[ string ], { feeOracleAddress: string; }>; export declare type FeeOracleAddressSetEventFilter = TypedEventFilter; export declare type FeePropertySetEvent = TypedEvent<[number], { gasUsed: number; }>; export declare type FeePropertySetEventFilter = TypedEventFilter; export declare type GasPriceSetEvent = TypedEvent<[ number, BigNumber ], { destinationDomainID: number; gasPrice: BigNumber; }>; export declare type GasPriceSetEventFilter = 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 WrapTokenAddressSetEvent = TypedEvent<[ number, string ], { destinationDomainID: number; wrapTokenAddress: string; }>; export declare type WrapTokenAddressSetEventFilter = TypedEventFilter; export interface TwapGenericFeeHandler extends BaseContract { contractName: "TwapGenericFeeHandler"; connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: TwapGenericFeeHandlerInterface; 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]>; _bridgeAddress(overrides?: CallOverrides): Promise<[string]>; _feeHandlerRouterAddress(overrides?: CallOverrides): Promise<[string]>; _gasUsed(overrides?: CallOverrides): Promise<[number]>; /** * Calculates fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ calculateFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: CallOverrides): Promise<[BigNumber, string] & { fee: BigNumber; tokenAddress: string; }>; /** * Collects fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ collectFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; destinationFee(arg0: BigNumberish, overrides?: CallOverrides): Promise<[ BigNumber, number, BigNumber ] & { gasPrice: BigNumber; feeType: number; amount: BigNumber; }>; destinationNativeCoinWrap(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>; /** * Getter function for fee handler type */ feeHandlerType(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]>; /** * 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]>; protocolFeeType(overrides?: CallOverrides): Promise<[number]>; /** * Removes admin role from {_msgSender()} and grants it to {newAdmin}.Only callable by an address that currently has the admin role. * @param newAdmin Address that admin role will be granted to. */ renounceAdmin(newAdmin: string, 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; /** * Sets the fee oracle address for signature verification. * @param oracleAddress Fee oracle address. */ setFeeOracle(oracleAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the fee properties. * @param gasUsed Default gas used for proposal execution in the destination. */ setFeeProperties(gasUsed: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the gas price for destination chain. * @param amount Fee amount that should be additional charged on top of execution cost (fixed native token amount/percentage of execution cost). * @param destinationDomainID ID of destination chain. * @param feeType Type of fee that can be set (fixed/percentage). "0" => execution cost "1" => execution cost + protocol fee (fixed fee) "2" => execution cost + protocol fee (percentage fee) * @param gasPrice Gas price of destination chain. */ setGasPrice(destinationDomainID: BigNumberish, gasPrice: BigNumberish, feeType: BigNumberish, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the wrap token address for destination chain. * @param destinationDomainID ID of destination chain. * @param wrapToken Wrap token address of destination chain. */ setWrapTokenAddress(destinationDomainID: BigNumberish, wrapToken: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0. * @param addrs Array of addresses to transfer {amounts} to. * @param amounts Array of amounts to transfer to {addrs}. */ transferFee(addrs: string[], amounts: BigNumberish[], overrides?: Overrides & { from?: string | Promise; }): Promise; twapOracle(overrides?: CallOverrides): Promise<[string]>; }; DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridgeAddress(overrides?: CallOverrides): Promise; _feeHandlerRouterAddress(overrides?: CallOverrides): Promise; _gasUsed(overrides?: CallOverrides): Promise; /** * Calculates fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ calculateFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: CallOverrides): Promise<[BigNumber, string] & { fee: BigNumber; tokenAddress: string; }>; /** * Collects fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ collectFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; destinationFee(arg0: BigNumberish, overrides?: CallOverrides): Promise<[ BigNumber, number, BigNumber ] & { gasPrice: BigNumber; feeType: number; amount: BigNumber; }>; destinationNativeCoinWrap(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Getter function for fee handler type */ feeHandlerType(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; protocolFeeType(overrides?: CallOverrides): Promise; /** * Removes admin role from {_msgSender()} and grants it to {newAdmin}.Only callable by an address that currently has the admin role. * @param newAdmin Address that admin role will be granted to. */ renounceAdmin(newAdmin: string, 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; /** * Sets the fee oracle address for signature verification. * @param oracleAddress Fee oracle address. */ setFeeOracle(oracleAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the fee properties. * @param gasUsed Default gas used for proposal execution in the destination. */ setFeeProperties(gasUsed: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the gas price for destination chain. * @param amount Fee amount that should be additional charged on top of execution cost (fixed native token amount/percentage of execution cost). * @param destinationDomainID ID of destination chain. * @param feeType Type of fee that can be set (fixed/percentage). "0" => execution cost "1" => execution cost + protocol fee (fixed fee) "2" => execution cost + protocol fee (percentage fee) * @param gasPrice Gas price of destination chain. */ setGasPrice(destinationDomainID: BigNumberish, gasPrice: BigNumberish, feeType: BigNumberish, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the wrap token address for destination chain. * @param destinationDomainID ID of destination chain. * @param wrapToken Wrap token address of destination chain. */ setWrapTokenAddress(destinationDomainID: BigNumberish, wrapToken: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0. * @param addrs Array of addresses to transfer {amounts} to. * @param amounts Array of amounts to transfer to {addrs}. */ transferFee(addrs: string[], amounts: BigNumberish[], overrides?: Overrides & { from?: string | Promise; }): Promise; twapOracle(overrides?: CallOverrides): Promise; callStatic: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridgeAddress(overrides?: CallOverrides): Promise; _feeHandlerRouterAddress(overrides?: CallOverrides): Promise; _gasUsed(overrides?: CallOverrides): Promise; /** * Calculates fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ calculateFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: CallOverrides): Promise<[BigNumber, string] & { fee: BigNumber; tokenAddress: string; }>; /** * Collects fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ collectFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: CallOverrides): Promise; destinationFee(arg0: BigNumberish, overrides?: CallOverrides): Promise<[ BigNumber, number, BigNumber ] & { gasPrice: BigNumber; feeType: number; amount: BigNumber; }>; destinationNativeCoinWrap(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Getter function for fee handler type */ feeHandlerType(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; protocolFeeType(overrides?: CallOverrides): Promise; /** * Removes admin role from {_msgSender()} and grants it to {newAdmin}.Only callable by an address that currently has the admin role. * @param newAdmin Address that admin role will be granted to. */ renounceAdmin(newAdmin: 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 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; /** * Sets the fee oracle address for signature verification. * @param oracleAddress Fee oracle address. */ setFeeOracle(oracleAddress: string, overrides?: CallOverrides): Promise; /** * Sets the fee properties. * @param gasUsed Default gas used for proposal execution in the destination. */ setFeeProperties(gasUsed: BigNumberish, overrides?: CallOverrides): Promise; /** * Sets the gas price for destination chain. * @param amount Fee amount that should be additional charged on top of execution cost (fixed native token amount/percentage of execution cost). * @param destinationDomainID ID of destination chain. * @param feeType Type of fee that can be set (fixed/percentage). "0" => execution cost "1" => execution cost + protocol fee (fixed fee) "2" => execution cost + protocol fee (percentage fee) * @param gasPrice Gas price of destination chain. */ setGasPrice(destinationDomainID: BigNumberish, gasPrice: BigNumberish, feeType: BigNumberish, amount: BigNumberish, overrides?: CallOverrides): Promise; /** * Sets the wrap token address for destination chain. * @param destinationDomainID ID of destination chain. * @param wrapToken Wrap token address of destination chain. */ setWrapTokenAddress(destinationDomainID: BigNumberish, wrapToken: string, overrides?: CallOverrides): Promise; /** * Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0. * @param addrs Array of addresses to transfer {amounts} to. * @param amounts Array of amounts to transfer to {addrs}. */ transferFee(addrs: string[], amounts: BigNumberish[], overrides?: CallOverrides): Promise; twapOracle(overrides?: CallOverrides): Promise; }; filters: { "FeeCollected(address,uint8,uint8,bytes32,uint256,address)"(sender?: null, fromDomainID?: null, destinationDomainID?: null, resourceID?: null, fee?: null, tokenAddress?: null): FeeCollectedEventFilter; FeeCollected(sender?: null, fromDomainID?: null, destinationDomainID?: null, resourceID?: null, fee?: null, tokenAddress?: null): FeeCollectedEventFilter; "FeeDistributed(address,address,uint256)"(tokenAddress?: null, recipient?: null, amount?: null): FeeDistributedEventFilter; FeeDistributed(tokenAddress?: null, recipient?: null, amount?: null): FeeDistributedEventFilter; "FeeOracleAddressSet(address)"(feeOracleAddress?: null): FeeOracleAddressSetEventFilter; FeeOracleAddressSet(feeOracleAddress?: null): FeeOracleAddressSetEventFilter; "FeePropertySet(uint32)"(gasUsed?: null): FeePropertySetEventFilter; FeePropertySet(gasUsed?: null): FeePropertySetEventFilter; "GasPriceSet(uint8,uint256)"(destinationDomainID?: null, gasPrice?: null): GasPriceSetEventFilter; GasPriceSet(destinationDomainID?: null, gasPrice?: null): GasPriceSetEventFilter; "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; "WrapTokenAddressSet(uint8,address)"(destinationDomainID?: null, wrapTokenAddress?: null): WrapTokenAddressSetEventFilter; WrapTokenAddressSet(destinationDomainID?: null, wrapTokenAddress?: null): WrapTokenAddressSetEventFilter; }; estimateGas: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridgeAddress(overrides?: CallOverrides): Promise; _feeHandlerRouterAddress(overrides?: CallOverrides): Promise; _gasUsed(overrides?: CallOverrides): Promise; /** * Calculates fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ calculateFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: CallOverrides): Promise; /** * Collects fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ collectFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; destinationFee(arg0: BigNumberish, overrides?: CallOverrides): Promise; destinationNativeCoinWrap(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Getter function for fee handler type */ feeHandlerType(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; protocolFeeType(overrides?: CallOverrides): Promise; /** * Removes admin role from {_msgSender()} and grants it to {newAdmin}.Only callable by an address that currently has the admin role. * @param newAdmin Address that admin role will be granted to. */ renounceAdmin(newAdmin: string, 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; /** * Sets the fee oracle address for signature verification. * @param oracleAddress Fee oracle address. */ setFeeOracle(oracleAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the fee properties. * @param gasUsed Default gas used for proposal execution in the destination. */ setFeeProperties(gasUsed: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the gas price for destination chain. * @param amount Fee amount that should be additional charged on top of execution cost (fixed native token amount/percentage of execution cost). * @param destinationDomainID ID of destination chain. * @param feeType Type of fee that can be set (fixed/percentage). "0" => execution cost "1" => execution cost + protocol fee (fixed fee) "2" => execution cost + protocol fee (percentage fee) * @param gasPrice Gas price of destination chain. */ setGasPrice(destinationDomainID: BigNumberish, gasPrice: BigNumberish, feeType: BigNumberish, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the wrap token address for destination chain. * @param destinationDomainID ID of destination chain. * @param wrapToken Wrap token address of destination chain. */ setWrapTokenAddress(destinationDomainID: BigNumberish, wrapToken: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0. * @param addrs Array of addresses to transfer {amounts} to. * @param amounts Array of amounts to transfer to {addrs}. */ transferFee(addrs: string[], amounts: BigNumberish[], overrides?: Overrides & { from?: string | Promise; }): Promise; twapOracle(overrides?: CallOverrides): Promise; }; populateTransaction: { DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; _bridgeAddress(overrides?: CallOverrides): Promise; _feeHandlerRouterAddress(overrides?: CallOverrides): Promise; _gasUsed(overrides?: CallOverrides): Promise; /** * Calculates fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ calculateFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: CallOverrides): Promise; /** * Collects fee for deposit. * @param depositData Additional data about the deposit. * @param destinationDomainID ID of chain deposit will be bridged to. * @param feeData Additional data to be passed to the fee handler. * @param fromDomainID ID of the source chain. * @param resourceID ResourceID to be used when making deposits. * @param sender Sender of the deposit. */ collectFee(sender: string, fromDomainID: BigNumberish, destinationDomainID: BigNumberish, resourceID: BytesLike, depositData: BytesLike, feeData: BytesLike, overrides?: PayableOverrides & { from?: string | Promise; }): Promise; destinationFee(arg0: BigNumberish, overrides?: CallOverrides): Promise; destinationNativeCoinWrap(arg0: BigNumberish, overrides?: CallOverrides): Promise; /** * Getter function for fee handler type */ feeHandlerType(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; protocolFeeType(overrides?: CallOverrides): Promise; /** * Removes admin role from {_msgSender()} and grants it to {newAdmin}.Only callable by an address that currently has the admin role. * @param newAdmin Address that admin role will be granted to. */ renounceAdmin(newAdmin: string, 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; /** * Sets the fee oracle address for signature verification. * @param oracleAddress Fee oracle address. */ setFeeOracle(oracleAddress: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the fee properties. * @param gasUsed Default gas used for proposal execution in the destination. */ setFeeProperties(gasUsed: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the gas price for destination chain. * @param amount Fee amount that should be additional charged on top of execution cost (fixed native token amount/percentage of execution cost). * @param destinationDomainID ID of destination chain. * @param feeType Type of fee that can be set (fixed/percentage). "0" => execution cost "1" => execution cost + protocol fee (fixed fee) "2" => execution cost + protocol fee (percentage fee) * @param gasPrice Gas price of destination chain. */ setGasPrice(destinationDomainID: BigNumberish, gasPrice: BigNumberish, feeType: BigNumberish, amount: BigNumberish, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Sets the wrap token address for destination chain. * @param destinationDomainID ID of destination chain. * @param wrapToken Wrap token address of destination chain. */ setWrapTokenAddress(destinationDomainID: BigNumberish, wrapToken: string, overrides?: Overrides & { from?: string | Promise; }): Promise; /** * Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0. * @param addrs Array of addresses to transfer {amounts} to. * @param amounts Array of amounts to transfer to {addrs}. */ transferFee(addrs: string[], amounts: BigNumberish[], overrides?: Overrides & { from?: string | Promise; }): Promise; twapOracle(overrides?: CallOverrides): Promise; }; }