ETH Price: $1,818.52 (+11.21%)

Contract

0x5e9C40AC6099dC3bd18b1E9D077145ca71227eE7

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
1348326472025-04-21 19:34:3140 hrs ago1745264071  Contract Creation0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AcrossBridgeRouteConstants

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 999999 runs

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

import "../../src/DaimoPayAcrossBridger.sol";

// @title AcrossBridgeRouteConstants
// @notice Auto-generated constants for Across bridge routes
library AcrossBridgeRouteConstants {
    // Return all Across bridge routes for the given source chain.
    function getAcrossBridgeRoutes(uint256 sourceChainId) public pure returns (
        uint256[] memory chainIds,
        DaimoPayAcrossBridger.AcrossBridgeRoute[] memory bridgeRoutes
    ) {
        // Source chain 1
        if (sourceChainId == 1) {
            chainIds = new uint256[](2);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](2);
            
            // 1 -> 480
            chainIds[0] = 480;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,
                bridgeTokenOut: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                pctFee: 120000000000000,
                flatFee: 43000
            });
            // 1 -> 81457
            chainIds[1] = 81457;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x6B175474E89094C44Da98b954EedeAC495271d0F,
                bridgeTokenOut: 0x4300000000000000000000000000000000000003,
                pctFee: 500000000000000,
                flatFee: 120000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 10
        if (sourceChainId == 10) {
            chainIds = new uint256[](3);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](3);
            
            // 10 -> 480
            chainIds[0] = 480;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85,
                bridgeTokenOut: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                pctFee: 300000000000000,
                flatFee: 120000
            });
            // 10 -> 59144
            chainIds[1] = 59144;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                bridgeTokenOut: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                pctFee: 400000000000000,
                flatFee: 87000000000000000
            });
            // 10 -> 81457
            chainIds[2] = 81457;
            bridgeRoutes[2] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                bridgeTokenOut: 0x4300000000000000000000000000000000000003,
                pctFee: 900000000000000,
                flatFee: 270000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 137
        if (sourceChainId == 137) {
            chainIds = new uint256[](3);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](3);
            
            // 137 -> 480
            chainIds[0] = 480;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359,
                bridgeTokenOut: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                pctFee: 300000000000000,
                flatFee: 120000
            });
            // 137 -> 59144
            chainIds[1] = 59144;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063,
                bridgeTokenOut: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                pctFee: 400000000000000,
                flatFee: 87000000000000000
            });
            // 137 -> 81457
            chainIds[2] = 81457;
            bridgeRoutes[2] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063,
                bridgeTokenOut: 0x4300000000000000000000000000000000000003,
                pctFee: 900000000000000,
                flatFee: 270000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 480
        if (sourceChainId == 480) {
            chainIds = new uint256[](5);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](5);
            
            // 480 -> 1
            chainIds[0] = 1;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                bridgeTokenOut: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,
                pctFee: 14600000000000000,
                flatFee: 3000000
            });
            // 480 -> 10
            chainIds[1] = 10;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                bridgeTokenOut: 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85,
                pctFee: 390000000000000,
                flatFee: 160000
            });
            // 480 -> 137
            chainIds[2] = 137;
            bridgeRoutes[2] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                bridgeTokenOut: 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359,
                pctFee: 440000000000000,
                flatFee: 170000
            });
            // 480 -> 8453
            chainIds[3] = 8453;
            bridgeRoutes[3] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                bridgeTokenOut: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913,
                pctFee: 440000000000000,
                flatFee: 170000
            });
            // 480 -> 42161
            chainIds[4] = 42161;
            bridgeRoutes[4] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                bridgeTokenOut: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831,
                pctFee: 440000000000000,
                flatFee: 170000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 8453
        if (sourceChainId == 8453) {
            chainIds = new uint256[](2);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](2);
            
            // 8453 -> 480
            chainIds[0] = 480;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913,
                bridgeTokenOut: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                pctFee: 300000000000000,
                flatFee: 120000
            });
            // 8453 -> 81457
            chainIds[1] = 81457;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb,
                bridgeTokenOut: 0x4300000000000000000000000000000000000003,
                pctFee: 900000000000000,
                flatFee: 270000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 42161
        if (sourceChainId == 42161) {
            chainIds = new uint256[](3);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](3);
            
            // 42161 -> 480
            chainIds[0] = 480;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831,
                bridgeTokenOut: 0x79A02482A880bCE3F13e09Da970dC34db4CD24d1,
                pctFee: 300000000000000,
                flatFee: 120000
            });
            // 42161 -> 59144
            chainIds[1] = 59144;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                bridgeTokenOut: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                pctFee: 400000000000000,
                flatFee: 80000000000000000
            });
            // 42161 -> 81457
            chainIds[2] = 81457;
            bridgeRoutes[2] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                bridgeTokenOut: 0x4300000000000000000000000000000000000003,
                pctFee: 900000000000000,
                flatFee: 270000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 59144
        if (sourceChainId == 59144) {
            chainIds = new uint256[](4);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](4);
            
            // 59144 -> 10
            chainIds[0] = 10;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                bridgeTokenOut: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                pctFee: 500000000000000,
                flatFee: 95000000000000000
            });
            // 59144 -> 137
            chainIds[1] = 137;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                bridgeTokenOut: 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063,
                pctFee: 400000000000000,
                flatFee: 77000000000000000
            });
            // 59144 -> 42161
            chainIds[2] = 42161;
            bridgeRoutes[2] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                bridgeTokenOut: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                pctFee: 500000000000000,
                flatFee: 100000000000000000
            });
            // 59144 -> 81457
            chainIds[3] = 81457;
            bridgeRoutes[3] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                bridgeTokenOut: 0x4300000000000000000000000000000000000003,
                pctFee: 900000000000000,
                flatFee: 270000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // Source chain 81457
        if (sourceChainId == 81457) {
            chainIds = new uint256[](6);
            bridgeRoutes = new DaimoPayAcrossBridger.AcrossBridgeRoute[](6);
            
            // 81457 -> 1
            chainIds[0] = 1;
            bridgeRoutes[0] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4300000000000000000000000000000000000003,
                bridgeTokenOut: 0x6B175474E89094C44Da98b954EedeAC495271d0F,
                pctFee: 33400000000000000,
                flatFee: 6890000000000000000
            });
            // 81457 -> 10
            chainIds[1] = 10;
            bridgeRoutes[1] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4300000000000000000000000000000000000003,
                bridgeTokenOut: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                pctFee: 1400000000000000,
                flatFee: 490000000000000000
            });
            // 81457 -> 137
            chainIds[2] = 137;
            bridgeRoutes[2] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4300000000000000000000000000000000000003,
                bridgeTokenOut: 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063,
                pctFee: 1200000000000000,
                flatFee: 450000000000000000
            });
            // 81457 -> 8453
            chainIds[3] = 8453;
            bridgeRoutes[3] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4300000000000000000000000000000000000003,
                bridgeTokenOut: 0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb,
                pctFee: 1600000000000000,
                flatFee: 530000000000000000
            });
            // 81457 -> 42161
            chainIds[4] = 42161;
            bridgeRoutes[4] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4300000000000000000000000000000000000003,
                bridgeTokenOut: 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,
                pctFee: 1800000000000000,
                flatFee: 570000000000000000
            });
            // 81457 -> 59144
            chainIds[5] = 59144;
            bridgeRoutes[5] = DaimoPayAcrossBridger.AcrossBridgeRoute({
                bridgeTokenIn: 0x4300000000000000000000000000000000000003,
                bridgeTokenOut: 0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5,
                pctFee: 2600000000000000,
                flatFee: 740000000000000000
            });
            
            return (chainIds, bridgeRoutes);
        }

        // If source chain not found, revert
        revert("Source chain not found");
    }
}

