MATIC Price: $0.734549 (+1.41%)
Gas: 147 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Value
Withdraw Token538280642024-02-22 15:06:5091 days ago1708614410IN
Archly : Chainlink Sender v1.0.0
0 MATIC0.01154411213.89864886
Send535749332024-02-16 3:39:0597 days ago1708054745IN
Archly : Chainlink Sender v1.0.0
0 MATIC0.0313119969
Send532806752024-02-08 17:46:32105 days ago1707414392IN
Archly : Chainlink Sender v1.0.0
0 MATIC0.0303849113
Send497599112023-11-10 4:31:58195 days ago1699590718IN
Archly : Chainlink Sender v1.0.0
0 MATIC0.06362167223
Send484090942023-10-06 20:44:14230 days ago1696625054IN
Archly : Chainlink Sender v1.0.0
0 MATIC0.0218789278
0x60806040475996242023-09-16 5:21:08250 days ago1694841668IN
 Create: ChainlinkSender
0 MATIC0.1603807984.38021045

Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChainlinkSender

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10000 runs

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

import {LinkTokenInterface} from "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import {ArcBaseWithRainbowRoad} from "./bases/ArcBaseWithRainbowRoad.sol";
import {IRainbowRoad} from "./interfaces/IRainbowRoad.sol";

/**
 * Sends messages to the Chainlink CCIP router
 */
contract ChainlinkSender is ArcBaseWithRainbowRoad 
{
    enum PaymentTypes {
        NATIVE,
        LINK
    }

    IRouterClient public router;
    LinkTokenInterface public link;
    PaymentTypes public paymentType;
    mapping(address => bool) public admins;

    event MessageSent(bytes32 messageId, uint64 destinationChainSelector, address messageReceiver, string action, address actionRecipient);

    constructor(address _rainbowRoad, address _router, address _link) ArcBaseWithRainbowRoad(_rainbowRoad)
    {
        require(_router != address(0), 'Router cannot be zero address');
        require(_link != address(0), 'Link cannot be zero address');
        
        router = IRouterClient(_router);
        link = LinkTokenInterface(_link);
        paymentType = PaymentTypes.LINK;
    }
    
    function setRouter(address _router) external onlyOwner
    {
        require(_router != address(0), 'Router cannot be zero address');
        router = IRouterClient(_router);
    }

    function setLink(address _link) external onlyOwner
    {
        require(_link != address(0), 'Link cannot be zero address');
        link = LinkTokenInterface(_link);
    }
    
    function setPaymentTypeToLink() external onlyOwner
    {
        require(paymentType != PaymentTypes.LINK, 'Fees are already paid in LINK');
        paymentType = PaymentTypes.LINK;
    }
    
    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(uint64 destinationChainSelector, address messageReceiver, address actionRecipient, string calldata action, bytes calldata payload) external nonReentrant whenNotPaused onlyAdmins returns (bytes32 messageId)
    {
        return _send(destinationChainSelector, messageReceiver, actionRecipient, action, payload);
    }
    
    function send(uint64 destinationChainSelector, address messageReceiver, string calldata action, bytes calldata payload) external nonReentrant whenNotPaused returns (bytes32 messageId)
    {
        return _send(destinationChainSelector, messageReceiver, msg.sender, action, payload);
    }

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

        rainbowRoad.sendAction(action, actionRecipient, payload);
        
        bytes memory extraArgs;
        {
            string memory extraArgsConfigName = 'chainlink_sender.extra_args';
            string memory extraArgsConfigNameOverride = string.concat(extraArgsConfigName, '_', action);
            extraArgs = rainbowRoad.config(extraArgsConfigNameOverride);
            if(extraArgs.length == 0) {
                extraArgs = rainbowRoad.config(extraArgsConfigName);
            }
        }
        
        Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({
            receiver: abi.encode(messageReceiver),
            data: abi.encode(action, actionRecipient, payload),
            tokenAmounts: new Client.EVMTokenAmount[](0),
            extraArgs: extraArgs,
            feeToken: paymentType == PaymentTypes.LINK ? address(link) : address(0)
        });

        uint256 fee = router.getFee(destinationChainSelector, message);

        if (paymentType == PaymentTypes.LINK) {
            link.approve(address(router), fee);
            messageId = router.ccipSend(destinationChainSelector, message);
        } else {
            messageId = router.ccipSend{value: fee}(destinationChainSelector, message);
        }

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

    receive() external payable {}
}

