S Price: $0.534543 (-2.66%)

Contract

0x9d1A576EF61e734CD0272a8652Fad5A18FB1337F

Overview

S Balance

Sonic LogoSonic LogoSonic Logo13.275748931130030226 S

S Value

$7.10 (@ $0.53/S)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Send72557172025-02-10 11:21:035 days ago1739186463IN
0x9d1A576E...18FB1337F
0 S0.0206824851
Transfer43003592025-01-17 19:37:4128 days ago1737142661IN
0x9d1A576E...18FB1337F
15 S0.00231605110

Latest 1 internal transaction

Parent Transaction Hash Block From To
72557172025-02-10 11:21:035 days ago1739186463
0x9d1A576E...18FB1337F
1.72425106 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LayerZeroSender

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 13 : LayerZeroSender.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ArcBaseWithRainbowRoad} from "../bases/ArcBaseWithRainbowRoad.sol";
import {ILayerZeroEndpoint} from "../interfaces/ILayerZeroEndpoint.sol";
import {IRainbowRoad} from "../interfaces/IRainbowRoad.sol";

/**
 * Sends messages to the LayerZero endpoint
 */
contract LayerZeroSender is ArcBaseWithRainbowRoad 
{
    enum PaymentTypes {
        NATIVE,
        ZRO
    }

    ILayerZeroEndpoint public endpoint;
    PaymentTypes public paymentType;
    address public zroToken;
    mapping(address => bool) public admins;

    event MessageSent(uint64 destinationChainSelector, bytes trustedRemote, string action, address actionRecipient);

    constructor(address _rainbowRoad, address _endpoint) ArcBaseWithRainbowRoad(_rainbowRoad)
    {
        require(_endpoint != address(0), 'LayerZero endpoint cannot be zero address');
        endpoint = ILayerZeroEndpoint(_endpoint);
        paymentType = PaymentTypes.NATIVE;
        zroToken = address(0);
    }
    
    function setZroToken(address _zroToken) external onlyOwner
    {
        require(_zroToken != address(0), 'ZRO token cannot be zero address');
        zroToken = _zroToken;
    }
    
    function setEndpoint(address _endpoint) external onlyOwner
    {
        require(_endpoint != address(0), 'LayerZero endpoint cannot be zero address');
        endpoint = ILayerZeroEndpoint(_endpoint);
    }
    
    function setPaymentTypeToZro() external onlyOwner
    {
        require(paymentType != PaymentTypes.ZRO, 'Fees are already paid in ZRO');
        paymentType = PaymentTypes.ZRO;
    }
    
    function setPaymentTypeToNative() external onlyOwner
    {
        require(paymentType != PaymentTypes.NATIVE, 'Fees are already paid in NATIVE');
        paymentType = PaymentTypes.NATIVE;
    }
    
    function enableAdmin(address admin) external onlyOwner
    {
        require(!admins[admin], 'Admin is enabled');
        admins[admin] = true;
    }
    
    function disableAdmin(address admin) external onlyOwner
    {
        require(admins[admin], 'Admin is disabled');
        admins[admin] = false;
    }

    function send(uint16 destinationChainSelector, address messageReceiver, address actionRecipient, string calldata action, bytes calldata payload) external nonReentrant whenNotPaused onlyAdmins
    {
        return _send(destinationChainSelector, messageReceiver, actionRecipient, action, payload);
    }
    
    function send(uint16 destinationChainSelector, address messageReceiver, string calldata action, bytes calldata payload) external nonReentrant whenNotPaused
    {
        return _send(destinationChainSelector, messageReceiver, msg.sender, action, payload);
    }

    function _send(uint16 destinationChainSelector, address messageReceiver, address actionRecipient, string calldata action, bytes calldata payload) internal
    {
        require(messageReceiver != address(0), 'Message receiver cannot be zero address');

        rainbowRoad.sendAction(action, actionRecipient, payload);
        
        bytes memory adapterParams;
        {
            string memory adapterParamsConfigName = 'layerzero_sender.adapter_params';
            string memory adapterParamsConfigNameOverride = string.concat(adapterParamsConfigName, '_', action);
            adapterParams = rainbowRoad.config(adapterParamsConfigNameOverride);
            if(adapterParams.length == 0) {
                adapterParams = rainbowRoad.config(adapterParamsConfigName);
            }
        }
        
        bytes memory message = abi.encode(action, actionRecipient, payload);
        bytes memory trustedRemote = abi.encodePacked(messageReceiver, address(this));
        
        (uint nativeFee, uint zroFee) = endpoint.estimateFees(
            destinationChainSelector,
            address(this),
            message,
            paymentType == PaymentTypes.ZRO,
            adapterParams
        );
        
        if (paymentType == PaymentTypes.ZRO) {
            
            IERC20(zroToken).approve(address(endpoint), zroFee);
            
            endpoint.send(
                destinationChainSelector,
                trustedRemote,
                message,
                payable(this),
                address(this),
                adapterParams
            );
        } else {
            
            endpoint.send{value: nativeFee}(
                destinationChainSelector,
                trustedRemote,
                message,
                payable(this),
                address(0),
                adapterParams
            );
        }

        emit MessageSent(destinationChainSelector, trustedRemote, action, actionRecipient);
    }
    
    /// @dev Only calls from the enabled admins are accepted.
    modifier onlyAdmins() 
    {
        require(admins[msg.sender], 'Invalid admin');
        _;
    }

    receive() external payable {}
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 4 of 13 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 5 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @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 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;

    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
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // 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 6 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` 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 amount) external returns (bool);
}

