ETH Price: $3,442.02 (-1.02%)
Gas: 3 Gwei

Contract

0xcc0f4d8235b3De2f469A7b9dBc631a0b7E14bA66
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Enabled193207382024-02-27 18:40:47146 days ago1709059247IN
0xcc0f4d82...b7E14bA66
0 ETH0.0014679954.39224963
Set Config193207232024-02-27 18:37:47146 days ago1709059067IN
0xcc0f4d82...b7E14bA66
0 ETH0.0020554357.59450395
Set Enabled193199282024-02-27 15:57:11146 days ago1709049431IN
0xcc0f4d82...b7E14bA66
0 ETH0.0017813466.03200713
Set Config192780262024-02-21 19:11:11152 days ago1708542671IN
0xcc0f4d82...b7E14bA66
0 ETH0.0036014938.8980477
0x60806040192779562024-02-21 18:57:11152 days ago1708541831IN
 Create: CCIPConfigurations
0 ETH0.0216990942.0855499

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CCIPConfigurations

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : CCIPConfigurations.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import '@openzeppelin/contracts/access/Ownable.sol';
import './interfaces/ICCIPConfigurations.sol';

contract CCIPConfigurations is ICCIPConfigurations, Ownable {
  bool public override enabled = true;
  uint256 public override gasLimit = 400_000;

  // source token => target chain selector => config
  mapping(address => mapping(uint64 => TokenConfig)) _configs;

  function get(
    address _sourceToken,
    uint64 _chain
  ) external view override returns (TokenConfig memory) {
    return _configs[_sourceToken][_chain];
  }

  function setConfig(
    address _targetBridge,
    uint64 _chain,
    address _sourceToken,
    bool _isMintBurn,
    address _targetToken,
    bool _enabled
  ) external onlyOwner {
    _configs[_sourceToken][_chain] = TokenConfig({
      enabled: _enabled,
      targetBridge: _targetBridge,
      sourceToken: _sourceToken,
      isMintBurn: _isMintBurn,
      chain: _chain,
      targetToken: _targetToken
    });
  }

  function setGasLimit(uint256 _gasLimit) external onlyOwner {
    require(gasLimit != _gasLimit, 'CHANGE');
    gasLimit = _gasLimit;
  }

  function setConfigEnabled(
    address _sourceToken,
    uint64 _chain,
    bool _isEnabled
  ) external onlyOwner {
    require(_configs[_sourceToken][_chain].enabled != _isEnabled);
    _configs[_sourceToken][_chain].enabled = _isEnabled;
  }

  function setEnabled(bool _isEnabled) external onlyOwner {
    require(enabled != _isEnabled);
    enabled = _isEnabled;
  }
}