File 1 of 14 : IRouterClient.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Client} from "../libraries/Client.sol";

interface IRouterClient {
  error UnsupportedDestinationChain(uint64 destChainSelector);
  error InsufficientFeeTokenAmount();
  error InvalidMsgValue();

  /// @notice Checks if the given chain ID is supported for sending/receiving.
  /// @param chainSelector The chain to check.
  /// @return supported is true if it is supported, false if not.
  function isChainSupported(uint64 chainSelector) external view returns (bool supported);

  /// @notice Gets a list of all supported tokens which can be sent or received
  /// to/from a given chain id.
  /// @param chainSelector The chainSelector.
  /// @return tokens The addresses of all tokens that are supported.
  function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens);

  /// @param destinationChainSelector The destination chainSelector
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return fee returns guaranteed execution fee for the specified message
  /// delivery to destination chain
  /// @dev returns 0 fee on invalid message.
  function getFee(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage memory message
  ) external view returns (uint256 fee);

  /// @notice Request a message to be sent to the destination chain
  /// @param destinationChainSelector The destination chain ID
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return messageId The message ID
  /// @dev Note if msg.value is larger than the required fee (from getFee) we accept
  /// the overpayment with no refund.
  function ccipSend(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage calldata message
  ) external payable returns (bytes32);
}

File 1 of 14 : Client.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// End consumer library.
library Client {
  struct EVMTokenAmount {
    address token; // token address on the local chain.
    uint256 amount; // Amount of tokens.
  }

  struct Any2EVMMessage {
    bytes32 messageId; // MessageId corresponding to ccipSend on source.
    uint64 sourceChainSelector; // Source chain selector.
    bytes sender; // abi.decode(sender) if coming from an EVM chain.
    bytes data; // payload sent in original message.
    EVMTokenAmount[] destTokenAmounts; // Tokens and their amounts in their destination chain representation.
  }

  // If extraArgs is empty bytes, the default is 200k gas limit and strict = false.
  struct EVM2AnyMessage {
    bytes receiver; // abi.encode(receiver address) for dest EVM chains
    bytes data; // Data payload
    EVMTokenAmount[] tokenAmounts; // Token transfers
    address feeToken; // Address of feeToken. address(0) means you will send msg.value.
    bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1)
  }

  // extraArgs will evolve to support new features
  // bytes4(keccak256("CCIP EVMExtraArgsV1"));
  bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;
  struct EVMExtraArgsV1 {
    uint256 gasLimit; // ATTENTION!!! MAX GAS LIMIT 4M FOR BETA TESTING
    bool strict; // See strict sequencing details below.
  }

  function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {
    return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs);
  }
}

File 1 of 14 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 1 of 14 : 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 1 of 14 : 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 1 of 14 : 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 1 of 14 : 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 1 of 14 : 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 1 of 14 : 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 1 of 14 : 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 1 of 14 : 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 2 of 14 : IArc.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

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

