Sonic Blaze Testnet

Contract

0xFb1883205c89BfDCAC4217223081E55aDC6BADC3

Overview

S Balance

Sonic Blaze LogoSonic Blaze LogoSonic Blaze Logo0 S

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

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

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x6ac220Ac...92A8b98fA
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
BRRRTreasury

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : BRRRTreasury.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

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;
        return c;
    }
}

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 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 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 {
            if (returndata.length > 0) {
                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(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) {
                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

interface IOwnable {
  function manager() external view returns (address);

  function renounceManagement() external;
  
  function pushManagement( address newOwner_ ) external;
  
  function pullManagement() external;
}

contract Ownable is IOwnable {

    address internal _owner;
    address internal _newOwner;

    event OwnershipPushed(address indexed previousOwner, address indexed newOwner);
    event OwnershipPulled(address indexed previousOwner, address indexed newOwner);

    constructor () {
        _owner = msg.sender;
        emit OwnershipPushed( address(0), _owner );
    }

    function manager() public view override returns (address) {
        return _owner;
    }

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

    function renounceManagement() public virtual override onlyManager() {
        emit OwnershipPushed( _owner, address(0) );
        _owner = address(0);
    }

    function pushManagement( address newOwner_ ) public virtual override onlyManager() {
        require( newOwner_ != address(0), "Ownable: new owner is the zero address");
        emit OwnershipPushed( _owner, newOwner_ );
        _newOwner = newOwner_;
    }
    
    function pullManagement() public virtual override {
        require( msg.sender == _newOwner, "Ownable: must be new owner to pull");
        emit OwnershipPulled( _owner, _newOwner );
        _owner = _newOwner;
    }
}

interface IERC20 {
    function decimals() external view returns (uint8);

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

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

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

    function totalSupply() external view returns (uint256);

    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 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 _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");
        }
    }
}

interface IERC20Mintable {
  function mint( uint256 amount_ ) external;

  function mint( address account_, uint256 ammount_ ) external;
}

interface IOHMERC20 {
    function burnFrom(address account_, uint256 amount_) external;
}

interface IBondCalculator {
  function valuation( address pair_, uint amount_ ) external view returns ( uint _value );
}

contract BRRRTreasury is Ownable {

    using SafeMath for uint;
    using SafeERC20 for IERC20;

    event Deposit( address indexed token, uint amount, uint value );
    event Withdrawal( address indexed token, uint amount, uint value );
    event CreateDebt( address indexed debtor, address indexed token, uint amount, uint value );
    event RepayDebt( address indexed debtor, address indexed token, uint amount, uint value );
    event ReservesManaged( address indexed token, uint amount );
    event ReservesUpdated( uint indexed totalReserves );
    event ReservesAudited( uint indexed totalReserves );
    event RewardsMinted( address indexed caller, address indexed recipient, uint amount );
    event ChangeQueued( MANAGING indexed managing, address queued );
    event ChangeActivated( MANAGING indexed managing, address activated, bool result );

    enum MANAGING { RESERVEDEPOSITOR, RESERVESPENDER, RESERVETOKEN, RESERVEMANAGER, LIQUIDITYDEPOSITOR, LIQUIDITYTOKEN, LIQUIDITYMANAGER, DEBTOR, REWARDMANAGER, SOHM }

    address public immutable OHM;
    uint public immutable blocksNeededForQueue;

    address[] public reserveTokens; // Push only, beware false-positives.
    mapping( address => bool ) public isReserveToken;
    mapping( address => uint ) public reserveTokenQueue; // Delays changes to mapping.

    address[] public reserveDepositors; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isReserveDepositor;
    mapping( address => uint ) public reserveDepositorQueue; // Delays changes to mapping.

    address[] public reserveSpenders; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isReserveSpender;
    mapping( address => uint ) public reserveSpenderQueue; // Delays changes to mapping.

    address[] public liquidityTokens; // Push only, beware false-positives.
    mapping( address => bool ) public isLiquidityToken;
    mapping( address => uint ) public LiquidityTokenQueue; // Delays changes to mapping.

    address[] public liquidityDepositors; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isLiquidityDepositor;
    mapping( address => uint ) public LiquidityDepositorQueue; // Delays changes to mapping.

    mapping( address => address ) public bondCalculator; // bond calculator for liquidity token

    address[] public reserveManagers; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isReserveManager;
    mapping( address => uint ) public ReserveManagerQueue; // Delays changes to mapping.

    address[] public liquidityManagers; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isLiquidityManager;
    mapping( address => uint ) public LiquidityManagerQueue; // Delays changes to mapping.

    address[] public debtors; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isDebtor;
    mapping( address => uint ) public debtorQueue; // Delays changes to mapping.
    mapping( address => uint ) public debtorBalance;

    address[] public rewardManagers; // Push only, beware false-positives. Only for viewing.
    mapping( address => bool ) public isRewardManager;
    mapping( address => uint ) public rewardManagerQueue; // Delays changes to mapping.

    address public sOHM;
    uint public sOHMQueue; // Delays change to sOHM address
    
    uint public totalReserves; // Risk-free value of all assets
    uint public totalDebt;

    constructor (
        address _OHM,
        address _DAI,
        address _OHMDAI,
        uint _blocksNeededForQueue
    ) {
        require( _OHM != address(0) );
        OHM = _OHM;

        isReserveToken[ _DAI ] = true;
        reserveTokens.push( _DAI );

        //isReserveToken[ _OHMDAI ] = true;
        //reserveTokens.push( _OHMDAI );

        isLiquidityToken[ _OHMDAI ] = true;
        liquidityTokens.push( _OHMDAI );

        blocksNeededForQueue = _blocksNeededForQueue;
    }

    /**
        @notice allow approved address to deposit an asset for OHM
        @param _amount uint
        @param _token address
        @param _profit uint
        @return send_ uint
     */
    function deposit( uint _amount, address _token, uint _profit ) external returns ( uint send_ ) {
        require( isReserveToken[ _token ] || isLiquidityToken[ _token ], "Not accepted" );
        IERC20( _token ).safeTransferFrom( msg.sender, address(this), _amount );

        if ( isReserveToken[ _token ] ) {
            require( isReserveDepositor[ msg.sender ], "Not approved" );
        } else {
            require( isLiquidityDepositor[ msg.sender ], "Not approved" );
        }

        uint value = valueOf(_token, _amount);
        // mint OHM needed and store amount of rewards for distribution
        send_ = value.sub( _profit );
        IERC20Mintable( OHM ).mint( msg.sender, send_ );

        totalReserves = totalReserves.add( value );
        emit ReservesUpdated( totalReserves );

        emit Deposit( _token, _amount, value );
    }

    /**
        @notice allow approved address to burn OHM for reserves
        @param _amount uint
        @param _token address
     */
    function withdraw( uint _amount, address _token ) external {
        require( isReserveToken[ _token ], "Not accepted" ); // Only reserves can be used for redemptions
        require( isReserveSpender[ msg.sender ] == true, "Not approved" );

        uint value = valueOf( _token, _amount );
        IOHMERC20( OHM ).burnFrom( msg.sender, value );

        totalReserves = totalReserves.sub( value );
        emit ReservesUpdated( totalReserves );

        IERC20( _token ).safeTransfer( msg.sender, _amount );

        emit Withdrawal( _token, _amount, value );
    }

    /**
        @notice allow approved address to borrow reserves
        @param _amount uint
        @param _token address
     */
    function incurDebt( uint _amount, address _token ) external {
        require( isDebtor[ msg.sender ], "Not approved" );
        require( isReserveToken[ _token ], "Not accepted" );

        uint value = valueOf( _token, _amount );

        uint maximumDebt = IERC20( sOHM ).balanceOf( msg.sender ); // Can only borrow against sOHM held
        uint availableDebt = maximumDebt.sub( debtorBalance[ msg.sender ] );
        require( value <= availableDebt, "Exceeds debt limit" );

        debtorBalance[ msg.sender ] = debtorBalance[ msg.sender ].add( value );
        totalDebt = totalDebt.add( value );

        totalReserves = totalReserves.sub( value );
        emit ReservesUpdated( totalReserves );

        IERC20( _token ).transfer( msg.sender, _amount );
        
        emit CreateDebt( msg.sender, _token, _amount, value );
    }

    /**
        @notice allow approved address to repay borrowed reserves with reserves
        @param _amount uint
        @param _token address
     */
    function repayDebtWithReserve( uint _amount, address _token ) external {
        require( isDebtor[ msg.sender ], "Not approved" );
        require( isReserveToken[ _token ], "Not accepted" );

        IERC20( _token ).safeTransferFrom( msg.sender, address(this), _amount );

        uint value = valueOf( _token, _amount );
        debtorBalance[ msg.sender ] = debtorBalance[ msg.sender ].sub( value );
        totalDebt = totalDebt.sub( value );

        totalReserves = totalReserves.add( value );
        emit ReservesUpdated( totalReserves );

        emit RepayDebt( msg.sender, _token, _amount, value );
    }

    /**
        @notice allow approved address to repay borrowed reserves with OHM
        @param _amount uint
     */
    function repayDebtWithOHM( uint _amount ) external {
        require( isDebtor[ msg.sender ], "Not approved" );

        IOHMERC20( OHM ).burnFrom( msg.sender, _amount );

        debtorBalance[ msg.sender ] = debtorBalance[ msg.sender ].sub( _amount );
        totalDebt = totalDebt.sub( _amount );

        emit RepayDebt( msg.sender, OHM, _amount, _amount );
    }

    /**
        @notice allow approved address to withdraw assets
        @param _token address
        @param _amount uint
     */
    function manage( address _token, uint _amount ) external {
        if( isLiquidityToken[ _token ] ) {
            require( isLiquidityManager[ msg.sender ], "Not approved" );
        } else {
            require( isReserveManager[ msg.sender ], "Not approved" );
        }

        uint value = valueOf(_token, _amount);
        require( value <= excessReserves(), "Insufficient reserves" );

        totalReserves = totalReserves.sub( value );
        emit ReservesUpdated( totalReserves );

        IERC20( _token ).safeTransfer( msg.sender, _amount );

        emit ReservesManaged( _token, _amount );
    }

    /**
        @notice send epoch reward to staking contract
     */
    function mintRewards( address _recipient, uint _amount ) external {
        require( isRewardManager[ msg.sender ], "Not approved" );
        require( _amount <= excessReserves(), "Insufficient reserves" );

        IERC20Mintable( OHM ).mint( _recipient, _amount );

        emit RewardsMinted( msg.sender, _recipient, _amount );
    } 

    /**
        @notice returns excess reserves not backing tokens
        @return uint
     */
    function excessReserves() public view returns ( uint ) {
        return totalReserves.sub( IERC20( OHM ).totalSupply().sub( totalDebt ) );
    }

    /**
        @notice takes inventory of all tracked assets
        @notice always consolidate to recognized reserves before audit
     */
    function auditReserves() external onlyManager() {
        uint reserves;
        for( uint i = 0; i < reserveTokens.length; i++ ) {
            reserves = reserves.add ( 
                valueOf( reserveTokens[ i ], IERC20( reserveTokens[ i ] ).balanceOf( address(this) ) )
            );
        }
        for( uint i = 0; i < liquidityTokens.length; i++ ) {
            reserves = reserves.add (
                valueOf( liquidityTokens[ i ], IERC20( liquidityTokens[ i ] ).balanceOf( address(this) ) )
            );
        }
        totalReserves = reserves;
        emit ReservesUpdated( reserves );
        emit ReservesAudited( reserves );
    }

    /**
        @notice returns OHM valuation of asset
        @param _token address
        @param _amount uint
        @return value_ uint
     */
    function valueOf( address _token, uint _amount ) public view returns ( uint value_ ) {
        if ( isReserveToken[ _token ] ) {
            // convert amount to match OHM decimals
            value_ = _amount.mul( 10 ** IERC20( OHM ).decimals() ).div( 10 ** IERC20( _token ).decimals() );
        } else if ( isLiquidityToken[ _token ] ) {
            value_ = IBondCalculator( bondCalculator[ _token ] ).valuation( _token, _amount );
        }
    }

    /**
        @notice queue address to change boolean in mapping
        @param _managing MANAGING
        @param _address address
        @return bool
     */
    function queue( MANAGING _managing, address _address ) external onlyManager() returns ( bool ) {
        require( _address != address(0) );
        if ( _managing == MANAGING.RESERVEDEPOSITOR ) { // 0
            reserveDepositorQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.RESERVESPENDER ) { // 1
            reserveSpenderQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.RESERVETOKEN ) { // 2
            reserveTokenQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.RESERVEMANAGER ) { // 3
            ReserveManagerQueue[ _address ] = block.number.add( blocksNeededForQueue.mul( 2 ) );
        } else if ( _managing == MANAGING.LIQUIDITYDEPOSITOR ) { // 4
            LiquidityDepositorQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.LIQUIDITYTOKEN ) { // 5
            LiquidityTokenQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.LIQUIDITYMANAGER ) { // 6
            LiquidityManagerQueue[ _address ] = block.number.add( blocksNeededForQueue.mul( 2 ) );
        } else if ( _managing == MANAGING.DEBTOR ) { // 7
            debtorQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.REWARDMANAGER ) { // 8
            rewardManagerQueue[ _address ] = block.number.add( blocksNeededForQueue );
        } else if ( _managing == MANAGING.SOHM ) { // 9
            sOHMQueue = block.number.add( blocksNeededForQueue );
        } else return false;

        emit ChangeQueued( _managing, _address );
        return true;
    }

    /**
        @notice verify queue then set boolean in mapping
        @param _managing MANAGING
        @param _address address
        @param _calculator address
        @return bool
     */
    function toggle( MANAGING _managing, address _address, address _calculator ) external onlyManager() returns ( bool ) {
        require( _address != address(0) );
        bool result;
        if ( _managing == MANAGING.RESERVEDEPOSITOR ) { // 0
            if ( requirements( reserveDepositorQueue, isReserveDepositor, _address ) ) {
                reserveDepositorQueue[ _address ] = 0;
                if( !listContains( reserveDepositors, _address ) ) {
                    reserveDepositors.push( _address );
                }
            }
            result = !isReserveDepositor[ _address ];
            isReserveDepositor[ _address ] = result;
            
        } else if ( _managing == MANAGING.RESERVESPENDER ) { // 1
            if ( requirements( reserveSpenderQueue, isReserveSpender, _address ) ) {
                reserveSpenderQueue[ _address ] = 0;
                if( !listContains( reserveSpenders, _address ) ) {
                    reserveSpenders.push( _address );
                }
            }
            result = !isReserveSpender[ _address ];
            isReserveSpender[ _address ] = result;

        } else if ( _managing == MANAGING.RESERVETOKEN ) { // 2
            if ( requirements( reserveTokenQueue, isReserveToken, _address ) ) {
                reserveTokenQueue[ _address ] = 0;
                if( !listContains( reserveTokens, _address ) ) {
                    reserveTokens.push( _address );
                }
            }
            result = !isReserveToken[ _address ];
            isReserveToken[ _address ] = result;

        } else if ( _managing == MANAGING.RESERVEMANAGER ) { // 3
            if ( requirements( ReserveManagerQueue, isReserveManager, _address ) ) {
                reserveManagers.push( _address );
                ReserveManagerQueue[ _address ] = 0;
                if( !listContains( reserveManagers, _address ) ) {
                    reserveManagers.push( _address );
                }
            }
            result = !isReserveManager[ _address ];
            isReserveManager[ _address ] = result;

        } else if ( _managing == MANAGING.LIQUIDITYDEPOSITOR ) { // 4
            if ( requirements( LiquidityDepositorQueue, isLiquidityDepositor, _address ) ) {
                liquidityDepositors.push( _address );
                LiquidityDepositorQueue[ _address ] = 0;
                if( !listContains( liquidityDepositors, _address ) ) {
                    liquidityDepositors.push( _address );
                }
            }
            result = !isLiquidityDepositor[ _address ];
            isLiquidityDepositor[ _address ] = result;
        } else if ( _managing == MANAGING.LIQUIDITYTOKEN ) { // 5
            if ( requirements( LiquidityTokenQueue, isLiquidityToken, _address ) ) {
                LiquidityTokenQueue[ _address ] = 0;
                if( !listContains( liquidityTokens, _address ) ) {
                    liquidityTokens.push( _address );
                }
            }
            result = !isLiquidityToken[ _address ];
            isLiquidityToken[ _address ] = result;
            bondCalculator[ _address ] = _calculator;

        } else if ( _managing == MANAGING.LIQUIDITYMANAGER ) { // 6
            if ( requirements( LiquidityManagerQueue, isLiquidityManager, _address ) ) {
                LiquidityManagerQueue[ _address ] = 0;
                if( !listContains( liquidityManagers, _address ) ) {
                    liquidityManagers.push( _address );
                }
            }
            result = !isLiquidityManager[ _address ];
            isLiquidityManager[ _address ] = result;

        } else if ( _managing == MANAGING.DEBTOR ) { // 7
            if ( requirements( debtorQueue, isDebtor, _address ) ) {
                debtorQueue[ _address ] = 0;
                if( !listContains( debtors, _address ) ) {
                    debtors.push( _address );
                }
            }
            result = !isDebtor[ _address ];
            isDebtor[ _address ] = result;

        } else if ( _managing == MANAGING.REWARDMANAGER ) { // 8
            if ( requirements( rewardManagerQueue, isRewardManager, _address ) ) {
                rewardManagerQueue[ _address ] = 0;
                if( !listContains( rewardManagers, _address ) ) {
                    rewardManagers.push( _address );
                }
            }
            result = !isRewardManager[ _address ];
            isRewardManager[ _address ] = result;

        } else if ( _managing == MANAGING.SOHM ) { // 9
            sOHMQueue = 0;
            sOHM = _address;
            result = true;

        } else return false;

        emit ChangeActivated( _managing, _address, result );
        return true;
    }

    /**
        @notice checks requirements and returns altered structs
        @param queue_ mapping( address => uint )
        @param status_ mapping( address => bool )
        @param _address address
        @return bool 
     */
    function requirements( 
        mapping( address => uint ) storage queue_, 
        mapping( address => bool ) storage status_, 
        address _address 
    ) internal view returns ( bool ) {
        if ( !status_[ _address ] ) {
            require( queue_[ _address ] != 0, "Must queue" );
            require( queue_[ _address ] <= block.number, "Queue not expired" );
            return true;
        } return false;
    }

    /**
        @notice checks array to ensure against duplicate
        @param _list address[]
        @param _token address
        @return bool
     */
    function listContains( address[] storage _list, address _token ) internal view returns ( bool ) {
        for( uint i = 0; i < _list.length; i++ ) {
            if( _list[ i ] == _token ) {
                return true;
            }
        }
        return false;
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_OHM","type":"address"},{"internalType":"address","name":"_DAI","type":"address"},{"internalType":"address","name":"_OHMDAI","type":"address"},{"internalType":"uint256","name":"_blocksNeededForQueue","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum BRRRTreasury.MANAGING","name":"managing","type":"uint8"},{"indexed":false,"internalType":"address","name":"activated","type":"address"},{"indexed":false,"internalType":"bool","name":"result","type":"bool"}],"name":"ChangeActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum BRRRTreasury.MANAGING","name":"managing","type":"uint8"},{"indexed":false,"internalType":"address","name":"queued","type":"address"}],"name":"ChangeQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"debtor","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CreateDebt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipPulled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipPushed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"debtor","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"RepayDebt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"totalReserves","type":"uint256"}],"name":"ReservesAudited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReservesManaged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"totalReserves","type":"uint256"}],"name":"ReservesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"LiquidityDepositorQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"LiquidityManagerQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"LiquidityTokenQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OHM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ReserveManagerQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auditReserves","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blocksNeededForQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bondCalculator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"debtorBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"debtorQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"debtors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_profit","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"send_","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"excessReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"incurDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isDebtor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isLiquidityDepositor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isLiquidityManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isLiquidityToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReserveDepositor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReserveManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReserveSpender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReserveToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isRewardManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"liquidityDepositors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"liquidityManagers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"liquidityTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"manage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pullManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"pushManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum BRRRTreasury.MANAGING","name":"_managing","type":"uint8"},{"internalType":"address","name":"_address","type":"address"}],"name":"queue","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"repayDebtWithOHM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"repayDebtWithReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveDepositorQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reserveDepositors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reserveManagers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveSpenderQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reserveSpenders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveTokenQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reserveTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardManagerQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardManagers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sOHM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sOHMQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum BRRRTreasury.MANAGING","name":"_managing","type":"uint8"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"address","name":"_calculator","type":"address"}],"name":"toggle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"valueOf","outputs":[{"internalType":"uint256","name":"value_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102f05760003560e01c806387d67dff1161019d578063cd85641a116100e9578063ebd83cd8116100a2578063fbfd393b1161007c578063fbfd393b146108ef578063fc7b9c1814610926578063fd1ec0101461092e578063fff9ee871461094b576102f0565b8063ebd83cd81461087d578063ee4e19a1146108a3578063fb939588146108c9576102f0565b8063cd85641a146107b1578063d031370b146107d7578063d07f390f146107f4578063d796ffb8146107fc578063df89b34414610828578063e83afee31461084e576102f0565b8063a569e57111610156578063b1bd38b011610130578063b1bd38b014610716578063b5b1d5601461073c578063bc157ac114610759578063c24ad43e1461078b576102f0565b8063a569e571146106c2578063a6c41fec146106e8578063ab319c9a146106f0576102f0565b806387d67dff146106055780638f59c7271461062b5780638f6a7b57146106515780638f840ddd1461066e578063932cc8c314610676578063a1210a2d1461069c576102f0565b80632789de371161025c5780635a96ac0a116102155780636b5e40a7116101ef5780636b5e40a71461058857806370a0502a146105a5578063788c6c01146105c2578063869871bf146105e8576102f0565b80635a96ac0a1461052e57806368c31dd5146105365780636a20de921461055c576102f0565b80632789de37146104ad5780632b7ce500146104b5578063437f7912146104bd57806346f68ee9146104da578063481c6a75146105005780634e83423c14610508576102f0565b80630f70431f116102ae5780630f70431f146103d0578063124154ca146103ed57806312422d231461042757806315079925146104535780631af4da701461045b5780631eec5a9a14610481576102f0565b8062f714ce146102f55780630619aff114610323578063089208d81461035c578063094a8651146103645780630b0eee301461039c5780630c3513a8146103c8575b600080fd5b6103216004803603604081101561030b57600080fd5b50803590602001356001600160a01b0316610971565b005b6103406004803603602081101561033957600080fd5b5035610b48565b604080516001600160a01b039092168252519081900360200190f35b610321610b72565b61038a6004803603602081101561037a57600080fd5b50356001600160a01b0316610c09565b60408051918252519081900360200190f35b610321600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610c1b565b61038a610dca565b610321600480360360208110156103e657600080fd5b5035610e6e565b6104136004803603602081101561040357600080fd5b50356001600160a01b0316610fed565b604080519115158252519081900360200190f35b6103216004803603604081101561043d57600080fd5b50803590602001356001600160a01b0316611002565b6103406112d2565b6103406004803603602081101561047157600080fd5b50356001600160a01b03166112e1565b61038a6004803603604081101561049757600080fd5b506001600160a01b0381351690602001356112fc565b61038a6114f0565b6103216114f6565b610340600480360360208110156104d357600080fd5b50356116b9565b610321600480360360208110156104f057600080fd5b50356001600160a01b03166116c9565b6103406117b6565b6104136004803603602081101561051e57600080fd5b50356001600160a01b03166117c5565b6103216117da565b6104136004803603602081101561054c57600080fd5b50356001600160a01b0316611884565b6103216004803603604081101561057257600080fd5b506001600160a01b038135169060200135611899565b6103406004803603602081101561059e57600080fd5b5035611a13565b610340600480360360208110156105bb57600080fd5b5035611a23565b61038a600480360360208110156105d857600080fd5b50356001600160a01b0316611a33565b610340600480360360208110156105fe57600080fd5b5035611a45565b6104136004803603602081101561061b57600080fd5b50356001600160a01b0316611a55565b61038a6004803603602081101561064157600080fd5b50356001600160a01b0316611a6a565b6103406004803603602081101561066757600080fd5b5035611a7c565b61038a611a8c565b61038a6004803603602081101561068c57600080fd5b50356001600160a01b0316611a92565b610413600480360360208110156106b257600080fd5b50356001600160a01b0316611aa4565b610413600480360360208110156106d857600080fd5b50356001600160a01b0316611ab9565b610340611ace565b61038a6004803603602081101561070657600080fd5b50356001600160a01b0316611af2565b61038a6004803603602081101561072c57600080fd5b50356001600160a01b0316611b04565b6103406004803603602081101561075257600080fd5b5035611b16565b61038a6004803603606081101561076f57600080fd5b508035906001600160a01b036020820135169060400135611b26565b61038a600480360360208110156107a157600080fd5b50356001600160a01b0316611da4565b61038a600480360360208110156107c757600080fd5b50356001600160a01b0316611db6565b610340600480360360208110156107ed57600080fd5b5035611dc8565b61038a611dd8565b6103216004803603604081101561081257600080fd5b50803590602001356001600160a01b0316611dfc565b6104136004803603602081101561083e57600080fd5b50356001600160a01b0316611f7f565b6104136004803603604081101561086457600080fd5b50803560ff1690602001356001600160a01b0316611f94565b6104136004803603602081101561089357600080fd5b50356001600160a01b03166123df565b610413600480360360208110156108b957600080fd5b50356001600160a01b03166123f4565b61038a600480360360208110156108df57600080fd5b50356001600160a01b0316612409565b6104136004803603606081101561090557600080fd5b5060ff813516906001600160a01b036020820135811691604001351661241b565b61038a612cd7565b6103406004803603602081101561094457600080fd5b5035612cdd565b61038a6004803603602081101561096157600080fd5b50356001600160a01b0316612ced565b6001600160a01b03811660009081526003602052604090205460ff166109cd576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b3360009081526009602052604090205460ff161515600114610a25576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000610a3182846112fc565b90507f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da46116001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610aaa57600080fd5b505af1158015610abe573d6000803e3d6000fd5b5050602154610ad09250905082612cff565b60218190556040516000805160206133e883398151915290600090a2610b006001600160a01b0383163385612d41565b604080518481526020810183905281516001600160a01b038516927fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb928290030190a2505050565b60128181548110610b5857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610bbf576040805162461bcd60e51b815260206004820181905260248201526000805160206133c8833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b601b6020526000908152604090205481565b6001600160a01b0382166000908152600c602052604090205460ff1615610c94573360009081526016602052604090205460ff16610c8f576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b610ce7565b3360009081526013602052604090205460ff16610ce7576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000610cf383836112fc565b9050610cfd610dca565b811115610d49576040805162461bcd60e51b8152602060048201526015602482015274496e73756666696369656e7420726573657276657360581b604482015290519081900360640190fd5b602154610d569082612cff565b60218190556040516000805160206133e883398151915290600090a2610d866001600160a01b0384163384612d41565b6040805183815290516001600160a01b038516917f2bb2640731848fe9820ba48dbc978c1fc9bbd5f11b948bfab05b7dee3378fd80919081900360200190a2505050565b6000610e69610e606022547f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da46116001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2e57600080fd5b505afa158015610e42573d6000803e3d6000fd5b505050506040513d6020811015610e5857600080fd5b505190612cff565b60215490612cff565b905090565b3360009081526019602052604090205460ff16610ec1576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6040805163079cc67960e41b81523360048201526024810183905290516001600160a01b037f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da461116916379cc679091604480830192600092919082900301818387803b158015610f2f57600080fd5b505af1158015610f43573d6000803e3d6000fd5b5050336000908152601b6020526040902054610f629250905082612cff565b336000908152601b6020526040902055602254610f7f9082612cff565b602255604080518281526020810183905281516001600160a01b037f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da4611169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a350565b60066020526000908152604090205460ff1681565b3360009081526019602052604090205460ff16611055576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff166110b1576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b60006110bd82846112fc565b601f54604080516370a0823160e01b815233600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561110e57600080fd5b505afa158015611122573d6000803e3d6000fd5b505050506040513d602081101561113857600080fd5b5051336000908152601b602052604081205491925090611159908390612cff565b9050808311156111a5576040805162461bcd60e51b8152602060048201526012602482015271115e18d959591cc81919589d081b1a5b5a5d60721b604482015290519081900360640190fd5b336000908152601b60205260409020546111bf9084612d98565b336000908152601b60205260409020556022546111dc9084612d98565b6022556021546111ec9084612cff565b60218190556040516000805160206133e883398151915290600090a26040805163a9059cbb60e01b81523360048201526024810187905290516001600160a01b0386169163a9059cbb9160448083019260209291908290030181600087803b15801561125757600080fd5b505af115801561126b573d6000803e3d6000fd5b505050506040513d602081101561128157600080fd5b5050604080518681526020810185905281516001600160a01b0387169233927f7e1a939bed137a819b5d2979822c67f877689f7a863d5e4cb57cdca97b2977d6929081900390910190a35050505050565b601f546001600160a01b031681565b6011602052600090815260409020546001600160a01b031681565b6001600160a01b03821660009081526003602052604081205460ff161561143957611432836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561135957600080fd5b505afa15801561136d573d6000803e3d6000fd5b505050506040513d602081101561138357600080fd5b50516040805163313ce56760e01b8152905160ff909216600a0a9161142c916001600160a01b037f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da4611169163313ce56791600480820192602092909190829003018186803b1580156113f357600080fd5b505afa158015611407573d6000803e3d6000fd5b505050506040513d602081101561141d57600080fd5b5051859060ff16600a0a612df2565b90612e4b565b90506114ea565b6001600160a01b0383166000908152600c602052604090205460ff16156114ea576001600160a01b03808416600081815260116020908152604091829020548251634249719f60e01b815260048101949094526024840187905291519190931692634249719f9260448082019391829003018186803b1580156114bb57600080fd5b505afa1580156114cf573d6000803e3d6000fd5b505050506040513d60208110156114e557600080fd5b505190505b92915050565b60205481565b6000546001600160a01b03163314611543576040805162461bcd60e51b815260206004820181905260248201526000805160206133c8833981519152604482015290519081900360640190fd5b6000805b60025481101561161b5761161161160a6002838154811061156457fe5b600091825260209091200154600280546001600160a01b03909216918590811061158a57fe5b60009182526020918290200154604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b1580156115d957600080fd5b505afa1580156115ed573d6000803e3d6000fd5b505050506040513d602081101561160357600080fd5b50516112fc565b8390612d98565b9150600101611547565b5060005b600b5481101561166c5761166261160a600b838154811061163c57fe5b600091825260209091200154600b80546001600160a01b03909216918590811061158a57fe5b915060010161161f565b50602181905560405181906000805160206133e883398151915290600090a260405181907fec691f09f6924b27932253f85caf99bacc30360cc0e50a1cc4d2acc24601446690600090a250565b60088181548110610b5857600080fd5b6000546001600160a01b03163314611716576040805162461bcd60e51b815260206004820181905260248201526000805160206133c8833981519152604482015290519081900360640190fd5b6001600160a01b03811661175b5760405162461bcd60e51b815260040180806020018281038252602681526020018061335f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b601d6020526000908152604090205460ff1681565b6001546001600160a01b031633146118235760405162461bcd60e51b81526004018080602001828103825260228152602001806133856022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b60036020526000908152604090205460ff1681565b336000908152601d602052604090205460ff166118ec576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6118f4610dca565b811115611940576040805162461bcd60e51b8152602060048201526015602482015274496e73756666696369656e7420726573657276657360581b604482015290519081900360640190fd5b7f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da46116001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156119b757600080fd5b505af11580156119cb573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693503392507ffa8ccab40e7da8146c2304cd0950334fd30a6ba093abe86261aa13911fed849c9181900360200190a35050565b60058181548110610b5857600080fd5b60158181548110610b5857600080fd5b60046020526000908152604090205481565b60188181548110610b5857600080fd5b60096020526000908152604090205460ff1681565b600d6020526000908152604090205481565b600e8181548110610b5857600080fd5b60215481565b60076020526000908152604090205481565b600f6020526000908152604090205460ff1681565b600c6020526000908152604090205460ff1681565b7f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da461181565b60176020526000908152604090205481565b60146020526000908152604090205481565b601c8181548110610b5857600080fd5b6001600160a01b03821660009081526003602052604081205460ff1680611b6557506001600160a01b0383166000908152600c602052604090205460ff165b611ba5576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b611bba6001600160a01b038416333087612e8d565b6001600160a01b03831660009081526003602052604090205460ff1615611c33573360009081526006602052604090205460ff16611c2e576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b611c86565b336000908152600f602052604090205460ff16611c86576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000611c9284866112fc565b9050611c9e8184612cff565b91507f00000000000000000000000050e32cae24671da8d85e0b3fe1cdac1758da46116001600160a01b03166340c10f1933846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611d1757600080fd5b505af1158015611d2b573d6000803e3d6000fd5b5050602154611d3d9250905082612d98565b60218190556040516000805160206133e883398151915290600090a2604080518681526020810183905281516001600160a01b038716927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a2509392505050565b600a6020526000908152604090205481565b601a6020526000908152604090205481565b60028181548110610b5857600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b3360009081526019602052604090205460ff16611e4f576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16611eab576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b611ec06001600160a01b038216333085612e8d565b6000611ecc82846112fc565b336000908152601b6020526040902054909150611ee99082612cff565b336000908152601b6020526040902055602254611f069082612cff565b602255602154611f169082612d98565b60218190556040516000805160206133e883398151915290600090a2604080518481526020810183905281516001600160a01b0385169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a3505050565b60166020526000908152604090205460ff1681565b600080546001600160a01b03163314611fe2576040805162461bcd60e51b815260206004820181905260248201526000805160206133c8833981519152604482015290519081900360640190fd5b6001600160a01b038216611ff557600080fd5b600083600981111561200357fe5b141561205157612033437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b03831660009081526007602052604090205561238e565b600183600981111561205f57fe5b14156120ad5761208f437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b0383166000908152600a602052604090205561238e565b60028360098111156120bb57fe5b1415612109576120eb437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b03831660009081526004602052604090205561238e565b600383600981111561211757fe5b14156121705761215261214b7f00000000000000000000000000000000000000000000000000000000000000006002612df2565b4390612d98565b6001600160a01b03831660009081526014602052604090205561238e565b600483600981111561217e57fe5b14156121cc576121ae437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b03831660009081526010602052604090205561238e565b60058360098111156121da57fe5b14156122285761220a437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b0383166000908152600d602052604090205561238e565b600683600981111561223657fe5b14156122885761226a61214b7f00000000000000000000000000000000000000000000000000000000000000006002612df2565b6001600160a01b03831660009081526017602052604090205561238e565b600783600981111561229657fe5b14156122e4576122c6437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b0383166000908152601a602052604090205561238e565b60088360098111156122f257fe5b141561234057612322437f0000000000000000000000000000000000000000000000000000000000000000612d98565b6001600160a01b0383166000908152601e602052604090205561238e565b600983600981111561234e57fe5b14156123865761237e437f0000000000000000000000000000000000000000000000000000000000000000612d98565b60205561238e565b5060006114ea565b82600981111561239a57fe5b604080516001600160a01b038516815290517f0e4f2c4b5bc209d509bc3d49348c787fefadc66a79351b470599ac0f5be52eaf9181900360200190a250600192915050565b60136020526000908152604090205460ff1681565b60196020526000908152604090205460ff1681565b601e6020526000908152604090205481565b600080546001600160a01b03163314612469576040805162461bcd60e51b815260206004820181905260248201526000805160206133c8833981519152604482015290519081900360640190fd5b6001600160a01b03831661247c57600080fd5b60008085600981111561248b57fe5b14156125475761249e6007600686612eed565b15612517576001600160a01b0384166000908152600760205260408120556124c7600585612fd7565b61251757600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600660205260409020805460ff81161560ff199091168117909155612c79565b600185600981111561255557fe5b141561261157612568600a600986612eed565b156125e1576001600160a01b0384166000908152600a6020526040812055612591600885612fd7565b6125e157600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600960205260409020805460ff81161560ff199091168117909155612c79565b600285600981111561261f57fe5b14156126db576126326004600386612eed565b156126ab576001600160a01b03841660009081526004602052604081205561265b600285612fd7565b6126ab57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600360205260409020805460ff81161560ff199091168117909155612c79565b60038560098111156126e957fe5b14156127e2576126fc6014601386612eed565b156127b257601280546001810182557fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0387169081179091556000908152601460205260408120556127629085612fd7565b6127b257601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601360205260409020805460ff81161560ff199091168117909155612c79565b60048560098111156127f057fe5b14156128e9576128036010600f86612eed565b156128b957600e80546001810182557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0387169081179091556000908152601060205260408120556128699085612fd7565b6128b957600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600f60205260409020805460ff81161560ff199091168117909155612c79565b60058560098111156128f757fe5b14156129d55761290a600d600c86612eed565b15612983576001600160a01b0384166000908152600d6020526040812055612933600b85612fd7565b61298357600b80546001810182556000919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b038381166000908152600c60209081526040808320805460ff81161560ff199091168117909155601190925290912080546001600160a01b03191692851692909217909155612c79565b60068560098111156129e357fe5b1415612a9f576129f66017601686612eed565b15612a6f576001600160a01b038416600090815260176020526040812055612a1f601585612fd7565b612a6f57601580546001810182556000919091527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601660205260409020805460ff81161560ff199091168117909155612c79565b6007856009811115612aad57fe5b1415612b6957612ac0601a601986612eed565b15612b39576001600160a01b0384166000908152601a6020526040812055612ae9601885612fd7565b612b3957601880546001810182556000919091527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601960205260409020805460ff81161560ff199091168117909155612c79565b6008856009811115612b7757fe5b1415612c3357612b8a601e601d86612eed565b15612c03576001600160a01b0384166000908152601e6020526040812055612bb3601c85612fd7565b612c0357601c80546001810182556000919091527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a2110180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601d60205260409020805460ff81161560ff199091168117909155612c79565b6009856009811115612c4157fe5b1415612c6f57506000602055601f80546001600160a01b0319166001600160a01b0385161790556001612c79565b6000915050612cd0565b846009811115612c8557fe5b604080516001600160a01b0387168152831515602082015281517f0dcacb7e392f3d6a216ed2660e3dcfd40b7793d33591db2ba185a6b8e44fc477929181900390910190a260019150505b9392505050565b60225481565b600b8181548110610b5857600080fd5b60106020526000908152604090205481565b6000612cd083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613027565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612d939084906130be565b505050565b600082820183811015612cd0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612e01575060006114ea565b82820282848281612e0e57fe5b0414612cd05760405162461bcd60e51b81526004018080602001828103825260218152602001806133a76021913960400191505060405180910390fd5b6000612cd083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061316f565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052612ee79085906130be565b50505050565b6001600160a01b03811660009081526020839052604081205460ff16612fcd576001600160a01b038216600090815260208590526040902054612f64576040805162461bcd60e51b815260206004820152600a6024820152694d75737420717565756560b01b604482015290519081900360640190fd5b6001600160a01b038216600090815260208590526040902054431015612fc5576040805162461bcd60e51b8152602060048201526011602482015270145d595d59481b9bdd08195e1c1a5c9959607a1b604482015290519081900360640190fd5b506001612cd0565b5060009392505050565b6000805b8354811015612fcd57826001600160a01b0316848281548110612ffa57fe5b6000918252602090912001546001600160a01b0316141561301f5760019150506114ea565b600101612fdb565b600081848411156130b65760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561307b578181015183820152602001613063565b50505050905090810190601f1680156130a85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060613113826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131d49092919063ffffffff16565b805190915015612d935780806020019051602081101561313257600080fd5b5051612d935760405162461bcd60e51b815260040180806020018281038252602a815260200180613408602a913960400191505060405180910390fd5b600081836131be5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561307b578181015183820152602001613063565b5060008385816131ca57fe5b0495945050505050565b60606131e384846000856131eb565b949350505050565b60606131f685613358565b613247576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106132865780518252601f199092019160209182019101613267565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146132e8576040519150601f19603f3d011682016040523d82523d6000602084013e6132ed565b606091505b509150915081156133015791506131e39050565b8051156133115780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561307b578181015183820152602001613063565b3b15159056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657293bb8edd35984706eee1b92541281f7f62d33c01c5b2ec0929a113603bd21d665361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e8d2fc1d2ac1c7875213f89cea51fa78385207870147c9e75b828992862a69e764736f6c63430007050033

Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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.