FTM Price: $0.40 (-0.27%)
Gas: 18 Gwei

Contract

0x7374d763A85E5123807C5365f72Bf069827b7452
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Compute Seignior...519984322022-12-07 17:29:36442 days 11 hrs ago1670434176IN
0x7374d7...827b7452
0 FTM0.006554289.04077595
Set Orchard For ...479495602022-09-28 16:18:33512 days 12 hrs ago1664381913IN
0x7374d7...827b7452
0 FTM0.000323125
0x60c06040479488272022-09-28 16:03:03512 days 12 hrs ago1664380983IN
 Create: Summertime
0 FTM0.004688075

Latest 1 internal transaction

Parent Txn Hash Block From To Value
479488272022-09-28 16:03:03512 days 12 hrs ago1664380983  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Summertime

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at ftmscan.com on 2022-10-31
*/

// CherrySummertime.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**

Summertime

This contract is NOT supposed to have ANY token.
Not event token or tree tokens.

Owner Powers:
  - setOrchardForEver(address orchard_) once
  - nothing else

Operator Powers:
  - setPeg()
Operator is allowed to change peg targed, as long as it less or equal to 1 FTM.
This is in case FTM price goes crazy. Imagine FTM = $5, then a simple comment
or like on Cherrific would cost $10 !!! This would kill the app.

TRUST (and gas cost) over governance

Summertime, and the livin' is easy

*/

abstract contract Ownable {

  // ==== Events      ====
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  // ==== Storage     ====
  // Private so it cannot be changed by inherited contracts
  address private _owner;


  // ==== Constructor ====
  constructor() {
    _transferOwnership(msg.sender);
  }


  // ==== Modifiers   ====
  modifier onlyOwner() {
    require(_owner == msg.sender, "Ownable: caller is not the owner");
    _;
  }


  // ==== Views       ====
  function owner() public view virtual returns (address) {
    return _owner;
  }


  // ==== Mutators    ====

  function renounceOwnership() public virtual onlyOwner {
    _transferOwnership(address(0));
  }

  function transferOwnership(address newOwner_) public virtual onlyOwner {
    require(newOwner_ != address(0), "Ownable: new owner is the zero address");
    _transferOwnership(newOwner_);
  }


  // ==== Internals   ====

  function _transferOwnership(address newOwner_) internal virtual {
    address oldOwner = owner();
    _owner = newOwner_;
    emit OwnershipTransferred(oldOwner, newOwner_);
  }
}


// Interfaces