File 2 of 11 : DaimoPayAcrossBridger.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";

import "./interfaces/IDaimoPayBridger.sol";
import "../vendor/across/V3SpokePoolInterface.sol";

/// @author Daimo, Inc
/// @custom:security-contact [email protected]
/// @notice Bridges assets to a destination chain using Across Protocol.
/// @dev Makes the assumption that the local token is an ERC20 token and has a
/// 1 to 1 price with the corresponding destination token.
contract DaimoPayAcrossBridger is IDaimoPayBridger {
    using SafeERC20 for IERC20;

    struct AcrossBridgeRoute {
        address bridgeTokenIn;
        address bridgeTokenOut;
        /// Minimum percentage fee to pay the Across relayer on the source
        /// chain. The input amount should be at least this much larger than the
        /// output amount.
        /// 1% is represented as 1e16, 100% is 1e18, 50% is 5e17. This is how
        /// Across represents percentage fees.
        uint256 pctFee;
        /// Minimum flat fee to pay the Across relayer on the source chain.
        /// This fee is paid in bridgeTokenIn. The input amount should be at
        /// least this much larger than the output amount.
        uint256 flatFee;
    }

    struct ExtraData {
        /// Returned from the Across API.
        address exclusiveRelayer;
        /// Returned from the Across API.
        uint32 quoteTimestamp;
        /// Deadline to fill the Across quote before the quote expires.
        uint32 fillDeadline;
        /// Returned from the Across API.
        uint32 exclusivityDeadline;
        /// Used when making a contract call on the destination chain using
        /// Across.
        bytes message;
    }

    uint256 public constant ONE_HUNDRED_PERCENT = 1e18;

    /// Across SpokePool contract address for this chain.
    V3SpokePoolInterface public immutable spokePool;

    /// Mapping destination chainId to the corresponding token on the current
    /// chain and fees associated with the bridge.
    mapping(uint256 toChainId => AcrossBridgeRoute bridgeRoute)
        public bridgeRouteMapping;

    /// Specify the localToken mapping to destination chains and tokens
    constructor(
        V3SpokePoolInterface _spokePool,
        uint256[] memory _toChainIds,
        AcrossBridgeRoute[] memory _bridgeRoutes
    ) {
        spokePool = _spokePool;
        uint256 n = _toChainIds.length;
        require(n == _bridgeRoutes.length, "DPAB: wrong bridgeRoutes length");
        for (uint256 i = 0; i < n; ++i) {
            bridgeRouteMapping[_toChainIds[i]] = _bridgeRoutes[i];
        }
    }

    // ----- BRIDGING FUNCTIONS -----

    /// Given a list of bridge token options, find the index of the bridge token
    /// that matches the correct bridge token out. Return the length of the array
    /// if no match is found.
    function _findBridgeTokenOut(
        TokenAmount[] calldata bridgeTokenOutOptions,
        address bridgeTokenOut
    ) internal pure returns (uint256 index) {
        uint256 n = bridgeTokenOutOptions.length;
        for (uint256 i = 0; i < n; ++i) {
            if (address(bridgeTokenOutOptions[i].token) == bridgeTokenOut) {
                return i;
            }
        }
        return n;
    }

    /// Retrieves the necessary data for bridging tokens from the current chain
    /// to a specified destination chain using Across Protocol.
    /// Across requires a fee that's paid to relayers for bridging. The
    /// AcrossBridgeRoute specifies a pctFee and flatFee to ensure that an
    /// Across relayer will fill the order. The input amount must cover the max
    /// of the pctFee and the flatFee.
    function _getBridgeData(
        uint256 toChainId,
        TokenAmount[] calldata bridgeTokenOutOptions
    )
        internal
        view
        returns (
            address inToken,
            uint256 inAmount,
            address outToken,
            uint256 outAmount
        )
    {
        AcrossBridgeRoute memory bridgeRoute = bridgeRouteMapping[toChainId];
        require(
            bridgeRoute.bridgeTokenOut != address(0),
            "DPAB: bridge route not found"
        );

        uint256 index = _findBridgeTokenOut(
            bridgeTokenOutOptions,
            bridgeRoute.bridgeTokenOut
        );
        // If the index is the length of the array, then the bridge token out
        // was not found in the list of options.
        require(index < bridgeTokenOutOptions.length, "DPAB: bad bridge token");

        // Calculate the amount that must be deposited to cover the fees.
        uint256 toAmount = bridgeTokenOutOptions[index].amount;
        uint256 amtWithPctFee = (toAmount *
            (ONE_HUNDRED_PERCENT + bridgeRoute.pctFee)) / ONE_HUNDRED_PERCENT;
        uint256 amtWithFlatFee = toAmount + bridgeRoute.flatFee;

        inToken = bridgeRoute.bridgeTokenIn;
        // Return the larger of the two amounts
        inAmount = amtWithPctFee > amtWithFlatFee
            ? amtWithPctFee
            : amtWithFlatFee;

        outToken = bridgeRoute.bridgeTokenOut;
        outAmount = bridgeTokenOutOptions[index].amount;
    }

    /// Determine the input token and amount required for bridging to
    /// another chain.
    function getBridgeTokenIn(
        uint256 toChainId,
        TokenAmount[] calldata bridgeTokenOutOptions
    ) public view returns (address bridgeTokenIn, uint256 inAmount) {
        (bridgeTokenIn, inAmount, , ) = _getBridgeData(
            toChainId,
            bridgeTokenOutOptions
        );
    }

    /// Initiate a bridge to a destination chain using Across Protocol.
    function sendToChain(
        uint256 toChainId,
        address toAddress,
        TokenAmount[] calldata bridgeTokenOutOptions,
        bytes calldata extraData
    ) public {
        require(toChainId != block.chainid, "DPAB: same chain");

        (
            address inToken,
            uint256 inAmount,
            address outToken,
            uint256 outAmount
        ) = _getBridgeData({
                toChainId: toChainId,
                bridgeTokenOutOptions: bridgeTokenOutOptions
            });
        require(outAmount > 0, "DPAB: zero amount");

        // Parse remaining arguments from extraData
        ExtraData memory extra;
        extra = abi.decode(extraData, (ExtraData));

        // Move input token from caller to this contract and approve the
        // Across SpokePool contract.
        IERC20(inToken).safeTransferFrom({
            from: msg.sender,
            to: address(this),
            value: inAmount
        });
        IERC20(inToken).forceApprove({
            spender: address(spokePool),
            value: inAmount
        });

        spokePool.depositV3({
            depositor: address(this),
            recipient: toAddress,
            inputToken: inToken,
            outputToken: outToken,
            inputAmount: inAmount,
            outputAmount: outAmount,
            destinationChainId: toChainId,
            exclusiveRelayer: extra.exclusiveRelayer,
            quoteTimestamp: extra.quoteTimestamp,
            fillDeadline: extra.fillDeadline,
            exclusivityDeadline: extra.exclusivityDeadline,
            message: extra.message
        });

        emit BridgeInitiated({
            fromAddress: msg.sender,
            fromToken: inToken,
            fromAmount: inAmount,
            toChainId: toChainId,
            toAddress: toAddress,
            toToken: outToken,
            toAmount: outAmount
        });
    }
}

