ETH Price: $1,809.17 (+10.92%)
Gas: 0.1 GWei

Contract

0xceA81F222e01d6c60A3a64b10A3F5BC512b2a7C9

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

5 Internal Transactions found.

Latest 5 internal transactions

Parent Transaction Hash Block From To
182955882025-04-23 4:38:136 hrs ago1745383093
0xceA81F22...512b2a7C9
0 ETH
182955882025-04-23 4:38:136 hrs ago1745383093
0xceA81F22...512b2a7C9
0 ETH
182621832025-04-22 3:55:0131 hrs ago1745294101
0xceA81F22...512b2a7C9
0 ETH
182621832025-04-22 3:55:0131 hrs ago1745294101
0xceA81F22...512b2a7C9
0 ETH
182541942025-04-21 20:56:1438 hrs ago1745268974  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PayIntentContract

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 999999 runs

Other Settings:
london EvmVersion
File 1 of 12 : PayIntent.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.12;

import "openzeppelin-contracts/contracts/proxy/utils/Initializable.sol";
import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol";

import {Call} from "./DaimoPayExecutor.sol";
import "./TokenUtils.sol";
import "./interfaces/IDaimoPayBridger.sol";

/// Represents an intended call: "make X of token Y show up on chain Z,
/// then [optionally] use it to do an arbitrary contract call".
struct PayIntent {
    /// Intent only executes on given target chain.
    uint256 toChainId;
    /// Possible output tokens after bridging to the destination chain.
    /// Currently, native token is not supported as a bridge token output.
    TokenAmount[] bridgeTokenOutOptions;
    /// Expected token amount after swapping on the destination chain.
    TokenAmount finalCallToken;
    /// Contract call to execute on the destination chain. If finalCall.data is
    /// empty, the tokens are transferred to finalCall.to. Otherwise, (token,
    /// amount) is approved to finalCall.to and finalCall.to is called with
    /// finalCall.data and finalCall.value.
    Call finalCall;
    /// Escrow contract. All calls are made through this contract.
    address payable escrow;
    /// Bridger contract.
    IDaimoPayBridger bridger;
    /// Address to refund tokens if call fails, or zero.
    address refundAddress;
    /// Nonce. PayIntent receiving addresses are one-time use.
    uint256 nonce;
    /// Timestamp after which intent expires and can be refunded
    uint256 expirationTimestamp;
}

/// Calculates the intent hash of a PayIntent struct.
function calcIntentHash(PayIntent calldata intent) pure returns (bytes32) {
    return keccak256(abi.encode(intent));
}

/// @author Daimo, Inc
/// @custom:security-contact [email protected]
/// @notice This is an ephemeral intent contract. Any supported tokens sent to
/// this address on any supported chain are forwarded, via a combination of
/// bridging and swapping, into a specified call on a destination chain.
contract PayIntentContract is Initializable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /// Save gas by minimizing storage to a single word. This makes intents
    /// usable on L1. intentHash = keccak(abi.encode(PayIntent))
    bytes32 intentHash;

    /// Runs at deploy time. Singleton implementation contract = no init,
    /// no state. All other methods are called via proxy.
    constructor() {
        _disableInitializers();
    }

    function initialize(bytes32 _intentHash) public initializer {
        intentHash = _intentHash;
    }

    /// Send tokens to a recipient.
    function sendTokens(
        PayIntent calldata intent,
        IERC20[] calldata tokens,
        address payable recipient
    ) public nonReentrant returns (uint256[] memory amounts) {
        require(calcIntentHash(intent) == intentHash, "PI: intent");
        require(msg.sender == intent.escrow, "PI: only escrow");

        uint256 n = tokens.length;
        amounts = new uint256[](n);
        // Send tokens to recipient
        for (uint256 i = 0; i < n; ++i) {
            amounts[i] = TokenUtils.transferBalance({
                token: tokens[i],
                recipient: recipient
            });
        }
    }

    /// Check that at least one of the token amounts is present. Assumes exactly
    /// one token is present, then sends the token to a recipient.
    function checkBalanceAndSendTokens(
        PayIntent calldata intent,
        TokenAmount[] calldata tokenAmounts,
        address payable recipient
    ) public nonReentrant {
        require(calcIntentHash(intent) == intentHash, "PI: intent");
        require(msg.sender == intent.escrow, "PI: only escrow");

        // Check that at least one of the token amounts is present.
        uint256 tokenIndex = TokenUtils.checkBalance({
            tokenAmounts: tokenAmounts
        });
        require(tokenIndex < tokenAmounts.length, "PI: insufficient balance");

        // Transfer the token amount to the recipient.
        TokenUtils.transfer({
            token: tokenAmounts[tokenIndex].token,
            recipient: recipient,
            amount: tokenAmounts[tokenIndex].amount
        });
    }

    /// Accept native-token (eg ETH) inputs
    receive() external payable {}
}

