Contract 0x4cc7584c3f8faabf734374ef129df17c3517e9cb

 

Contract Overview

KlimaDAO: Distributor V1
Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xce563c127df1c1f9b49839612afbaca8c58ea019a6ea0f4cf530bbfd0659c66bPush Policy219101592021-11-28 19:31:09306 days 5 hrs agoKlimaDAO: Deployer IN  KlimaDAO: Distributor V10 MATIC0.0013800930
0xb797614e644e9b6170cc28aee19aa23f62b0a8081e522f946beae5da9f0e2404Add Recipient203748862021-10-19 9:11:50346 days 15 hrs agoKlimaDAO: Deployer IN  KlimaDAO: Distributor V10 MATIC0.0027165930
0x6e6a46a8b506882254a85a99eba574002de13011a2faafe11ac719c02a7b6f5a0x60e06040203262402021-10-17 22:30:13348 days 2 hrs agoKlimaDAO: Deployer IN  Create: Distributor0 MATIC0.0027834480033.000000004
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Distributor

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-10-17
*/

// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity 0.7.5;

library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {

        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function _callOptionalReturn(IERC20 token, bytes memory data) private {

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

library SafeMath {

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {

        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrrt(uint256 a) internal pure returns (uint c) {
        if (a > 3) {
            c = a;
            uint b = add( div( a, 2), 1 );
            while (b < c) {
                c = b;
                b = div( add( div( a, b ), b), 2 );
            }
        } else if (a != 0) {
            c = 1;
        }
    }

    function percentageAmount( uint256 total_, uint8 percentage_ ) internal pure returns ( uint256 percentAmount_ ) {
        return div( mul( total_, percentage_ ), 1000 );
    }

    function substractPercentage( uint256 total_, uint8 percentageToSub_ ) internal pure returns ( uint256 result_ ) {
        return sub( total_, div( mul( total_, percentageToSub_ ), 1000 ) );
    }

    function percentageOfTotal( uint256 part_, uint256 total_ ) internal pure returns ( uint256 percent_ ) {
        return div( mul(part_, 100) , total_ );
    }

    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }

    function quadraticPricing( uint256 payment_, uint256 multiplier_ ) internal pure returns (uint256) {
        return sqrrt( mul( multiplier_, payment_ ) );
    }

    function bondingCurve( uint256 supply_, uint256 multiplier_ ) internal pure returns (uint256) {
        return mul( multiplier_, supply_ );
    }
}

interface IERC20 {

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function transfer(address recipient, uint256 amount) external returns (bool);

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

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

    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

library Address {

    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }

    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            if (returndata.length > 0) {
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }

    function addressToString(address _address) internal pure returns(string memory) {
        bytes32 _bytes = bytes32(uint256(_address));
        bytes memory HEX = "0123456789abcdef";
        bytes memory _addr = new bytes(42);

        _addr[0] = '0';
        _addr[1] = 'x';

        for(uint256 i = 0; i < 20; i++) {
            _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];
            _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];
        }

        return string(_addr);

    }
}


interface IPolicy {

    function policy() external view returns (address);

    function renouncePolicy() external;

    function pushPolicy( address newPolicy_ ) external;

    function pullPolicy() external;
}

contract Policy is IPolicy {

    address internal _policy;
    address internal _newPolicy;

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

    constructor () {
        _policy = msg.sender;
        emit OwnershipTransferred( address(0), _policy );
    }

    function policy() public view override returns (address) {
        return _policy;
    }

    modifier onlyPolicy() {
        require( _policy == msg.sender, "Ownable: caller is not the owner" );
        _;
    }

    function renouncePolicy() public virtual override onlyPolicy() {
        emit OwnershipTransferred( _policy, address(0) );
        _policy = address(0);
    }

    function pushPolicy( address newPolicy_ ) public virtual override onlyPolicy() {
        require( newPolicy_ != address(0), "Ownable: new owner is the zero address");
        _newPolicy = newPolicy_;
    }

    function pullPolicy() public virtual override {
        require( msg.sender == _newPolicy );
        emit OwnershipTransferred( _policy, _newPolicy );
        _policy = _newPolicy;
    }
}

interface ITreasury {
    function mintRewards( address _recipient, uint _amount ) external;
}