File 3 of 11 : 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 4 of 11 : 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 5 of 11 : 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 6 of 11 : V3SpokePoolInterface.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

// Contains structs and functions used by SpokePool contracts to facilitate universal settlement.
interface V3SpokePoolInterface {
    /**************************************
     *              ENUMS                 *
     **************************************/

    // Fill status tracks on-chain state of deposit, uniquely identified by relayHash.
    enum FillStatus {
        Unfilled,
        RequestedSlowFill,
        Filled
    }
    // Fill type is emitted in the FilledRelay event to assist Dataworker with determining which types of
    // fills to refund (e.g. only fast fills) and whether a fast fill created a sow fill excess.
    enum FillType {
        FastFill,
        // Fast fills are normal fills that do not replace a slow fill request.
        ReplacedSlowFill,
        // Replaced slow fills are fast fills that replace a slow fill request. This type is used by the Dataworker
        // to know when to send excess funds from the SpokePool to the HubPool because they can no longer be used
        // for a slow fill execution.
        SlowFill
        // Slow fills are requested via requestSlowFill and executed by executeSlowRelayLeaf after a bundle containing
        // the slow fill is validated.
    }

    /**************************************
     *              STRUCTS               *
     **************************************/

    // This struct represents the data to fully specify a **unique** relay submitted on this chain.
    // This data is hashed with the chainId() and saved by the SpokePool to prevent collisions and protect against
    // replay attacks on other chains. If any portion of this data differs, the relay is considered to be
    // completely distinct.
    struct V3RelayData {
        // The address that made the deposit on the origin chain.
        address depositor;
        // The recipient address on the destination chain.
        address recipient;
        // This is the exclusive relayer who can fill the deposit before the exclusivity deadline.
        address exclusiveRelayer;
        // Token that is deposited on origin chain by depositor.
        address inputToken;
        // Token that is received on destination chain by recipient.
        address outputToken;
        // The amount of input token deposited by depositor.
        uint256 inputAmount;
        // The amount of output token to be received by recipient.
        uint256 outputAmount;
        // Origin chain id.
        uint256 originChainId;
        // The id uniquely identifying this deposit on the origin chain.
        uint32 depositId;
        // The timestamp on the destination chain after which this deposit can no longer be filled.
        uint32 fillDeadline;
        // The timestamp on the destination chain after which any relayer can fill the deposit.
        uint32 exclusivityDeadline;
        // Data that is forwarded to the recipient.
        bytes message;
    }

