Source Code
Latest 16 from a total of 16 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute Route | 7503778 | 3 days ago | IN | 0 HYPE | 0.00000805 | ||||
Execute Route | 7503744 | 3 days ago | IN | 0 HYPE | 0.00003018 | ||||
Execute Route | 7503697 | 3 days ago | IN | 0 HYPE | 0.00003283 | ||||
Execute Route | 7168837 | 7 days ago | IN | 0 HYPE | 0.0000554 | ||||
Execute Route | 7141347 | 7 days ago | IN | 0 HYPE | 0.00000973 | ||||
Execute Route | 6913132 | 10 days ago | IN | 0 HYPE | 0.00002955 | ||||
Execute Route | 6835358 | 10 days ago | IN | 0 HYPE | 0.00000976 | ||||
Execute Route | 6723219 | 12 days ago | IN | 0 HYPE | 0.00002182 | ||||
Execute Route | 6602257 | 13 days ago | IN | 0 HYPE | 0.00000702 | ||||
Execute Route | 6545756 | 14 days ago | IN | 0 HYPE | 0.00002526 | ||||
Execute Route | 6545126 | 14 days ago | IN | 0 HYPE | 0.00000968 | ||||
Execute Route | 6085598 | 19 days ago | IN | 0 HYPE | 0.00001104 | ||||
Execute Route | 5904750 | 21 days ago | IN | 0 HYPE | 0.00000701 | ||||
Execute Route | 5842681 | 22 days ago | IN | 0 HYPE | 0.00002777 | ||||
Execute Route | 5842362 | 22 days ago | IN | 0 HYPE | 0.00000416 | ||||
Transfer | 3796812 | 54 days ago | IN | 0.5 HYPE | 0.00000253 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
7793888 | 4 mins ago | 2.79 HYPE | ||||
7793888 | 4 mins ago | 2.79 HYPE | ||||
7793882 | 4 mins ago | 2.79 HYPE | ||||
7793882 | 4 mins ago | 2.79 HYPE | ||||
7793876 | 4 mins ago | 2.79 HYPE | ||||
7793876 | 4 mins ago | 2.79 HYPE | ||||
7793844 | 5 mins ago | 18.5 HYPE | ||||
7793844 | 5 mins ago | 18.5 HYPE | ||||
7793801 | 6 mins ago | 4.59064636 HYPE | ||||
7793801 | 6 mins ago | 4.59064636 HYPE | ||||
7793720 | 7 mins ago | 2.79 HYPE | ||||
7793720 | 7 mins ago | 2.79 HYPE | ||||
7793712 | 7 mins ago | 2.79 HYPE | ||||
7793712 | 7 mins ago | 2.79 HYPE | ||||
7793684 | 8 mins ago | 2.79 HYPE | ||||
7793684 | 8 mins ago | 2.79 HYPE | ||||
7793677 | 8 mins ago | 2.79 HYPE | ||||
7793677 | 8 mins ago | 2.79 HYPE | ||||
7793670 | 8 mins ago | 2.79 HYPE | ||||
7793670 | 8 mins ago | 2.79 HYPE | ||||
7793662 | 8 mins ago | 2.79 HYPE | ||||
7793662 | 8 mins ago | 2.79 HYPE | ||||
7793542 | 10 mins ago | 2.79 HYPE | ||||
7793542 | 10 mins ago | 2.79 HYPE | ||||
7793534 | 10 mins ago | 2.79 HYPE |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
GluexExecutor
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; import {EthReceiver} from "./utils/EthReceiver.sol"; import {Interaction} from "./base/RouterStructs.sol"; import {IExecutor} from "./interfaces/IExecutor.sol"; import {IERC20} from "./interfaces/IERC20.sol"; import {IWrappedNativeToken} from "./interfaces/IWrappedNativeToken.sol"; import {SafeERC20} from "./lib/SafeERC20.sol"; /** * @title GluexExecutor * @notice A contract that executes an array of interactions as specified by the caller. * @dev This contract processes a sequence of interactions by invoking the target contract methods with provided call data and values. */ contract GluexExecutor is EthReceiver, IExecutor { using SafeERC20 for IERC20; // Errors /** * @notice Error emitted when an execution call fails. * @param target The target address of the failed call. * @param callData The call data sent to the target. * @param failureData The data returned from the failed call. */ error FailedExecutionCall( address target, bytes callData, bytes failureData ); error InsufficientBalance(); error NativeTransferFailed(); error OnlyGlueTreasury(); error ZeroAddress(); // Constants uint256 private _RAW_CALL_GAS_LIMIT = 5000; // State Variables address private immutable _gluexRouter; address private immutable _glueTreasury; address private immutable _nativeToken; address private immutable _wrappedNativeToken; /** * @notice Constructs the GluexExecutor contract. * @param gluexRouter The address of the GluexRouter contract. * @param gluexTreasury The address of the GluexTreasury contract. * @param nativeToken The address of the native token used by the contract. * @param wrappedNativeToken The address of the wrapped native token used by the contract. */ constructor( address gluexRouter, address gluexTreasury, address nativeToken, address wrappedNativeToken ) { // Ensure the address is not zero checkZeroAddress(gluexRouter); checkZeroAddress(gluexTreasury); _gluexRouter = gluexRouter; _glueTreasury = gluexTreasury; _nativeToken = nativeToken; _wrappedNativeToken = wrappedNativeToken; } /** * @dev Modifier to restrict access to treasury-only functions. */ modifier onlyTreasury() { checkTreasury(); _; } /** * @notice Verifies the caller is the Glue treasury. * @dev Reverts with `OnlyGlueTreasury` if the caller is not the treasury. */ function checkTreasury() internal view { if (msg.sender != _glueTreasury) revert OnlyGlueTreasury(); } /** * @notice Verifies the given address is not zero. * @param addr The address to verify. * @dev Reverts with `ZeroAddress` if the address is zero. */ function checkZeroAddress(address addr) internal pure { if (addr == address(0)) revert ZeroAddress(); } /** * @notice Executes a series of interactions by making low-level calls to the specified targets. * @param interactions An array of `Interaction` structs, each containing the target address, * call data, and value to be sent with the call. * @dev Each interaction is executed sequentially. If any call fails, the function reverts with * detailed information about the failed interaction. */ function executeRoute( Interaction[] calldata interactions, IERC20 outputToken ) external payable { // Execute interactions sequentially uint256 len = interactions.length; IERC20 balanceToken; if (address(outputToken) == _nativeToken) { balanceToken = IERC20(_wrappedNativeToken); } else { balanceToken = outputToken; } uint256 outputBalanceBefore = uniBalanceOf(balanceToken, address(this)); for (uint256 i; i < len; ) { // Perform the interaction via a low-level call (bool success, bytes memory response) = interactions[i].target.call{ value: interactions[i].value }(interactions[i].callData); // Revert if the call fails if (!success) { revert FailedExecutionCall( interactions[i].target, interactions[i].callData, response ); } unchecked { ++i; } } uint256 outputBalanceAfter = uniBalanceOf(balanceToken, address(this)); uint256 outputAmountWithSlippage = outputBalanceAfter - outputBalanceBefore; if (address(outputToken) == _nativeToken) { // Apply slippage adjusted unwrapping of native token IWrappedNativeToken(_wrappedNativeToken).withdraw(outputAmountWithSlippage); } // Transfer the output token to the GluexRouter if (outputAmountWithSlippage > 0) uniTransfer( outputToken, payable(_gluexRouter), outputAmountWithSlippage ); } /** * @notice Retrieves the balance of a specified token for a given account. * @param token The ERC20 token to check. * @param account The account address to query the balance for. * @return The balance of the token for the account. */ function uniBalanceOf( IERC20 token, address account ) internal view returns (uint256) { if (address(token) == _nativeToken) { uint256 contractBalance; assembly { contractBalance := balance(account) } return contractBalance; } else { return token.balanceOf(account); } } /** * @notice Transfers a specified amount of a token to a given address. * @param token The ERC20 token to transfer. * @param to The address to transfer the token to. * @param amount The amount of the token to transfer. * @dev Handles both native token and ERC20 transfers. */ function uniTransfer( IERC20 token, address payable to, uint256 amount ) internal { if (amount > 0) { if (address(token) == _nativeToken) { uint256 contractBalance; assembly { contractBalance := selfbalance() } if (contractBalance < amount) revert InsufficientBalance(); (bool success, ) = to.call{ value: amount, gas: _RAW_CALL_GAS_LIMIT }(""); if (!success) revert NativeTransferFailed(); } else { token.safeTransfer(to, amount); } } else { revert InsufficientBalance(); } } /** * @notice Updates the gas limit for raw calls made by the contract. * @param gasLimit The new gas limit to be set. * @dev This function is restricted to the treasury. */ function setGasLimit(uint256 gasLimit) external onlyTreasury { _RAW_CALL_GAS_LIMIT = gasLimit; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; /// @dev generic smart contract interaction struct Interaction { address target; uint256 value; bytes callData; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; // File @1inch/solidity-utils/contracts/interfaces/[email protected] interface IDaiLikePermit { function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance( address owner, address spender ) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 value ) external returns (bool); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; import {Interaction} from "../base/RouterStructs.sol"; import {IERC20} from "./IERC20.sol"; /// @title Interface for making arbitrary calls interface IExecutor { /// @notice propagates information about original msg.sender and executes arbitrary data function executeRoute( Interaction[] calldata interactions, IERC20 outputToken ) external payable; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; // File @1inch/solidity-utils/contracts/interfaces/[email protected] interface IPermit2 { struct PermitDetails { // ERC20 token address address token; // the maximum amount allowed to spend uint160 amount; // timestamp at which a spender's token allowances become invalid uint48 expiration; // an incrementing value indexed per owner,token,and spender for each signature uint48 nonce; } /// @notice The permit message signed for a single token allownce struct PermitSingle { // the permit data for a single token alownce PermitDetails details; // address permissioned on the allowed tokens address spender; // deadline on the permit signature uint256 sigDeadline; } /// @notice Packed allowance struct PackedAllowance { // amount allowed uint160 amount; // permission expiry uint48 expiration; // an incrementing value indexed per owner,token,and spender for each signature uint48 nonce; } function transferFrom( address user, address spender, uint160 amount, address token ) external; function permit( address owner, PermitSingle memory permitSingle, bytes calldata signature ) external; function allowance( address user, address token, address spender ) external view returns (PackedAllowance memory); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; /** * @dev Generic interface for native tokens. * * Note that this interface may require adjustment * per chain. */ interface IWrappedNativeToken { /** * @dev Returns amount deposited into native wrapper. */ function deposit() external payable; /** * @dev Returns amount withdrawn from native wrapper. */ function withdraw(uint wad) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; // File @1inch/solidity-utils/contracts/libraries/[email protected] /// @title Revert reason forwarder. library RevertReasonForwarder { /// @dev Forwards latest externall call revert. function reRevert() internal pure { // bubble up revert reason from latest external call assembly ("memory-safe") { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } } /// @dev Returns latest external call revert reason. function reReason() internal pure returns (bytes memory reason) { assembly ("memory-safe") { // solhint-disable-line no-inline-assembly reason := mload(0x40) let length := returndatasize() mstore(reason, length) returndatacopy(add(reason, 0x20), 0, length) mstore(0x40, add(reason, add(0x20, length))) } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; import {IERC20} from "../interfaces/IERC20.sol"; import {IPermit2} from "../interfaces/IPermit2.sol"; import {IERC20Permit} from "../interfaces/IERC20Permit.sol"; import {IDaiLikePermit} from "../interfaces/IDaiLikePermit.sol"; import {RevertReasonForwarder} from "../lib/RevertReasonForwarder.sol"; // File @1inch/solidity-utils/contracts/libraries/[email protected] /** * @title Implements efficient safe methods for ERC20 interface. * @notice Compared to the standard ERC20, this implementation offers several enhancements: * 1. more gas-efficient, providing significant savings in transaction costs. * 2. support for different permit implementations * 3. forceApprove functionality * 4. support for WETH deposit and withdraw */ library SafeERC20 { error SafeTransferFailed(); error SafeTransferFromFailed(); error ForceApproveFailed(); error SafeIncreaseAllowanceFailed(); error SafeDecreaseAllowanceFailed(); error SafePermitBadLength(); error Permit2TransferAmountTooHigh(); // Uniswap Permit2 address address private constant _PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3; bytes4 private constant _PERMIT_LENGTH_ERROR = 0x68275857; // SafePermitBadLength.selector uint256 private constant _RAW_CALL_GAS_LIMIT = 5000; /** * @notice Fetches the balance of a specific ERC20 token held by an account. * Consumes less gas then regular `ERC20.balanceOf`. * @dev Note that the implementation does not perform dirty bits cleaning, so it is the * responsibility of the caller to make sure that the higher 96 bits of the `account` parameter are clean. * @param token The IERC20 token contract for which the balance will be fetched. * @param account The address of the account whose token balance will be fetched. * @return tokenBalance The balance of the specified ERC20 token held by the account. */ function safeBalanceOf( IERC20 token, address account ) internal view returns (uint256 tokenBalance) { bytes4 selector = IERC20.balanceOf.selector; assembly ("memory-safe") { // solhint-disable-line no-inline-assembly mstore(0x00, selector) mstore(0x04, account) let success := staticcall(gas(), token, 0x00, 0x24, 0x00, 0x20) tokenBalance := mload(0) if or(iszero(success), lt(returndatasize(), 0x20)) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } } } /** * @notice Attempts to safely transfer tokens from one address to another. * @dev If permit2 is true, uses the Permit2 standard; otherwise uses the standard ERC20 transferFrom. * Either requires `true` in return data, or requires target to be smart-contract and empty return data. * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of * the caller to make sure that the higher 96 bits of the `from` and `to` parameters are clean. * @param token The IERC20 token contract from which the tokens will be transferred. * @param from The address from which the tokens will be transferred. * @param to The address to which the tokens will be transferred. * @param amount The amount of tokens to transfer. * @param permit2 If true, uses the Permit2 standard for the transfer; otherwise uses the standard ERC20 transferFrom. */ function safeTransferFromUniversal( IERC20 token, address from, address to, uint256 amount, bool permit2 ) internal { if (permit2) { safeTransferFromPermit2(token, from, to, amount); } else { safeTransferFrom(token, from, to, amount); } } /** * @notice Attempts to safely transfer tokens from one address to another using the ERC20 standard. * @dev Either requires `true` in return data, or requires target to be smart-contract and empty return data. * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of * the caller to make sure that the higher 96 bits of the `from` and `to` parameters are clean. * @param token The IERC20 token contract from which the tokens will be transferred. * @param from The address from which the tokens will be transferred. * @param to The address to which the tokens will be transferred. * @param amount The amount of tokens to transfer. */ function safeTransferFrom( IERC20 token, address from, address to, uint256 amount ) internal { bytes4 selector = token.transferFrom.selector; bool success; assembly ("memory-safe") { // solhint-disable-line no-inline-assembly let data := mload(0x40) mstore(data, selector) mstore(add(data, 0x04), from) mstore(add(data, 0x24), to) mstore(add(data, 0x44), amount) success := call(gas(), token, 0, data, 100, 0x0, 0x20) if success { switch returndatasize() case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } } if (!success) revert SafeTransferFromFailed(); } /** * @notice Attempts to safely transfer tokens from one address to another using the Permit2 standard. * @dev Either requires `true` in return data, or requires target to be smart-contract and empty return data. * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of * the caller to make sure that the higher 96 bits of the `from` and `to` parameters are clean. * @param token The IERC20 token contract from which the tokens will be transferred. * @param from The address from which the tokens will be transferred. * @param to The address to which the tokens will be transferred. * @param amount The amount of tokens to transfer. */ function safeTransferFromPermit2( IERC20 token, address from, address to, uint256 amount ) internal { if (amount > type(uint160).max) revert Permit2TransferAmountTooHigh(); bytes4 selector = IPermit2.transferFrom.selector; bool success; assembly ("memory-safe") { // solhint-disable-line no-inline-assembly let data := mload(0x40) mstore(data, selector) mstore(add(data, 0x04), from) mstore(add(data, 0x24), to) mstore(add(data, 0x44), amount) mstore(add(data, 0x64), token) success := call(gas(), _PERMIT2, 0, data, 0x84, 0x0, 0x0) if success { success := gt(extcodesize(_PERMIT2), 0) } } if (!success) revert SafeTransferFromFailed(); } /** * @notice Attempts to safely transfer tokens to another address. * @dev Either requires `true` in return data, or requires target to be smart-contract and empty return data. * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of * the caller to make sure that the higher 96 bits of the `to` parameter are clean. * @param token The IERC20 token contract from which the tokens will be transferred. * @param to The address to which the tokens will be transferred. * @param value The amount of tokens to transfer. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { if (!_makeCall(token, token.transfer.selector, to, value)) { revert SafeTransferFailed(); } } /** * @notice Attempts to execute the `permit` function on the provided token with the sender and contract as parameters. * Permit type is determined automatically based on permit calldata (IERC20Permit, IDaiLikePermit, and IPermit2). * @dev Wraps `tryPermit` function and forwards revert reason if permit fails. * @param token The IERC20 token to execute the permit function on. * @param permit The permit data to be used in the function call. */ function safePermit(IERC20 token, bytes calldata permit) internal { if (!tryPermit(token, msg.sender, address(this), permit)) RevertReasonForwarder.reRevert(); } /** * @notice Attempts to execute the `permit` function on the provided token with custom owner and spender parameters. * Permit type is determined automatically based on permit calldata (IERC20Permit, IDaiLikePermit, and IPermit2). * @dev Wraps `tryPermit` function and forwards revert reason if permit fails. * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of * the caller to make sure that the higher 96 bits of the `owner` and `spender` parameters are clean. * @param token The IERC20 token to execute the permit function on. * @param owner The owner of the tokens for which the permit is made. * @param spender The spender allowed to spend the tokens by the permit. * @param permit The permit data to be used in the function call. */ function safePermit( IERC20 token, address owner, address spender, bytes calldata permit ) internal { if (!tryPermit(token, owner, spender, permit)) RevertReasonForwarder.reRevert(); } /** * @notice Attempts to execute the `permit` function on the provided token with the sender and contract as parameters. * @dev Invokes `tryPermit` with sender as owner and contract as spender. * @param token The IERC20 token to execute the permit function on. * @param permit The permit data to be used in the function call. * @return success Returns true if the permit function was successfully executed, false otherwise. */ function tryPermit( IERC20 token, bytes calldata permit ) internal returns (bool success) { return tryPermit(token, msg.sender, address(this), permit); } /** * @notice The function attempts to call the permit function on a given ERC20 token. * @dev The function is designed to support a variety of permit functions, namely: IERC20Permit, IDaiLikePermit, and IPermit2. * It accommodates both Compact and Full formats of these permit types. * Please note, it is expected that the `expiration` parameter for the compact Permit2 and the `deadline` parameter * for the compact Permit are to be incremented by one before invoking this function. This approach is motivated by * gas efficiency considerations; as the unlimited expiration period is likely to be the most common scenario, and * zeros are cheaper to pass in terms of gas cost. Thus, callers should increment the expiration or deadline by one * before invocation for optimized performance. * Note that the implementation does not perform dirty bits cleaning, so it is the responsibility of * the caller to make sure that the higher 96 bits of the `owner` and `spender` parameters are clean. * @param token The address of the ERC20 token on which to call the permit function. * @param owner The owner of the tokens. This address should have signed the off-chain permit. * @param spender The address which will be approved for transfer of tokens. * @param permit The off-chain permit data, containing different fields depending on the type of permit function. * @return success A boolean indicating whether the permit call was successful. */ function tryPermit( IERC20 token, address owner, address spender, bytes calldata permit ) internal returns (bool success) { // load function selectors for different permit standards bytes4 permitSelector = IERC20Permit.permit.selector; bytes4 daiPermitSelector = IDaiLikePermit.permit.selector; bytes4 permit2Selector = IPermit2.permit.selector; assembly ("memory-safe") { // solhint-disable-line no-inline-assembly let ptr := mload(0x40) // Switch case for different permit lengths, indicating different permit standards switch permit.length // Compact IERC20Permit case 100 { mstore(ptr, permitSelector) // store selector mstore(add(ptr, 0x04), owner) // store owner mstore(add(ptr, 0x24), spender) // store spender // Compact IERC20Permit.permit(uint256 value, uint32 deadline, uint256 r, uint256 vs) { // stack too deep let deadline := shr( 224, calldataload(add(permit.offset, 0x20)) ) // loads permit.offset 0x20..0x23 let vs := calldataload(add(permit.offset, 0x44)) // loads permit.offset 0x44..0x63 calldatacopy(add(ptr, 0x44), permit.offset, 0x20) // store value = copy permit.offset 0x00..0x19 mstore(add(ptr, 0x64), sub(deadline, 1)) // store deadline = deadline - 1 mstore(add(ptr, 0x84), add(27, shr(255, vs))) // store v = most significant bit of vs + 27 (27 or 28) calldatacopy(add(ptr, 0xa4), add(permit.offset, 0x24), 0x20) // store r = copy permit.offset 0x24..0x43 mstore(add(ptr, 0xc4), shr(1, shl(1, vs))) // store s = vs without most significant bit } // IERC20Permit.permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) success := call(gas(), token, 0, ptr, 0xe4, 0, 0) } // Compact IDaiLikePermit case 72 { mstore(ptr, daiPermitSelector) // store selector mstore(add(ptr, 0x04), owner) // store owner mstore(add(ptr, 0x24), spender) // store spender // Compact IDaiLikePermit.permit(uint32 nonce, uint32 expiry, uint256 r, uint256 vs) { // stack too deep let expiry := shr( 224, calldataload(add(permit.offset, 0x04)) ) // loads permit.offset 0x04..0x07 let vs := calldataload(add(permit.offset, 0x28)) // loads permit.offset 0x28..0x47 mstore( add(ptr, 0x44), shr(224, calldataload(permit.offset)) ) // store nonce = copy permit.offset 0x00..0x03 mstore(add(ptr, 0x64), sub(expiry, 1)) // store expiry = expiry - 1 mstore(add(ptr, 0x84), true) // store allowed = true mstore(add(ptr, 0xa4), add(27, shr(255, vs))) // store v = most significant bit of vs + 27 (27 or 28) calldatacopy(add(ptr, 0xc4), add(permit.offset, 0x08), 0x20) // store r = copy permit.offset 0x08..0x27 mstore(add(ptr, 0xe4), shr(1, shl(1, vs))) // store s = vs without most significant bit } // IDaiLikePermit.permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) success := call(gas(), token, 0, ptr, 0x104, 0, 0) } // IERC20Permit case 224 { mstore(ptr, permitSelector) calldatacopy(add(ptr, 0x04), permit.offset, permit.length) // copy permit calldata // IERC20Permit.permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) success := call(gas(), token, 0, ptr, 0xe4, 0, 0) } // IDaiLikePermit case 256 { mstore(ptr, daiPermitSelector) calldatacopy(add(ptr, 0x04), permit.offset, permit.length) // copy permit calldata // IDaiLikePermit.permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) success := call(gas(), token, 0, ptr, 0x104, 0, 0) } // Compact IPermit2 case 96 { // Compact IPermit2.permit(uint160 amount, uint32 expiration, uint32 nonce, uint32 sigDeadline, uint256 r, uint256 vs) mstore(ptr, permit2Selector) // store selector mstore(add(ptr, 0x04), owner) // store owner mstore(add(ptr, 0x24), token) // store token calldatacopy(add(ptr, 0x50), permit.offset, 0x14) // store amount = copy permit.offset 0x00..0x13 // and(0xffffffffffff, ...) - conversion to uint48 mstore( add(ptr, 0x64), and( 0xffffffffffff, sub(shr(224, calldataload(add(permit.offset, 0x14))), 1) ) ) // store expiration = ((permit.offset 0x14..0x17 - 1) & 0xffffffffffff) mstore( add(ptr, 0x84), shr(224, calldataload(add(permit.offset, 0x18))) ) // store nonce = copy permit.offset 0x18..0x1b mstore(add(ptr, 0xa4), spender) // store spender // and(0xffffffffffff, ...) - conversion to uint48 mstore( add(ptr, 0xc4), and( 0xffffffffffff, sub(shr(224, calldataload(add(permit.offset, 0x1c))), 1) ) ) // store sigDeadline = ((permit.offset 0x1c..0x1f - 1) & 0xffffffffffff) mstore(add(ptr, 0xe4), 0x100) // store offset = 256 mstore(add(ptr, 0x104), 0x40) // store length = 64 calldatacopy(add(ptr, 0x124), add(permit.offset, 0x20), 0x20) // store r = copy permit.offset 0x20..0x3f calldatacopy(add(ptr, 0x144), add(permit.offset, 0x40), 0x20) // store vs = copy permit.offset 0x40..0x5f // IPermit2.permit(address owner, PermitSingle calldata permitSingle, bytes calldata signature) success := call(gas(), _PERMIT2, 0, ptr, 0x164, 0, 0) } // IPermit2 case 352 { mstore(ptr, permit2Selector) calldatacopy(add(ptr, 0x04), permit.offset, permit.length) // copy permit calldata // IPermit2.permit(address owner, PermitSingle calldata permitSingle, bytes calldata signature) success := call(gas(), _PERMIT2, 0, ptr, 0x164, 0, 0) } // Unknown default { mstore(ptr, _PERMIT_LENGTH_ERROR) revert(ptr, 4) } } } /** * @dev Executes a low level call to a token contract, making it resistant to reversion and erroneous boolean returns. * @param token The IERC20 token contract on which the call will be made. * @param selector The function signature that is to be called on the token contract. * @param to The address to which the token amount will be transferred. * @param amount The token amount to be transferred. * @return success A boolean indicating if the call was successful. Returns 'true' on success and 'false' on failure. * In case of success but no returned data, validates that the contract code exists. * In case of returned data, ensures that it's a boolean `true`. */ function _makeCall( IERC20 token, bytes4 selector, address to, uint256 amount ) private returns (bool success) { assembly ("memory-safe") { // solhint-disable-line no-inline-assembly let data := mload(0x40) mstore(data, selector) mstore(add(data, 0x04), to) mstore(add(data, 0x24), amount) success := call(gas(), token, 0, data, 0x44, 0x0, 0x20) if success { switch returndatasize() case 0 { success := gt(extcodesize(token), 0) } default { success := and(gt(returndatasize(), 31), eq(mload(0), 1)) } } } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; abstract contract EthReceiver { error EthDepositRejected(); receive() external payable { _receive(); } function _receive() internal virtual { // solhint-disable-next-line avoid-tx-origin if (msg.sender == tx.origin) revert EthDepositRejected(); } }
{ "libraries": {}, "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"gluexRouter","type":"address"},{"internalType":"address","name":"gluexTreasury","type":"address"},{"internalType":"address","name":"nativeToken","type":"address"},{"internalType":"address","name":"wrappedNativeToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EthDepositRejected","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes","name":"failureData","type":"bytes"}],"name":"FailedExecutionCall","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"NativeTransferFailed","type":"error"},{"inputs":[],"name":"OnlyGlueTreasury","type":"error"},{"inputs":[],"name":"SafeTransferFailed","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Interaction[]","name":"interactions","type":"tuple[]"},{"internalType":"contract IERC20","name":"outputToken","type":"address"}],"name":"executeRoute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasLimit","type":"uint256"}],"name":"setGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101006040526113885f55348015610015575f80fd5b50604051611017380380611017833981810160405281019061003791906101f4565b6100468461012e60201b60201c565b6100558361012e60201b60201c565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508273ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff168152505050505050610258565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610193576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c38261019a565b9050919050565b6101d3816101b9565b81146101dd575f80fd5b50565b5f815190506101ee816101ca565b92915050565b5f805f806080858703121561020c5761020b610196565b5b5f610219878288016101e0565b945050602061022a878288016101e0565b935050604061023b878288016101e0565b925050606061024c878288016101e0565b91505092959194509250565b60805160a05160c05160e051610d716102a65f395f818161014701526103b301525f818160f4015281816103600152818161048a015261057401525f61071701525f6104460152610d715ff3fe60806040526004361061002c575f3560e01c8063c0dcf8041461003f578063ee7d72b41461005b5761003b565b3661003b57610039610083565b005b5f80fd5b6100596004803603810190610054919061090e565b6100ea565b005b348015610066575f80fd5b50610081600480360381019061007c919061099e565b610476565b005b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16036100e8576040517f1b10b0f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f8383905090505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361016d577f00000000000000000000000000000000000000000000000000000000000000009050610171565b8290505b5f61017c8230610487565b90505f5b83811015610341575f8088888481811061019d5761019c6109c9565b5b90506020028101906101af9190610a02565b5f0160208101906101c09190610a53565b73ffffffffffffffffffffffffffffffffffffffff168989858181106101e9576101e86109c9565b5b90506020028101906101fb9190610a02565b602001358a8a86818110610212576102116109c9565b5b90506020028101906102249190610a02565b80604001906102339190610a7e565b604051610241929190610b1c565b5f6040518083038185875af1925050503d805f811461027b576040519150601f19603f3d011682016040523d82523d5f602084013e610280565b606091505b5091509150816103345788888481811061029d5761029c6109c9565b5b90506020028101906102af9190610a02565b5f0160208101906102c09190610a53565b8989858181106102d3576102d26109c9565b5b90506020028101906102e59190610a02565b80604001906102f49190610a7e565b836040517f97474f3900000000000000000000000000000000000000000000000000000000815260040161032b9493929190610bdf565b60405180910390fd5b8260010192505050610180565b505f61034d8330610487565b90505f828261035c9190610c51565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1603610438577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040161040a9190610c93565b5f604051808303815f87803b158015610421575f80fd5b505af1158015610433573d5f803e3d5ffd5b505050505b5f81111561046c5761046b867f00000000000000000000000000000000000000000000000000000000000000008361056a565b5b5050505050505050565b61047e610715565b805f8190555050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036104e9575f8231905080915050610564565b8273ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016105229190610cac565b602060405180830381865afa15801561053d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105619190610cd9565b90505b92915050565b5f8111156106de577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036106ad575f47905081811015610603576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8373ffffffffffffffffffffffffffffffffffffffff16835f549060405161062b90610d27565b5f60405180830381858888f193505050503d805f8114610666576040519150601f19603f3d011682016040523d82523d5f602084013e61066b565b606091505b50509050806106a6576040517ff4b3b1bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50506106d9565b6106d882828573ffffffffffffffffffffffffffffffffffffffff1661079c9092919063ffffffff16565b5b610710565b6040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461079a576040517ffcb6435400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6107af8363a9059cbb60e01b84846107ea565b6107e5576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b5f60405184815283600482015282602482015260205f6044835f8a5af191508115610831573d5f81146108285760015f5114601f3d1116925061082f565b5f873b1192505b505b50949350505050565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261086357610862610842565b5b8235905067ffffffffffffffff8111156108805761087f610846565b5b60208301915083602082028301111561089c5761089b61084a565b5b9250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6108cc826108a3565b9050919050565b5f6108dd826108c2565b9050919050565b6108ed816108d3565b81146108f7575f80fd5b50565b5f81359050610908816108e4565b92915050565b5f805f604084860312156109255761092461083a565b5b5f84013567ffffffffffffffff8111156109425761094161083e565b5b61094e8682870161084e565b93509350506020610961868287016108fa565b9150509250925092565b5f819050919050565b61097d8161096b565b8114610987575f80fd5b50565b5f8135905061099881610974565b92915050565b5f602082840312156109b3576109b261083a565b5b5f6109c08482850161098a565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f82356001606003833603038112610a1d57610a1c6109f6565b5b80830191505092915050565b610a32816108c2565b8114610a3c575f80fd5b50565b5f81359050610a4d81610a29565b92915050565b5f60208284031215610a6857610a6761083a565b5b5f610a7584828501610a3f565b91505092915050565b5f8083356001602003843603038112610a9a57610a996109f6565b5b80840192508235915067ffffffffffffffff821115610abc57610abb6109fa565b5b602083019250600182023603831315610ad857610ad76109fe565b5b509250929050565b5f81905092915050565b828183375f83830152505050565b5f610b038385610ae0565b9350610b10838584610aea565b82840190509392505050565b5f610b28828486610af8565b91508190509392505050565b610b3d816108c2565b82525050565b5f82825260208201905092915050565b5f601f19601f8301169050919050565b5f610b6e8385610b43565b9350610b7b838584610aea565b610b8483610b53565b840190509392505050565b5f81519050919050565b8281835e5f83830152505050565b5f610bb182610b8f565b610bbb8185610b43565b9350610bcb818560208601610b99565b610bd481610b53565b840191505092915050565b5f606082019050610bf25f830187610b34565b8181036020830152610c05818587610b63565b90508181036040830152610c198184610ba7565b905095945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610c5b8261096b565b9150610c668361096b565b9250828203905081811115610c7e57610c7d610c24565b5b92915050565b610c8d8161096b565b82525050565b5f602082019050610ca65f830184610c84565b92915050565b5f602082019050610cbf5f830184610b34565b92915050565b5f81519050610cd381610974565b92915050565b5f60208284031215610cee57610ced61083a565b5b5f610cfb84828501610cc5565b91505092915050565b50565b5f610d125f83610ae0565b9150610d1d82610d04565b5f82019050919050565b5f610d3182610d07565b915081905091905056fea2646970667358221220dc9ab370267c75f7a39d0e3d1fcdd95bda24da7c6d68adb35399e5b5a03f48d764736f6c634300081a00330000000000000000000000006ec7612828b776cc746fe0ee5381cc93878844f700000000000000000000000084dbae2549d67caf00f65c355de3d6f4df59a32c00000000000000000000000022222222222222222222222222222222222222220000000000000000000000005555555555555555555555555555555555555555
Deployed Bytecode
0x60806040526004361061002c575f3560e01c8063c0dcf8041461003f578063ee7d72b41461005b5761003b565b3661003b57610039610083565b005b5f80fd5b6100596004803603810190610054919061090e565b6100ea565b005b348015610066575f80fd5b50610081600480360381019061007c919061099e565b610476565b005b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16036100e8576040517f1b10b0f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f8383905090505f7f000000000000000000000000222222222222222222222222222222222222222273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361016d577f00000000000000000000000055555555555555555555555555555555555555559050610171565b8290505b5f61017c8230610487565b90505f5b83811015610341575f8088888481811061019d5761019c6109c9565b5b90506020028101906101af9190610a02565b5f0160208101906101c09190610a53565b73ffffffffffffffffffffffffffffffffffffffff168989858181106101e9576101e86109c9565b5b90506020028101906101fb9190610a02565b602001358a8a86818110610212576102116109c9565b5b90506020028101906102249190610a02565b80604001906102339190610a7e565b604051610241929190610b1c565b5f6040518083038185875af1925050503d805f811461027b576040519150601f19603f3d011682016040523d82523d5f602084013e610280565b606091505b5091509150816103345788888481811061029d5761029c6109c9565b5b90506020028101906102af9190610a02565b5f0160208101906102c09190610a53565b8989858181106102d3576102d26109c9565b5b90506020028101906102e59190610a02565b80604001906102f49190610a7e565b836040517f97474f3900000000000000000000000000000000000000000000000000000000815260040161032b9493929190610bdf565b60405180910390fd5b8260010192505050610180565b505f61034d8330610487565b90505f828261035c9190610c51565b90507f000000000000000000000000222222222222222222222222222222222222222273ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1603610438577f000000000000000000000000555555555555555555555555555555555555555573ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b815260040161040a9190610c93565b5f604051808303815f87803b158015610421575f80fd5b505af1158015610433573d5f803e3d5ffd5b505050505b5f81111561046c5761046b867f0000000000000000000000006ec7612828b776cc746fe0ee5381cc93878844f78361056a565b5b5050505050505050565b61047e610715565b805f8190555050565b5f7f000000000000000000000000222222222222222222222222222222222222222273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036104e9575f8231905080915050610564565b8273ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016105229190610cac565b602060405180830381865afa15801561053d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105619190610cd9565b90505b92915050565b5f8111156106de577f000000000000000000000000222222222222222222222222222222222222222273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036106ad575f47905081811015610603576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8373ffffffffffffffffffffffffffffffffffffffff16835f549060405161062b90610d27565b5f60405180830381858888f193505050503d805f8114610666576040519150601f19603f3d011682016040523d82523d5f602084013e61066b565b606091505b50509050806106a6576040517ff4b3b1bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50506106d9565b6106d882828573ffffffffffffffffffffffffffffffffffffffff1661079c9092919063ffffffff16565b5b610710565b6040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b7f00000000000000000000000084dbae2549d67caf00f65c355de3d6f4df59a32c73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461079a576040517ffcb6435400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6107af8363a9059cbb60e01b84846107ea565b6107e5576040517ffb7f507900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b5f60405184815283600482015282602482015260205f6044835f8a5af191508115610831573d5f81146108285760015f5114601f3d1116925061082f565b5f873b1192505b505b50949350505050565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261086357610862610842565b5b8235905067ffffffffffffffff8111156108805761087f610846565b5b60208301915083602082028301111561089c5761089b61084a565b5b9250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6108cc826108a3565b9050919050565b5f6108dd826108c2565b9050919050565b6108ed816108d3565b81146108f7575f80fd5b50565b5f81359050610908816108e4565b92915050565b5f805f604084860312156109255761092461083a565b5b5f84013567ffffffffffffffff8111156109425761094161083e565b5b61094e8682870161084e565b93509350506020610961868287016108fa565b9150509250925092565b5f819050919050565b61097d8161096b565b8114610987575f80fd5b50565b5f8135905061099881610974565b92915050565b5f602082840312156109b3576109b261083a565b5b5f6109c08482850161098a565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f82356001606003833603038112610a1d57610a1c6109f6565b5b80830191505092915050565b610a32816108c2565b8114610a3c575f80fd5b50565b5f81359050610a4d81610a29565b92915050565b5f60208284031215610a6857610a6761083a565b5b5f610a7584828501610a3f565b91505092915050565b5f8083356001602003843603038112610a9a57610a996109f6565b5b80840192508235915067ffffffffffffffff821115610abc57610abb6109fa565b5b602083019250600182023603831315610ad857610ad76109fe565b5b509250929050565b5f81905092915050565b828183375f83830152505050565b5f610b038385610ae0565b9350610b10838584610aea565b82840190509392505050565b5f610b28828486610af8565b91508190509392505050565b610b3d816108c2565b82525050565b5f82825260208201905092915050565b5f601f19601f8301169050919050565b5f610b6e8385610b43565b9350610b7b838584610aea565b610b8483610b53565b840190509392505050565b5f81519050919050565b8281835e5f83830152505050565b5f610bb182610b8f565b610bbb8185610b43565b9350610bcb818560208601610b99565b610bd481610b53565b840191505092915050565b5f606082019050610bf25f830187610b34565b8181036020830152610c05818587610b63565b90508181036040830152610c198184610ba7565b905095945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610c5b8261096b565b9150610c668361096b565b9250828203905081811115610c7e57610c7d610c24565b5b92915050565b610c8d8161096b565b82525050565b5f602082019050610ca65f830184610c84565b92915050565b5f602082019050610cbf5f830184610b34565b92915050565b5f81519050610cd381610974565b92915050565b5f60208284031215610cee57610ced61083a565b5b5f610cfb84828501610cc5565b91505092915050565b50565b5f610d125f83610ae0565b9150610d1d82610d04565b5f82019050919050565b5f610d3182610d07565b915081905091905056fea2646970667358221220dc9ab370267c75f7a39d0e3d1fcdd95bda24da7c6d68adb35399e5b5a03f48d764736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006ec7612828b776cc746fe0ee5381cc93878844f700000000000000000000000084dbae2549d67caf00f65c355de3d6f4df59a32c00000000000000000000000022222222222222222222222222222222222222220000000000000000000000005555555555555555555555555555555555555555
-----Decoded View---------------
Arg [0] : gluexRouter (address): 0x6Ec7612828B776cC746fe0Ee5381CC93878844f7
Arg [1] : gluexTreasury (address): 0x84dbAE2549d67CaF00f65C355de3D6F4df59A32C
Arg [2] : nativeToken (address): 0x2222222222222222222222222222222222222222
Arg [3] : wrappedNativeToken (address): 0x5555555555555555555555555555555555555555
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000006ec7612828b776cc746fe0ee5381cc93878844f7
Arg [1] : 00000000000000000000000084dbae2549d67caf00f65c355de3d6f4df59a32c
Arg [2] : 0000000000000000000000002222222222222222222222222222222222222222
Arg [3] : 0000000000000000000000005555555555555555555555555555555555555555
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
GNO | 12.33% | $3,051.73 | 0.00018111 | $0.5526 | |
GNO | 10.70% | $1.19 | 0.403 | $0.4795 | |
GNO | 4.29% | $110.38 | 0.00174046 | $0.1921 | |
GNO | 3.22% | $1.17 | 0.1233 | $0.1442 | |
GNO | 3.22% | $1.17 | 0.1233 | $0.1442 | |
BASE | 15.31% | $2,795.04 | 0.00024562 | $0.6865 | |
BASE | 7.71% | $2,525.84 | 0.00013686 | $0.345696 | |
BASE | 7.22% | $1.17 | 0.2768 | $0.3238 | |
ETH | 5.41% | $0.999838 | 0.2426 | $0.2425 | |
ETH | 4.72% | $0.998347 | 0.2118 | $0.2114 | |
ETH | 4.05% | $0.935553 | 0.194 | $0.1815 | |
ETH | 3.26% | $2,523.92 | 0.00005786 | $0.146 | |
ETH | 3.22% | $1.05 | 0.1374 | $0.1445 | |
ETH | 3.14% | $107,621 | 0.00000131 | $0.1409 | |
ETH | 2.43% | $0.99925 | 0.1092 | $0.1091 | |
ARB | 4.29% | $2,524.56 | 0.00007617 | $0.1923 | |
ARB | 2.82% | $0.999868 | 0.1264 | $0.1263 | |
ARB | 2.67% | $0.327535 | 0.3654 | $0.1196 |
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.