File 2 of 12 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reinitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.
     *
     * NOTE: Consider following the ERC-7201 formula to derive storage locations.
     */
    function _initializableStorageSlot() internal pure virtual returns (bytes32) {
        return INITIALIZABLE_STORAGE;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        bytes32 slot = _initializableStorageSlot();
        assembly {
            $.slot := slot
        }
    }
}

File 3 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

File 4 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 5 of 12 : DaimoPayExecutor.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.12;

import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol";

import "./TokenUtils.sol";

/// Represents a contract call.
struct Call {
    /// Address of the contract to call.
    address to;
    /// Native token amount for call, or 0
    uint256 value;
    /// Calldata for call
    bytes data;
}

/// @author Daimo, Inc
/// @custom:security-contact [email protected]
/// @notice This contract is used to execute arbitrary contract calls on behalf
/// of the DaimoPay escrow contract.
/// WARNING: Never approve tokens directly to this contract. Never transfer
/// tokens to this contract. Such tokens can be stolen by anyone. All
/// interactions with this contract should be done via the DaimoPay contract.
contract DaimoPayExecutor is ReentrancyGuard {
    using SafeERC20 for IERC20;

    /// The only address that is allowed to call the `execute` function.
    address public immutable escrow;

    constructor(address _escrow) {
        escrow = _escrow;
    }

    /// Execute arbitrary calls. Revert if any fail.
    /// Check that at least one of the expectedOutput tokens is present. Assumes
    /// that exactly one token is present and transfers it to the recipient.
    /// Returns any surplus tokens to the surplus recipient.
    function execute(
        Call[] calldata calls,
        TokenAmount[] calldata expectedOutput,
        address payable recipient,
        address payable surplusRecipient
    ) external nonReentrant {
        require(msg.sender == escrow, "DPCE: only escrow");

        // Execute provided calls.
        uint256 callsLength = calls.length;
        for (uint256 i = 0; i < callsLength; ++i) {
            Call calldata call = calls[i];
            (bool success, ) = call.to.call{value: call.value}(call.data);
            require(success, "DPCE: call failed");
        }

        /// Check that at least one of the expectedOutput tokens is present
        /// with enough balance.
        uint256 outputIndex = TokenUtils.checkBalance({
            tokenAmounts: expectedOutput
        });
        require(
            outputIndex < expectedOutput.length,
            "DPCE: insufficient output"
        );

        // Transfer the expected amount of the token to the recipient.
        TokenUtils.transfer({
            token: expectedOutput[outputIndex].token,
            recipient: recipient,
            amount: expectedOutput[outputIndex].amount
        });

        // Transfer any surplus tokens to the surplus recipient.
        TokenUtils.transferBalance({
            token: expectedOutput[outputIndex].token,
            recipient: surplusRecipient
        });
    }

    /// Execute a final call. Approve the final token and make the call.
    /// Return whether the call succeeded.
    function executeFinalCall(
        Call calldata finalCall,
        TokenAmount calldata finalCallToken
    ) external nonReentrant returns (bool success) {
        require(msg.sender == escrow, "DPCE: only escrow");

        // Approve the final call token to the final call contract.
        TokenUtils.approve({
            token: finalCallToken.token,
            spender: address(finalCall.to),
            amount: finalCallToken.amount
        });

        // Then, execute the final call.
        (success, ) = finalCall.to.call{value: finalCall.value}(finalCall.data);
    }

    /// Accept native-token (eg ETH) inputs
    receive() external payable {}
}