    // Contains parameters passed in by someone who wants to execute a slow relay leaf.
    struct V3SlowFill {
        V3RelayData relayData;
        uint256 chainId;
        uint256 updatedOutputAmount;
    }

    // Contains information about a relay to be sent along with additional information that is not unique to the
    // relay itself but is required to know how to process the relay. For example, "updatedX" fields can be used
    // by the relayer to modify fields of the relay with the depositor's permission, and "repaymentChainId" is specified
    // by the relayer to determine where to take a relayer refund, but doesn't affect the uniqueness of the relay.
    struct V3RelayExecutionParams {
        V3RelayData relay;
        bytes32 relayHash;
        uint256 updatedOutputAmount;
        address updatedRecipient;
        bytes updatedMessage;
        uint256 repaymentChainId;
    }

    // Packs together parameters emitted in FilledV3Relay because there are too many emitted otherwise.
    // Similar to V3RelayExecutionParams, these parameters are not used to uniquely identify the deposit being
    // filled so they don't have to be unpacked by all clients.
    struct V3RelayExecutionEventInfo {
        address updatedRecipient;
        bytes updatedMessage;
        uint256 updatedOutputAmount;
        FillType fillType;
    }

    /**************************************
     *              EVENTS                *
     **************************************/

    event V3FundsDeposited(
        address inputToken,
        address outputToken,
        uint256 inputAmount,
        uint256 outputAmount,
        uint256 indexed destinationChainId,
        uint32 indexed depositId,
        uint32 quoteTimestamp,
        uint32 fillDeadline,
        uint32 exclusivityDeadline,
        address indexed depositor,
        address recipient,
        address exclusiveRelayer,
        bytes message
    );

    event RequestedSpeedUpV3Deposit(
        uint256 updatedOutputAmount,
        uint32 indexed depositId,
        address indexed depositor,
        address updatedRecipient,
        bytes updatedMessage,
        bytes depositorSignature
    );

    event FilledV3Relay(
        address inputToken,
        address outputToken,
        uint256 inputAmount,
        uint256 outputAmount,
        uint256 repaymentChainId,
        uint256 indexed originChainId,
        uint32 indexed depositId,
        uint32 fillDeadline,
        uint32 exclusivityDeadline,
        address exclusiveRelayer,
        address indexed relayer,
        address depositor,
        address recipient,
        bytes message,
        V3RelayExecutionEventInfo relayExecutionInfo
    );

    event RequestedV3SlowFill(
        address inputToken,
        address outputToken,
        uint256 inputAmount,
        uint256 outputAmount,
        uint256 indexed originChainId,
        uint32 indexed depositId,
        uint32 fillDeadline,
        uint32 exclusivityDeadline,
        address exclusiveRelayer,
        address depositor,
        address recipient,
        bytes message
    );

    /**************************************
     *              FUNCTIONS             *
     **************************************/

    function depositV3(
        address depositor,
        address recipient,
        address inputToken,
        address outputToken,
        uint256 inputAmount,
        uint256 outputAmount,
        uint256 destinationChainId,
        address exclusiveRelayer,
        uint32 quoteTimestamp,
        uint32 fillDeadline,
        uint32 exclusivityDeadline,
        bytes calldata message
    ) external payable;

