ETH Price: $2,637.85 (+1.16%)

Contract

0xE70311B73A193b9F87653C9399dD04C605D3E357
 
Transaction Hash
Method
Block
From
To
Manage146730672022-04-28 13:18:25886 days ago1651151905IN
Congruent DAO: Treasury
0 ETH0.0040689548.36284555
Toggle146730112022-04-28 13:04:32886 days ago1651151072IN
Congruent DAO: Treasury
0 ETH0.0059386262.84921488
Queue146730082022-04-28 13:03:38886 days ago1651151018IN
Congruent DAO: Treasury
0 ETH0.0025325652.52436382
Push Management142708692022-02-24 20:05:56949 days ago1645733156IN
Congruent DAO: Treasury
0 ETH0.00583987122.36764017
Toggle142039132022-02-14 11:05:09959 days ago1644836709IN
Congruent DAO: Treasury
0 ETH0.0027990835.26228091
Queue142039122022-02-14 11:04:35959 days ago1644836675IN
Congruent DAO: Treasury
0 ETH0.0015154731.59024725
Toggle142037982022-02-14 10:36:19959 days ago1644834979IN
Congruent DAO: Treasury
0 ETH0.0011184741.48954016
Toggle142036632022-02-14 10:06:30959 days ago1644833190IN
Congruent DAO: Treasury
0 ETH0.0038158840.61002144
Queue142036622022-02-14 10:06:02959 days ago1644833162IN
Congruent DAO: Treasury
0 ETH0.0017432136.3465711
Toggle141788932022-02-10 14:36:57963 days ago1644503817IN
Congruent DAO: Treasury
0 ETH0.01118943118.5120474
Queue141788902022-02-10 14:35:15963 days ago1644503715IN
Congruent DAO: Treasury
0 ETH0.00491564101.56081936
Audit Reserves141788702022-02-10 14:30:29963 days ago1644503429IN
Congruent DAO: Treasury
0 ETH0.0052250565.87813906
0x60c06040141449092022-02-05 8:25:46969 days ago1644049546IN
 Create: CongruentTreasury
0 ETH0.1915881461.55673947

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CongruentTreasury

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : CongruentTreasury.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

import "../libs/IERC20.sol";
import "../libs/SafeERC20.sol";
import "../libs/SafeMath.sol";
import "../libs/DaoOwnable.sol";
import "../libs/interface/IERC20Mintable.sol";
import "../libs/interface/IGaas.sol";
import "../libs/interface/IBondCalculator.sol";

contract CongruentTreasury is DaoOwnable {

    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, SGaas }

    address public immutable Gaas;
    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 sGaas;
    uint public sGaasQueue; // Delays change to sGaas address
    
    uint public totalReserves; // Risk-free value of all assets
    uint public totalDebt;

    constructor (
        address _Gaas,
        address _USDC,
        uint _blocksNeededForQueue
    ) {
        require( _Gaas != address(0) );
        Gaas = _Gaas;

        isReserveToken[ _USDC ] = true;
        reserveTokens.push( _USDC );
		
        blocksNeededForQueue = _blocksNeededForQueue;
    }

    /**
        @notice allow approved address to deposit an asset for Gaas
        @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 Gaas needed and store amount of rewards for distribution
        send_ = value.sub( _profit );
        IERC20Mintable( Gaas ).mint( msg.sender, send_ );

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

        emit Deposit( _token, _amount, value );
    }

    /**
        @notice allow approved address to burn Gaas 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 );
        IGaas( Gaas ).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( sGaas ).balanceOf( msg.sender ); // Can only borrow against sGaas 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 Gaas
        @param _amount uint
     */
    function repayDebtWithGaas( uint _amount ) external {
        require( isDebtor[ msg.sender ], "Not approved" );

        IGaas( Gaas ).burnFrom( msg.sender, _amount );

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

        emit RepayDebt( msg.sender, Gaas, _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" );
		if( _amount > excessReserves())
			_amount = excessReserves();
			
		if (_amount > 0)
			IERC20Mintable( Gaas ).mint( _recipient, _amount );

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

    /**
        @notice returns excess reserves not backing tokens, return 0 if excessReserve < 0
        @return uint
     */
    function excessReserves() public view returns ( uint ) {
		if (totalDebt > IERC20( Gaas ).totalSupply()) 
			return 0;
		if ( IERC20( Gaas ).totalSupply().sub( totalDebt ) > totalReserves)
			return 0;
        return totalReserves.sub( IERC20( Gaas ).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 Gaas 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 Gaas decimals
            value_ = _amount.mul( 10 ** IERC20( Gaas ).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.SGaas ) { // 9
            sGaasQueue = 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.SGaas ) { // 9
            sGaasQueue = 0;
            sGaas = _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;
    }
}

File 2 of 11 : IERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {

	/**
     * @dev Returns the decimals of token.
     */
	function decimals() external view returns (uint8);
	
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 11 : SafeERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

import "./ERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";

library SafeERC20 {
    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) + 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) - value;
        _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");
        }
    }
}