File 7 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 13 : ArcBase.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * Provides set of properties, functions, and modifiers to help with 
 * security and access control of extending contracts
 */
contract ArcBase is Ownable2Step, Pausable, ReentrancyGuard
{
    function pause() public onlyOwner
    {
        _pause();
    }
    
    function unpause() public onlyOwner
    {
        _unpause();
    }

    function withdrawNative(address beneficiary) public onlyOwner {
        uint256 amount = address(this).balance;
        (bool sent, ) = beneficiary.call{value: amount}("");
        require(sent, 'Unable to withdraw');
    }

    function withdrawToken(address beneficiary, address token) public onlyOwner {
        uint256 amount = IERC20(token).balanceOf(address(this));
        IERC20(token).transfer(beneficiary, amount);
    }
}

File 9 of 13 : ArcBaseWithRainbowRoad.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

import {ArcBase} from "./ArcBase.sol";
import {IRainbowRoad} from "../interfaces/IRainbowRoad.sol";

/**
 * Extends the ArcBase contract to provide
 * for interactions with the Rainbow Road
 */
contract ArcBaseWithRainbowRoad is ArcBase
{
    IRainbowRoad public rainbowRoad;
    
    constructor(address _rainbowRoad)
    {
        require(_rainbowRoad != address(0), 'Rainbow Road cannot be zero address');
        rainbowRoad = IRainbowRoad(_rainbowRoad);
    }
    
    function setRainbowRoad(address _rainbowRoad) external onlyOwner
    {
        require(_rainbowRoad != address(0), 'Rainbow Road cannot be zero address');
        rainbowRoad = IRainbowRoad(_rainbowRoad);
    }
    
    /// @dev Only calls from the Rainbow Road are accepted.
    modifier onlyRainbowRoad() 
    {
        require(msg.sender == address(rainbowRoad), 'Must be called by Rainbow Road');
        _;
    }
}

File 10 of 13 : IArc.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

interface IArc {
    function approve(address _spender, uint _value) external returns (bool);
    function burn(uint amount) external;
    function mint(address account, uint amount) external;
    function transfer(address, uint) external returns (bool);
    function transferFrom(address _from, address _to, uint _value) external;
}

File 11 of 13 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(
        uint16 _dstChainId,
        bytes calldata _destination,
        bytes calldata _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes calldata _adapterParams
    ) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        address _dstAddress,
        uint64 _nonce,
        uint _gasLimit,
        bytes calldata _payload
    ) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(
        uint16 _dstChainId,
        address _userApplication,
        bytes calldata _payload,
        bool _payInZRO,
        bytes calldata _adapterParam
    ) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        bytes calldata _payload
    ) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(
        uint16 _version,
        uint16 _chainId,
        address _userApplication,
        uint _configType
    ) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 12 of 13 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(
        uint16 _version,
        uint16 _chainId,
        uint _configType,
        bytes calldata _config
    ) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 13 of 13 : IRainbowRoad.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

import {IArc} from "./IArc.sol";

interface IRainbowRoad {
    