contract Distributor is Policy {
    using SafeMath for uint;
    using SafeERC20 for IERC20;



    /* ====== VARIABLES ====== */

    address public immutable KLIMA;
    address public immutable treasury;

    uint public immutable epochLength;
    uint public nextEpochBlock;

    mapping( uint => Adjust ) public adjustments;


    /* ====== STRUCTS ====== */

    struct Info {
        uint rate; // in ten-thousandths ( 5000 = 0.5% )
        address recipient;
    }
    Info[] public info;

    struct Adjust {
        bool add;
        uint rate;
        uint target;
    }



    /* ====== CONSTRUCTOR ====== */

    constructor( address _treasury, address _klima, uint _epochLength, uint _nextEpochBlock ) {
        require( _treasury != address(0) );
        treasury = _treasury;
        require( _klima != address(0) );
        KLIMA = _klima;
        epochLength = _epochLength;
        nextEpochBlock = _nextEpochBlock;
    }



    /* ====== PUBLIC FUNCTIONS ====== */

    /**
        @notice send epoch reward to staking contract
     */
    function distribute() external returns ( bool ) {
        if ( nextEpochBlock <= block.number ) {
            nextEpochBlock = nextEpochBlock.add( epochLength ); // set next epoch block

            // distribute rewards to each recipient
            for ( uint i = 0; i < info.length; i++ ) {
                if ( info[ i ].rate > 0 ) {
                    ITreasury( treasury ).mintRewards( // mint and send from treasury
                        info[ i ].recipient,
                        nextRewardAt( info[ i ].rate )
                    );
                    adjust( i ); // check for adjustment
                }
            }
            return true;
        } else {
            return false;
        }
    }



    /* ====== INTERNAL FUNCTIONS ====== */

    /**
        @notice increment reward rate for collector
     */
    function adjust( uint _index ) internal {
        Adjust memory adjustment = adjustments[ _index ];
        if ( adjustment.rate != 0 ) {
            if ( adjustment.add ) { // if rate should increase
                info[ _index ].rate = info[ _index ].rate.add( adjustment.rate ); // raise rate
                if ( info[ _index ].rate >= adjustment.target ) { // if target met
                    adjustments[ _index ].rate = 0; // turn off adjustment
                }
            } else { // if rate should decrease
                info[ _index ].rate = info[ _index ].rate.sub( adjustment.rate ); // lower rate
                if ( info[ _index ].rate <= adjustment.target ) { // if target met
                    adjustments[ _index ].rate = 0; // turn off adjustment
                }
            }
        }
    }



    /* ====== VIEW FUNCTIONS ====== */

    /**
        @notice view function for next reward at given rate
        @param _rate uint
        @return uint
     */
    function nextRewardAt( uint _rate ) public view returns ( uint ) {
        return IERC20( KLIMA ).totalSupply().mul( _rate ).div( 1000000 );
    }

    /**
        @notice view function for next reward for specified address
        @param _recipient address
        @return uint
     */
    function nextRewardFor( address _recipient ) public view returns ( uint ) {
        uint reward;
        for ( uint i = 0; i < info.length; i++ ) {
            if ( info[ i ].recipient == _recipient ) {
                reward = nextRewardAt( info[ i ].rate );
            }
        }
        return reward;
    }



    /* ====== POLICY FUNCTIONS ====== */

    /**
        @notice adds recipient for distributions
        @param _recipient address
        @param _rewardRate uint
     */
    function addRecipient( address _recipient, uint _rewardRate ) external onlyPolicy() {
        require( _recipient != address(0) );
        info.push( Info({
        recipient: _recipient,
        rate: _rewardRate
        }));
    }

    /**
        @notice removes recipient for distributions
        @param _index uint
        @param _recipient address
     */
    function removeRecipient( uint _index, address _recipient ) external onlyPolicy() {
        require( _recipient == info[ _index ].recipient );
        info[ _index ].recipient = address(0);
        info[ _index ].rate = 0;
    }

    /**
        @notice set adjustment info for a collector's reward rate
        @param _index uint
        @param _add bool
        @param _rate uint
        @param _target uint
     */
    function setAdjustment( uint _index, bool _add, uint _rate, uint _target ) external onlyPolicy() {
        adjustments[ _index ] = Adjust({
        add: _add,
        rate: _rate,
        target: _target
        });
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_klima","type":"address"},{"internalType":"uint256","name":"_epochLength","type":"uint256"},{"internalType":"uint256","name":"_nextEpochBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"KLIMA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_rewardRate","type":"uint256"}],"name":"addRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"adjustments","outputs":[{"internalType":"bool","name":"add","type":"bool"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"target","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distribute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epochLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"info","outputs":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"nextRewardAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"nextRewardFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"policy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pullPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPolicy_","type":"address"}],"name":"pushPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"removeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renouncePolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"bool","name":"_add","type":"bool"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_target","type":"uint256"}],"name":"setAdjustment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e060405234801561001057600080fd5b506040516110173803806110178339818101604052608081101561003357600080fd5b5080516020820151604080840151606090940151600080546001600160a01b031916331780825592519495939491926001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36001600160a01b0384166100a457600080fd5b6001600160601b0319606085901b1660a0526001600160a01b0383166100c957600080fd5b6001600160601b031960609390931b9290921660805260c0526002555060805160601c60a05160601c60c051610ef0610127600039806103c752806107655250806104f752806107c2525080610698528061072f5250610ef06000f3fe608060405234801561001057600080fd5b50600436106100ff5760003560e01c8063a15ad07711610097578063e3ed12a011610066578063e3ed12a014610279578063e4fc6b6d14610281578063f79822431461029d578063fe3fbbad146102c9576100ff565b8063a15ad077146101f1578063a4b2398014610217578063bc3b2b121461021f578063c9fa8b2a1461025c576100ff565b806357d775f8116100d357806357d775f8146101a65780635beede08146101ae5780635db854b0146101b857806361d027b3146101e9576100ff565b8062640c2e146101045780630505c8c91461011e5780632e3405991461014257806336d33f4414610180575b600080fd5b61010c6102f5565b60408051918252519081900360200190f35b6101266102fb565b604080516001600160a01b039092168252519081900360200190f35b61015f6004803603602081101561015857600080fd5b503561030b565b604080519283526001600160a01b0390911660208301528051918290030190f35b61010c6004803603602081101561019657600080fd5b50356001600160a01b0316610342565b61010c6103c5565b6101b66103e9565b005b6101b6600480360360808110156101ce57600080fd5b50803590602081013515159060408101359060600135610461565b6101266104f5565b6101b66004803603602081101561020757600080fd5b50356001600160a01b0316610519565b6101b66105cd565b61023c6004803603602081101561023557600080fd5b5035610664565b604080519315158452602084019290925282820152519081900360600190f35b61010c6004803603602081101561027257600080fd5b5035610689565b61012661072d565b610289610751565b604080519115158252519081900360200190f35b6101b6600480360360408110156102b357600080fd5b506001600160a01b0381351690602001356108b2565b6101b6600480360360408110156102df57600080fd5b50803590602001356001600160a01b03166109a7565b60025481565b6000546001600160a01b03165b90565b6004818154811061031b57600080fd5b6000918252602090912060029091020180546001909101549091506001600160a01b031682565b60008060005b6004548110156103be57836001600160a01b03166004828154811061036957fe5b60009182526020909120600160029092020101546001600160a01b031614156103b6576103b36004828154811061039c57fe5b906000526020600020906002020160000154610689565b91505b600101610348565b5092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001546001600160a01b0316331461040057600080fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b6000546001600160a01b031633146104ae576040805162461bcd60e51b81526020600482018190526024820152600080516020610e9b833981519152604482015290519081900360640190fd5b60408051606081018252931515845260208085019384528482019283526000958652600390529093209151825460ff19169015151782555160018201559051600290910155565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03163314610566576040805162461bcd60e51b81526020600482018190526024820152600080516020610e9b833981519152604482015290519081900360640190fd5b6001600160a01b0381166105ab5760405162461bcd60e51b8152600401808060200182810382526026815260200180610e546026913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461061a576040805162461bcd60e51b81526020600482018190526024820152600080516020610e9b833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60036020526000908152604090208054600182015460029092015460ff909116919083565b6000610727620f4240610721847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106ef57600080fd5b505afa158015610703573d6000803e3d6000fd5b505050506040513d602081101561071957600080fd5b505190610a94565b90610af4565b92915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600043600254116108aa57600254610789907f0000000000000000000000000000000000000000000000000000000000000000610b36565b60025560005b6004548110156108a0576000600482815481106107a857fe5b9060005260206000209060020201600001541115610898577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636a20de92600483815481106107fc57fe5b906000526020600020906002020160010160009054906101000a90046001600160a01b03166108316004858154811061039c57fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561087757600080fd5b505af115801561088b573d6000803e3d6000fd5b5050505061089881610b90565b60010161078f565b5060019050610308565b506000610308565b6000546001600160a01b031633146108ff576040805162461bcd60e51b81526020600482018190526024820152600080516020610e9b833981519152604482015290519081900360640190fd5b6001600160a01b03821661091257600080fd5b604080518082019091529081526001600160a01b03918216602082019081526004805460018101825560009190915291517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600290930292830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90910180546001600160a01b03191691909216179055565b6000546001600160a01b031633146109f4576040805162461bcd60e51b81526020600482018190526024820152600080516020610e9b833981519152604482015290519081900360640190fd5b60048281548110610a0157fe5b60009182526020909120600160029092020101546001600160a01b03828116911614610a2c57600080fd5b600060048381548110610a3b57fe5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060048381548110610a7f57fe5b60009182526020909120600290910201555050565b600082610aa357506000610727565b82820282848281610ab057fe5b0414610aed5760405162461bcd60e51b8152600401808060200182810382526021815260200180610e7a6021913960400191505060405180910390fd5b9392505050565b6000610aed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610cf7565b600082820183811015610aed576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b610b98610e30565b506000818152600360209081526040918290208251606081018452815460ff161515815260018201549281018390526002909101549281019290925215610cf357805115610c6c57610c0c816020015160048481548110610bf557fe5b600091825260209091206002909102015490610b36565b60048381548110610c1957fe5b600091825260209091206002909102015560408101516004805484908110610c3d57fe5b90600052602060002090600202016000015410610c67576000828152600360205260408120600101555b610cf3565b610c98816020015160048481548110610c8157fe5b600091825260209091206002909102015490610d99565b60048381548110610ca557fe5b600091825260209091206002909102015560408101516004805484908110610cc957fe5b90600052602060002090600202016000015411610cf3576000828152600360205260408120600101555b5050565b60008183610d835760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d48578181015183820152602001610d30565b50505050905090810190601f168015610d755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610d8f57fe5b0495945050505050565b6000610aed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060008184841115610e285760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610d48578181015183820152602001610d30565b505050900390565b60405180606001604052806000151581526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f2d1cf282d00448c71faa154fca18eb99eda0eed4e96bab0af4594680db5e1d464736f6c634300070500330000000000000000000000007dd4f0b986f032a44f913bf92c9e8b7c17d77ad70000000000000000000000004e78011ce80ee02d2c3e649fb657e458982578150000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000136e3b2

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