    function depositV3Now(
        address depositor,
        address recipient,
        address inputToken,
        address outputToken,
        uint256 inputAmount,
        uint256 outputAmount,
        uint256 destinationChainId,
        address exclusiveRelayer,
        uint32 fillDeadlineOffset,
        uint32 exclusivityDeadline,
        bytes calldata message
    ) external payable;

    function speedUpV3Deposit(
        address depositor,
        uint32 depositId,
        uint256 updatedOutputAmount,
        address updatedRecipient,
        bytes calldata updatedMessage,
        bytes calldata depositorSignature
    ) external;

    function fillV3Relay(V3RelayData calldata relayData, uint256 repaymentChainId) external;

    function fillV3RelayWithUpdatedDeposit(
        V3RelayData calldata relayData,
        uint256 repaymentChainId,
        uint256 updatedOutputAmount,
        address updatedRecipient,
        bytes calldata updatedMessage,
        bytes calldata depositorSignature
    ) external;

    function requestV3SlowFill(V3RelayData calldata relayData) external;

    function executeV3SlowRelayLeaf(
        V3SlowFill calldata slowFillLeaf,
        uint32 rootBundleId,
        bytes32[] calldata proof
    ) external;

    /**************************************
     *              ERRORS                *
     **************************************/

    error DisabledRoute();
    error InvalidQuoteTimestamp();
    error InvalidFillDeadline();
    error InvalidExclusiveRelayer();
    error InvalidExclusivityDeadline();
    error MsgValueDoesNotMatchInputAmount();
    error NotExclusiveRelayer();
    error NoSlowFillsInExclusivityWindow();
    error RelayFilled();
    error InvalidSlowFillRequest();
    error ExpiredFillDeadline();
    error InvalidMerkleProof();
    error InvalidChainId();
    error InvalidMerkleLeaf();
    error ClaimedMerkleLeaf();
    error InvalidPayoutAdjustmentPct();
}

File 7 of 11 : 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 8 of 11 : 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 9 of 11 : 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 10 of 11 : 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 11 of 11 : 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": {
    "script/constants/AcrossBridgeRouteConstants.sol": {
      "AcrossBridgeRouteConstants": "0x5e9C40AC6099dC3bd18b1E9D077145ca71227eE7"
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"sourceChainId","type":"uint256"}],"name":"getAcrossBridgeRoutes","outputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"},{"components":[{"internalType":"address","name":"bridgeTokenIn","type":"address"},{"internalType":"address","name":"bridgeTokenOut","type":"address"},{"internalType":"uint256","name":"pctFee","type":"uint256"},{"internalType":"uint256","name":"flatFee","type":"uint256"}],"internalType":"struct DaimoPayAcrossBridger.AcrossBridgeRoute[]","name":"bridgeRoutes","type":"tuple[]"}],"stateMutability":"pure","type":"function"}]