interface IERC20 {
    event Transfer(address indexed from,  address indexed to,      uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    function totalSupply()                             external view returns (uint256);
    function balanceOf(address account)                external view returns (uint256);
    function allowance(address owner, address spender) external view returns (uint256);

    function transfer(     address to,                uint256 amount)  external returns (bool);
    function approve(      address spender,           uint256 amount)  external returns (bool);
    function transferFrom( address from,  address to, uint256 amount ) external returns (bool);
}


interface IERC20Metadata is IERC20 {
    function name()     external view returns (string memory);
    function symbol()   external view returns (string memory);
    function decimals() external view returns (uint8);
}

interface IERC20Mintable {
    function totalSupply()                       external view returns (uint256);
    function mint(address account, uint amount)  external      returns (bool);
}

interface IOrchard {
  function summertime() external view returns(address);
  function distributeSeigniorage(uint amount) external returns (bool);
}

interface IOracle {
  function epoch()  external view returns(uint32);
  function twap()   external view returns(uint112);
  function update() external      returns(bool);
}


contract Summertime is Ownable {

  // ==== Events ====

  event OrchardFunded(uint32 indexed epoch, uint80 expansionRate, uint112 minted);

  // ==== Constants ====

  uint constant PERIOD = 6 hours;
  uint constant maxExpansionRate  = 5 * 1e16;  // 5%
  uint constant minSupply         = 1e22; // minimum 10 000 tokens

  // ==== Storage ====

  // epoch
  // is incremented only in computeSeigniorage()
  uint32  public epoch;
  uint80  public peg = 100 * 1e16;  // 1.00 FTM

  address public operator;

  // related contracts
  address public immutable token;
  address public immutable oracle;
  address public orchard;
  // FYI: Summertime doesn't know tree token

  // ==== Constructor ====

  constructor(
    address token_,
    address oracle_,
    string  memory symbol_
  ) {
    require(token_   != address(0), "Token cannot be 0x00");
    require(oracle_  != address(0), "Oracle cannot be 0x00");

    // check the token contract that we set is indeed the good token contract
    require(
      keccak256(abi.encodePacked(IERC20Metadata(token_).symbol())) == keccak256(abi.encodePacked(symbol_)),
      "Not the right token"
    );

    token  = token_;
    oracle = oracle_;
    operator = msg.sender;
  }

  // ==== Governance ====

  // Setting the orchard can only be done once
  function setOrchardForEver(address orchard_) external onlyOwner returns(bool) {
    // can only be run once
    require(orchard == address(0), "Orchard already set");

    // Safeguard: make sure we are the Summertime of the Orchard
    require(IOrchard(orchard_).summertime() == address(this), "Wrong Orchard");

    orchard = orchard_;

    return true;
  }

  function setOperator(address operator_) external returns(bool) {
    require(msg.sender == operator, "Only operator can change operator");

    operator = operator_;
    return true;
  }

  function setPeg(uint peg_) external returns(bool) {
    require(msg.sender == operator, "Only operator can set peg");
    require(peg_ <= 1e18, "Peg must be under 1FTM");

    peg = uint80(peg_);
    return true;
  }


  // ==== Views ====

  // Current epoch
  function getEpoch() public view returns (uint) {
    return block.timestamp / PERIOD;
  }



  // ==== Mutators ====

  /**
   * Open for anyone to call
   */

  function computeSeigniorage() external returns(bool) {

    uint newEpoch = getEpoch();

    // don't do this or you will block Orchard update
    // require(newEpoch > epoch, "Summertime: has already run this epoch");

    // do this instead:
    if (newEpoch <= epoch) {
      return true;
    }

    // below code will only be run once per epoch

    // update epoch
    epoch = uint32(newEpoch);

    // check Oracle is on current epoch
    if (newEpoch > IOracle(oracle).epoch()) {
      IOracle(oracle).update(); // should revert if does not work
    }

    // "new" means the twap of new previous epoch
    uint newTwap = IOracle(oracle).twap();

    if (newTwap < (peg * 101 / 100)) {
      // no summer
      // just so that Orchard updates its epoch
      IOrchard(orchard).distributeSeigniorage(0);
      return true;
    }

    // summer: do seigniorage
    uint tokenSupply = IERC20Mintable(token).totalSupply();

    uint qtyToMint;
    uint expansionRate;

    if (tokenSupply < minSupply) {
      // to avoid suffocating the app in case base coins are burnt faster
      // than minted, we directly set supply to 120% of minSupply
      unchecked {
        qtyToMint = minSupply - tokenSupply + minSupply / 5;
        expansionRate = ((qtyToMint << 112) / tokenSupply) * 1e18 >> 112;
      }
    } else {

      // normal expansion
      unchecked {
        expansionRate = (newTwap - peg) / 10;
        // twap:  1.01 FTM  ->  exp: 0.001 = 0.1 %
        // twap:  1.10 FTM  ->  exp: 0.01  = 1.0 %
        // twap:  1.30 FTM  ->  exp: 0.03  = 3.0 %
        // twap:  1.50 FTM  ->  exp: 0.05  = 5.0 %
      }

      // cap expansionRate to 5%
      if (expansionRate > maxExpansionRate ) {
          expansionRate = maxExpansionRate;
      }
      // mint for Orchard
      unchecked {
        qtyToMint = tokenSupply * expansionRate / 1e18;
      }
    }

    IERC20Mintable(token).mint(orchard, qtyToMint);
    IOrchard(orchard).distributeSeigniorage(qtyToMint);

    emit OrchardFunded(uint32(newEpoch), uint80(expansionRate), uint112(qtyToMint));

    return true;
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"oracle_","type":"address"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"epoch","type":"uint32"},{"indexed":false,"internalType":"uint80","name":"expansionRate","type":"uint80"},{"indexed":false,"internalType":"uint112","name":"minted","type":"uint112"}],"name":"OrchardFunded","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"},{"inputs":[],"name":"computeSeigniorage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"orchard","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"peg","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"}],"name":"setOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"orchard_","type":"address"}],"name":"setOrchardForEver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"peg_","type":"uint256"}],"name":"setPeg","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600180546001600160501b031916670de0b6b3a76400001790553480156200002b57600080fd5b506040516200135f3803806200135f8339810160408190526200004e916200038b565b620000593362000251565b6001600160a01b038316620000b55760405162461bcd60e51b815260206004820152601460248201527f546f6b656e2063616e6e6f74206265203078303000000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166200010d5760405162461bcd60e51b815260206004820152601560248201527f4f7261636c652063616e6e6f74206265203078303000000000000000000000006044820152606401620000ac565b80604051602001620001209190620003f1565b60405160208183030381529060405280519060200120836001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200019f91908101906200040f565b604051602001620001b19190620003f1565b6040516020818303038152906040528051906020012014620002165760405162461bcd60e51b815260206004820152601360248201527f4e6f742074686520726967687420746f6b656e000000000000000000000000006044820152606401620000ac565b506001600160a01b039182166080521660a05260018054600160501b600160f01b031916336a0100000000000000000000021790556200044f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620002b957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620002f1578181015183820152602001620002d7565b50506000910152565b600082601f8301126200030c57600080fd5b81516001600160401b0380821115620003295762000329620002be565b604051601f8301601f19908116603f01168101908282118183101715620003545762000354620002be565b816040528381528660208588010111156200036e57600080fd5b62000381846020830160208901620002d4565b9695505050505050565b600080600060608486031215620003a157600080fd5b620003ac84620002a1565b9250620003bc60208501620002a1565b60408501519092506001600160401b03811115620003d957600080fd5b620003e786828701620002fa565b9150509250925092565b6000825162000405818460208701620002d4565b9190910192915050565b6000602082840312156200042257600080fd5b81516001600160401b038111156200043957600080fd5b6200044784828501620002fa565b949350505050565b60805160a051610ec762000498600039600081816101cc015281816106bd0152818161074c01526107d401526000818161025e015281816109200152610a7b0152610ec76000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637dc0d1d01161008c578063b3ab15fb11610066578063b3ab15fb1461022b578063ce9b000e1461023e578063f2fde38b14610246578063fc0c546a1461025957600080fd5b80637dc0d1d0146101c75780638da5cb5b146101ee578063900cf0cf146101ff57600080fd5b806353db446a116100c857806353db446a1461015b578063570ca73514610186578063715018a6146101a7578063757991a8146101b157600080fd5b80631f1cb62b146100ef5780632439725a146101255780633309cde114610148575b600080fd5b6001546101059069ffffffffffffffffffff1681565b60405169ffffffffffffffffffff90911681526020015b60405180910390f35b610138610133366004610d02565b610280565b604051901515815260200161011c565b610138610156366004610d30565b610372565b60025461016e906001600160a01b031681565b6040516001600160a01b03909116815260200161011c565b60015461016e906a010000000000000000000090046001600160a01b031681565b6101af61051a565b005b6101b9610580565b60405190815260200161011c565b61016e7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661016e565b60005461021690600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161011c565b610138610239366004610d30565b610593565b61013861066e565b6101af610254366004610d30565b610bc3565b61016e7f000000000000000000000000000000000000000000000000000000000000000081565b6001546000906a010000000000000000000090046001600160a01b031633146102f05760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206f70657261746f722063616e20736574207065670000000000000060448201526064015b60405180910390fd5b670de0b6b3a76400008211156103485760405162461bcd60e51b815260206004820152601660248201527f506567206d75737420626520756e646572203146544d0000000000000000000060448201526064016102e7565b506001805469ffffffffffffffffffff191669ffffffffffffffffffff9290921691909117815590565b600080546001600160a01b031633146103cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6002546001600160a01b0316156104265760405162461bcd60e51b815260206004820152601360248201527f4f72636861726420616c7265616479207365740000000000000000000000000060448201526064016102e7565b306001600160a01b0316826001600160a01b031663cff2edf76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104929190610d54565b6001600160a01b0316146104e85760405162461bcd60e51b815260206004820152600d60248201527f57726f6e67204f7263686172640000000000000000000000000000000000000060448201526064016102e7565b50600280546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000546001600160a01b031633146105745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b61057e6000610ca5565b565b600061058e61546042610d87565b905090565b6001546000906a010000000000000000000090046001600160a01b031633146106245760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206f70657261746f722063616e206368616e6765206f70657261746f60448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016102e7565b50600180546001600160a01b039092166a0100000000000000000000027fffff0000000000000000000000000000000000000000ffffffffffffffffffff90921691909117815590565b600080610679610580565b600054909150600160a01b900463ffffffff16811161069a57600191505090565b80600060146101000a81548163ffffffff021916908363ffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190610d9b565b63ffffffff168111156107d0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a2e620456040518163ffffffff1660e01b81526004016020604051808303816000875af11580156107aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ce9190610dc1565b505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631208aa186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108549190610de3565b6001546dffffffffffffffffffffffffffff9190911691506064906108869069ffffffffffffffffffff166065610e13565b6108909190610e4f565b69ffffffffffffffffffff1681101561091c57600254604051630dbf0d7560e31b8152600060048201526001600160a01b0390911690636df86ba8906024016020604051808303816000875af11580156108ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109129190610dc1565b5060019250505090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190610e78565b905060008069021e19e0c9bab24000008310156109f95769021e19e0c9bab2400000839003686c6b935b8bbd40000001915060708383821b816109e5576109e5610d71565b04670de0b6b3a764000002901c9050610a39565b600154600a9069ffffffffffffffffffff16850304905066b1a2bc2ec50000811115610a29575066b1a2bc2ec500005b670de0b6b3a76400008382020491505b6002546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018490527f0000000000000000000000000000000000000000000000000000000000000000909116906340c10f19906044016020604051808303816000875af1158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea9190610dc1565b50600254604051630dbf0d7560e31b8152600481018490526001600160a01b0390911690636df86ba8906024016020604051808303816000875af1158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190610dc1565b506040805169ffffffffffffffffffff831681526dffffffffffffffffffffffffffff8416602082015263ffffffff8716917fd9dca2e41460b338faff1cefc08530982c239927bc8c4cb4748097fbf75ae53f910160405180910390a260019550505050505090565b6000546001600160a01b03163314610c1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6001600160a01b038116610c995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e7565b610ca281610ca5565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610d1457600080fd5b5035919050565b6001600160a01b0381168114610ca257600080fd5b600060208284031215610d4257600080fd5b8135610d4d81610d1b565b9392505050565b600060208284031215610d6657600080fd5b8151610d4d81610d1b565b634e487b7160e01b600052601260045260246000fd5b600082610d9657610d96610d71565b500490565b600060208284031215610dad57600080fd5b815163ffffffff81168114610d4d57600080fd5b600060208284031215610dd357600080fd5b81518015158114610d4d57600080fd5b600060208284031215610df557600080fd5b81516dffffffffffffffffffffffffffff81168114610d4d57600080fd5b69ffffffffffffffffffff818116838216028082169190828114610e4757634e487b7160e01b600052601160045260246000fd5b505092915050565b600069ffffffffffffffffffff80841680610e6c57610e6c610d71565b92169190910492915050565b600060208284031215610e8a57600080fd5b505191905056fea264697066735822122086803c22f9c3aa7b5a980e111c8982e37cbfad0b1f386a331f365e0901e8687764736f6c634300081100330000000000000000000000004c41bff37db389ba1edc7ed7e757059a1d08ceb50000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000044348525900000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637dc0d1d01161008c578063b3ab15fb11610066578063b3ab15fb1461022b578063ce9b000e1461023e578063f2fde38b14610246578063fc0c546a1461025957600080fd5b80637dc0d1d0146101c75780638da5cb5b146101ee578063900cf0cf146101ff57600080fd5b806353db446a116100c857806353db446a1461015b578063570ca73514610186578063715018a6146101a7578063757991a8146101b157600080fd5b80631f1cb62b146100ef5780632439725a146101255780633309cde114610148575b600080fd5b6001546101059069ffffffffffffffffffff1681565b60405169ffffffffffffffffffff90911681526020015b60405180910390f35b610138610133366004610d02565b610280565b604051901515815260200161011c565b610138610156366004610d30565b610372565b60025461016e906001600160a01b031681565b6040516001600160a01b03909116815260200161011c565b60015461016e906a010000000000000000000090046001600160a01b031681565b6101af61051a565b005b6101b9610580565b60405190815260200161011c565b61016e7f0000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d681565b6000546001600160a01b031661016e565b60005461021690600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161011c565b610138610239366004610d30565b610593565b61013861066e565b6101af610254366004610d30565b610bc3565b61016e7f0000000000000000000000004c41bff37db389ba1edc7ed7e757059a1d08ceb581565b6001546000906a010000000000000000000090046001600160a01b031633146102f05760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206f70657261746f722063616e20736574207065670000000000000060448201526064015b60405180910390fd5b670de0b6b3a76400008211156103485760405162461bcd60e51b815260206004820152601660248201527f506567206d75737420626520756e646572203146544d0000000000000000000060448201526064016102e7565b506001805469ffffffffffffffffffff191669ffffffffffffffffffff9290921691909117815590565b600080546001600160a01b031633146103cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6002546001600160a01b0316156104265760405162461bcd60e51b815260206004820152601360248201527f4f72636861726420616c7265616479207365740000000000000000000000000060448201526064016102e7565b306001600160a01b0316826001600160a01b031663cff2edf76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104929190610d54565b6001600160a01b0316146104e85760405162461bcd60e51b815260206004820152600d60248201527f57726f6e67204f7263686172640000000000000000000000000000000000000060448201526064016102e7565b50600280546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000546001600160a01b031633146105745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b61057e6000610ca5565b565b600061058e61546042610d87565b905090565b6001546000906a010000000000000000000090046001600160a01b031633146106245760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206f70657261746f722063616e206368616e6765206f70657261746f60448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016102e7565b50600180546001600160a01b039092166a0100000000000000000000027fffff0000000000000000000000000000000000000000ffffffffffffffffffff90921691909117815590565b600080610679610580565b600054909150600160a01b900463ffffffff16811161069a57600191505090565b80600060146101000a81548163ffffffff021916908363ffffffff1602179055507f0000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d66001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190610d9b565b63ffffffff168111156107d0577f0000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d66001600160a01b031663a2e620456040518163ffffffff1660e01b81526004016020604051808303816000875af11580156107aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ce9190610dc1565b505b60007f0000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d66001600160a01b0316631208aa186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108549190610de3565b6001546dffffffffffffffffffffffffffff9190911691506064906108869069ffffffffffffffffffff166065610e13565b6108909190610e4f565b69ffffffffffffffffffff1681101561091c57600254604051630dbf0d7560e31b8152600060048201526001600160a01b0390911690636df86ba8906024016020604051808303816000875af11580156108ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109129190610dc1565b5060019250505090565b60007f0000000000000000000000004c41bff37db389ba1edc7ed7e757059a1d08ceb56001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190610e78565b905060008069021e19e0c9bab24000008310156109f95769021e19e0c9bab2400000839003686c6b935b8bbd40000001915060708383821b816109e5576109e5610d71565b04670de0b6b3a764000002901c9050610a39565b600154600a9069ffffffffffffffffffff16850304905066b1a2bc2ec50000811115610a29575066b1a2bc2ec500005b670de0b6b3a76400008382020491505b6002546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018490527f0000000000000000000000004c41bff37db389ba1edc7ed7e757059a1d08ceb5909116906340c10f19906044016020604051808303816000875af1158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea9190610dc1565b50600254604051630dbf0d7560e31b8152600481018490526001600160a01b0390911690636df86ba8906024016020604051808303816000875af1158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190610dc1565b506040805169ffffffffffffffffffff831681526dffffffffffffffffffffffffffff8416602082015263ffffffff8716917fd9dca2e41460b338faff1cefc08530982c239927bc8c4cb4748097fbf75ae53f910160405180910390a260019550505050505090565b6000546001600160a01b03163314610c1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6001600160a01b038116610c995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e7565b610ca281610ca5565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610d1457600080fd5b5035919050565b6001600160a01b0381168114610ca257600080fd5b600060208284031215610d4257600080fd5b8135610d4d81610d1b565b9392505050565b600060208284031215610d6657600080fd5b8151610d4d81610d1b565b634e487b7160e01b600052601260045260246000fd5b600082610d9657610d96610d71565b500490565b600060208284031215610dad57600080fd5b815163ffffffff81168114610d4d57600080fd5b600060208284031215610dd357600080fd5b81518015158114610d4d57600080fd5b600060208284031215610df557600080fd5b81516dffffffffffffffffffffffffffff81168114610d4d57600080fd5b69ffffffffffffffffffff818116838216028082169190828114610e4757634e487b7160e01b600052601160045260246000fd5b505092915050565b600069ffffffffffffffffffff80841680610e6c57610e6c610d71565b92169190910492915050565b600060208284031215610e8a57600080fd5b505191905056fea264697066735822122086803c22f9c3aa7b5a980e111c8982e37cbfad0b1f386a331f365e0901e8687764736f6c63430008110033

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