File 4 of 11 : SafeMath.sol
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be 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;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be 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;
        }
    }

    /*
     * Expects percentage to be trailed by 00,
    */
    function percentageAmount( uint256 total_, uint8 percentage_ ) internal pure returns ( uint256 percentAmount_ ) {
        return div( mul( total_, percentage_ ), 1000 );
    }

    /*
     * Expects percentage to be trailed by 00,
    */
    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_ );
    }

    /**
     * Taken from Hypersonic https://github.com/M2629/HyperSonic/blob/main/Math.sol
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    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_ );
	}
}

File 5 of 11 : DaoOwnable.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

contract DaoOwnable{

    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 returns (address) {
        return _owner;
    }

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

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

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

File 6 of 11 : IERC20Mintable.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

interface IERC20Mintable {
  function mint( uint256 amount_ ) external;

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

File 7 of 11 : IGaas.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

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

File 8 of 11 : IBondCalculator.sol
// SPDX-License-Identifier: AGPL-3.0-or-later


pragma solidity 0.7.5;

interface IBondCalculator {
    function valuation( address _LP, uint _amount ) external view returns ( uint );
    function markdown( address _LP ) external view returns ( uint );
}

File 9 of 11 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later



pragma solidity 0.7.5;

import "./IERC20.sol";
import "./Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 internal _totalSupply;

    string private _name;
    string private _symbol;
	uint8 private _decimals;
	

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The defaut value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_, uint8 decimals_) {
        _name = name_;
        _symbol = symbol_;
		_decimals = decimals_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overloaded;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        _approve(sender, _msgSender(), currentAllowance - amount);

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);

        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        _balances[account] = accountBalance - amount;
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address, address, uint256) internal virtual { }
}

File 10 of 11 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on 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;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    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");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    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");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    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);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    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 _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        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);
            }
        }
    }
}

File 11 of 11 : Context.sol
// SPDX-License-Identifier: AGPL-3.0-or-later

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_Gaas","type":"address"},{"internalType":"address","name":"_USDC","type":"address"},{"internalType":"uint256","name":"_blocksNeededForQueue","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum CongruentTreasury.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 CongruentTreasury.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":[],"name":"Gaas","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"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":[{"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 CongruentTreasury.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":"repayDebtWithGaas","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":"sGaas","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sGaasQueue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum CongruentTreasury.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"}]

60c060405234801561001057600080fd5b5060405162003759380380620037598339818101604052606081101561003557600080fd5b5080516020820151604092830151600080546001600160a01b031916331780825594519394929391926001600160a01b0316917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908290a36001600160a01b0383166100a057600080fd5b6001600160601b031960609390931b929092166080526001600160a01b03166000818152600360205260408120805460ff191660019081179091556002805491820181559091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b031916909117905560a05260805160601c60a0516135b6620001a360003980611e8a52806120bf528061211b528061217752806121d5528061223a528061229652806122f4528061235252806123ae528061240a525080610a355280610dce5280610e6d5280610f0f528061133452806116b552806117695280611a0f5280611d525280612d9f52506135b66000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c806387d67dff1161019d578063d031370b116100e9578063ee4e19a1116100a2578063fc7b9c181161007c578063fc7b9c181461091e578063fd1ec01014610926578063fdff1e0314610943578063fff9ee871461094b576102f0565b8063ee4e19a11461089b578063fb939588146108c1578063fbfd393b146108e7576102f0565b8063d031370b146107cf578063d07f390f146107ec578063d796ffb8146107f4578063df89b34414610820578063e83afee314610846578063ebd83cd814610875576102f0565b8063a569e57111610156578063b5b1d56011610130578063b5b1d56014610734578063bc157ac114610751578063c24ad43e14610783578063cd85641a146107a9576102f0565b8063a569e571146106c2578063ab319c9a146106e8578063b1bd38b01461070e576102f0565b806387d67dff146106055780638f59c7271461062b5780638f6a7b57146106515780638f840ddd1461066e578063932cc8c314610676578063a1210a2d1461069c576102f0565b80633cdff8311161025c57806368c31dd51161021557806370a0502a116101ef57806370a0502a1461059d578063788c6c01146105ba5780638048e0d9146105e0578063869871bf146105e8576102f0565b806368c31dd51461052e5780636a20de92146105545780636b5e40a714610580576102f0565b80633cdff83114610498578063437f7912146104b557806346f68ee9146104d2578063481c6a75146104f85780634e83423c146105005780635a96ac0a14610526576102f0565b806311e56cf0116102ae57806311e56cf0146103d0578063124154ca146103d857806312422d23146104125780631af4da701461043e5780631eec5a9a146104645780632b7ce50014610490576102f0565b8062f714ce146102f55780630619aff114610323578063089208d81461035c578063094a8651146103645780630b0eee301461039c5780630c3513a8146103c8575b600080fd5b6103216004803603604081101561030b57600080fd5b50803590602001356001600160a01b0316610971565b005b6103406004803603602081101561033957600080fd5b5035610b48565b604080516001600160a01b039092168252519081900360200190f35b610321610b72565b61038a6004803603602081101561037a57600080fd5b50356001600160a01b0316610c09565b60408051918252519081900360200190f35b610321600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610c1b565b61038a610dca565b610340610f75565b6103fe600480360360208110156103ee57600080fd5b50356001600160a01b0316610f84565b604080519115158252519081900360200190f35b6103216004803603604081101561042857600080fd5b50803590602001356001600160a01b0316610f99565b6103406004803603602081101561045457600080fd5b50356001600160a01b0316611269565b61038a6004803603604081101561047a57600080fd5b506001600160a01b038135169060200135611284565b610321611478565b610321600480360360208110156104ae57600080fd5b503561163b565b610340600480360360208110156104cb57600080fd5b50356117ba565b610321600480360360208110156104e857600080fd5b50356001600160a01b03166117ca565b6103406118b7565b6103fe6004803603602081101561051657600080fd5b50356001600160a01b03166118c6565b6103216118db565b6103fe6004803603602081101561054457600080fd5b50356001600160a01b0316611985565b6103216004803603604081101561056a57600080fd5b506001600160a01b03813516906020013561199a565b6103406004803603602081101561059657600080fd5b5035611ae1565b610340600480360360208110156105b357600080fd5b5035611af1565b61038a600480360360208110156105d057600080fd5b50356001600160a01b0316611b01565b61038a611b13565b610340600480360360208110156105fe57600080fd5b5035611b19565b6103fe6004803603602081101561061b57600080fd5b50356001600160a01b0316611b29565b61038a6004803603602081101561064157600080fd5b50356001600160a01b0316611b3e565b6103406004803603602081101561066757600080fd5b5035611b50565b61038a611b60565b61038a6004803603602081101561068c57600080fd5b50356001600160a01b0316611b66565b6103fe600480360360208110156106b257600080fd5b50356001600160a01b0316611b78565b6103fe600480360360208110156106d857600080fd5b50356001600160a01b0316611b8d565b61038a600480360360208110156106fe57600080fd5b50356001600160a01b0316611ba2565b61038a6004803603602081101561072457600080fd5b50356001600160a01b0316611bb4565b6103406004803603602081101561074a57600080fd5b5035611bc6565b61038a6004803603606081101561076757600080fd5b508035906001600160a01b036020820135169060400135611bd6565b61038a6004803603602081101561079957600080fd5b50356001600160a01b0316611e54565b61038a600480360360208110156107bf57600080fd5b50356001600160a01b0316611e66565b610340600480360360208110156107e557600080fd5b5035611e78565b61038a611e88565b6103216004803603604081101561080a57600080fd5b50803590602001356001600160a01b0316611eac565b6103fe6004803603602081101561083657600080fd5b50356001600160a01b031661202f565b6103fe6004803603604081101561085c57600080fd5b50803560ff1690602001356001600160a01b0316612044565b6103fe6004803603602081101561088b57600080fd5b50356001600160a01b031661248f565b6103fe600480360360208110156108b157600080fd5b50356001600160a01b03166124a4565b61038a600480360360208110156108d757600080fd5b50356001600160a01b03166124b9565b6103fe600480360360608110156108fd57600080fd5b5060ff813516906001600160a01b03602082013581169160400135166124cb565b61038a612d87565b6103406004803603602081101561093c57600080fd5b5035612d8d565b610340612d9d565b61038a6004803603602081101561096157600080fd5b50356001600160a01b0316612dc1565b6001600160a01b03811660009081526003602052604090205460ff166109cd576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b3360009081526009602052604090205460ff161515600114610a25576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000610a318284611284565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610aaa57600080fd5b505af1158015610abe573d6000803e3d6000fd5b5050602154610ad09250905082612dd3565b602181905560405160008051602061353783398151915290600090a2610b006001600160a01b0383163385612e15565b604080518481526020810183905281516001600160a01b038516927fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb928290030190a2505050565b60128181548110610b5857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610bbf576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b601b6020526000908152604090205481565b6001600160a01b0382166000908152600c602052604090205460ff1615610c94573360009081526016602052604090205460ff16610c8f576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b610ce7565b3360009081526013602052604090205460ff16610ce7576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000610cf38383611284565b9050610cfd610dca565b811115610d49576040805162461bcd60e51b8152602060048201526015602482015274496e73756666696369656e7420726573657276657360581b604482015290519081900360640190fd5b602154610d569082612dd3565b602181905560405160008051602061353783398151915290600090a2610d866001600160a01b0384163384612e15565b6040805183815290516001600160a01b038516917f2bb2640731848fe9820ba48dbc978c1fc9bbd5f11b948bfab05b7dee3378fd80919081900360200190a2505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2557600080fd5b505afa158015610e39573d6000803e3d6000fd5b505050506040513d6020811015610e4f57600080fd5b50516022541115610e6257506000610f72565b602154610ef66022547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec457600080fd5b505afa158015610ed8573d6000803e3d6000fd5b505050506040513d6020811015610eee57600080fd5b505190612dd3565b1115610f0457506000610f72565b610f6f610f666022547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec457600080fd5b60215490612dd3565b90505b90565b601f546001600160a01b031681565b60066020526000908152604090205460ff1681565b3360009081526019602052604090205460ff16610fec576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16611048576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b60006110548284611284565b601f54604080516370a0823160e01b815233600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156110a557600080fd5b505afa1580156110b9573d6000803e3d6000fd5b505050506040513d60208110156110cf57600080fd5b5051336000908152601b6020526040812054919250906110f0908390612dd3565b90508083111561113c576040805162461bcd60e51b8152602060048201526012602482015271115e18d959591cc81919589d081b1a5b5a5d60721b604482015290519081900360640190fd5b336000908152601b60205260409020546111569084612e6c565b336000908152601b60205260409020556022546111739084612e6c565b6022556021546111839084612dd3565b602181905560405160008051602061353783398151915290600090a26040805163a9059cbb60e01b81523360048201526024810187905290516001600160a01b0386169163a9059cbb9160448083019260209291908290030181600087803b1580156111ee57600080fd5b505af1158015611202573d6000803e3d6000fd5b505050506040513d602081101561121857600080fd5b5050604080518681526020810185905281516001600160a01b0387169233927f7e1a939bed137a819b5d2979822c67f877689f7a863d5e4cb57cdca97b2977d6929081900390910190a35050505050565b6011602052600090815260409020546001600160a01b031681565b6001600160a01b03821660009081526003602052604081205460ff16156113c1576113ba836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156112e157600080fd5b505afa1580156112f5573d6000803e3d6000fd5b505050506040513d602081101561130b57600080fd5b50516040805163313ce56760e01b8152905160ff909216600a0a916113b4916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163313ce56791600480820192602092909190829003018186803b15801561137b57600080fd5b505afa15801561138f573d6000803e3d6000fd5b505050506040513d60208110156113a557600080fd5b5051859060ff16600a0a612ec6565b90612f1f565b9050611472565b6001600160a01b0383166000908152600c602052604090205460ff1615611472576001600160a01b03808416600081815260116020908152604091829020548251634249719f60e01b815260048101949094526024840187905291519190931692634249719f9260448082019391829003018186803b15801561144357600080fd5b505afa158015611457573d6000803e3d6000fd5b505050506040513d602081101561146d57600080fd5b505190505b92915050565b6000546001600160a01b031633146114c5576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6000805b60025481101561159d5761159361158c600283815481106114e657fe5b600091825260209091200154600280546001600160a01b03909216918590811061150c57fe5b60009182526020918290200154604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b15801561155b57600080fd5b505afa15801561156f573d6000803e3d6000fd5b505050506040513d602081101561158557600080fd5b5051611284565b8390612e6c565b91506001016114c9565b5060005b600b548110156115ee576115e461158c600b83815481106115be57fe5b600091825260209091200154600b80546001600160a01b03909216918590811061150c57fe5b91506001016115a1565b506021819055604051819060008051602061353783398151915290600090a260405181907fec691f09f6924b27932253f85caf99bacc30360cc0e50a1cc4d2acc24601446690600090a250565b3360009081526019602052604090205460ff1661168e576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6040805163079cc67960e41b81523360048201526024810183905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916379cc679091604480830192600092919082900301818387803b1580156116fc57600080fd5b505af1158015611710573d6000803e3d6000fd5b5050336000908152601b602052604090205461172f9250905082612dd3565b336000908152601b602052604090205560225461174c9082612dd3565b602255604080518281526020810183905281516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a350565b60088181548110610b5857600080fd5b6000546001600160a01b03163314611817576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6001600160a01b03811661185c5760405162461bcd60e51b81526004018080602001828103825260268152602001806134886026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b601d6020526000908152604090205460ff1681565b6001546001600160a01b031633146119245760405162461bcd60e51b81526004018080602001828103825260228152602001806134ae6022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b60036020526000908152604090205460ff1681565b336000908152601d602052604090205460ff166119ed576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6119f5610dca565b811115611a0757611a04610dca565b90505b8015611a9d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611a8457600080fd5b505af1158015611a98573d6000803e3d6000fd5b505050505b6040805182815290516001600160a01b0384169133917ffa8ccab40e7da8146c2304cd0950334fd30a6ba093abe86261aa13911fed849c9181900360200190a35050565b60058181548110610b5857600080fd5b60158181548110610b5857600080fd5b60046020526000908152604090205481565b60205481565b60188181548110610b5857600080fd5b60096020526000908152604090205460ff1681565b600d6020526000908152604090205481565b600e8181548110610b5857600080fd5b60215481565b60076020526000908152604090205481565b600f6020526000908152604090205460ff1681565b600c6020526000908152604090205460ff1681565b60176020526000908152604090205481565b60146020526000908152604090205481565b601c8181548110610b5857600080fd5b6001600160a01b03821660009081526003602052604081205460ff1680611c1557506001600160a01b0383166000908152600c602052604090205460ff165b611c55576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b611c6a6001600160a01b038416333087612f61565b6001600160a01b03831660009081526003602052604090205460ff1615611ce3573360009081526006602052604090205460ff16611cde576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b611d36565b336000908152600f602052604090205460ff16611d36576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000611d428486611284565b9050611d4e8184612dd3565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1933846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611dc757600080fd5b505af1158015611ddb573d6000803e3d6000fd5b5050602154611ded9250905082612e6c565b602181905560405160008051602061353783398151915290600090a2604080518681526020810183905281516001600160a01b038716927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a2509392505050565b600a6020526000908152604090205481565b601a6020526000908152604090205481565b60028181548110610b5857600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b3360009081526019602052604090205460ff16611eff576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16611f5b576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b611f706001600160a01b038216333085612f61565b6000611f7c8284611284565b336000908152601b6020526040902054909150611f999082612dd3565b336000908152601b6020526040902055602254611fb69082612dd3565b602255602154611fc69082612e6c565b602181905560405160008051602061353783398151915290600090a2604080518481526020810183905281516001600160a01b0385169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a3505050565b60166020526000908152604090205460ff1681565b600080546001600160a01b03163314612092576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6001600160a01b0382166120a557600080fd5b60008360098111156120b357fe5b1415612101576120e3437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b03831660009081526007602052604090205561243e565b600183600981111561210f57fe5b141561215d5761213f437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152600a602052604090205561243e565b600283600981111561216b57fe5b14156121b95761219b437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b03831660009081526004602052604090205561243e565b60038360098111156121c757fe5b1415612220576122026121fb7f00000000000000000000000000000000000000000000000000000000000000006002612ec6565b4390612e6c565b6001600160a01b03831660009081526014602052604090205561243e565b600483600981111561222e57fe5b141561227c5761225e437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b03831660009081526010602052604090205561243e565b600583600981111561228a57fe5b14156122d8576122ba437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152600d602052604090205561243e565b60068360098111156122e657fe5b14156123385761231a6121fb7f00000000000000000000000000000000000000000000000000000000000000006002612ec6565b6001600160a01b03831660009081526017602052604090205561243e565b600783600981111561234657fe5b141561239457612376437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152601a602052604090205561243e565b60088360098111156123a257fe5b14156123f0576123d2437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152601e602052604090205561243e565b60098360098111156123fe57fe5b14156124365761242e437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b60205561243e565b506000611472565b82600981111561244a57fe5b604080516001600160a01b038516815290517f0e4f2c4b5bc209d509bc3d49348c787fefadc66a79351b470599ac0f5be52eaf9181900360200190a250600192915050565b60136020526000908152604090205460ff1681565b60196020526000908152604090205460ff1681565b601e6020526000908152604090205481565b600080546001600160a01b03163314612519576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6001600160a01b03831661252c57600080fd5b60008085600981111561253b57fe5b14156125f75761254e6007600686612fc1565b156125c7576001600160a01b0384166000908152600760205260408120556125776005856130ab565b6125c757600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600660205260409020805460ff81161560ff199091168117909155612d29565b600185600981111561260557fe5b14156126c157612618600a600986612fc1565b15612691576001600160a01b0384166000908152600a60205260408120556126416008856130ab565b61269157600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600960205260409020805460ff81161560ff199091168117909155612d29565b60028560098111156126cf57fe5b141561278b576126e26004600386612fc1565b1561275b576001600160a01b03841660009081526004602052604081205561270b6002856130ab565b61275b57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600360205260409020805460ff81161560ff199091168117909155612d29565b600385600981111561279957fe5b1415612892576127ac6014601386612fc1565b1561286257601280546001810182557fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b03871690811790915560009081526014602052604081205561281290856130ab565b61286257601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601360205260409020805460ff81161560ff199091168117909155612d29565b60048560098111156128a057fe5b1415612999576128b36010600f86612fc1565b1561296957600e80546001810182557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b03871690811790915560009081526010602052604081205561291990856130ab565b61296957600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600f60205260409020805460ff81161560ff199091168117909155612d29565b60058560098111156129a757fe5b1415612a85576129ba600d600c86612fc1565b15612a33576001600160a01b0384166000908152600d60205260408120556129e3600b856130ab565b612a3357600b80546001810182556000919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b038381166000908152600c60209081526040808320805460ff81161560ff199091168117909155601190925290912080546001600160a01b03191692851692909217909155612d29565b6006856009811115612a9357fe5b1415612b4f57612aa66017601686612fc1565b15612b1f576001600160a01b038416600090815260176020526040812055612acf6015856130ab565b612b1f57601580546001810182556000919091527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601660205260409020805460ff81161560ff199091168117909155612d29565b6007856009811115612b5d57fe5b1415612c1957612b70601a601986612fc1565b15612be9576001600160a01b0384166000908152601a6020526040812055612b996018856130ab565b612be957601880546001810182556000919091527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601960205260409020805460ff81161560ff199091168117909155612d29565b6008856009811115612c2757fe5b1415612ce357612c3a601e601d86612fc1565b15612cb3576001600160a01b0384166000908152601e6020526040812055612c63601c856130ab565b612cb357601c80546001810182556000919091527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a2110180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601d60205260409020805460ff81161560ff199091168117909155612d29565b6009856009811115612cf157fe5b1415612d1f57506000602055601f80546001600160a01b0319166001600160a01b0385161790556001612d29565b6000915050612d80565b846009811115612d3557fe5b604080516001600160a01b0387168152831515602082015281517f0dcacb7e392f3d6a216ed2660e3dcfd40b7793d33591db2ba185a6b8e44fc477929181900390910190a260019150505b9392505050565b60225481565b600b8181548110610b5857600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b60106020526000908152604090205481565b6000612d8083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506130fb565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612e67908490613192565b505050565b600082820183811015612d80576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612ed557506000611472565b82820282848281612ee257fe5b0414612d805760405162461bcd60e51b81526004018080602001828103825260218152602001806134f66021913960400191505060405180910390fd5b6000612d8083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613243565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052612fbb908590613192565b50505050565b6001600160a01b03811660009081526020839052604081205460ff166130a1576001600160a01b038216600090815260208590526040902054613038576040805162461bcd60e51b815260206004820152600a6024820152694d75737420717565756560b01b604482015290519081900360640190fd5b6001600160a01b038216600090815260208590526040902054431015613099576040805162461bcd60e51b8152602060048201526011602482015270145d595d59481b9bdd08195e1c1a5c9959607a1b604482015290519081900360640190fd5b506001612d80565b5060009392505050565b6000805b83548110156130a157826001600160a01b03168482815481106130ce57fe5b6000918252602090912001546001600160a01b031614156130f3576001915050611472565b6001016130af565b6000818484111561318a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561314f578181015183820152602001613137565b50505050905090810190601f16801561317c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606131e7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132a89092919063ffffffff16565b805190915015612e675780806020019051602081101561320657600080fd5b5051612e675760405162461bcd60e51b815260040180806020018281038252602a815260200180613557602a913960400191505060405180910390fd5b600081836132925760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561314f578181015183820152602001613137565b50600083858161329e57fe5b0495945050505050565b60606132b784846000856132bf565b949350505050565b6060824710156133005760405162461bcd60e51b81526004018080602001828103825260268152602001806134d06026913960400191505060405180910390fd5b6133098561341b565b61335a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106133995780518252601f19909201916020918201910161337a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146133fb576040519150601f19603f3d011682016040523d82523d6000602084013e613400565b606091505b5091509150613410828286613421565b979650505050505050565b3b151590565b60608315613430575081612d80565b8251156134405782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561314f57818101518382015260200161313756fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657293bb8edd35984706eee1b92541281f7f62d33c01c5b2ec0929a113603bd21d665361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122094700c07129ed10bbfbd0fb8056ede956e685e299cffe6ed88281fcb34be698a64736f6c63430007050033000000000000000000000000b4dffa52fee44bd493f12d85829d775ec8017691000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102f05760003560e01c806387d67dff1161019d578063d031370b116100e9578063ee4e19a1116100a2578063fc7b9c181161007c578063fc7b9c181461091e578063fd1ec01014610926578063fdff1e0314610943578063fff9ee871461094b576102f0565b8063ee4e19a11461089b578063fb939588146108c1578063fbfd393b146108e7576102f0565b8063d031370b146107cf578063d07f390f146107ec578063d796ffb8146107f4578063df89b34414610820578063e83afee314610846578063ebd83cd814610875576102f0565b8063a569e57111610156578063b5b1d56011610130578063b5b1d56014610734578063bc157ac114610751578063c24ad43e14610783578063cd85641a146107a9576102f0565b8063a569e571146106c2578063ab319c9a146106e8578063b1bd38b01461070e576102f0565b806387d67dff146106055780638f59c7271461062b5780638f6a7b57146106515780638f840ddd1461066e578063932cc8c314610676578063a1210a2d1461069c576102f0565b80633cdff8311161025c57806368c31dd51161021557806370a0502a116101ef57806370a0502a1461059d578063788c6c01146105ba5780638048e0d9146105e0578063869871bf146105e8576102f0565b806368c31dd51461052e5780636a20de92146105545780636b5e40a714610580576102f0565b80633cdff83114610498578063437f7912146104b557806346f68ee9146104d2578063481c6a75146104f85780634e83423c146105005780635a96ac0a14610526576102f0565b806311e56cf0116102ae57806311e56cf0146103d0578063124154ca146103d857806312422d23146104125780631af4da701461043e5780631eec5a9a146104645780632b7ce50014610490576102f0565b8062f714ce146102f55780630619aff114610323578063089208d81461035c578063094a8651146103645780630b0eee301461039c5780630c3513a8146103c8575b600080fd5b6103216004803603604081101561030b57600080fd5b50803590602001356001600160a01b0316610971565b005b6103406004803603602081101561033957600080fd5b5035610b48565b604080516001600160a01b039092168252519081900360200190f35b610321610b72565b61038a6004803603602081101561037a57600080fd5b50356001600160a01b0316610c09565b60408051918252519081900360200190f35b610321600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610c1b565b61038a610dca565b610340610f75565b6103fe600480360360208110156103ee57600080fd5b50356001600160a01b0316610f84565b604080519115158252519081900360200190f35b6103216004803603604081101561042857600080fd5b50803590602001356001600160a01b0316610f99565b6103406004803603602081101561045457600080fd5b50356001600160a01b0316611269565b61038a6004803603604081101561047a57600080fd5b506001600160a01b038135169060200135611284565b610321611478565b610321600480360360208110156104ae57600080fd5b503561163b565b610340600480360360208110156104cb57600080fd5b50356117ba565b610321600480360360208110156104e857600080fd5b50356001600160a01b03166117ca565b6103406118b7565b6103fe6004803603602081101561051657600080fd5b50356001600160a01b03166118c6565b6103216118db565b6103fe6004803603602081101561054457600080fd5b50356001600160a01b0316611985565b6103216004803603604081101561056a57600080fd5b506001600160a01b03813516906020013561199a565b6103406004803603602081101561059657600080fd5b5035611ae1565b610340600480360360208110156105b357600080fd5b5035611af1565b61038a600480360360208110156105d057600080fd5b50356001600160a01b0316611b01565b61038a611b13565b610340600480360360208110156105fe57600080fd5b5035611b19565b6103fe6004803603602081101561061b57600080fd5b50356001600160a01b0316611b29565b61038a6004803603602081101561064157600080fd5b50356001600160a01b0316611b3e565b6103406004803603602081101561066757600080fd5b5035611b50565b61038a611b60565b61038a6004803603602081101561068c57600080fd5b50356001600160a01b0316611b66565b6103fe600480360360208110156106b257600080fd5b50356001600160a01b0316611b78565b6103fe600480360360208110156106d857600080fd5b50356001600160a01b0316611b8d565b61038a600480360360208110156106fe57600080fd5b50356001600160a01b0316611ba2565b61038a6004803603602081101561072457600080fd5b50356001600160a01b0316611bb4565b6103406004803603602081101561074a57600080fd5b5035611bc6565b61038a6004803603606081101561076757600080fd5b508035906001600160a01b036020820135169060400135611bd6565b61038a6004803603602081101561079957600080fd5b50356001600160a01b0316611e54565b61038a600480360360208110156107bf57600080fd5b50356001600160a01b0316611e66565b610340600480360360208110156107e557600080fd5b5035611e78565b61038a611e88565b6103216004803603604081101561080a57600080fd5b50803590602001356001600160a01b0316611eac565b6103fe6004803603602081101561083657600080fd5b50356001600160a01b031661202f565b6103fe6004803603604081101561085c57600080fd5b50803560ff1690602001356001600160a01b0316612044565b6103fe6004803603602081101561088b57600080fd5b50356001600160a01b031661248f565b6103fe600480360360208110156108b157600080fd5b50356001600160a01b03166124a4565b61038a600480360360208110156108d757600080fd5b50356001600160a01b03166124b9565b6103fe600480360360608110156108fd57600080fd5b5060ff813516906001600160a01b03602082013581169160400135166124cb565b61038a612d87565b6103406004803603602081101561093c57600080fd5b5035612d8d565b610340612d9d565b61038a6004803603602081101561096157600080fd5b50356001600160a01b0316612dc1565b6001600160a01b03811660009081526003602052604090205460ff166109cd576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b3360009081526009602052604090205460ff161515600114610a25576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000610a318284611284565b90507f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec80176916001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610aaa57600080fd5b505af1158015610abe573d6000803e3d6000fd5b5050602154610ad09250905082612dd3565b602181905560405160008051602061353783398151915290600090a2610b006001600160a01b0383163385612e15565b604080518481526020810183905281516001600160a01b038516927fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb928290030190a2505050565b60128181548110610b5857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610bbf576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b601b6020526000908152604090205481565b6001600160a01b0382166000908152600c602052604090205460ff1615610c94573360009081526016602052604090205460ff16610c8f576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b610ce7565b3360009081526013602052604090205460ff16610ce7576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000610cf38383611284565b9050610cfd610dca565b811115610d49576040805162461bcd60e51b8152602060048201526015602482015274496e73756666696369656e7420726573657276657360581b604482015290519081900360640190fd5b602154610d569082612dd3565b602181905560405160008051602061353783398151915290600090a2610d866001600160a01b0384163384612e15565b6040805183815290516001600160a01b038516917f2bb2640731848fe9820ba48dbc978c1fc9bbd5f11b948bfab05b7dee3378fd80919081900360200190a2505050565b60007f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec80176916001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2557600080fd5b505afa158015610e39573d6000803e3d6000fd5b505050506040513d6020811015610e4f57600080fd5b50516022541115610e6257506000610f72565b602154610ef66022547f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec80176916001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec457600080fd5b505afa158015610ed8573d6000803e3d6000fd5b505050506040513d6020811015610eee57600080fd5b505190612dd3565b1115610f0457506000610f72565b610f6f610f666022547f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec80176916001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec457600080fd5b60215490612dd3565b90505b90565b601f546001600160a01b031681565b60066020526000908152604090205460ff1681565b3360009081526019602052604090205460ff16610fec576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16611048576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b60006110548284611284565b601f54604080516370a0823160e01b815233600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156110a557600080fd5b505afa1580156110b9573d6000803e3d6000fd5b505050506040513d60208110156110cf57600080fd5b5051336000908152601b6020526040812054919250906110f0908390612dd3565b90508083111561113c576040805162461bcd60e51b8152602060048201526012602482015271115e18d959591cc81919589d081b1a5b5a5d60721b604482015290519081900360640190fd5b336000908152601b60205260409020546111569084612e6c565b336000908152601b60205260409020556022546111739084612e6c565b6022556021546111839084612dd3565b602181905560405160008051602061353783398151915290600090a26040805163a9059cbb60e01b81523360048201526024810187905290516001600160a01b0386169163a9059cbb9160448083019260209291908290030181600087803b1580156111ee57600080fd5b505af1158015611202573d6000803e3d6000fd5b505050506040513d602081101561121857600080fd5b5050604080518681526020810185905281516001600160a01b0387169233927f7e1a939bed137a819b5d2979822c67f877689f7a863d5e4cb57cdca97b2977d6929081900390910190a35050505050565b6011602052600090815260409020546001600160a01b031681565b6001600160a01b03821660009081526003602052604081205460ff16156113c1576113ba836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156112e157600080fd5b505afa1580156112f5573d6000803e3d6000fd5b505050506040513d602081101561130b57600080fd5b50516040805163313ce56760e01b8152905160ff909216600a0a916113b4916001600160a01b037f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec8017691169163313ce56791600480820192602092909190829003018186803b15801561137b57600080fd5b505afa15801561138f573d6000803e3d6000fd5b505050506040513d60208110156113a557600080fd5b5051859060ff16600a0a612ec6565b90612f1f565b9050611472565b6001600160a01b0383166000908152600c602052604090205460ff1615611472576001600160a01b03808416600081815260116020908152604091829020548251634249719f60e01b815260048101949094526024840187905291519190931692634249719f9260448082019391829003018186803b15801561144357600080fd5b505afa158015611457573d6000803e3d6000fd5b505050506040513d602081101561146d57600080fd5b505190505b92915050565b6000546001600160a01b031633146114c5576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6000805b60025481101561159d5761159361158c600283815481106114e657fe5b600091825260209091200154600280546001600160a01b03909216918590811061150c57fe5b60009182526020918290200154604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b15801561155b57600080fd5b505afa15801561156f573d6000803e3d6000fd5b505050506040513d602081101561158557600080fd5b5051611284565b8390612e6c565b91506001016114c9565b5060005b600b548110156115ee576115e461158c600b83815481106115be57fe5b600091825260209091200154600b80546001600160a01b03909216918590811061150c57fe5b91506001016115a1565b506021819055604051819060008051602061353783398151915290600090a260405181907fec691f09f6924b27932253f85caf99bacc30360cc0e50a1cc4d2acc24601446690600090a250565b3360009081526019602052604090205460ff1661168e576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6040805163079cc67960e41b81523360048201526024810183905290516001600160a01b037f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec801769116916379cc679091604480830192600092919082900301818387803b1580156116fc57600080fd5b505af1158015611710573d6000803e3d6000fd5b5050336000908152601b602052604090205461172f9250905082612dd3565b336000908152601b602052604090205560225461174c9082612dd3565b602255604080518281526020810183905281516001600160a01b037f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec8017691169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a350565b60088181548110610b5857600080fd5b6000546001600160a01b03163314611817576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6001600160a01b03811661185c5760405162461bcd60e51b81526004018080602001828103825260268152602001806134886026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b601d6020526000908152604090205460ff1681565b6001546001600160a01b031633146119245760405162461bcd60e51b81526004018080602001828103825260228152602001806134ae6022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b60036020526000908152604090205460ff1681565b336000908152601d602052604090205460ff166119ed576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6119f5610dca565b811115611a0757611a04610dca565b90505b8015611a9d577f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec80176916001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611a8457600080fd5b505af1158015611a98573d6000803e3d6000fd5b505050505b6040805182815290516001600160a01b0384169133917ffa8ccab40e7da8146c2304cd0950334fd30a6ba093abe86261aa13911fed849c9181900360200190a35050565b60058181548110610b5857600080fd5b60158181548110610b5857600080fd5b60046020526000908152604090205481565b60205481565b60188181548110610b5857600080fd5b60096020526000908152604090205460ff1681565b600d6020526000908152604090205481565b600e8181548110610b5857600080fd5b60215481565b60076020526000908152604090205481565b600f6020526000908152604090205460ff1681565b600c6020526000908152604090205460ff1681565b60176020526000908152604090205481565b60146020526000908152604090205481565b601c8181548110610b5857600080fd5b6001600160a01b03821660009081526003602052604081205460ff1680611c1557506001600160a01b0383166000908152600c602052604090205460ff165b611c55576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b611c6a6001600160a01b038416333087612f61565b6001600160a01b03831660009081526003602052604090205460ff1615611ce3573360009081526006602052604090205460ff16611cde576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b611d36565b336000908152600f602052604090205460ff16611d36576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6000611d428486611284565b9050611d4e8184612dd3565b91507f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec80176916001600160a01b03166340c10f1933846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611dc757600080fd5b505af1158015611ddb573d6000803e3d6000fd5b5050602154611ded9250905082612e6c565b602181905560405160008051602061353783398151915290600090a2604080518681526020810183905281516001600160a01b038716927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a2509392505050565b600a6020526000908152604090205481565b601a6020526000908152604090205481565b60028181548110610b5857600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b3360009081526019602052604090205460ff16611eff576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16611f5b576040805162461bcd60e51b815260206004820152600c60248201526b139bdd081858d8d95c1d195960a21b604482015290519081900360640190fd5b611f706001600160a01b038216333085612f61565b6000611f7c8284611284565b336000908152601b6020526040902054909150611f999082612dd3565b336000908152601b6020526040902055602254611fb69082612dd3565b602255602154611fc69082612e6c565b602181905560405160008051602061353783398151915290600090a2604080518481526020810183905281516001600160a01b0385169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a3505050565b60166020526000908152604090205460ff1681565b600080546001600160a01b03163314612092576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6001600160a01b0382166120a557600080fd5b60008360098111156120b357fe5b1415612101576120e3437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b03831660009081526007602052604090205561243e565b600183600981111561210f57fe5b141561215d5761213f437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152600a602052604090205561243e565b600283600981111561216b57fe5b14156121b95761219b437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b03831660009081526004602052604090205561243e565b60038360098111156121c757fe5b1415612220576122026121fb7f00000000000000000000000000000000000000000000000000000000000000006002612ec6565b4390612e6c565b6001600160a01b03831660009081526014602052604090205561243e565b600483600981111561222e57fe5b141561227c5761225e437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b03831660009081526010602052604090205561243e565b600583600981111561228a57fe5b14156122d8576122ba437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152600d602052604090205561243e565b60068360098111156122e657fe5b14156123385761231a6121fb7f00000000000000000000000000000000000000000000000000000000000000006002612ec6565b6001600160a01b03831660009081526017602052604090205561243e565b600783600981111561234657fe5b141561239457612376437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152601a602052604090205561243e565b60088360098111156123a257fe5b14156123f0576123d2437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b6001600160a01b0383166000908152601e602052604090205561243e565b60098360098111156123fe57fe5b14156124365761242e437f0000000000000000000000000000000000000000000000000000000000000000612e6c565b60205561243e565b506000611472565b82600981111561244a57fe5b604080516001600160a01b038516815290517f0e4f2c4b5bc209d509bc3d49348c787fefadc66a79351b470599ac0f5be52eaf9181900360200190a250600192915050565b60136020526000908152604090205460ff1681565b60196020526000908152604090205460ff1681565b601e6020526000908152604090205481565b600080546001600160a01b03163314612519576040805162461bcd60e51b81526020600482018190526024820152600080516020613517833981519152604482015290519081900360640190fd5b6001600160a01b03831661252c57600080fd5b60008085600981111561253b57fe5b14156125f75761254e6007600686612fc1565b156125c7576001600160a01b0384166000908152600760205260408120556125776005856130ab565b6125c757600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600660205260409020805460ff81161560ff199091168117909155612d29565b600185600981111561260557fe5b14156126c157612618600a600986612fc1565b15612691576001600160a01b0384166000908152600a60205260408120556126416008856130ab565b61269157600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600960205260409020805460ff81161560ff199091168117909155612d29565b60028560098111156126cf57fe5b141561278b576126e26004600386612fc1565b1561275b576001600160a01b03841660009081526004602052604081205561270b6002856130ab565b61275b57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600360205260409020805460ff81161560ff199091168117909155612d29565b600385600981111561279957fe5b1415612892576127ac6014601386612fc1565b1561286257601280546001810182557fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b03871690811790915560009081526014602052604081205561281290856130ab565b61286257601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601360205260409020805460ff81161560ff199091168117909155612d29565b60048560098111156128a057fe5b1415612999576128b36010600f86612fc1565b1561296957600e80546001810182557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b03871690811790915560009081526010602052604081205561291990856130ab565b61296957600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152600f60205260409020805460ff81161560ff199091168117909155612d29565b60058560098111156129a757fe5b1415612a85576129ba600d600c86612fc1565b15612a33576001600160a01b0384166000908152600d60205260408120556129e3600b856130ab565b612a3357600b80546001810182556000919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b038381166000908152600c60209081526040808320805460ff81161560ff199091168117909155601190925290912080546001600160a01b03191692851692909217909155612d29565b6006856009811115612a9357fe5b1415612b4f57612aa66017601686612fc1565b15612b1f576001600160a01b038416600090815260176020526040812055612acf6015856130ab565b612b1f57601580546001810182556000919091527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601660205260409020805460ff81161560ff199091168117909155612d29565b6007856009811115612b5d57fe5b1415612c1957612b70601a601986612fc1565b15612be9576001600160a01b0384166000908152601a6020526040812055612b996018856130ab565b612be957601880546001810182556000919091527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e0180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601960205260409020805460ff81161560ff199091168117909155612d29565b6008856009811115612c2757fe5b1415612ce357612c3a601e601d86612fc1565b15612cb3576001600160a01b0384166000908152601e6020526040812055612c63601c856130ab565b612cb357601c80546001810182556000919091527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a2110180546001600160a01b0319166001600160a01b0386161790555b506001600160a01b0383166000908152601d60205260409020805460ff81161560ff199091168117909155612d29565b6009856009811115612cf157fe5b1415612d1f57506000602055601f80546001600160a01b0319166001600160a01b0385161790556001612d29565b6000915050612d80565b846009811115612d3557fe5b604080516001600160a01b0387168152831515602082015281517f0dcacb7e392f3d6a216ed2660e3dcfd40b7793d33591db2ba185a6b8e44fc477929181900390910190a260019150505b9392505050565b60225481565b600b8181548110610b5857600080fd5b7f000000000000000000000000b4dffa52fee44bd493f12d85829d775ec801769181565b60106020526000908152604090205481565b6000612d8083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506130fb565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612e67908490613192565b505050565b600082820183811015612d80576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082612ed557506000611472565b82820282848281612ee257fe5b0414612d805760405162461bcd60e51b81526004018080602001828103825260218152602001806134f66021913960400191505060405180910390fd5b6000612d8083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613243565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052612fbb908590613192565b50505050565b6001600160a01b03811660009081526020839052604081205460ff166130a1576001600160a01b038216600090815260208590526040902054613038576040805162461bcd60e51b815260206004820152600a6024820152694d75737420717565756560b01b604482015290519081900360640190fd5b6001600160a01b038216600090815260208590526040902054431015613099576040805162461bcd60e51b8152602060048201526011602482015270145d595d59481b9bdd08195e1c1a5c9959607a1b604482015290519081900360640190fd5b506001612d80565b5060009392505050565b6000805b83548110156130a157826001600160a01b03168482815481106130ce57fe5b6000918252602090912001546001600160a01b031614156130f3576001915050611472565b6001016130af565b6000818484111561318a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561314f578181015183820152602001613137565b50505050905090810190601f16801561317c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606131e7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132a89092919063ffffffff16565b805190915015612e675780806020019051602081101561320657600080fd5b5051612e675760405162461bcd60e51b815260040180806020018281038252602a815260200180613557602a913960400191505060405180910390fd5b600081836132925760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561314f578181015183820152602001613137565b50600083858161329e57fe5b0495945050505050565b60606132b784846000856132bf565b949350505050565b6060824710156133005760405162461bcd60e51b81526004018080602001828103825260268152602001806134d06026913960400191505060405180910390fd5b6133098561341b565b61335a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106133995780518252601f19909201916020918201910161337a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146133fb576040519150601f19603f3d011682016040523d82523d6000602084013e613400565b606091505b5091509150613410828286613421565b979650505050505050565b3b151590565b60608315613430575081612d80565b8251156134405782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561314f57818101518382015260200161313756fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657293bb8edd35984706eee1b92541281f7f62d33c01c5b2ec0929a113603bd21d665361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122094700c07129ed10bbfbd0fb8056ede956e685e299cffe6ed88281fcb34be698a64736f6c63430007050033

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

000000000000000000000000b4dffa52fee44bd493f12d85829d775ec8017691000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _Gaas (address): 0xB4dFfa52fEe44BD493f12D85829D775EC8017691
Arg [1] : _USDC (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [2] : _blocksNeededForQueue (uint256): 0

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000b4dffa52fee44bd493f12d85829d775ec8017691
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.