60808060405234601957611281908161001f823930815050f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c63dd7c91ce1461002757600080fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261012b5761005c600435610333565b906040519182916040830160408452815180915260206060850192019060005b8181106101125750505082810360208401526020808351928381520192019060005b8181106100ac575050500390f35b91935091602060806001926060875173ffffffffffffffffffffffffffffffffffffffff815116835273ffffffffffffffffffffffffffffffffffffffff858201511685840152604081015160408401520151606082015201940191019184939261009e565b825184528695506020938401939092019160010161007c565b600080fd5b604051906080820182811067ffffffffffffffff82111761015057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761015057604052565b6060906101cf8261017f565b60028152917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018260005b82811061020657505050565b602090610211610130565b600081526000838201526000604082015260006060820152828285010152016101fa565b6080906102418261017f565b60038152917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018260005b82811061027857505050565b602090610283610130565b6000815260008382015260006040820152600060608201528282850101520161026c565b8051156102b45760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8051600110156102b45760400190565b8051600210156102b45760600190565b8051600310156102b45760800190565b8051600410156102b45760a00190565b8051600510156102b45760c00190565b6001811461113157600a81146110365760898114610ec5576101e08114610c13576121058114610aed5761a4b181146109725761e708811461071a5762013e31146103d65760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536f7572636520636861696e206e6f7420666f756e64000000000000000000006044820152fd5b6103e060e061017f565b600681529060c036602084013760e0916103f98361017f565b60068152927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b8181106106eb5750506001610437826102a7565b52610440610130565b7343000000000000000000000000000000000000038152736b175474e89094c44da98b954eedeac495271d0f60208201526676a91f7f7f80006040820152675f9e327ec67100006060820152610495846102a7565b5261049f836102a7565b50600a6104ab826102e3565b526104b4610130565b734300000000000000000000000000000000000003815273da10009cbd5d07dd0cecc66161fc93d7c9000da160208201526604f94ae6af800060408201526706ccd46763f100006060820152610509846102e3565b52610513836102e3565b50608961051f826102f3565b52610528610130565b7343000000000000000000000000000000000000038152738f3cf7ad23cd3cadbd9735aff958023239c6a063602082015266044364c5bb0000604082015267063eb89da4ed0000606082015261057d846102f3565b52610587836102f3565b5061210561059482610303565b5261059d610130565b73430000000000000000000000000000000000000381527350c5725949a6f0c72e6c4a641f24049a917db0cb60208201526605af3107a40000604082015267075af03122f5000060608201526105f284610303565b526105fc83610303565b5061a4b161060982610313565b52610612610130565b734300000000000000000000000000000000000003815273da10009cbd5d07dd0cecc66161fc93d7c9000da16020820152660665172898800060408201526707e90bfae1f90000606082015261066784610313565b5261067183610313565b5061e70861067e82610323565b52610687610130565b7343000000000000000000000000000000000000038152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266093cafac6a80006040820152670a4502144dca000060608201526106dc84610323565b526106e683610323565b509190565b6020906106f6610130565b60008152600083820152600060408201526000606082015282828801015201610423565b5061072560a061017f565b6004815290608036602084013760a09161073e8361017f565b60048152927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b818110610943575050600a61077c826102a7565b52610785610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5815273da10009cbd5d07dd0cecc66161fc93d7c9000da160208201526601c6bf52634000604082015267015181ff25a9800060608201526107da846102a7565b526107e4836102a7565b5060896107f0826102e3565b526107f9610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d58152738f3cf7ad23cd3cadbd9735aff958023239c6a063602082015266016bcc41e9000060408201526701118f178fb48000606082015261084e846102e3565b52610858836102e3565b5061a4b1610865826102f3565b5261086e610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5815273da10009cbd5d07dd0cecc66161fc93d7c9000da160208201526601c6bf52634000604082015267016345785d8a000060608201526108c3846102f3565b526108cd836102f3565b5062013e316108db82610303565b526108e4610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5815273430000000000000000000000000000000000000360208201526603328b944c400060408201526703bf3b91c95b0000606082015261093984610303565b526106e683610303565b60209061094e610130565b60008152600083820152600060408201526000606082015282828801015201610768565b5061097d608061017f565b60038152906060366020840137610992610235565b916101e061099f826102a7565b526109a8610130565b73af88d065e77c8cc2239327c5edb3a432268e583181527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c060608201526109f8846102a7565b52610a02836102a7565b5061e708610a0f826102e3565b52610a18610130565b73da10009cbd5d07dd0cecc66161fc93d7c9000da18152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266016bcc41e90000604082015267011c37937e0800006060820152610a6d846102e3565b52610a77836102e3565b5062013e31610a85826102f3565b52610a8e610130565b73da10009cbd5d07dd0cecc66161fc93d7c9000da1815273430000000000000000000000000000000000000360208201526603328b944c400060408201526703bf3b91c95b00006060820152610ae3846102f3565b526106e6836102f3565b50606090610afa8261017f565b600281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301366020830137610b2f6101c3565b926101e0610b3c836102a7565b52610b45610130565b73833589fcd6edb6e08f4c7c32d4f71b54bda0291381527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c082820152610b94856102a7565b52610b9e846102a7565b5062013e31610bac836102e3565b526703bf3b91c95b0000610bbe610130565b917350c5725949a6f0c72e6c4a641f24049a917db0cb835273430000000000000000000000000000000000000360208401526603328b944c40006040840152820152610c09846102e3565b526106e6836102e3565b50610c1e60c061017f565b906005825260a036602084013760c091610c378361017f565b60058152927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b818110610e965750506001610c75826102a7565b52610c7e610130565b7379a02482a880bce3f13e09da970dc34db4cd24d1815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860208201526633de9f65b880006040820152622dc6c06060820152610cce846102a7565b52610cd8836102a7565b50600a610ce4826102e3565b52610ced610130565b7379a02482a880bce3f13e09da970dc34db4cd24d18152730b2c639c533813f4aa9d7837caf62653d097ff856020820152660162b3f37660006040820152620271006060820152610d3d846102e3565b52610d47836102e3565b506089610d53826102f3565b52610d5c610130565b7379a02482a880bce3f13e09da970dc34db4cd24d18152733c499c542cef5e3811e1192ce70d8cc03d5c335960208201526601902d7bb380006040820152620298106060820152610dac846102f3565b52610db6836102f3565b50612105610dc382610303565b52610dcc610130565b7379a02482a880bce3f13e09da970dc34db4cd24d1815273833589fcd6edb6e08f4c7c32d4f71b54bda0291360208201526601902d7bb380006040820152620298106060820152610e1c84610303565b52610e2683610303565b5061a4b1610e3382610313565b52610e3c610130565b7379a02482a880bce3f13e09da970dc34db4cd24d1815273af88d065e77c8cc2239327c5edb3a432268e583160208201526601902d7bb380006040820152620298106060820152610e8c84610313565b526106e683610313565b602090610ea1610130565b60008152600083820152600060408201526000606082015282828801015201610c61565b50610ed0608061017f565b60038152906060366020840137610ee5610235565b916101e0610ef2826102a7565b52610efb610130565b733c499c542cef5e3811e1192ce70d8cc03d5c335981527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c06060820152610f4b846102a7565b52610f55836102a7565b5061e708610f62826102e3565b52610f6b610130565b738f3cf7ad23cd3cadbd9735aff958023239c6a0638152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266016bcc41e9000060408201526701351609ff7580006060820152610fc0846102e3565b52610fca836102e3565b5062013e31610fd8826102f3565b52610fe1610130565b738f3cf7ad23cd3cadbd9735aff958023239c6a063815273430000000000000000000000000000000000000360208201526603328b944c400060408201526703bf3b91c95b00006060820152610ae3846102f3565b50611041608061017f565b60038152906060366020840137611056610235565b916101e0611063826102a7565b5261106c610130565b730b2c639c533813f4aa9d7837caf62653d097ff8581527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c060608201526110bc846102a7565b526110c6836102a7565b5061e7086110d3826102e3565b526110dc610130565b73da10009cbd5d07dd0cecc66161fc93d7c9000da18152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266016bcc41e9000060408201526701351609ff7580006060820152610a6d846102e3565b5060609061113e8261017f565b600281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe083013660208301376111736101c3565b926101e0611180836102a7565b52611189610130565b73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881527379a02482a880bce3f13e09da970dc34db4cd24d16020820152656d23ad5f8000604082015261a7f8828201526111d6856102a7565b526111e0846102a7565b5062013e316111ee836102e3565b526701aa535d3d0c0000611200610130565b91736b175474e89094c44da98b954eedeac495271d0f835273430000000000000000000000000000000000000360208401526601c6bf526340006040840152820152610c09846102e356fea2646970667358221220aa30b83e853e50761c35819c96a2fee017435713d9e98f6626227c932713378964736f6c634300081a0033