    function acceptTeam() external;
    function actionHandlers(string calldata action) external view returns (address);
    function arc() external view returns (IArc);
    function blockToken(address tokenAddress) external;
    function disableFeeManager(address feeManager) external;
    function disableOpenTokenWhitelisting() external;
    function disableReceiver(address receiver) external;
    function disableSender(address sender) external;
    function disableSendFeeBurn() external;
    function disableSendFeeCharge() external;
    function disableWhitelistingFeeBurn() external;
    function disableWhitelistingFeeCharge() external;
    function enableFeeManager(address feeManager) external;
    function enableOpenTokenWhitelisting() external;
    function enableReceiver(address receiver) external;
    function enableSendFeeBurn() external;
    function enableSender(address sender) external;
    function enableSendFeeCharge() external;
    function enableWhitelistingFeeBurn() external;
    function enableWhitelistingFeeCharge() external;
    function sendFee() external view returns (uint256);
    function whitelistingFee() external view returns (uint256);
    function chargeSendFee() external view returns (bool);
    function chargeWhitelistingFee() external view returns (bool);
    function burnSendFee() external view returns (bool);
    function burnWhitelistingFee() external view returns (bool);
    function openTokenWhitelisting() external view returns (bool);
    function config(string calldata configName) external view returns (bytes memory);
    function blockedTokens(address tokenAddress) external view returns (bool);
    function feeManagers(address feeManager) external view returns (bool);
    function receiveAction(string calldata action, address to, bytes calldata payload) external;
    function sendAction(string calldata action, address from, bytes calldata payload) external;
    function setActionHandler(string memory action, address handler) external;
    function setArc(address _arc) external;
    function setSendFee(uint256 _fee) external;
    function setTeam(address _team) external;
    function setTeamRate(uint256 _teamRate) external;
    function setToken(string calldata tokenSymbol, address tokenAddress) external;
    function setWhitelistingFee(uint256 _fee) external;
    function team() external view returns (address);
    function teamRate() external view returns (uint256);
    function tokens(string calldata tokenSymbol) external view returns (address);
    function MAX_TEAM_RATE() external view returns (uint256);
    function receivers(address receiver) external view returns (bool);
    function senders(address sender) external view returns (bool);
    function unblockToken(address tokenAddress) external;
    function whitelist(address tokenAddress) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rainbowRoad","type":"address"},{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"destinationChainSelector","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"trustedRemote","type":"bytes"},{"indexed":false,"internalType":"string","name":"action","type":"string"},{"indexed":false,"internalType":"address","name":"actionRecipient","type":"address"}],"name":"MessageSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"disableAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"enableAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentType","outputs":[{"internalType":"enum LayerZeroSender.PaymentTypes","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rainbowRoad","outputs":[{"internalType":"contract IRainbowRoad","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"destinationChainSelector","type":"uint16"},{"internalType":"address","name":"messageReceiver","type":"address"},{"internalType":"string","name":"action","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"destinationChainSelector","type":"uint16"},{"internalType":"address","name":"messageReceiver","type":"address"},{"internalType":"address","name":"actionRecipient","type":"address"},{"internalType":"string","name":"action","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"}],"name":"setEndpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPaymentTypeToNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPaymentTypeToZro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rainbowRoad","type":"address"}],"name":"setRainbowRoad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_zroToken","type":"address"}],"name":"setZroToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"withdrawNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zroToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620020e2380380620020e28339810160408190526200003491620001f8565b8162000040336200016d565b6001805460ff60a01b191681556002556001600160a01b038116620000b85760405162461bcd60e51b815260206004820152602360248201527f5261696e626f7720526f61642063616e6e6f74206265207a65726f206164647260448201526265737360e81b60648201526084015b60405180910390fd5b600380546001600160a01b0319166001600160a01b039283161790558116620001365760405162461bcd60e51b815260206004820152602960248201527f4c617965725a65726f20656e64706f696e742063616e6e6f74206265207a65726044820152686f206164647265737360b81b6064820152608401620000af565b600480546001600160a81b0319166001600160a01b039290921691909117905550600580546001600160a01b031916905562000230565b600180546001600160a01b031916905562000188816200018b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001f357600080fd5b919050565b600080604083850312156200020c57600080fd5b6200021783620001db565b91506200022760208401620001db565b90509250929050565b611ea280620002406000396000f3fe60806040526004361061018f5760003560e01c8063751e9a9c116100d6578063dbbb41551161007f578063e30c397811610059578063e30c3978146104aa578063ed53ff81146104d5578063f2fde38b146104f557600080fd5b8063dbbb41551461044a578063dd8d329c1461046a578063e1fdfe871461048a57600080fd5b80638da5cb5b116100b05780638da5cb5b146103df578063bea532ff1461040a578063bfb5944a1461042a57600080fd5b8063751e9a9c1461039557806379ba5097146103b55780638456cb59146103ca57600080fd5b80635a3ced59116101385780635f95266f116101125780635f95266f1461033e5780636a93681714610353578063715018a61461038057600080fd5b80635a3ced59146102cc5780635c975abb146102e15780635e280f111461031157600080fd5b80633f4ba83a116101695780633f4ba83a14610225578063429b62e51461023a578063452a3a701461027a57600080fd5b80632763b8da1461019b5780632f622e6b146101e35780633aeac4e11461020557600080fd5b3661019657005b600080fd5b3480156101a757600080fd5b506004546101cd9074010000000000000000000000000000000000000000900460ff1681565b6040516101da9190611894565b60405180910390f35b3480156101ef57600080fd5b506102036101fe3660046118fe565b610515565b005b34801561021157600080fd5b50610203610220366004611920565b6105d7565b34801561023157600080fd5b50610203610713565b34801561024657600080fd5b5061026a6102553660046118fe565b60066020526000908152604090205460ff1681565b60405190151581526020016101da565b34801561028657600080fd5b506005546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101da565b3480156102d857600080fd5b50610203610725565b3480156102ed57600080fd5b5060015474010000000000000000000000000000000000000000900460ff1661026a565b34801561031d57600080fd5b506004546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561034a57600080fd5b506102036107f4565b34801561035f57600080fd5b506003546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561038c57600080fd5b506102036108c0565b3480156103a157600080fd5b506102036103b03660046118fe565b6108d2565b3480156103c157600080fd5b5061020361099b565b3480156103d657600080fd5b50610203610a36565b3480156103eb57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102a7565b34801561041657600080fd5b506102036104253660046118fe565b610a46565b34801561043657600080fd5b506102036104453660046118fe565b610b13565b34801561045657600080fd5b506102036104653660046118fe565b610beb565b34801561047657600080fd5b506102036104853660046119ae565b610cc3565b34801561049657600080fd5b506102036104a5366004611a3f565b610cf4565b3480156104b657600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166102a7565b3480156104e157600080fd5b506102036104f03660046118fe565b610d85565b34801561050157600080fd5b506102036105103660046118fe565b610e37565b61051d610ee7565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d8060008114610577576040519150601f19603f3d011682016040523d82523d6000602084013e61057c565b606091505b50509050806105d25760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207769746864726177000000000000000000000000000060448201526064015b60405180910390fd5b505050565b6105df610ee7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa15801561064c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106709190611ae1565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018390529192509083169063a9059cbb906044016020604051808303816000875af11580156106e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070d9190611afa565b50505050565b61071b610ee7565b610723610f4e565b565b61072d610ee7565b600160045474010000000000000000000000000000000000000000900460ff16600181111561075e5761075e611865565b036107ab5760405162461bcd60e51b815260206004820152601c60248201527f466565732061726520616c7265616479207061696420696e205a524f0000000060448201526064016105c9565b60048054600191907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000835b0217905550565b6107fc610ee7565b600060045474010000000000000000000000000000000000000000900460ff16600181111561082d5761082d611865565b0361087a5760405162461bcd60e51b815260206004820152601f60248201527f466565732061726520616c7265616479207061696420696e204e41544956450060448201526064016105c9565b60048054600091907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000836107ed565b6108c8610ee7565b6107236000610fcb565b6108da610ee7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff1661094f5760405162461bcd60e51b815260206004820152601160248201527f41646d696e2069732064697361626c656400000000000000000000000000000060448201526064016105c9565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610a2a5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016105c9565b610a3381610fcb565b50565b610a3e610ee7565b610723610ffc565b610a4e610ee7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff1615610ac45760405162461bcd60e51b815260206004820152601060248201527f41646d696e20697320656e61626c65640000000000000000000000000000000060448201526064016105c9565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610b1b610ee7565b73ffffffffffffffffffffffffffffffffffffffff8116610ba45760405162461bcd60e51b815260206004820152602360248201527f5261696e626f7720526f61642063616e6e6f74206265207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105c9565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610bf3610ee7565b73ffffffffffffffffffffffffffffffffffffffff8116610c7c5760405162461bcd60e51b815260206004820152602960248201527f4c617965725a65726f20656e64706f696e742063616e6e6f74206265207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016105c9565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610ccb61106b565b610cd36110c2565b610ce28686338787878761112d565b610cec6001600255565b505050505050565b610cfc61106b565b610d046110c2565b3360009081526006602052604090205460ff16610d635760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642061646d696e0000000000000000000000000000000000000060448201526064016105c9565b610d728787878787878761112d565b610d7c6001600255565b50505050505050565b610d8d610ee7565b73ffffffffffffffffffffffffffffffffffffffff8116610df05760405162461bcd60e51b815260206004820181905260248201527f5a524f20746f6b656e2063616e6e6f74206265207a65726f206164647265737360448201526064016105c9565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e3f610ee7565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610ea260005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105c9565b610f56611786565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610a33816117f0565b6110046110c2565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fa13390565b60028054036110bc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105c9565b60028055565b60015474010000000000000000000000000000000000000000900460ff16156107235760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105c9565b73ffffffffffffffffffffffffffffffffffffffff86166111b65760405162461bcd60e51b815260206004820152602760248201527f4d6573736167652072656365697665722063616e6e6f74206265207a65726f2060448201527f616464726573730000000000000000000000000000000000000000000000000060648201526084016105c9565b6003546040517f6eb8011d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636eb8011d9061121490879087908a9088908890600401611b47565b600060405180830381600087803b15801561122e57600080fd5b505af1158015611242573d6000803e3d6000fd5b50505050606060006040518060400160405280601f81526020017f6c617965727a65726f5f73656e6465722e616461707465725f706172616d73008152509050600081878760405160200161129993929190611bba565b60408051601f19818403018152908290526003547f96d436c000000000000000000000000000000000000000000000000000000000835290925073ffffffffffffffffffffffffffffffffffffffff16906396d436c0906112fe908490600401611c39565b600060405180830381865afa15801561131b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113439190810190611c7b565b925082516000036113ec576003546040517f96d436c000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906396d436c0906113a4908590600401611c39565b600060405180830381865afa1580156113c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113e99190810190611c7b565b92505b505060008585888686604051602001611409959493929190611b47565b60408051601f19818403018152908290527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608b811b8216602085015230901b166034830152915060009060480160408051601f19818403018152919052600454909150600090819073ffffffffffffffffffffffffffffffffffffffff166340a7bb108d3087600160045474010000000000000000000000000000000000000000900460ff1660018111156114c2576114c2611865565b148a6040518663ffffffff1660e01b81526004016114e4959493929190611d28565b6040805180830381865afa158015611500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115249190611d7b565b9092509050600160045474010000000000000000000000000000000000000000900460ff16600181111561155a5761155a611865565b0361169f57600554600480546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063095ea7b3906044016020604051808303816000875af11580156115de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116029190611afa565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c58031008d858730308b6040518763ffffffff1660e01b815260040161166896959493929190611d9f565b600060405180830381600087803b15801561168257600080fd5b505af1158015611696573d6000803e3d6000fd5b50505050611739565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c5803100838e86883060008c6040518863ffffffff1660e01b815260040161170696959493929190611d9f565b6000604051808303818588803b15801561171f57600080fd5b505af1158015611733573d6000803e3d6000fd5b50505050505b7f742549daabef48dfd7bb602b74ff1d60c222b230639e62d416c43bd873fc68bb8c848b8b8e604051611770959493929190611e13565b60405180910390a1505050505050505050505050565b60015474010000000000000000000000000000000000000000900460ff166107235760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105c9565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600283106118cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b803573ffffffffffffffffffffffffffffffffffffffff811681146118f957600080fd5b919050565b60006020828403121561191057600080fd5b611919826118d5565b9392505050565b6000806040838503121561193357600080fd5b61193c836118d5565b915061194a602084016118d5565b90509250929050565b803561ffff811681146118f957600080fd5b60008083601f84011261197757600080fd5b50813567ffffffffffffffff81111561198f57600080fd5b6020830191508360208285010111156119a757600080fd5b9250929050565b600080600080600080608087890312156119c757600080fd5b6119d087611953565b95506119de602088016118d5565b9450604087013567ffffffffffffffff808211156119fb57600080fd5b611a078a838b01611965565b90965094506060890135915080821115611a2057600080fd5b50611a2d89828a01611965565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611a5a57600080fd5b611a6388611953565b9650611a71602089016118d5565b9550611a7f604089016118d5565b9450606088013567ffffffffffffffff80821115611a9c57600080fd5b611aa88b838c01611965565b909650945060808a0135915080821115611ac157600080fd5b50611ace8a828b01611965565b989b979a50959850939692959293505050565b600060208284031215611af357600080fd5b5051919050565b600060208284031215611b0c57600080fd5b8151801515811461191957600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b606081526000611b5b606083018789611b1c565b73ffffffffffffffffffffffffffffffffffffffff861660208401528281036040840152611b8a818587611b1c565b98975050505050505050565b60005b83811015611bb1578181015183820152602001611b99565b50506000910152565b60008451611bcc818460208901611b96565b7f5f00000000000000000000000000000000000000000000000000000000000000908301908152838560018301376000930160010192835250909392505050565b60008151808452611c25816020860160208601611b96565b601f01601f19169290920160200192915050565b6020815260006119196020830184611c0d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611c8d57600080fd5b815167ffffffffffffffff80821115611ca557600080fd5b818401915084601f830112611cb957600080fd5b815181811115611ccb57611ccb611c4c565b604051601f8201601f19908116603f01168101908382118183101715611cf357611cf3611c4c565b81604052828152876020848701011115611d0c57600080fd5b611d1d836020830160208801611b96565b979650505050505050565b61ffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015260a060408201526000611d6160a0830186611c0d565b84151560608401528281036080840152611b8a8185611c0d565b60008060408385031215611d8e57600080fd5b505080516020909101519092909150565b61ffff8716815260c060208201526000611dbc60c0830188611c0d565b8281036040840152611dce8188611c0d565b73ffffffffffffffffffffffffffffffffffffffff87811660608601528616608085015283810360a08501529050611e068185611c0d565b9998505050505050505050565b61ffff86168152608060208201526000611e306080830187611c0d565b8281036040840152611e43818688611b1c565b91505073ffffffffffffffffffffffffffffffffffffffff83166060830152969550505050505056fea264697066735822122069aee8997923ab6f3547c4b076bf0f77f65c7d67baafb682d7b4b942142d9af064736f6c634300081300330000000000000000000000009412316dc6c882ffc4fa1a01413b0c701b147b9e000000000000000000000000b6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7