File 6 of 12 : TokenUtils.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.12;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";

/// Asset amount, e.g. $100 USDC or 0.1 ETH
struct TokenAmount {
    /// Zero address = native asset, e.g. ETH
    IERC20 token;
    uint256 amount;
}

/// Utility functions that work for both ERC20 and native tokens.
library TokenUtils {
    using SafeERC20 for IERC20;

    /// Returns ERC20 or ETH balance.
    function getBalanceOf(
        IERC20 token,
        address addr
    ) internal view returns (uint256) {
        if (address(token) == address(0)) {
            return addr.balance;
        } else {
            return token.balanceOf(addr);
        }
    }

    /// Approves a token transfer.
    function approve(IERC20 token, address spender, uint256 amount) internal {
        if (address(token) != address(0)) {
            token.forceApprove({spender: spender, value: amount});
        } // Do nothing for native token.
    }

    /// Sends an ERC20 or ETH transfer. For ETH, verify call success.
    function transfer(
        IERC20 token,
        address payable recipient,
        uint256 amount
    ) internal {
        if (address(token) != address(0)) {
            token.safeTransfer({to: recipient, value: amount});
        } else {
            // Native token transfer
            (bool success, ) = recipient.call{value: amount}("");
            require(success, "TokenUtils: ETH transfer failed");
        }
    }

    /// Sends an ERC20 or ETH transfer. Returns true if successful.
    function tryTransfer(
        IERC20 token,
        address recipient,
        uint256 amount
    ) internal returns (bool) {
        if (address(token) != address(0)) {
            return token.trySafeTransfer({to: recipient, value: amount});
        } else {
            (bool success, ) = recipient.call{value: amount}("");
            return success;
        }
    }

    /// Sends an ERC20 transfer.
    function transferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        require(
            address(token) != address(0),
            "TokenUtils: ETH transferFrom must be caller"
        );
        token.safeTransferFrom({from: from, to: to, value: amount});
    }

    /// Sends any token balance in the contract to the recipient.
    function transferBalance(
        IERC20 token,
        address payable recipient
    ) internal returns (uint256) {
        uint256 balance = getBalanceOf({token: token, addr: address(this)});
        if (balance > 0) {
            transfer({token: token, recipient: recipient, amount: balance});
        }
        return balance;
    }

    /// Check that the address has enough of at least one of the tokenAmounts.
    /// Returns the index of the first token that has sufficient balance, or
    /// the length of the tokenAmounts array if no token has sufficient balance.
    function checkBalance(
        TokenAmount[] calldata tokenAmounts
    ) internal view returns (uint256) {
        uint256 n = tokenAmounts.length;
        for (uint256 i = 0; i < n; ++i) {
            TokenAmount calldata tokenAmount = tokenAmounts[i];
            uint256 balance = getBalanceOf({
                token: tokenAmount.token,
                addr: address(this)
            });
            if (balance >= tokenAmount.amount) {
                return i;
            }
        }
        return n;
    }
}

File 7 of 12 : IDaimoPayBridger.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.12;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";

import "../TokenUtils.sol";

/// @author Daimo, Inc
/// @custom:security-contact [email protected]
/// @notice Bridges assets. Specifically, it lets any relayer initiate a bridge
/// transaction to another chain.
interface IDaimoPayBridger {
    /// Emitted when a bridge transaction is initiated
    event BridgeInitiated(
        address fromAddress,
        address fromToken,
        uint256 fromAmount,
        uint256 toChainId,
        address toAddress,
        address toToken,
        uint256 toAmount
    );

    /// Determine the input token and amount required to achieve one of the
    /// given output options on a given chain.
    function getBridgeTokenIn(
        uint256 toChainId,
        TokenAmount[] memory bridgeTokenOutOptions
    ) external view returns (address bridgeTokenIn, uint256 inAmount);