Deployed Bytecode

0x6080604052600436101561001257600080fd5b60003560e01c63dd7c91ce1461002757600080fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261012b5761005c600435610333565b906040519182916040830160408452815180915260206060850192019060005b8181106101125750505082810360208401526020808351928381520192019060005b8181106100ac575050500390f35b91935091602060806001926060875173ffffffffffffffffffffffffffffffffffffffff815116835273ffffffffffffffffffffffffffffffffffffffff858201511685840152604081015160408401520151606082015201940191019184939261009e565b825184528695506020938401939092019160010161007c565b600080fd5b604051906080820182811067ffffffffffffffff82111761015057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761015057604052565b6060906101cf8261017f565b60028152917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018260005b82811061020657505050565b602090610211610130565b600081526000838201526000604082015260006060820152828285010152016101fa565b6080906102418261017f565b60038152917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018260005b82811061027857505050565b602090610283610130565b6000815260008382015260006040820152600060608201528282850101520161026c565b8051156102b45760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8051600110156102b45760400190565b8051600210156102b45760600190565b8051600310156102b45760800190565b8051600410156102b45760a00190565b8051600510156102b45760c00190565b6001811461113157600a81146110365760898114610ec5576101e08114610c13576121058114610aed5761a4b181146109725761e708811461071a5762013e31146103d65760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536f7572636520636861696e206e6f7420666f756e64000000000000000000006044820152fd5b6103e060e061017f565b600681529060c036602084013760e0916103f98361017f565b60068152927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b8181106106eb5750506001610437826102a7565b52610440610130565b7343000000000000000000000000000000000000038152736b175474e89094c44da98b954eedeac495271d0f60208201526676a91f7f7f80006040820152675f9e327ec67100006060820152610495846102a7565b5261049f836102a7565b50600a6104ab826102e3565b526104b4610130565b734300000000000000000000000000000000000003815273da10009cbd5d07dd0cecc66161fc93d7c9000da160208201526604f94ae6af800060408201526706ccd46763f100006060820152610509846102e3565b52610513836102e3565b50608961051f826102f3565b52610528610130565b7343000000000000000000000000000000000000038152738f3cf7ad23cd3cadbd9735aff958023239c6a063602082015266044364c5bb0000604082015267063eb89da4ed0000606082015261057d846102f3565b52610587836102f3565b5061210561059482610303565b5261059d610130565b73430000000000000000000000000000000000000381527350c5725949a6f0c72e6c4a641f24049a917db0cb60208201526605af3107a40000604082015267075af03122f5000060608201526105f284610303565b526105fc83610303565b5061a4b161060982610313565b52610612610130565b734300000000000000000000000000000000000003815273da10009cbd5d07dd0cecc66161fc93d7c9000da16020820152660665172898800060408201526707e90bfae1f90000606082015261066784610313565b5261067183610313565b5061e70861067e82610323565b52610687610130565b7343000000000000000000000000000000000000038152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266093cafac6a80006040820152670a4502144dca000060608201526106dc84610323565b526106e683610323565b509190565b6020906106f6610130565b60008152600083820152600060408201526000606082015282828801015201610423565b5061072560a061017f565b6004815290608036602084013760a09161073e8361017f565b60048152927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b818110610943575050600a61077c826102a7565b52610785610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5815273da10009cbd5d07dd0cecc66161fc93d7c9000da160208201526601c6bf52634000604082015267015181ff25a9800060608201526107da846102a7565b526107e4836102a7565b5060896107f0826102e3565b526107f9610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d58152738f3cf7ad23cd3cadbd9735aff958023239c6a063602082015266016bcc41e9000060408201526701118f178fb48000606082015261084e846102e3565b52610858836102e3565b5061a4b1610865826102f3565b5261086e610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5815273da10009cbd5d07dd0cecc66161fc93d7c9000da160208201526601c6bf52634000604082015267016345785d8a000060608201526108c3846102f3565b526108cd836102f3565b5062013e316108db82610303565b526108e4610130565b734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5815273430000000000000000000000000000000000000360208201526603328b944c400060408201526703bf3b91c95b0000606082015261093984610303565b526106e683610303565b60209061094e610130565b60008152600083820152600060408201526000606082015282828801015201610768565b5061097d608061017f565b60038152906060366020840137610992610235565b916101e061099f826102a7565b526109a8610130565b73af88d065e77c8cc2239327c5edb3a432268e583181527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c060608201526109f8846102a7565b52610a02836102a7565b5061e708610a0f826102e3565b52610a18610130565b73da10009cbd5d07dd0cecc66161fc93d7c9000da18152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266016bcc41e90000604082015267011c37937e0800006060820152610a6d846102e3565b52610a77836102e3565b5062013e31610a85826102f3565b52610a8e610130565b73da10009cbd5d07dd0cecc66161fc93d7c9000da1815273430000000000000000000000000000000000000360208201526603328b944c400060408201526703bf3b91c95b00006060820152610ae3846102f3565b526106e6836102f3565b50606090610afa8261017f565b600281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08301366020830137610b2f6101c3565b926101e0610b3c836102a7565b52610b45610130565b73833589fcd6edb6e08f4c7c32d4f71b54bda0291381527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c082820152610b94856102a7565b52610b9e846102a7565b5062013e31610bac836102e3565b526703bf3b91c95b0000610bbe610130565b917350c5725949a6f0c72e6c4a641f24049a917db0cb835273430000000000000000000000000000000000000360208401526603328b944c40006040840152820152610c09846102e3565b526106e6836102e3565b50610c1e60c061017f565b906005825260a036602084013760c091610c378361017f565b60058152927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b818110610e965750506001610c75826102a7565b52610c7e610130565b7379a02482a880bce3f13e09da970dc34db4cd24d1815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860208201526633de9f65b880006040820152622dc6c06060820152610cce846102a7565b52610cd8836102a7565b50600a610ce4826102e3565b52610ced610130565b7379a02482a880bce3f13e09da970dc34db4cd24d18152730b2c639c533813f4aa9d7837caf62653d097ff856020820152660162b3f37660006040820152620271006060820152610d3d846102e3565b52610d47836102e3565b506089610d53826102f3565b52610d5c610130565b7379a02482a880bce3f13e09da970dc34db4cd24d18152733c499c542cef5e3811e1192ce70d8cc03d5c335960208201526601902d7bb380006040820152620298106060820152610dac846102f3565b52610db6836102f3565b50612105610dc382610303565b52610dcc610130565b7379a02482a880bce3f13e09da970dc34db4cd24d1815273833589fcd6edb6e08f4c7c32d4f71b54bda0291360208201526601902d7bb380006040820152620298106060820152610e1c84610303565b52610e2683610303565b5061a4b1610e3382610313565b52610e3c610130565b7379a02482a880bce3f13e09da970dc34db4cd24d1815273af88d065e77c8cc2239327c5edb3a432268e583160208201526601902d7bb380006040820152620298106060820152610e8c84610313565b526106e683610313565b602090610ea1610130565b60008152600083820152600060408201526000606082015282828801015201610c61565b50610ed0608061017f565b60038152906060366020840137610ee5610235565b916101e0610ef2826102a7565b52610efb610130565b733c499c542cef5e3811e1192ce70d8cc03d5c335981527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c06060820152610f4b846102a7565b52610f55836102a7565b5061e708610f62826102e3565b52610f6b610130565b738f3cf7ad23cd3cadbd9735aff958023239c6a0638152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266016bcc41e9000060408201526701351609ff7580006060820152610fc0846102e3565b52610fca836102e3565b5062013e31610fd8826102f3565b52610fe1610130565b738f3cf7ad23cd3cadbd9735aff958023239c6a063815273430000000000000000000000000000000000000360208201526603328b944c400060408201526703bf3b91c95b00006060820152610ae3846102f3565b50611041608061017f565b60038152906060366020840137611056610235565b916101e0611063826102a7565b5261106c610130565b730b2c639c533813f4aa9d7837caf62653d097ff8581527379a02482a880bce3f13e09da970dc34db4cd24d16020820152660110d9316ec00060408201526201d4c060608201526110bc846102a7565b526110c6836102a7565b5061e7086110d3826102e3565b526110dc610130565b73da10009cbd5d07dd0cecc66161fc93d7c9000da18152734af15ec2a0bd43db75dd04e62faa3b8ef36b00d5602082015266016bcc41e9000060408201526701351609ff7580006060820152610a6d846102e3565b5060609061113e8261017f565b600281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe083013660208301376111736101c3565b926101e0611180836102a7565b52611189610130565b73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881527379a02482a880bce3f13e09da970dc34db4cd24d16020820152656d23ad5f8000604082015261a7f8828201526111d6856102a7565b526111e0846102a7565b5062013e316111ee836102e3565b526701aa535d3d0c0000611200610130565b91736b175474e89094c44da98b954eedeac495271d0f835273430000000000000000000000000000000000000360208401526601c6bf526340006040840152820152610c09846102e356fea2646970667358221220aa30b83e853e50761c35819c96a2fee017435713d9e98f6626227c932713378964736f6c634300081a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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.