0000000000000000000000007dd4f0b986f032a44f913bf92c9e8b7c17d77ad70000000000000000000000004e78011ce80ee02d2c3e649fb657e458982578150000000000000000000000000000000000000000000000000000000000002d00000000000000000000000000000000000000000000000000000000000136e3b2

-----Decoded View---------------
Arg [0] : _treasury (address): 0x7dd4f0b986f032a44f913bf92c9e8b7c17d77ad7
Arg [1] : _klima (address): 0x4e78011ce80ee02d2c3e649fb657e45898257815
Arg [2] : _epochLength (uint256): 11520
Arg [3] : _nextEpochBlock (uint256): 20374450

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000007dd4f0b986f032a44f913bf92c9e8b7c17d77ad7
Arg [1] : 0000000000000000000000004e78011ce80ee02d2c3e649fb657e45898257815
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002d00
Arg [3] : 000000000000000000000000000000000000000000000000000000000136e3b2


Deployed ByteCode Sourcemap

12472:4853:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12735:26;;;:::i;:::-;;;;;;;;;;;;;;;;11563:90;;;:::i;:::-;;;;-1:-1:-1;;;;;11563:90:0;;;;;;;;;;;;;;12972:18;;;;;;;;;;;;;;;;-1:-1:-1;12972:18:0;;:::i;:::-;;;;;;;-1:-1:-1;;;;;12972:18:0;;;;;;;;;;;;;;;;15768:320;;;;;;;;;;;;;;;;-1:-1:-1;15768:320:0;-1:-1:-1;;;;;15768:320:0;;:::i;12695:33::-;;;:::i;12175:190::-;;;:::i;:::-;;17095:227;;;;;;;;;;;;;;;;-1:-1:-1;17095:227:0;;;;;;;;;;;;;;;;;;;:::i;12653:33::-;;;:::i;11959:208::-;;;;;;;;;;;;;;;;-1:-1:-1;11959:208:0;-1:-1:-1;;;;;11959:208:0;;:::i;11790:161::-;;;:::i;12770:44::-;;;;;;;;;;;;;;;;-1:-1:-1;12770:44:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15468:148;;;;;;;;;;;;;;;;-1:-1:-1;15468:148:0;;:::i;12616:30::-;;;:::i;13583:737::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;16280:238;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;16280:238:0;;;;;;;;:::i;16660:232::-;;;;;;;;;;;;;;;;-1:-1:-1;16660:232:0;;;;;;-1:-1:-1;;;;;16660:232:0;;:::i;12735:26::-;;;;:::o;11563:90::-;11611:7;11638;-1:-1:-1;;;;;11638:7:0;11563:90;;:::o;12972:18::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12972:18:0;;:::o;15768:320::-;15835:4;15853:11;15881:6;15875:182;15897:4;:11;15893:15;;15875:182;;;15959:10;-1:-1:-1;;;;;15936:33:0;:4;15942:1;15936:9;;;;;;;;;;;;;;;;:19;:9;;;;;:19;;-1:-1:-1;;;;;15936:19:0;:33;15931:115;;;16000:30;16014:4;16020:1;16014:9;;;;;;;;;;;;;;;;;;:14;;;16000:12;:30::i;:::-;15991:39;;15931:115;15910:3;;15875:182;;;-1:-1:-1;16074:6:0;15768:320;-1:-1:-1;;15768:320:0:o;12695:33::-;;;:::o;12175:190::-;12255:10;;-1:-1:-1;;;;;12255:10:0;12241;:24;12232:35;;;;;;12314:10;;;12305:7;;12283:43;;-1:-1:-1;;;;;12314:10:0;;;;12305:7;;;;12283:43;;;12347:10;;;12337:20;;-1:-1:-1;;;;;;12337:20:0;-1:-1:-1;;;;;12347:10:0;;;12337:20;;;;;;12175:190::o;17095:227::-;11703:7;;-1:-1:-1;;;;;11703:7:0;11714:10;11703:21;11694:68;;;;;-1:-1:-1;;;11694:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11694:68:0;;;;;;;;;;;;;;;17227:87:::1;::::0;;::::1;::::0;::::1;::::0;;;::::1;;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;17203:21:0;;;:11:::1;:21:::0;;;;;:111;;;;-1:-1:-1;;17203:111:0::1;::::0;::::1;;;::::0;;;-1:-1:-1;17203:111:0;::::1;::::0;;;::::1;::::0;;::::1;::::0;17095:227::o;12653:33::-;;;:::o;11959:208::-;11703:7;;-1:-1:-1;;;;;11703:7:0;11714:10;11703:21;11694:68;;;;;-1:-1:-1;;;11694:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11694:68:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;12058:24:0;::::1;12049:76;;;;-1:-1:-1::0;;;12049:76:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12136:10;:23:::0;;-1:-1:-1;;;;;;12136:23:0::1;-1:-1:-1::0;;;;;12136:23:0;;;::::1;::::0;;;::::1;::::0;;11959:208::o;11790:161::-;11703:7;;-1:-1:-1;;;;;11703:7:0;11714:10;11703:21;11694:68;;;;;-1:-1:-1;;;11694:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11694:68:0;;;;;;;;;;;;;;;11908:1:::1;11891:7:::0;;11869:43:::1;::::0;-1:-1:-1;;;;;11891:7:0;;::::1;::::0;11869:43:::1;::::0;11908:1;;11869:43:::1;11941:1;11923:20:::0;;-1:-1:-1;;;;;;11923:20:0::1;::::0;;11790:161::o;12770:44::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;15468:148::-;15526:4;15551:57;15599:7;15551:42;15586:5;15559;-1:-1:-1;;;;;15551:27:0;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15551:29:0;;:33;:42::i;:::-;:46;;:57::i;:::-;15544:64;15468:148;-1:-1:-1;;15468:148:0:o;12616:30::-;;;:::o;13583:737::-;13624:4;13665:12;13647:14;;:30;13642:671;;13712:14;;:33;;13732:11;13712:18;:33::i;:::-;13695:14;:50;13845:6;13839:392;13861:4;:11;13857:15;;13839:392;;;13921:1;13904:4;13910:1;13904:9;;;;;;;;;;;;;;;;;;:14;;;:18;13899:317;;;13959:8;-1:-1:-1;;;;;13948:33:0;;14039:4;14045:1;14039:9;;;;;;;;;;;;;;;;;;:19;;;;;;;;;;-1:-1:-1;;;;;14039:19:0;14085:30;14099:4;14105:1;14099:9;;;;;;;14085:30;13948:190;;;;;;;;;;;;;-1:-1:-1;;;;;13948:190:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14161:11;14169:1;14161:6;:11::i;:::-;13874:3;;13839:392;;;;14252:4;14245:11;;;;13642:671;-1:-1:-1;14296:5:0;14289:12;;16280:238;11703:7;;-1:-1:-1;;;;;11703:7:0;11714:10;11703:21;11694:68;;;;;-1:-1:-1;;;11694:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11694:68:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;16384:24:0;::::1;16375:35;;;::::0;::::1;;16432:77;::::0;;;;::::1;::::0;;;;;;-1:-1:-1;;;;;16432:77:0;;::::1;;::::0;::::1;::::0;;;16421:4:::1;:89:::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;16421:89:0;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;-1:-1:-1;;;;;;16421:89:0::1;::::0;;;::::1;;::::0;;16280:238::o;16660:232::-;11703:7;;-1:-1:-1;;;;;11703:7:0;11714:10;11703:21;11694:68;;;;;-1:-1:-1;;;11694:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11694:68:0;;;;;;;;;;;;;;;16776:4:::1;16782:6;16776:14;;;;;;;;;::::0;;;::::1;::::0;;;:24:::1;:14;::::0;;::::1;;:24;::::0;-1:-1:-1;;;;;16762:38:0;;::::1;16776:24:::0;::::1;16762:38;16753:49;;;::::0;::::1;;16848:1;16813:4;16819:6;16813:14;;;;;;;;;;;;;;;;;;:24;;;:37;;;;;-1:-1:-1::0;;;;;16813:37:0::1;;;;;-1:-1:-1::0;;;;;16813:37:0::1;;;;;;16883:1;16861:4;16867:6;16861:14;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:23:::0;-1:-1:-1;;16660:232:0:o;2542:252::-;2600:7;2626:6;2622:47;;-1:-1:-1;2656:1:0;2649:8;;2622:47;2693:5;;;2697:1;2693;:5;:1;2717:5;;;;;:10;2709:56;;;;-1:-1:-1;;;2709:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2785:1;2542:252;-1:-1:-1;;;2542:252:0:o;2802:132::-;2860:7;2887:39;2891:1;2894;2887:39;;;;;;;;;;;;;;;;;:3;:39::i;2009:181::-;2067:7;2099:5;;;2123:6;;;;2115:46;;;;;-1:-1:-1;;;2115:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;14449:837;14500:24;;:::i;:::-;-1:-1:-1;14527:21:0;;;;:11;:21;;;;;;;;;14500:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14564:20;14559:720;;14607:14;;14602:666;;;14692:42;14717:10;:15;;;14692:4;14698:6;14692:14;;;;;;;;;;;;;;;;;;;;;:19;;:23;:42::i;:::-;14670:4;14676:6;14670:14;;;;;;;;;;;;;;;;;;;;;:64;14795:17;;;;14772:4;:14;;14778:6;;14772:14;;;;;;;;;;;;;;;;:19;;;:40;14767:161;;14884:1;14855:21;;;:11;:21;;;;;:26;;:30;14767:161;14602:666;;;15017:42;15042:10;:15;;;15017:4;15023:6;15017:14;;;;;;;;;;;;;;;;;;;;;:19;;:23;:42::i;:::-;14995:4;15001:6;14995:14;;;;;;;;;;;;;;;;;;;;;:64;15120:17;;;;15097:4;:14;;15103:6;;15097:14;;;;;;;;;;;;;;;;:19;;;:40;15092:161;;15209:1;15180:21;;;:11;:21;;;;;:26;;:30;15092:161;14449:837;;:::o;2942:278::-;3028:7;3063:12;3056:5;3048:28;;;;-1:-1:-1;;;3048:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3087:9;3103:1;3099;:5;;;;;;;2942:278;-1:-1:-1;;;;;2942:278:0:o;2198:136::-;2256:7;2283:43;2287:1;2290;2283:43;;;;;;;;;;;;;;;;;2428:7;2464:12;2456:6;;;;2448:29;;;;-1:-1:-1;;;2448:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2500:5:0;;;2342:192::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://f2d1cf282d00448c71faa154fca18eb99eda0eed4e96bab0af4594680db5e1d4
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.