File 2 of 4 : 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 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 4 of 4 : ICCIPConfigurations.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface ICCIPConfigurations {
  struct TokenConfig {
    bool enabled;
    address targetBridge;
    address sourceToken;
    bool isMintBurn;
    uint64 chain;
    address targetToken;
  }

  function enabled() external view returns (bool);

  function gasLimit() external view returns (uint256);

  function get(
    address sourceToken,
    uint64 chainSelector
  ) external returns (TokenConfig memory);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"enabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sourceToken","type":"address"},{"internalType":"uint64","name":"_chain","type":"uint64"}],"name":"get","outputs":[{"components":[{"internalType":"bool","name":"enabled","type":"bool"},{"internalType":"address","name":"targetBridge","type":"address"},{"internalType":"address","name":"sourceToken","type":"address"},{"internalType":"bool","name":"isMintBurn","type":"bool"},{"internalType":"uint64","name":"chain","type":"uint64"},{"internalType":"address","name":"targetToken","type":"address"}],"internalType":"struct ICCIPConfigurations.TokenConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_targetBridge","type":"address"},{"internalType":"uint64","name":"_chain","type":"uint64"},{"internalType":"address","name":"_sourceToken","type":"address"},{"internalType":"bool","name":"_isMintBurn","type":"bool"},{"internalType":"address","name":"_targetToken","type":"address"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sourceToken","type":"address"},{"internalType":"uint64","name":"_chain","type":"uint64"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setConfigEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasLimit","type":"uint256"}],"name":"setGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805460ff60a01b1916600160a01b17905562061a8060015534801561002a57600080fd5b5061003433610039565b610089565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61077e806100986000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b14610232578063ca46b9471461024d578063ee7d72b414610260578063f2fde38b14610273578063f68016b71461028657600080fd5b8063238dafe0146100a35780632de98f8f146100cc578063328d8f72146102025780635d961ed114610217578063715018a61461022a575b600080fd5b6000546100b790600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b61019c6100da366004610621565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152506001600160a01b03918216600090815260026020818152604080842067ffffffffffffffff9586168552825292839020835160c081018552815460ff80821615158352610100909104881693820193909352600182015480881695820195909552600160a01b850490921615156060830152600160a81b9093049093166080840152015490911660a082015290565b6040516100c391908151151581526020808301516001600160a01b039081169183019190915260408084015182169083015260608084015115159083015260808084015167ffffffffffffffff169083015260a092830151169181019190915260c00190565b610215610210366004610664565b61029d565b005b610215610225366004610686565b6102e2565b61021561036d565b6000546040516001600160a01b0390911681526020016100c3565b61021561025b3660046106c9565b610381565b61021561026e36600461073d565b61047e565b610215610281366004610756565b6104ca565b61028f60015481565b6040519081526020016100c3565b6102a5610543565b801515600060149054906101000a900460ff161515036102c457600080fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b6102ea610543565b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff8616845290915290205481151560ff90911615150361032c57600080fd5b6001600160a01b03909216600090815260026020908152604080832067ffffffffffffffff909416835292905220805491151560ff19909216919091179055565b610375610543565b61037f600061059d565b565b610389610543565b6040805160c08101825291151582526001600160a01b0396871660208084019182529588168383018181529515156060850190815267ffffffffffffffff98891660808601818152968b1660a0870190815260009384526002808b5286852092855291909952939091209351845492518a1661010002610100600160a81b0319911515919091166001600160a81b031993841617178455945160018401805496519551909816600160a81b0267ffffffffffffffff60a81b19951515600160a01b029690921690891617949094179290921692909217909355905191018054919092166001600160a01b031991909116179055565b610486610543565b80600154036104c55760405162461bcd60e51b81526020600482015260066024820152654348414e474560d01b60448201526064015b60405180910390fd5b600155565b6104d2610543565b6001600160a01b0381166105375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104bc565b6105408161059d565b50565b6000546001600160a01b0316331461037f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461060457600080fd5b919050565b803567ffffffffffffffff8116811461060457600080fd5b6000806040838503121561063457600080fd5b61063d836105ed565b915061064b60208401610609565b90509250929050565b8035801515811461060457600080fd5b60006020828403121561067657600080fd5b61067f82610654565b9392505050565b60008060006060848603121561069b57600080fd5b6106a4846105ed565b92506106b260208501610609565b91506106c060408501610654565b90509250925092565b60008060008060008060c087890312156106e257600080fd5b6106eb876105ed565b95506106f960208801610609565b9450610707604088016105ed565b935061071560608801610654565b9250610723608088016105ed565b915061073160a08801610654565b90509295509295509295565b60006020828403121561074f57600080fd5b5035919050565b60006020828403121561076857600080fd5b61067f826105ed56fea164736f6c6343000813000a

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b14610232578063ca46b9471461024d578063ee7d72b414610260578063f2fde38b14610273578063f68016b71461028657600080fd5b8063238dafe0146100a35780632de98f8f146100cc578063328d8f72146102025780635d961ed114610217578063715018a61461022a575b600080fd5b6000546100b790600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b61019c6100da366004610621565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a0810191909152506001600160a01b03918216600090815260026020818152604080842067ffffffffffffffff9586168552825292839020835160c081018552815460ff80821615158352610100909104881693820193909352600182015480881695820195909552600160a01b850490921615156060830152600160a81b9093049093166080840152015490911660a082015290565b6040516100c391908151151581526020808301516001600160a01b039081169183019190915260408084015182169083015260608084015115159083015260808084015167ffffffffffffffff169083015260a092830151169181019190915260c00190565b610215610210366004610664565b61029d565b005b610215610225366004610686565b6102e2565b61021561036d565b6000546040516001600160a01b0390911681526020016100c3565b61021561025b3660046106c9565b610381565b61021561026e36600461073d565b61047e565b610215610281366004610756565b6104ca565b61028f60015481565b6040519081526020016100c3565b6102a5610543565b801515600060149054906101000a900460ff161515036102c457600080fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b6102ea610543565b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff8616845290915290205481151560ff90911615150361032c57600080fd5b6001600160a01b03909216600090815260026020908152604080832067ffffffffffffffff909416835292905220805491151560ff19909216919091179055565b610375610543565b61037f600061059d565b565b610389610543565b6040805160c08101825291151582526001600160a01b0396871660208084019182529588168383018181529515156060850190815267ffffffffffffffff98891660808601818152968b1660a0870190815260009384526002808b5286852092855291909952939091209351845492518a1661010002610100600160a81b0319911515919091166001600160a81b031993841617178455945160018401805496519551909816600160a81b0267ffffffffffffffff60a81b19951515600160a01b029690921690891617949094179290921692909217909355905191018054919092166001600160a01b031991909116179055565b610486610543565b80600154036104c55760405162461bcd60e51b81526020600482015260066024820152654348414e474560d01b60448201526064015b60405180910390fd5b600155565b6104d2610543565b6001600160a01b0381166105375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104bc565b6105408161059d565b50565b6000546001600160a01b0316331461037f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461060457600080fd5b919050565b803567ffffffffffffffff8116811461060457600080fd5b6000806040838503121561063457600080fd5b61063d836105ed565b915061064b60208401610609565b90509250929050565b8035801515811461060457600080fd5b60006020828403121561067657600080fd5b61067f82610654565b9392505050565b60008060006060848603121561069b57600080fd5b6106a4846105ed565b92506106b260208501610609565b91506106c060408501610654565b90509250925092565b60008060008060008060c087890312156106e257600080fd5b6106eb876105ed565b95506106f960208801610609565b9450610707604088016105ed565b935061071560608801610654565b9250610723608088016105ed565b915061073160a08801610654565b90509295509295509295565b60006020828403121561074f57600080fd5b5035919050565b60006020828403121561076857600080fd5b61067f826105ed56fea164736f6c6343000813000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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