    /// Initiate a bridge. Guarantee that one of the bridge token options
    /// (bridgeTokenOut, outAmount) shows up at toAddress on toChainId.
    /// Otherwise, revert.
    function sendToChain(
        uint256 toChainId,
        address toAddress,
        TokenAmount[] calldata bridgeTokenOutOptions,
        bytes calldata extraData
    ) external;
}

File 8 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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);
}

File 9 of 12 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 10 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 11 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 12 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "@axelar-network/=lib/axelar-gmp-sdk-solidity/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "axelar-gmp-sdk-solidity/=lib/axelar-gmp-sdk-solidity/contracts/",
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"inputs":[{"components":[{"internalType":"uint256","name":"toChainId","type":"uint256"},{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct TokenAmount[]","name":"bridgeTokenOutOptions","type":"tuple[]"},{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct TokenAmount","name":"finalCallToken","type":"tuple"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Call","name":"finalCall","type":"tuple"},{"internalType":"address payable","name":"escrow","type":"address"},{"internalType":"contract IDaimoPayBridger","name":"bridger","type":"address"},{"internalType":"address","name":"refundAddress","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"}],"internalType":"struct PayIntent","name":"intent","type":"tuple"},{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct TokenAmount[]","name":"tokenAmounts","type":"tuple[]"},{"internalType":"address payable","name":"recipient","type":"address"}],"name":"checkBalanceAndSendTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_intentHash","type":"bytes32"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"toChainId","type":"uint256"},{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct TokenAmount[]","name":"bridgeTokenOutOptions","type":"tuple[]"},{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct TokenAmount","name":"finalCallToken","type":"tuple"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Call","name":"finalCall","type":"tuple"},{"internalType":"address payable","name":"escrow","type":"address"},{"internalType":"contract IDaimoPayBridger","name":"bridger","type":"address"},{"internalType":"address","name":"refundAddress","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"}],"internalType":"struct PayIntent","name":"intent","type":"tuple"},{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"address payable","name":"recipient","type":"address"}],"name":"sendTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080806040523460d75760016000557ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c1660c6576002600160401b03196001600160401b038216016061575b604051610deb90816100dd8239f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a138806052565b63f92ee8a960e01b60005260046000fd5b600080fdfe608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c9081639498bd71146103f157508063b9a815db146101fa5763f57254421461004b573861000f565b346101f55760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f55760043567ffffffffffffffff81116101f5576101407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126101f55760243567ffffffffffffffff81116101f557366023820112156101f55780600401359167ffffffffffffffff83116101f5576024820191602436918560061b0101116101f55761015373ffffffffffffffffffffffffffffffffffffffff61014b60a46101246105fc565b9461012d6107f2565b61014561013c8260040161085a565b60015414610640565b016106a5565b1633146106c6565b61015d8383610afa565b8381101561019757610188818561018261017d60209561019099896107b3565b6106a5565b956107b3565b013591610b3f565b6001600055005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50493a20696e73756666696369656e742062616c616e636500000000000000006044820152fd5b600080fd5b346101f55760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f55760043567ffffffffffffffff81116101f5576101407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126101f5576024359067ffffffffffffffff82116101f557366023830112156101f55781600401359067ffffffffffffffff82116101f5573660248360051b850101116101f5576102cf73ffffffffffffffffffffffffffffffffffffffff61014b60a46101246105fc565b6102d88261079b565b6102e5604051918261072b565b8281526102f18361079b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208301910136823760005b848110156103a75760008160051b61033a6024828a01016106a5565b916103453084610d06565b92838881610396575b5050508551841015610369575084016020015260010161031e565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b61039f92610b3f565b89838861034e565b509060016000556040519182916020830190602084525180915260408301919060005b8181106103d8575050500390f35b82518452859450602093840193909201916001016103ca565b346101f55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f5577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159067ffffffffffffffff8116801590816105f4575b60011490816105ea575b1590816105e1575b506105b7578160017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055610562575b506004356001556104d157005b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2917fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560018152a1005b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055826104c4565b7ff92ee8a90000000000000000000000000000000000000000000000000000000060005260046000fd5b90501584610471565b303b159150610469565b83915061045f565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036101f557565b359073ffffffffffffffffffffffffffffffffffffffff821682036101f557565b1561064757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f50493a20696e74656e74000000000000000000000000000000000000000000006044820152fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036101f55790565b156106cd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f50493a206f6e6c7920657363726f7700000000000000000000000000000000006044820152fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761076c57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161076c5760051b60200190565b91908110156107c35760061b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600260005414610803576002600055565b7f3ee5aeb50000000000000000000000000000000000000000000000000000000060005260046000fd5b803573ffffffffffffffffffffffffffffffffffffffff81168091036101f5578252602090810135910152565b604051602081019160208352610180820190803560408401526020810135813603907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182018112156101f55782016020813591019367ffffffffffffffff82116101f5578160061b360385136101f55781906101406060880152526101a08501939060005b818110610adc575050506108f9608085016040840161082d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1608083013591018112156101f55781017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08484030160c085015273ffffffffffffffffffffffffffffffffffffffff6109728261061f565b1683526020810135602084015260408101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156101f5570160208135910167ffffffffffffffff82116101f55781360381136101f557819060606040860152816060860152608085013760006080828501015273ffffffffffffffffffffffffffffffffffffffff610a0d60a0840161061f565b1660e085015260c08201359273ffffffffffffffffffffffffffffffffffffffff84168094036101f5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8693610120608096610ad69861010088015273ffffffffffffffffffffffffffffffffffffffff610a8d60e0830161061f565b1682880152610100810135610140880152013561016086015201160103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261072b565b51902090565b90919460408082610aef6001948a61082d565b0196019291016108df565b60005b828110610b0957505090565b610b148184846107b3565b6020610b2830610b23846106a5565b610d06565b9101351115610b3957600101610afd565b91505090565b73ffffffffffffffffffffffffffffffffffffffff8116929091908315610c215791600091826020946040519073ffffffffffffffffffffffffffffffffffffffff878301947fa9059cbb000000000000000000000000000000000000000000000000000000008652166024830152604482015260448152610bc260648261072b565b51925af115610c15576000513d610c0c5750803b155b610bdf5750565b7f5274afe70000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60011415610bd8565b6040513d6000823e3d90fd5b6000935083925082919073ffffffffffffffffffffffffffffffffffffffff8392165af13d15610d01573d67ffffffffffffffff811161076c5760405190610c9160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116018361072b565b8152600060203d92013e5b15610ca357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f546f6b656e5574696c733a20455448207472616e73666572206661696c6564006044820152fd5b610c9c565b73ffffffffffffffffffffffffffffffffffffffff1680610d2657503190565b9073ffffffffffffffffffffffffffffffffffffffff602460209260405194859384927f70a082310000000000000000000000000000000000000000000000000000000084521660048301525afa908115610c1557600091610d86575090565b90506020813d602011610dad575b81610da16020938361072b565b810103126101f5575190565b3d9150610d9456fea2646970667358221220b37c8c4db9ad3ef67ce0123f0ab2c5d317a941116dedd7864402556f327b6ed664736f6c634300081a0033

Deployed Bytecode

0x608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c9081639498bd71146103f157508063b9a815db146101fa5763f57254421461004b573861000f565b346101f55760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f55760043567ffffffffffffffff81116101f5576101407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126101f55760243567ffffffffffffffff81116101f557366023820112156101f55780600401359167ffffffffffffffff83116101f5576024820191602436918560061b0101116101f55761015373ffffffffffffffffffffffffffffffffffffffff61014b60a46101246105fc565b9461012d6107f2565b61014561013c8260040161085a565b60015414610640565b016106a5565b1633146106c6565b61015d8383610afa565b8381101561019757610188818561018261017d60209561019099896107b3565b6106a5565b956107b3565b013591610b3f565b6001600055005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50493a20696e73756666696369656e742062616c616e636500000000000000006044820152fd5b600080fd5b346101f55760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f55760043567ffffffffffffffff81116101f5576101407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126101f5576024359067ffffffffffffffff82116101f557366023830112156101f55781600401359067ffffffffffffffff82116101f5573660248360051b850101116101f5576102cf73ffffffffffffffffffffffffffffffffffffffff61014b60a46101246105fc565b6102d88261079b565b6102e5604051918261072b565b8281526102f18361079b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208301910136823760005b848110156103a75760008160051b61033a6024828a01016106a5565b916103453084610d06565b92838881610396575b5050508551841015610369575084016020015260010161031e565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b61039f92610b3f565b89838861034e565b509060016000556040519182916020830190602084525180915260408301919060005b8181106103d8575050500390f35b82518452859450602093840193909201916001016103ca565b346101f55760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f5577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159067ffffffffffffffff8116801590816105f4575b60011490816105ea575b1590816105e1575b506105b7578160017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055610562575b506004356001556104d157005b60207fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2917fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560018152a1005b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055826104c4565b7ff92ee8a90000000000000000000000000000000000000000000000000000000060005260046000fd5b90501584610471565b303b159150610469565b83915061045f565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036101f557565b359073ffffffffffffffffffffffffffffffffffffffff821682036101f557565b1561064757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f50493a20696e74656e74000000000000000000000000000000000000000000006044820152fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036101f55790565b156106cd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f50493a206f6e6c7920657363726f7700000000000000000000000000000000006044820152fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761076c57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161076c5760051b60200190565b91908110156107c35760061b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600260005414610803576002600055565b7f3ee5aeb50000000000000000000000000000000000000000000000000000000060005260046000fd5b803573ffffffffffffffffffffffffffffffffffffffff81168091036101f5578252602090810135910152565b604051602081019160208352610180820190803560408401526020810135813603907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182018112156101f55782016020813591019367ffffffffffffffff82116101f5578160061b360385136101f55781906101406060880152526101a08501939060005b818110610adc575050506108f9608085016040840161082d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1608083013591018112156101f55781017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08484030160c085015273ffffffffffffffffffffffffffffffffffffffff6109728261061f565b1683526020810135602084015260408101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156101f5570160208135910167ffffffffffffffff82116101f55781360381136101f557819060606040860152816060860152608085013760006080828501015273ffffffffffffffffffffffffffffffffffffffff610a0d60a0840161061f565b1660e085015260c08201359273ffffffffffffffffffffffffffffffffffffffff84168094036101f5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8693610120608096610ad69861010088015273ffffffffffffffffffffffffffffffffffffffff610a8d60e0830161061f565b1682880152610100810135610140880152013561016086015201160103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261072b565b51902090565b90919460408082610aef6001948a61082d565b0196019291016108df565b60005b828110610b0957505090565b610b148184846107b3565b6020610b2830610b23846106a5565b610d06565b9101351115610b3957600101610afd565b91505090565b73ffffffffffffffffffffffffffffffffffffffff8116929091908315610c215791600091826020946040519073ffffffffffffffffffffffffffffffffffffffff878301947fa9059cbb000000000000000000000000000000000000000000000000000000008652166024830152604482015260448152610bc260648261072b565b51925af115610c15576000513d610c0c5750803b155b610bdf5750565b7f5274afe70000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60011415610bd8565b6040513d6000823e3d90fd5b6000935083925082919073ffffffffffffffffffffffffffffffffffffffff8392165af13d15610d01573d67ffffffffffffffff811161076c5760405190610c9160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116018361072b565b8152600060203d92013e5b15610ca357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f546f6b656e5574696c733a20455448207472616e73666572206661696c6564006044820152fd5b610c9c565b73ffffffffffffffffffffffffffffffffffffffff1680610d2657503190565b9073ffffffffffffffffffffffffffffffffffffffff602460209260405194859384927f70a082310000000000000000000000000000000000000000000000000000000084521660048301525afa908115610c1557600091610d86575090565b90506020813d602011610dad575b81610da16020938361072b565b810103126101f5575190565b3d9150610d9456fea2646970667358221220b37c8c4db9ad3ef67ce0123f0ab2c5d317a941116dedd7864402556f327b6ed664736f6c634300081a0033

Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.