Deployed Bytecode

0x60806040526004361061018f5760003560e01c8063751e9a9c116100d6578063dbbb41551161007f578063e30c397811610059578063e30c3978146104aa578063ed53ff81146104d5578063f2fde38b146104f557600080fd5b8063dbbb41551461044a578063dd8d329c1461046a578063e1fdfe871461048a57600080fd5b80638da5cb5b116100b05780638da5cb5b146103df578063bea532ff1461040a578063bfb5944a1461042a57600080fd5b8063751e9a9c1461039557806379ba5097146103b55780638456cb59146103ca57600080fd5b80635a3ced59116101385780635f95266f116101125780635f95266f1461033e5780636a93681714610353578063715018a61461038057600080fd5b80635a3ced59146102cc5780635c975abb146102e15780635e280f111461031157600080fd5b80633f4ba83a116101695780633f4ba83a14610225578063429b62e51461023a578063452a3a701461027a57600080fd5b80632763b8da1461019b5780632f622e6b146101e35780633aeac4e11461020557600080fd5b3661019657005b600080fd5b3480156101a757600080fd5b506004546101cd9074010000000000000000000000000000000000000000900460ff1681565b6040516101da9190611894565b60405180910390f35b3480156101ef57600080fd5b506102036101fe3660046118fe565b610515565b005b34801561021157600080fd5b50610203610220366004611920565b6105d7565b34801561023157600080fd5b50610203610713565b34801561024657600080fd5b5061026a6102553660046118fe565b60066020526000908152604090205460ff1681565b60405190151581526020016101da565b34801561028657600080fd5b506005546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101da565b3480156102d857600080fd5b50610203610725565b3480156102ed57600080fd5b5060015474010000000000000000000000000000000000000000900460ff1661026a565b34801561031d57600080fd5b506004546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561034a57600080fd5b506102036107f4565b34801561035f57600080fd5b506003546102a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561038c57600080fd5b506102036108c0565b3480156103a157600080fd5b506102036103b03660046118fe565b6108d2565b3480156103c157600080fd5b5061020361099b565b3480156103d657600080fd5b50610203610a36565b3480156103eb57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102a7565b34801561041657600080fd5b506102036104253660046118fe565b610a46565b34801561043657600080fd5b506102036104453660046118fe565b610b13565b34801561045657600080fd5b506102036104653660046118fe565b610beb565b34801561047657600080fd5b506102036104853660046119ae565b610cc3565b34801561049657600080fd5b506102036104a5366004611a3f565b610cf4565b3480156104b657600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166102a7565b3480156104e157600080fd5b506102036104f03660046118fe565b610d85565b34801561050157600080fd5b506102036105103660046118fe565b610e37565b61051d610ee7565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d8060008114610577576040519150601f19603f3d011682016040523d82523d6000602084013e61057c565b606091505b50509050806105d25760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207769746864726177000000000000000000000000000060448201526064015b60405180910390fd5b505050565b6105df610ee7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa15801561064c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106709190611ae1565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018390529192509083169063a9059cbb906044016020604051808303816000875af11580156106e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070d9190611afa565b50505050565b61071b610ee7565b610723610f4e565b565b61072d610ee7565b600160045474010000000000000000000000000000000000000000900460ff16600181111561075e5761075e611865565b036107ab5760405162461bcd60e51b815260206004820152601c60248201527f466565732061726520616c7265616479207061696420696e205a524f0000000060448201526064016105c9565b60048054600191907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000835b0217905550565b6107fc610ee7565b600060045474010000000000000000000000000000000000000000900460ff16600181111561082d5761082d611865565b0361087a5760405162461bcd60e51b815260206004820152601f60248201527f466565732061726520616c7265616479207061696420696e204e41544956450060448201526064016105c9565b60048054600091907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000836107ed565b6108c8610ee7565b6107236000610fcb565b6108da610ee7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff1661094f5760405162461bcd60e51b815260206004820152601160248201527f41646d696e2069732064697361626c656400000000000000000000000000000060448201526064016105c9565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610a2a5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016105c9565b610a3381610fcb565b50565b610a3e610ee7565b610723610ffc565b610a4e610ee7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff1615610ac45760405162461bcd60e51b815260206004820152601060248201527f41646d696e20697320656e61626c65640000000000000000000000000000000060448201526064016105c9565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610b1b610ee7565b73ffffffffffffffffffffffffffffffffffffffff8116610ba45760405162461bcd60e51b815260206004820152602360248201527f5261696e626f7720526f61642063616e6e6f74206265207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105c9565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610bf3610ee7565b73ffffffffffffffffffffffffffffffffffffffff8116610c7c5760405162461bcd60e51b815260206004820152602960248201527f4c617965725a65726f20656e64706f696e742063616e6e6f74206265207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016105c9565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610ccb61106b565b610cd36110c2565b610ce28686338787878761112d565b610cec6001600255565b505050505050565b610cfc61106b565b610d046110c2565b3360009081526006602052604090205460ff16610d635760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642061646d696e0000000000000000000000000000000000000060448201526064016105c9565b610d728787878787878761112d565b610d7c6001600255565b50505050505050565b610d8d610ee7565b73ffffffffffffffffffffffffffffffffffffffff8116610df05760405162461bcd60e51b815260206004820181905260248201527f5a524f20746f6b656e2063616e6e6f74206265207a65726f206164647265737360448201526064016105c9565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e3f610ee7565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610ea260005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105c9565b610f56611786565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610a33816117f0565b6110046110c2565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fa13390565b60028054036110bc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105c9565b60028055565b60015474010000000000000000000000000000000000000000900460ff16156107235760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105c9565b73ffffffffffffffffffffffffffffffffffffffff86166111b65760405162461bcd60e51b815260206004820152602760248201527f4d6573736167652072656365697665722063616e6e6f74206265207a65726f2060448201527f616464726573730000000000000000000000000000000000000000000000000060648201526084016105c9565b6003546040517f6eb8011d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636eb8011d9061121490879087908a9088908890600401611b47565b600060405180830381600087803b15801561122e57600080fd5b505af1158015611242573d6000803e3d6000fd5b50505050606060006040518060400160405280601f81526020017f6c617965727a65726f5f73656e6465722e616461707465725f706172616d73008152509050600081878760405160200161129993929190611bba565b60408051601f19818403018152908290526003547f96d436c000000000000000000000000000000000000000000000000000000000835290925073ffffffffffffffffffffffffffffffffffffffff16906396d436c0906112fe908490600401611c39565b600060405180830381865afa15801561131b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113439190810190611c7b565b925082516000036113ec576003546040517f96d436c000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906396d436c0906113a4908590600401611c39565b600060405180830381865afa1580156113c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526113e99190810190611c7b565b92505b505060008585888686604051602001611409959493929190611b47565b60408051601f19818403018152908290527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608b811b8216602085015230901b166034830152915060009060480160408051601f19818403018152919052600454909150600090819073ffffffffffffffffffffffffffffffffffffffff166340a7bb108d3087600160045474010000000000000000000000000000000000000000900460ff1660018111156114c2576114c2611865565b148a6040518663ffffffff1660e01b81526004016114e4959493929190611d28565b6040805180830381865afa158015611500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115249190611d7b565b9092509050600160045474010000000000000000000000000000000000000000900460ff16600181111561155a5761155a611865565b0361169f57600554600480546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063095ea7b3906044016020604051808303816000875af11580156115de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116029190611afa565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c58031008d858730308b6040518763ffffffff1660e01b815260040161166896959493929190611d9f565b600060405180830381600087803b15801561168257600080fd5b505af1158015611696573d6000803e3d6000fd5b50505050611739565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c5803100838e86883060008c6040518863ffffffff1660e01b815260040161170696959493929190611d9f565b6000604051808303818588803b15801561171f57600080fd5b505af1158015611733573d6000803e3d6000fd5b50505050505b7f742549daabef48dfd7bb602b74ff1d60c222b230639e62d416c43bd873fc68bb8c848b8b8e604051611770959493929190611e13565b60405180910390a1505050505050505050505050565b60015474010000000000000000000000000000000000000000900460ff166107235760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105c9565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600283106118cf577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b803573ffffffffffffffffffffffffffffffffffffffff811681146118f957600080fd5b919050565b60006020828403121561191057600080fd5b611919826118d5565b9392505050565b6000806040838503121561193357600080fd5b61193c836118d5565b915061194a602084016118d5565b90509250929050565b803561ffff811681146118f957600080fd5b60008083601f84011261197757600080fd5b50813567ffffffffffffffff81111561198f57600080fd5b6020830191508360208285010111156119a757600080fd5b9250929050565b600080600080600080608087890312156119c757600080fd5b6119d087611953565b95506119de602088016118d5565b9450604087013567ffffffffffffffff808211156119fb57600080fd5b611a078a838b01611965565b90965094506060890135915080821115611a2057600080fd5b50611a2d89828a01611965565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611a5a57600080fd5b611a6388611953565b9650611a71602089016118d5565b9550611a7f604089016118d5565b9450606088013567ffffffffffffffff80821115611a9c57600080fd5b611aa88b838c01611965565b909650945060808a0135915080821115611ac157600080fd5b50611ace8a828b01611965565b989b979a50959850939692959293505050565b600060208284031215611af357600080fd5b5051919050565b600060208284031215611b0c57600080fd5b8151801515811461191957600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b606081526000611b5b606083018789611b1c565b73ffffffffffffffffffffffffffffffffffffffff861660208401528281036040840152611b8a818587611b1c565b98975050505050505050565b60005b83811015611bb1578181015183820152602001611b99565b50506000910152565b60008451611bcc818460208901611b96565b7f5f00000000000000000000000000000000000000000000000000000000000000908301908152838560018301376000930160010192835250909392505050565b60008151808452611c25816020860160208601611b96565b601f01601f19169290920160200192915050565b6020815260006119196020830184611c0d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611c8d57600080fd5b815167ffffffffffffffff80821115611ca557600080fd5b818401915084601f830112611cb957600080fd5b815181811115611ccb57611ccb611c4c565b604051601f8201601f19908116603f01168101908382118183101715611cf357611cf3611c4c565b81604052828152876020848701011115611d0c57600080fd5b611d1d836020830160208801611b96565b979650505050505050565b61ffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015260a060408201526000611d6160a0830186611c0d565b84151560608401528281036080840152611b8a8185611c0d565b60008060408385031215611d8e57600080fd5b505080516020909101519092909150565b61ffff8716815260c060208201526000611dbc60c0830188611c0d565b8281036040840152611dce8188611c0d565b73ffffffffffffffffffffffffffffffffffffffff87811660608601528616608085015283810360a08501529050611e068185611c0d565b9998505050505050505050565b61ffff86168152608060208201526000611e306080830187611c0d565b8281036040840152611e43818688611b1c565b91505073ffffffffffffffffffffffffffffffffffffffff83166060830152969550505050505056fea264697066735822122069aee8997923ab6f3547c4b076bf0f77f65c7d67baafb682d7b4b942142d9af064736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000009412316dc6c882ffc4fa1a01413b0c701b147b9e000000000000000000000000b6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7

-----Decoded View---------------
Arg [0] : _rainbowRoad (address): 0x9412316DC6C882ffc4FA1A01413b0C701b147B9E
Arg [1] : _endpoint (address): 0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009412316dc6c882ffc4fa1a01413b0c701b147b9e
Arg [1] : 000000000000000000000000b6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7


Block Transaction 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  ]
[ 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.