File 2 of 14 : 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":"_router","type":"address"},{"internalType":"address","name":"_link","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"destinationChainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"messageReceiver","type":"address"},{"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":"link","outputs":[{"internalType":"contract LinkTokenInterface","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 ChainlinkSender.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":[],"name":"router","outputs":[{"internalType":"contract IRouterClient","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"destinationChainSelector","type":"uint64"},{"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":[{"internalType":"bytes32","name":"messageId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"destinationChainSelector","type":"uint64"},{"internalType":"address","name":"messageReceiver","type":"address"},{"internalType":"string","name":"action","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"send","outputs":[{"internalType":"bytes32","name":"messageId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_link","type":"address"}],"name":"setLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPaymentTypeToLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPaymentTypeToNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rainbowRoad","type":"address"}],"name":"setRainbowRoad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","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"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620021f4380380620021f4833981016040819052620000349162000249565b826200004033620001be565b6001805460ff60a01b191681556002556001600160a01b038116620000b85760405162461bcd60e51b815260206004820152602360248201527f5261696e626f7720526f61642063616e6e6f74206265207a65726f206164647260448201526265737360e81b60648201526084015b60405180910390fd5b600380546001600160a01b0319166001600160a01b039283161790558216620001245760405162461bcd60e51b815260206004820152601d60248201527f526f757465722063616e6e6f74206265207a65726f20616464726573730000006044820152606401620000af565b6001600160a01b0381166200017c5760405162461bcd60e51b815260206004820152601b60248201527f4c696e6b2063616e6e6f74206265207a65726f206164647265737300000000006044820152606401620000af565b600480546001600160a01b039384166001600160a01b031990911617905560058054919092166001600160a81b031990911617600160a01b1790555062000293565b600180546001600160a01b0319169055620001d981620001dc565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200024457600080fd5b919050565b6000806000606084860312156200025f57600080fd5b6200026a846200022c565b92506200027a602085016200022c565b91506200028a604085016200022c565b90509250925092565b611f5180620002a36000396000f3fe60806040526004361061018f5760003560e01c806379ba5097116100d6578063bea532ff1161007f578063e30c397811610059578063e30c3978146104a7578063f2fde38b146104d2578063f887ea40146104f257600080fd5b8063bea532ff14610447578063bfb5944a14610467578063c0d786551461048757600080fd5b80638da5cb5b116100b05780638da5cb5b146103e757806394547fcc14610412578063bc76b7f71461043257600080fd5b806379ba50971461039d5780638456cb59146103b2578063878f7dce146103c757600080fd5b8063429b62e5116101385780636a936817116101125780636a9368171461033b578063715018a614610368578063751e9a9c1461037d57600080fd5b8063429b62e5146102b65780635c975abb146102f65780635f95266f1461032657600080fd5b8063374a103b11610169578063374a103b146102535780633aeac4e1146102815780633f4ba83a146102a157600080fd5b80631c4695f41461019b5780632763b8da146101f25780632f622e6b1461023157600080fd5b3661019657005b600080fd5b3480156101a757600080fd5b506005546101c89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101fe57600080fd5b506005546102249074010000000000000000000000000000000000000000900460ff1681565b6040516101e9919061191d565b34801561023d57600080fd5b5061025161024c366004611987565b61051f565b005b34801561025f57600080fd5b5061027361026e366004611a0a565b6105e1565b6040519081526020016101e9565b34801561028d57600080fd5b5061025161029c366004611aac565b610678565b3480156102ad57600080fd5b506102516107b4565b3480156102c257600080fd5b506102e66102d1366004611987565b60066020526000908152604090205460ff1681565b60405190151581526020016101e9565b34801561030257600080fd5b5060015474010000000000000000000000000000000000000000900460ff166102e6565b34801561033257600080fd5b506102516107c6565b34801561034757600080fd5b506003546101c89073ffffffffffffffffffffffffffffffffffffffff1681565b34801561037457600080fd5b50610251610895565b34801561038957600080fd5b50610251610398366004611987565b6108a7565b3480156103a957600080fd5b50610251610970565b3480156103be57600080fd5b50610251610a0b565b3480156103d357600080fd5b506102736103e2366004611adf565b610a1b565b3480156103f357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101c8565b34801561041e57600080fd5b5061025161042d366004611987565b610a52565b34801561043e57600080fd5b50610251610b04565b34801561045357600080fd5b50610251610462366004611987565b610bd0565b34801561047357600080fd5b50610251610482366004611987565b610c9d565b34801561049357600080fd5b506102516104a2366004611987565b610d75565b3480156104b357600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166101c8565b3480156104de57600080fd5b506102516104ed366004611987565b610e27565b3480156104fe57600080fd5b506004546101c89073ffffffffffffffffffffffffffffffffffffffff1681565b610527610ed7565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d8060008114610581576040519150601f19603f3d011682016040523d82523d6000602084013e610586565b606091505b50509050806105dc5760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207769746864726177000000000000000000000000000060448201526064015b60405180910390fd5b505050565b60006105eb610f3e565b6105f3610f95565b3360009081526006602052604090205460ff166106525760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642061646d696e0000000000000000000000000000000000000060448201526064016105d3565b61066188888888888888611000565b905061066d6001600255565b979650505050505050565b610680610ed7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190611b70565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018390529192509083169063a9059cbb906044016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae9190611b89565b50505050565b6107bc610ed7565b6107c46116f2565b565b6107ce610ed7565b600060055474010000000000000000000000000000000000000000900460ff1660018111156107ff576107ff6118ee565b0361084c5760405162461bcd60e51b815260206004820152601f60248201527f466565732061726520616c7265616479207061696420696e204e41544956450060448201526064016105d3565b60058054600091907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000835b0217905550565b61089d610ed7565b6107c4600061176f565b6108af610ed7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff166109245760405162461bcd60e51b815260206004820152601160248201527f41646d696e2069732064697361626c656400000000000000000000000000000060448201526064016105d3565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600154339073ffffffffffffffffffffffffffffffffffffffff1681146109ff5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016105d3565b610a088161176f565b50565b610a13610ed7565b6107c46117a0565b6000610a25610f3e565b610a2d610f95565b610a3c87873388888888611000565b9050610a486001600255565b9695505050505050565b610a5a610ed7565b73ffffffffffffffffffffffffffffffffffffffff8116610abd5760405162461bcd60e51b815260206004820152601b60248201527f4c696e6b2063616e6e6f74206265207a65726f2061646472657373000000000060448201526064016105d3565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610b0c610ed7565b600160055474010000000000000000000000000000000000000000900460ff166001811115610b3d57610b3d6118ee565b03610b8a5760405162461bcd60e51b815260206004820152601d60248201527f466565732061726520616c7265616479207061696420696e204c494e4b00000060448201526064016105d3565b60058054600191907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000008361088e565b610bd8610ed7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff1615610c4e5760405162461bcd60e51b815260206004820152601060248201527f41646d696e20697320656e61626c65640000000000000000000000000000000060448201526064016105d3565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610ca5610ed7565b73ffffffffffffffffffffffffffffffffffffffff8116610d2e5760405162461bcd60e51b815260206004820152602360248201527f5261696e626f7720526f61642063616e6e6f74206265207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105d3565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d7d610ed7565b73ffffffffffffffffffffffffffffffffffffffff8116610de05760405162461bcd60e51b815260206004820152601d60248201527f526f757465722063616e6e6f74206265207a65726f206164647265737300000060448201526064016105d3565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e2f610ed7565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610e9260005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d3565b6002805403610f8f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105d3565b60028055565b60015474010000000000000000000000000000000000000000900460ff16156107c45760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105d3565b600073ffffffffffffffffffffffffffffffffffffffff871661108b5760405162461bcd60e51b815260206004820152602760248201527f4d6573736167652072656365697665722063616e6e6f74206265207a65726f2060448201527f616464726573730000000000000000000000000000000000000000000000000060648201526084016105d3565b6003546040517f6eb8011d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636eb8011d906110e990889088908b9089908990600401611bd6565b600060405180830381600087803b15801561110357600080fd5b505af1158015611117573d6000803e3d6000fd5b50505050606060006040518060400160405280601b81526020017f636861696e6c696e6b5f73656e6465722e65787472615f6172677300000000008152509050600081888860405160200161116e93929190611c49565b60408051601f19818403018152908290526003547f96d436c000000000000000000000000000000000000000000000000000000000835290925073ffffffffffffffffffffffffffffffffffffffff16906396d436c0906111d3908490600401611cc8565b600060405180830381865afa1580156111f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112189190810190611d0a565b925082516000036112c1576003546040517f96d436c000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906396d436c090611279908590600401611cc8565b600060405180830381865afa158015611296573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112be9190810190611d0a565b92505b50506040805160a0810190915273ffffffffffffffffffffffffffffffffffffffff891660c08201526000908060e08101604051602081830303815290604052815260200188888b898960405160200161131f959493929190611bd6565b60408051601f198184030181529190528152602001600060405190808252806020026020018201604052801561137b57816020015b60408051808201909152600080825260208201528152602001906001900390816113545790505b508152602001600160055474010000000000000000000000000000000000000000900460ff1660018111156113b2576113b26118ee565b146113be5760006113d8565b60055473ffffffffffffffffffffffffffffffffffffffff165b73ffffffffffffffffffffffffffffffffffffffff90811682526020909101849052600480546040517f20487ded0000000000000000000000000000000000000000000000000000000081529394506000939216916320487ded91611441918f91879101611dac565b602060405180830381865afa15801561145e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114829190611b70565b9050600160055474010000000000000000000000000000000000000000900460ff1660018111156114b5576114b56118ee565b036115ff57600554600480546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063095ea7b3906044016020604051808303816000875af1158015611539573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155d9190611b89565b50600480546040517f96f4e9f900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916396f4e9f9916115b5918f91879101611dac565b6020604051808303816000875af11580156115d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f89190611b70565b93506116a3565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166396f4e9f9828d856040518463ffffffff1660e01b815260040161165d929190611dac565b60206040518083038185885af115801561167b573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906116a09190611b70565b93505b7ff1b8d03457fddb16f97cc2e68119953177422075874f3f3be09f1a2054354a2f848c8c8b8b8e6040516116dc96959493929190611ebe565b60405180910390a1505050979650505050505050565b6116fa61180f565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610a0881611879565b6117a8610f95565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117453390565b60015474010000000000000000000000000000000000000000900460ff166107c45760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105d3565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160028310611958577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461198257600080fd5b919050565b60006020828403121561199957600080fd5b6119a28261195e565b9392505050565b803567ffffffffffffffff8116811461198257600080fd5b60008083601f8401126119d357600080fd5b50813567ffffffffffffffff8111156119eb57600080fd5b602083019150836020828501011115611a0357600080fd5b9250929050565b600080600080600080600060a0888a031215611a2557600080fd5b611a2e886119a9565b9650611a3c6020890161195e565b9550611a4a6040890161195e565b9450606088013567ffffffffffffffff80821115611a6757600080fd5b611a738b838c016119c1565b909650945060808a0135915080821115611a8c57600080fd5b50611a998a828b016119c1565b989b979a50959850939692959293505050565b60008060408385031215611abf57600080fd5b611ac88361195e565b9150611ad66020840161195e565b90509250929050565b60008060008060008060808789031215611af857600080fd5b611b01876119a9565b9550611b0f6020880161195e565b9450604087013567ffffffffffffffff80821115611b2c57600080fd5b611b388a838b016119c1565b90965094506060890135915080821115611b5157600080fd5b50611b5e89828a016119c1565b979a9699509497509295939492505050565b600060208284031215611b8257600080fd5b5051919050565b600060208284031215611b9b57600080fd5b815180151581146119a257600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b606081526000611bea606083018789611bab565b73ffffffffffffffffffffffffffffffffffffffff861660208401528281036040840152611c19818587611bab565b98975050505050505050565b60005b83811015611c40578181015183820152602001611c28565b50506000910152565b60008451611c5b818460208901611c25565b7f5f00000000000000000000000000000000000000000000000000000000000000908301908152838560018301376000930160010192835250909392505050565b60008151808452611cb4816020860160208601611c25565b601f01601f19169290920160200192915050565b6020815260006119a26020830184611c9c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611d1c57600080fd5b815167ffffffffffffffff80821115611d3457600080fd5b818401915084601f830112611d4857600080fd5b815181811115611d5a57611d5a611cdb565b604051601f8201601f19908116603f01168101908382118183101715611d8257611d82611cdb565b81604052828152876020848701011115611d9b57600080fd5b61066d836020830160208801611c25565b6000604067ffffffffffffffff8516835260208181850152845160a083860152611dd960e0860182611c9c565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878403016060880152611e148383611c9c565b88860151888203830160808a01528051808352908601945060009350908501905b80841015611e74578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001939093019290860190611e35565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a01529550611eb08187611c9c565b9a9950505050505050505050565b86815267ffffffffffffffff86166020820152600073ffffffffffffffffffffffffffffffffffffffff808716604084015260a06060840152611f0560a084018688611bab565b915080841660808401525097965050505050505056fea26469706673582212208fc4f2dd56e5f23172df8a9b01bf400bebd2232057f2954b871d6f87b9d5b2c464736f6c634300081300330000000000000000000000009de5b4928296d96f48fe67ebb2ca1556827fc6a90000000000000000000000003c3d92629a02a8d95d5cb9650fe49c3544f69b43000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1

Deployed Bytecode

0x60806040526004361061018f5760003560e01c806379ba5097116100d6578063bea532ff1161007f578063e30c397811610059578063e30c3978146104a7578063f2fde38b146104d2578063f887ea40146104f257600080fd5b8063bea532ff14610447578063bfb5944a14610467578063c0d786551461048757600080fd5b80638da5cb5b116100b05780638da5cb5b146103e757806394547fcc14610412578063bc76b7f71461043257600080fd5b806379ba50971461039d5780638456cb59146103b2578063878f7dce146103c757600080fd5b8063429b62e5116101385780636a936817116101125780636a9368171461033b578063715018a614610368578063751e9a9c1461037d57600080fd5b8063429b62e5146102b65780635c975abb146102f65780635f95266f1461032657600080fd5b8063374a103b11610169578063374a103b146102535780633aeac4e1146102815780633f4ba83a146102a157600080fd5b80631c4695f41461019b5780632763b8da146101f25780632f622e6b1461023157600080fd5b3661019657005b600080fd5b3480156101a757600080fd5b506005546101c89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101fe57600080fd5b506005546102249074010000000000000000000000000000000000000000900460ff1681565b6040516101e9919061191d565b34801561023d57600080fd5b5061025161024c366004611987565b61051f565b005b34801561025f57600080fd5b5061027361026e366004611a0a565b6105e1565b6040519081526020016101e9565b34801561028d57600080fd5b5061025161029c366004611aac565b610678565b3480156102ad57600080fd5b506102516107b4565b3480156102c257600080fd5b506102e66102d1366004611987565b60066020526000908152604090205460ff1681565b60405190151581526020016101e9565b34801561030257600080fd5b5060015474010000000000000000000000000000000000000000900460ff166102e6565b34801561033257600080fd5b506102516107c6565b34801561034757600080fd5b506003546101c89073ffffffffffffffffffffffffffffffffffffffff1681565b34801561037457600080fd5b50610251610895565b34801561038957600080fd5b50610251610398366004611987565b6108a7565b3480156103a957600080fd5b50610251610970565b3480156103be57600080fd5b50610251610a0b565b3480156103d357600080fd5b506102736103e2366004611adf565b610a1b565b3480156103f357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101c8565b34801561041e57600080fd5b5061025161042d366004611987565b610a52565b34801561043e57600080fd5b50610251610b04565b34801561045357600080fd5b50610251610462366004611987565b610bd0565b34801561047357600080fd5b50610251610482366004611987565b610c9d565b34801561049357600080fd5b506102516104a2366004611987565b610d75565b3480156104b357600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166101c8565b3480156104de57600080fd5b506102516104ed366004611987565b610e27565b3480156104fe57600080fd5b506004546101c89073ffffffffffffffffffffffffffffffffffffffff1681565b610527610ed7565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d8060008114610581576040519150601f19603f3d011682016040523d82523d6000602084013e610586565b606091505b50509050806105dc5760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207769746864726177000000000000000000000000000060448201526064015b60405180910390fd5b505050565b60006105eb610f3e565b6105f3610f95565b3360009081526006602052604090205460ff166106525760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642061646d696e0000000000000000000000000000000000000060448201526064016105d3565b61066188888888888888611000565b905061066d6001600255565b979650505050505050565b610680610ed7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190611b70565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018390529192509083169063a9059cbb906044016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae9190611b89565b50505050565b6107bc610ed7565b6107c46116f2565b565b6107ce610ed7565b600060055474010000000000000000000000000000000000000000900460ff1660018111156107ff576107ff6118ee565b0361084c5760405162461bcd60e51b815260206004820152601f60248201527f466565732061726520616c7265616479207061696420696e204e41544956450060448201526064016105d3565b60058054600091907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000835b0217905550565b61089d610ed7565b6107c4600061176f565b6108af610ed7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff166109245760405162461bcd60e51b815260206004820152601160248201527f41646d696e2069732064697361626c656400000000000000000000000000000060448201526064016105d3565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600154339073ffffffffffffffffffffffffffffffffffffffff1681146109ff5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084016105d3565b610a088161176f565b50565b610a13610ed7565b6107c46117a0565b6000610a25610f3e565b610a2d610f95565b610a3c87873388888888611000565b9050610a486001600255565b9695505050505050565b610a5a610ed7565b73ffffffffffffffffffffffffffffffffffffffff8116610abd5760405162461bcd60e51b815260206004820152601b60248201527f4c696e6b2063616e6e6f74206265207a65726f2061646472657373000000000060448201526064016105d3565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610b0c610ed7565b600160055474010000000000000000000000000000000000000000900460ff166001811115610b3d57610b3d6118ee565b03610b8a5760405162461bcd60e51b815260206004820152601d60248201527f466565732061726520616c7265616479207061696420696e204c494e4b00000060448201526064016105d3565b60058054600191907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000008361088e565b610bd8610ed7565b73ffffffffffffffffffffffffffffffffffffffff811660009081526006602052604090205460ff1615610c4e5760405162461bcd60e51b815260206004820152601060248201527f41646d696e20697320656e61626c65640000000000000000000000000000000060448201526064016105d3565b73ffffffffffffffffffffffffffffffffffffffff16600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b610ca5610ed7565b73ffffffffffffffffffffffffffffffffffffffff8116610d2e5760405162461bcd60e51b815260206004820152602360248201527f5261696e626f7720526f61642063616e6e6f74206265207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105d3565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d7d610ed7565b73ffffffffffffffffffffffffffffffffffffffff8116610de05760405162461bcd60e51b815260206004820152601d60248201527f526f757465722063616e6e6f74206265207a65726f206164647265737300000060448201526064016105d3565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e2f610ed7565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610e9260005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d3565b6002805403610f8f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105d3565b60028055565b60015474010000000000000000000000000000000000000000900460ff16156107c45760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105d3565b600073ffffffffffffffffffffffffffffffffffffffff871661108b5760405162461bcd60e51b815260206004820152602760248201527f4d6573736167652072656365697665722063616e6e6f74206265207a65726f2060448201527f616464726573730000000000000000000000000000000000000000000000000060648201526084016105d3565b6003546040517f6eb8011d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636eb8011d906110e990889088908b9089908990600401611bd6565b600060405180830381600087803b15801561110357600080fd5b505af1158015611117573d6000803e3d6000fd5b50505050606060006040518060400160405280601b81526020017f636861696e6c696e6b5f73656e6465722e65787472615f6172677300000000008152509050600081888860405160200161116e93929190611c49565b60408051601f19818403018152908290526003547f96d436c000000000000000000000000000000000000000000000000000000000835290925073ffffffffffffffffffffffffffffffffffffffff16906396d436c0906111d3908490600401611cc8565b600060405180830381865afa1580156111f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112189190810190611d0a565b925082516000036112c1576003546040517f96d436c000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906396d436c090611279908590600401611cc8565b600060405180830381865afa158015611296573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112be9190810190611d0a565b92505b50506040805160a0810190915273ffffffffffffffffffffffffffffffffffffffff891660c08201526000908060e08101604051602081830303815290604052815260200188888b898960405160200161131f959493929190611bd6565b60408051601f198184030181529190528152602001600060405190808252806020026020018201604052801561137b57816020015b60408051808201909152600080825260208201528152602001906001900390816113545790505b508152602001600160055474010000000000000000000000000000000000000000900460ff1660018111156113b2576113b26118ee565b146113be5760006113d8565b60055473ffffffffffffffffffffffffffffffffffffffff165b73ffffffffffffffffffffffffffffffffffffffff90811682526020909101849052600480546040517f20487ded0000000000000000000000000000000000000000000000000000000081529394506000939216916320487ded91611441918f91879101611dac565b602060405180830381865afa15801561145e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114829190611b70565b9050600160055474010000000000000000000000000000000000000000900460ff1660018111156114b5576114b56118ee565b036115ff57600554600480546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063095ea7b3906044016020604051808303816000875af1158015611539573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155d9190611b89565b50600480546040517f96f4e9f900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116916396f4e9f9916115b5918f91879101611dac565b6020604051808303816000875af11580156115d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f89190611b70565b93506116a3565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166396f4e9f9828d856040518463ffffffff1660e01b815260040161165d929190611dac565b60206040518083038185885af115801561167b573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906116a09190611b70565b93505b7ff1b8d03457fddb16f97cc2e68119953177422075874f3f3be09f1a2054354a2f848c8c8b8b8e6040516116dc96959493929190611ebe565b60405180910390a1505050979650505050505050565b6116fa61180f565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610a0881611879565b6117a8610f95565b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117453390565b60015474010000000000000000000000000000000000000000900460ff166107c45760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105d3565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160028310611958577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461198257600080fd5b919050565b60006020828403121561199957600080fd5b6119a28261195e565b9392505050565b803567ffffffffffffffff8116811461198257600080fd5b60008083601f8401126119d357600080fd5b50813567ffffffffffffffff8111156119eb57600080fd5b602083019150836020828501011115611a0357600080fd5b9250929050565b600080600080600080600060a0888a031215611a2557600080fd5b611a2e886119a9565b9650611a3c6020890161195e565b9550611a4a6040890161195e565b9450606088013567ffffffffffffffff80821115611a6757600080fd5b611a738b838c016119c1565b909650945060808a0135915080821115611a8c57600080fd5b50611a998a828b016119c1565b989b979a50959850939692959293505050565b60008060408385031215611abf57600080fd5b611ac88361195e565b9150611ad66020840161195e565b90509250929050565b60008060008060008060808789031215611af857600080fd5b611b01876119a9565b9550611b0f6020880161195e565b9450604087013567ffffffffffffffff80821115611b2c57600080fd5b611b388a838b016119c1565b90965094506060890135915080821115611b5157600080fd5b50611b5e89828a016119c1565b979a9699509497509295939492505050565b600060208284031215611b8257600080fd5b5051919050565b600060208284031215611b9b57600080fd5b815180151581146119a257600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b606081526000611bea606083018789611bab565b73ffffffffffffffffffffffffffffffffffffffff861660208401528281036040840152611c19818587611bab565b98975050505050505050565b60005b83811015611c40578181015183820152602001611c28565b50506000910152565b60008451611c5b818460208901611c25565b7f5f00000000000000000000000000000000000000000000000000000000000000908301908152838560018301376000930160010192835250909392505050565b60008151808452611cb4816020860160208601611c25565b601f01601f19169290920160200192915050565b6020815260006119a26020830184611c9c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611d1c57600080fd5b815167ffffffffffffffff80821115611d3457600080fd5b818401915084601f830112611d4857600080fd5b815181811115611d5a57611d5a611cdb565b604051601f8201601f19908116603f01168101908382118183101715611d8257611d82611cdb565b81604052828152876020848701011115611d9b57600080fd5b61066d836020830160208801611c25565b6000604067ffffffffffffffff8516835260208181850152845160a083860152611dd960e0860182611c9c565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878403016060880152611e148383611c9c565b88860151888203830160808a01528051808352908601945060009350908501905b80841015611e74578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001939093019290860190611e35565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a01529550611eb08187611c9c565b9a9950505050505050505050565b86815267ffffffffffffffff86166020820152600073ffffffffffffffffffffffffffffffffffffffff808716604084015260a06060840152611f0560a084018688611bab565b915080841660808401525097965050505050505056fea26469706673582212208fc4f2dd56e5f23172df8a9b01bf400bebd2232057f2954b871d6f87b9d5b2c464736f6c63430008130033

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

0000000000000000000000009de5b4928296d96f48fe67ebb2ca1556827fc6a90000000000000000000000003c3d92629a02a8d95d5cb9650fe49c3544f69b43000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1

-----Decoded View---------------
Arg [0] : _rainbowRoad (address): 0x9DE5b4928296D96f48Fe67ebB2cA1556827fc6A9
Arg [1] : _router (address): 0x3C3D92629A02a8D95D5CB9650fe49C3544f69B43
Arg [2] : _link (address): 0xb0897686c545045aFc77CF20eC7A532E3120E0F1

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000009de5b4928296d96f48fe67ebb2ca1556827fc6a9
Arg [1] : 0000000000000000000000003c3d92629a02a8d95d5cb9650fe49c3544f69b43
Arg [2] : 000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.