0000000000000000000000004c41bff37db389ba1edc7ed7e757059a1d08ceb50000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000044348525900000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : token_ (address): 0x4C41bFf37db389BA1edC7ED7e757059a1D08ceb5
Arg [1] : oracle_ (address): 0x2bcC8dA3fE1BF5637262c9c05663490f14C981d6
Arg [2] : symbol_ (string): CHRY

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000004c41bff37db389ba1edc7ed7e757059a1d08ceb5
Arg [1] : 0000000000000000000000002bcc8da3fe1bf5637262c9c05663490f14c981d6
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [4] : 4348525900000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

3333:4531:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3782:31;;;;;;;;;;;;188:22:1;176:35;;;158:54;;146:2;131:18;3782:31:0;;;;;;;;5254:222;;;;;;:::i;:::-;;:::i;:::-;;;573:14:1;;566:22;548:41;;536:2;521:18;5254:222:0;408:187:1;4682:369:0;;;;;;:::i;:::-;;:::i;3958:22::-;;;;;-1:-1:-1;;;;;3958:22:0;;;;;;-1:-1:-1;;;;;1175:55:1;;;1157:74;;1145:2;1130:18;3958:22:0;1011:226:1;3833:23:0;;;;;;;;-1:-1:-1;;;;;3833:23:0;;;1272:97;;;:::i;:::-;;5528:91;;;:::i;:::-;;;1388:25:1;;;1376:2;1361:18;5528:91:0;1242:177:1;3922:31:0;;;;;1153:81;1199:7;1222:6;-1:-1:-1;;;;;1222:6:0;1153:81;;3757:20;;;;;-1:-1:-1;;;3757:20:0;;;;;;;;;1598:10:1;1586:23;;;1568:42;;1556:2;1541:18;3757:20:0;1424:192:1;5057:191:0;;;;;;:::i;:::-;;:::i;5702:2159::-;;;:::i;1375:194::-;;;;;;:::i;:::-;;:::i;3887:30::-;;;;;5254:222;5333:8;;5298:4;;5333:8;;;-1:-1:-1;;;;;5333:8:0;5319:10;:22;5311:60;;;;-1:-1:-1;;;5311:60:0;;1823:2:1;5311:60:0;;;1805:21:1;1862:2;1842:18;;;1835:30;1901:27;1881:18;;;1874:55;1946:18;;5311:60:0;;;;;;;;;5394:4;5386;:12;;5378:47;;;;-1:-1:-1;;;5378:47:0;;2177:2:1;5378:47:0;;;2159:21:1;2216:2;2196:18;;;2189:30;2255:24;2235:18;;;2228:52;2297:18;;5378:47:0;1975:346:1;5378:47:0;-1:-1:-1;5434:3:0;:18;;-1:-1:-1;;5434:18:0;;;;;;;;;;;;:3;5254:222::o;4682:369::-;4754:4;1046:6;;-1:-1:-1;;;;;1046:6:0;1056:10;1046:20;1038:65;;;;-1:-1:-1;;;1038:65:0;;2528:2:1;1038:65:0;;;2510:21:1;;;2547:18;;;2540:30;2606:34;2586:18;;;2579:62;2658:18;;1038:65:0;2326:356:1;1038:65:0;4804:7:::1;::::0;-1:-1:-1;;;;;4804:7:0::1;:21:::0;4796:53:::1;;;::::0;-1:-1:-1;;;4796:53:0;;2889:2:1;4796:53:0::1;::::0;::::1;2871:21:1::0;2928:2;2908:18;;;2901:30;2967:21;2947:18;;;2940:49;3006:18;;4796:53:0::1;2687:343:1::0;4796:53:0::1;4975:4;-1:-1:-1::0;;;;;4932:48:0::1;4941:8;-1:-1:-1::0;;;;;4932:29:0::1;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;4932:48:0::1;;4924:74;;;::::0;-1:-1:-1;;;4924:74:0;;3493:2:1;4924:74:0::1;::::0;::::1;3475:21:1::0;3532:2;3512:18;;;3505:30;3571:15;3551:18;;;3544:43;3604:18;;4924:74:0::1;3291:337:1::0;4924:74:0::1;-1:-1:-1::0;5007:7:0::1;:18:::0;;-1:-1:-1;;;;;5007:18:0;::::1;-1:-1:-1::0;;5007:18:0;;::::1;;::::0;;;4682:369;;;:::o;1272:97::-;1046:6;;-1:-1:-1;;;;;1046:6:0;1056:10;1046:20;1038:65;;;;-1:-1:-1;;;1038:65:0;;2528:2:1;1038:65:0;;;2510:21:1;;;2547:18;;;2540:30;2606:34;2586:18;;;2579:62;2658:18;;1038:65:0;2326:356:1;1038:65:0;1333:30:::1;1360:1;1333:18;:30::i;:::-;1272:97::o:0;5528:91::-;5569:4;5589:24;3533:7;5589:15;:24;:::i;:::-;5582:31;;5528:91;:::o;5057:191::-;5149:8;;5114:4;;5149:8;;;-1:-1:-1;;;;;5149:8:0;5135:10;:22;5127:68;;;;-1:-1:-1;;;5127:68:0;;4149:2:1;5127:68:0;;;4131:21:1;4188:2;4168:18;;;4161:30;4227:34;4207:18;;;4200:62;4298:3;4278:18;;;4271:31;4319:19;;5127:68:0;3947:397:1;5127:68:0;-1:-1:-1;5204:8:0;:20;;-1:-1:-1;;;;;5204:20:0;;;;;;;;;;;;;;;:8;5057:191::o;5702:2159::-;5749:4;5764:13;5780:10;:8;:10::i;:::-;5974:5;;5764:26;;-1:-1:-1;;;;5974:5:0;;;;5962:17;;5958:51;;5997:4;5990:11;;;5702:2159;:::o;5958:51::-;6106:8;6091:5;;:24;;;;;;;;;;;;;;;;;;6188:6;-1:-1:-1;;;;;6180:21:0;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6169:34;;:8;:34;6165:115;;;6222:6;-1:-1:-1;;;;;6214:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6165:115;6339:12;6362:6;-1:-1:-1;;;;;6354:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6400:3;;6339:37;;;;;;-1:-1:-1;6412:3:0;;6400:9;;:3;;6406;6400:9;:::i;:::-;:15;;;;:::i;:::-;6389:27;;:7;:27;6385:181;;;6505:7;;6496:42;;-1:-1:-1;;;6496:42:0;;6505:7;6496:42;;;1388:25:1;-1:-1:-1;;;;;6505:7:0;;;;6496:39;;1361:18:1;;6496:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6554:4;6547:11;;;;5702:2159;:::o;6385:181::-;6605:16;6639:5;-1:-1:-1;;;;;6624:33:0;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6605:54;;6668:14;6689:18;3633:4;6720:11;:23;6716:920;;;3633:4;6929:23;;;6955:13;6929:39;;-1:-1:-1;7040:3:0;6941:11;6997:16;;;6941:11;6996:32;;;;:::i;:::-;;7032:4;6995:41;:48;;6979:64;;6716:920;;;7152:3;;7159:2;;7152:3;;7142:13;;7141:20;7125:36;;3579:8;7427:13;:32;7423:94;;;-1:-1:-1;3579:8:0;7423:94;7615:4;7585:27;;;:34;7573:46;;6716:920;7671:7;;7644:46;;;;;-1:-1:-1;;;;;7671:7:0;;;7644:46;;;6403:74:1;6493:18;;;6486:34;;;7659:5:0;7644:26;;;;;;6376:18:1;;7644:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;7706:7:0;;7697:50;;-1:-1:-1;;;7697:50:0;;;;;1388:25:1;;;-1:-1:-1;;;;;7706:7:0;;;;7697:39;;1361:18:1;;7697:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;7761:74:0;;;6733:22:1;6721:35;;6703:54;;6805:30;6793:43;;6788:2;6773:18;;6766:71;7761:74:0;;;;;;6676:18:1;7761:74:0;;;;;;;7851:4;7844:11;;;;;;;5702:2159;:::o;1375:194::-;1046:6;;-1:-1:-1;;;;;1046:6:0;1056:10;1046:20;1038:65;;;;-1:-1:-1;;;1038:65:0;;2528:2:1;1038:65:0;;;2510:21:1;;;2547:18;;;2540:30;2606:34;2586:18;;;2579:62;2658:18;;1038:65:0;2326:356:1;1038:65:0;-1:-1:-1;;;;;1461:23:0;::::1;1453:74;;;::::0;-1:-1:-1;;;1453:74:0;;7050:2:1;1453:74:0::1;::::0;::::1;7032:21:1::0;7089:2;7069:18;;;7062:30;7128:34;7108:18;;;7101:62;7199:8;7179:18;;;7172:36;7225:19;;1453:74:0::1;6848:402:1::0;1453:74:0::1;1534:29;1553:9;1534:18;:29::i;:::-;1375:194:::0;:::o;1607:181::-;1678:16;1222:6;;-1:-1:-1;;;;;1711:18:0;;;-1:-1:-1;;1711:18:0;;;;;;1741:41;;1222:6;;;;;;;1741:41;;1678:16;1741:41;1671:117;1607:181;:::o;223:180:1:-;282:6;335:2;323:9;314:7;310:23;306:32;303:52;;;351:1;348;341:12;303:52;-1:-1:-1;374:23:1;;223:180;-1:-1:-1;223:180:1:o;600:154::-;-1:-1:-1;;;;;679:5:1;675:54;668:5;665:65;655:93;;744:1;741;734:12;759:247;818:6;871:2;859:9;850:7;846:23;842:32;839:52;;;887:1;884;877:12;839:52;926:9;913:23;945:31;970:5;945:31;:::i;:::-;995:5;759:247;-1:-1:-1;;;759:247:1:o;3035:251::-;3105:6;3158:2;3146:9;3137:7;3133:23;3129:32;3126:52;;;3174:1;3171;3164:12;3126:52;3206:9;3200:16;3225:31;3250:5;3225:31;:::i;3633:184::-;-1:-1:-1;;;3682:1:1;3675:88;3782:4;3779:1;3772:15;3806:4;3803:1;3796:15;3822:120;3862:1;3888;3878:35;;3893:18;;:::i;:::-;-1:-1:-1;3927:9:1;;3822:120::o;4349:280::-;4418:6;4471:2;4459:9;4450:7;4446:23;4442:32;4439:52;;;4487:1;4484;4477:12;4439:52;4519:9;4513:16;4569:10;4562:5;4558:22;4551:5;4548:33;4538:61;;4595:1;4592;4585:12;4634:277;4701:6;4754:2;4742:9;4733:7;4729:23;4725:32;4722:52;;;4770:1;4767;4760:12;4722:52;4802:9;4796:16;4855:5;4848:13;4841:21;4834:5;4831:32;4821:60;;4877:1;4874;4867:12;4916:301;4986:6;5039:2;5027:9;5018:7;5014:23;5010:32;5007:52;;;5055:1;5052;5045:12;5007:52;5087:9;5081:16;5137:30;5130:5;5126:42;5119:5;5116:53;5106:81;;5183:1;5180;5173:12;5222:415;5293:22;5347:10;;;5359;;;5343:27;5390:20;;;;5293:22;5429:24;;;5419:212;;-1:-1:-1;;;5484:1:1;5477:88;5588:4;5585:1;5578:15;5616:4;5613:1;5606:15;5419:212;;;5222:415;;;;:::o;5642:203::-;5681:1;5707:22;5756:2;5753:1;5749:10;5778:3;5768:37;;5785:18;;:::i;:::-;5823:10;;5819:20;;;;;5642:203;-1:-1:-1;;5642:203:1:o;6040:184::-;6110:6;6163:2;6151:9;6142:7;6138:23;6134:32;6131:52;;;6179:1;6176;6169:12;6131:52;-1:-1:-1;6202:16:1;;6040:184;-1:-1:-1;6040:184:1:o

Swarm Source

ipfs://86803c22f9c3aa7b5a980e111c8982e37cbfad0b1f386a331f365e0901e86877

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

Txn 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.