Contract 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c

Contract Overview

Balance:
0 tCRO
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd96e4af26fb827f3410eb43665cf05bebf62824c91d562ac1732e4f5a8b419a0Vault Set Token ...70975072023-01-17 7:49:0611 days 12 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.2411824248450
0x6e5d8842be78ff3af9dcb40ed853f8469100a3dbe1eec888ca2ae72b9f81e483Signal Vault Set...70975002023-01-17 7:48:2811 days 12 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.1061813472830
0xa6bc60aba43614e4a027ce10c1653bf9d11cabeb38593f5d9297de7c0b58a539Set Max Leverage63539332022-12-01 7:27:2558 days 12 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.072097737414 1,933.381711797
0x505b32c3d9fab22c1b3d382a1bded7dfed5e241565a410f1095645a784a511f7Set Liquidator61455192022-11-18 2:58:5371 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.1026863867450
0x8869545e47d01b12097386f40733ea39f56aa640af64a3e2a83c9d468502259fSet Contract Han...61309272022-11-17 2:55:3272 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.0927680584730
0x796c75c8ac4b5ec41959eeb2b257fa064f265e50f7a08f9c6af2fb95b14b11ccSet Contract Han...61309252022-11-17 2:55:2172 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.0927448213020
0x4b4bed4168820ba14d93e6200109f275c51ff36fd65d6f6bdfcbac3cb29f4737Set Should Toggl...61309232022-11-17 2:55:1072 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO0.0932928976680
0x77d75ceab09b6f313a418f210f14c09daa85256ce3cb6853be3cf0e641453e720x6080604061309182022-11-17 2:54:4372 days 17 hrs ago0x111e164336e0d0a2b9554f96a2cca80680fba449 IN  Create: Timelock0 tCRO9.7177888562510
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0x5a10a0a5d33e72f740ea24d7ba5ff0e73e4b7a001e0f86f9c595c0666dde606372762642023-01-28 13:59:576 hrs 24 mins ago 0x80da155776c91f9da570928981c837ad470c3700 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c0 tCRO
0xea15d5d3345f5b8402cdd5d9d291c055829f69e1015b3ea9e1e2291ef56dced972760712023-01-28 13:42:266 hrs 41 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0xea15d5d3345f5b8402cdd5d9d291c055829f69e1015b3ea9e1e2291ef56dced972760712023-01-28 13:42:266 hrs 41 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
0xea15d5d3345f5b8402cdd5d9d291c055829f69e1015b3ea9e1e2291ef56dced972760712023-01-28 13:42:266 hrs 41 mins ago 0xc61932fc60df7f56c6e10f98f7844f32b9dbdd8c 0x4b789d998ff47e06e7e4aed3045162d50dad76ab0 tCRO
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Timelock

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : IAdmin.sol
//SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IAdmin {
    function setAdmin(address _admin) external;
}

File 2 of 16 : IGlpManager.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IGlpManager {
    function usdg() external view returns (address);
    function cooldownDuration() external returns (uint256);
    function getAumInUsdg(bool maximise) external view returns (uint256);
    function lastAddedAt(address _account) external returns (uint256);
    function addLiquidity(address _token, uint256 _amount, uint256 _minUsdg, uint256 _minGlp) external returns (uint256);
    function addLiquidityForAccount(address _fundingAccount, address _account, address _token, uint256 _amount, uint256 _minUsdg, uint256 _minGlp) external returns (uint256);
    function removeLiquidity(address _tokenOut, uint256 _glpAmount, uint256 _minOut, address _receiver) external returns (uint256);
    function removeLiquidityForAccount(address _account, address _tokenOut, uint256 _glpAmount, uint256 _minOut, address _receiver) external returns (uint256);
    function setShortsTrackerAveragePriceWeight(uint256 _shortsTrackerAveragePriceWeight) external;
    function setCooldownDuration(uint256 _cooldownDuration) external;
}

File 3 of 16 : IVault.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./IVaultUtils.sol";

interface IVault {
    function isInitialized() external view returns (bool);
    function isSwapEnabled() external view returns (bool);
    function isLeverageEnabled() external view returns (bool);

    function setVaultUtils(IVaultUtils _vaultUtils) external;
    function setError(uint256 _errorCode, string calldata _error) external;

    function router() external view returns (address);
    function usdg() external view returns (address);
    function gov() external view returns (address);

    function whitelistedTokenCount() external view returns (uint256);
    function maxLeverage() external view returns (uint256);

    function minProfitTime() external view returns (uint256);
    function hasDynamicFees() external view returns (bool);
    function fundingInterval() external view returns (uint256);
    function totalTokenWeights() external view returns (uint256);
    function getTargetUsdgAmount(address _token) external view returns (uint256);

    function inManagerMode() external view returns (bool);
    function inPrivateLiquidationMode() external view returns (bool);

    function maxGasPrice() external view returns (uint256);

    function approvedRouters(address _account, address _router) external view returns (bool);
    function isLiquidator(address _account) external view returns (bool);
    function isManager(address _account) external view returns (bool);

    function minProfitBasisPoints(address _token) external view returns (uint256);
    function tokenBalances(address _token) external view returns (uint256);
    function lastFundingTimes(address _token) external view returns (uint256);

    function setMaxLeverage(uint256 _maxLeverage) external;
    function setInManagerMode(bool _inManagerMode) external;
    function setManager(address _manager, bool _isManager) external;
    function setIsSwapEnabled(bool _isSwapEnabled) external;
    function setIsLeverageEnabled(bool _isLeverageEnabled) external;
    function setMaxGasPrice(uint256 _maxGasPrice) external;
    function setUsdgAmount(address _token, uint256 _amount) external;
    function setBufferAmount(address _token, uint256 _amount) external;
    function setMaxGlobalShortSize(address _token, uint256 _amount) external;
    function setInPrivateLiquidationMode(bool _inPrivateLiquidationMode) external;
    function setLiquidator(address _liquidator, bool _isActive) external;

    function setFundingRate(uint256 _fundingInterval, uint256 _fundingRateFactor, uint256 _stableFundingRateFactor) external;

    function setFees(
        uint256 _taxBasisPoints,
        uint256 _stableTaxBasisPoints,
        uint256 _mintBurnFeeBasisPoints,
        uint256 _swapFeeBasisPoints,
        uint256 _stableSwapFeeBasisPoints,
        uint256 _marginFeeBasisPoints,
        uint256 _liquidationFeeUsd,
        uint256 _minProfitTime,
        bool _hasDynamicFees
    ) external;

    function setTokenConfig(
        address _token,
        uint256 _tokenDecimals,
        uint256 _redemptionBps,
        uint256 _minProfitBps,
        uint256 _maxUsdgAmount,
        bool _isStable,
        bool _isShortable
    ) external;

    function setPriceFeed(address _priceFeed) external;
    function withdrawFees(address _token, address _receiver) external returns (uint256);

    function directPoolDeposit(address _token) external;
    function buyUSDG(address _token, address _receiver) external returns (uint256);
    function sellUSDG(address _token, address _receiver) external returns (uint256);
    function swap(address _tokenIn, address _tokenOut, address _receiver) external returns (uint256);
    function increasePosition(address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong) external;
    function decreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver) external returns (uint256);
    function validateLiquidation(address _account, address _collateralToken, address _indexToken, bool _isLong, bool _raise) external view returns (uint256, uint256);
    function liquidatePosition(address _account, address _collateralToken, address _indexToken, bool _isLong, address _feeReceiver) external;
    function tokenToUsdMin(address _token, uint256 _tokenAmount) external view returns (uint256);

    function priceFeed() external view returns (address);
    function fundingRateFactor() external view returns (uint256);
    function stableFundingRateFactor() external view returns (uint256);
    function cumulativeFundingRates(address _token) external view returns (uint256);
    function getNextFundingRate(address _token) external view returns (uint256);
    function getFeeBasisPoints(address _token, uint256 _usdgDelta, uint256 _feeBasisPoints, uint256 _taxBasisPoints, bool _increment) external view returns (uint256);

    function liquidationFeeUsd() external view returns (uint256);
    function taxBasisPoints() external view returns (uint256);
    function stableTaxBasisPoints() external view returns (uint256);
    function mintBurnFeeBasisPoints() external view returns (uint256);
    function swapFeeBasisPoints() external view returns (uint256);
    function stableSwapFeeBasisPoints() external view returns (uint256);
    function marginFeeBasisPoints() external view returns (uint256);

    function allWhitelistedTokensLength() external view returns (uint256);
    function allWhitelistedTokens(uint256) external view returns (address);
    function whitelistedTokens(address _token) external view returns (bool);
    function stableTokens(address _token) external view returns (bool);
    function shortableTokens(address _token) external view returns (bool);
    function feeReserves(address _token) external view returns (uint256);
    function globalShortSizes(address _token) external view returns (uint256);
    function globalShortAveragePrices(address _token) external view returns (uint256);
    function maxGlobalShortSizes(address _token) external view returns (uint256);
    function tokenDecimals(address _token) external view returns (uint256);
    function tokenWeights(address _token) external view returns (uint256);
    function guaranteedUsd(address _token) external view returns (uint256);
    function poolAmounts(address _token) external view returns (uint256);
    function bufferAmounts(address _token) external view returns (uint256);
    function reservedAmounts(address _token) external view returns (uint256);
    function usdgAmounts(address _token) external view returns (uint256);
    function maxUsdgAmounts(address _token) external view returns (uint256);
    function getRedemptionAmount(address _token, uint256 _usdgAmount) external view returns (uint256);
    function getMaxPrice(address _token) external view returns (uint256);
    function getMinPrice(address _token) external view returns (uint256);

    function getDelta(address _indexToken, uint256 _size, uint256 _averagePrice, bool _isLong, uint256 _lastIncreasedTime) external view returns (bool, uint256);
    function getPosition(address _account, address _collateralToken, address _indexToken, bool _isLong) external view returns (uint256, uint256, uint256, uint256, uint256, uint256, bool, uint256);
}

File 4 of 16 : IVaultUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IVaultUtils {
    function updateCumulativeFundingRate(address _collateralToken, address _indexToken) external returns (bool);
    function validateIncreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong) external view;
    function validateDecreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver) external view;
    function validateLiquidation(address _account, address _collateralToken, address _indexToken, bool _isLong, bool _raise) external view returns (uint256, uint256);
    function getEntryFundingRate(address _collateralToken, address _indexToken, bool _isLong) external view returns (uint256);
    function getPositionFee(address _account, address _collateralToken, address _indexToken, bool _isLong, uint256 _sizeDelta) external view returns (uint256);
    function getFundingFee(address _account, address _collateralToken, address _indexToken, bool _isLong, uint256 _size, uint256 _entryFundingRate) external view returns (uint256);
    function getBuyUsdgFeeBasisPoints(address _token, uint256 _usdgAmount) external view returns (uint256);
    function getSellUsdgFeeBasisPoints(address _token, uint256 _usdgAmount) external view returns (uint256);
    function getSwapFeeBasisPoints(address _tokenIn, address _tokenOut, uint256 _usdgAmount) external view returns (uint256);
    function getFeeBasisPoints(address _token, uint256 _usdgDelta, uint256 _feeBasisPoints, uint256 _taxBasisPoints, bool _increment) external view returns (uint256);
}

File 5 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @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;
    }
}

File 6 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 7 of 16 : IHandlerTarget.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IHandlerTarget {
    function isHandler(address _account) external returns (bool);
    function setHandler(address _handler, bool _isActive) external;
}

File 8 of 16 : ITimelock.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ITimelock {
    function setAdmin(address _admin) external;
    function enableLeverage(address _vault) external;
    function disableLeverage(address _vault) external;
    function setIsLeverageEnabled(address _vault, bool _isLeverageEnabled) external;
    function signalSetGov(address _target, address _gov) external;
}

File 9 of 16 : ITimelockTarget.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ITimelockTarget {
    function setGov(address _gov) external;
    function withdrawToken(address _token, address _account, uint256 _amount) external;
}

File 10 of 16 : Timelock.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./interfaces/ITimelockTarget.sol";
import "./interfaces/ITimelock.sol";
import "./interfaces/IHandlerTarget.sol";
import "../access/interfaces/IAdmin.sol";
import "../core/interfaces/IVault.sol";
import "../core/interfaces/IVaultUtils.sol";
import "../core/interfaces/IGlpManager.sol";
import "../referrals/interfaces/IReferralStorage.sol";
import "../tokens/interfaces/IYieldToken.sol";
import "../tokens/interfaces/IBaseToken.sol";
import "../tokens/interfaces/IMintable.sol";
import "../tokens/interfaces/IUSDG.sol";
import "../staking/interfaces/IVester.sol";

import "../libraries/math/SafeMath.sol";
import "../libraries/token/IERC20.sol";

contract Timelock is ITimelock {
    using SafeMath for uint256;

    uint256 public constant PRICE_PRECISION = 10 ** 30;
    uint256 public constant MAX_BUFFER = 5 days;
    uint256 public constant MAX_FUNDING_RATE_FACTOR = 200; // 0.02%
    uint256 public constant MAX_LEVERAGE_VALIDATION = 500000; // 50x

    uint256 public buffer;
    address public admin;

    address public tokenManager;
    address public mintReceiver;
    address public glpManager;
    uint256 public maxTokenSupply;

    uint256 public marginFeeBasisPoints;
    uint256 public maxMarginFeeBasisPoints;
    bool public shouldToggleIsLeverageEnabled;

    mapping (bytes32 => uint256) public pendingActions;

    mapping (address => bool) public isHandler;
    mapping (address => bool) public isKeeper;

    event SignalPendingAction(bytes32 action);
    event SignalApprove(address token, address spender, uint256 amount, bytes32 action);
    event SignalWithdrawToken(address target, address token, address receiver, uint256 amount, bytes32 action);
    event SignalMint(address token, address receiver, uint256 amount, bytes32 action);
    event SignalSetGov(address target, address gov, bytes32 action);
    event SignalSetHandler(address target, address handler, bool isActive, bytes32 action);
    event SignalSetPriceFeed(address vault, address priceFeed, bytes32 action);
    event SignalRedeemUsdg(address vault, address token, uint256 amount);
    event SignalVaultSetTokenConfig(
        address vault,
        address token,
        uint256 tokenDecimals,
        uint256 tokenWeight,
        uint256 minProfitBps,
        uint256 maxUsdgAmount,
        bool isStable,
        bool isShortable
    );
    event ClearAction(bytes32 action);

    modifier onlyAdmin() {
        require(msg.sender == admin, "Timelock: forbidden");
        _;
    }

    modifier onlyHandlerAndAbove() {
        require(msg.sender == admin || isHandler[msg.sender], "Timelock: forbidden");
        _;
    }

    modifier onlyKeeperAndAbove() {
        require(msg.sender == admin || isHandler[msg.sender] || isKeeper[msg.sender], "Timelock: forbidden");
        _;
    }

    modifier onlyTokenManager() {
        require(msg.sender == tokenManager, "Timelock: forbidden");
        _;
    }

    constructor(
        address _admin,
        uint256 _buffer,
        address _tokenManager,
        address _mintReceiver,
        address _glpManager,
        uint256 _maxTokenSupply,
        uint256 _marginFeeBasisPoints,
        uint256 _maxMarginFeeBasisPoints
    ) public {
        require(_buffer <= MAX_BUFFER, "Timelock: invalid _buffer");
        admin = _admin;
        buffer = _buffer;
        tokenManager = _tokenManager;
        mintReceiver = _mintReceiver;
        glpManager = _glpManager;
        maxTokenSupply = _maxTokenSupply;

        marginFeeBasisPoints = _marginFeeBasisPoints;
        maxMarginFeeBasisPoints = _maxMarginFeeBasisPoints;
    }

    function setAdmin(address _admin) external override onlyTokenManager {
        admin = _admin;
    }

    function setExternalAdmin(address _target, address _admin) external onlyAdmin {
        require(_target != address(this), "Timelock: invalid _target");
        IAdmin(_target).setAdmin(_admin);
    }

    function setContractHandler(address _handler, bool _isActive) external onlyAdmin {
        isHandler[_handler] = _isActive;
    }

    function setKeeper(address _keeper, bool _isActive) external onlyAdmin {
        isKeeper[_keeper] = _isActive;
    }

    function setBuffer(uint256 _buffer) external onlyAdmin {
        require(_buffer <= MAX_BUFFER, "Timelock: invalid _buffer");
        require(_buffer > buffer, "Timelock: buffer cannot be decreased");
        buffer = _buffer;
    }

    function setMaxLeverage(address _vault, uint256 _maxLeverage) external onlyAdmin {
      require(_maxLeverage > MAX_LEVERAGE_VALIDATION, "Timelock: invalid _maxLeverage");
      IVault(_vault).setMaxLeverage(_maxLeverage);
    }

    function setFundingRate(address _vault, uint256 _fundingInterval, uint256 _fundingRateFactor, uint256 _stableFundingRateFactor) external onlyKeeperAndAbove {
        require(_fundingRateFactor < MAX_FUNDING_RATE_FACTOR, "Timelock: invalid _fundingRateFactor");
        require(_stableFundingRateFactor < MAX_FUNDING_RATE_FACTOR, "Timelock: invalid _stableFundingRateFactor");
        IVault(_vault).setFundingRate(_fundingInterval, _fundingRateFactor, _stableFundingRateFactor);
    }

    function setShouldToggleIsLeverageEnabled(bool _shouldToggleIsLeverageEnabled) external onlyHandlerAndAbove {
        shouldToggleIsLeverageEnabled = _shouldToggleIsLeverageEnabled;
    }

    function setMarginFeeBasisPoints(uint256 _marginFeeBasisPoints, uint256 _maxMarginFeeBasisPoints) external onlyHandlerAndAbove {
        marginFeeBasisPoints = _marginFeeBasisPoints;
        maxMarginFeeBasisPoints = _maxMarginFeeBasisPoints;
    }

    function setSwapFees(
        address _vault,
        uint256 _taxBasisPoints,
        uint256 _stableTaxBasisPoints,
        uint256 _mintBurnFeeBasisPoints,
        uint256 _swapFeeBasisPoints,
        uint256 _stableSwapFeeBasisPoints
    ) external onlyKeeperAndAbove {
        IVault vault = IVault(_vault);

        vault.setFees(
            _taxBasisPoints,
            _stableTaxBasisPoints,
            _mintBurnFeeBasisPoints,
            _swapFeeBasisPoints,
            _stableSwapFeeBasisPoints,
            maxMarginFeeBasisPoints,
            vault.liquidationFeeUsd(),
            vault.minProfitTime(),
            vault.hasDynamicFees()
        );
    }

    // assign _marginFeeBasisPoints to this.marginFeeBasisPoints
    // because enableLeverage would update Vault.marginFeeBasisPoints to this.marginFeeBasisPoints
    // and disableLeverage would reset the Vault.marginFeeBasisPoints to this.maxMarginFeeBasisPoints
    function setFees(
        address _vault,
        uint256 _taxBasisPoints,
        uint256 _stableTaxBasisPoints,
        uint256 _mintBurnFeeBasisPoints,
        uint256 _swapFeeBasisPoints,
        uint256 _stableSwapFeeBasisPoints,
        uint256 _marginFeeBasisPoints,
        uint256 _liquidationFeeUsd,
        uint256 _minProfitTime,
        bool _hasDynamicFees
    ) external onlyKeeperAndAbove {
        marginFeeBasisPoints = _marginFeeBasisPoints;

        IVault(_vault).setFees(
            _taxBasisPoints,
            _stableTaxBasisPoints,
            _mintBurnFeeBasisPoints,
            _swapFeeBasisPoints,
            _stableSwapFeeBasisPoints,
            maxMarginFeeBasisPoints,
            _liquidationFeeUsd,
            _minProfitTime,
            _hasDynamicFees
        );
    }

    function enableLeverage(address _vault) external override onlyHandlerAndAbove {
        IVault vault = IVault(_vault);

        if (shouldToggleIsLeverageEnabled) {
            vault.setIsLeverageEnabled(true);
        }

        vault.setFees(
            vault.taxBasisPoints(),
            vault.stableTaxBasisPoints(),
            vault.mintBurnFeeBasisPoints(),
            vault.swapFeeBasisPoints(),
            vault.stableSwapFeeBasisPoints(),
            marginFeeBasisPoints,
            vault.liquidationFeeUsd(),
            vault.minProfitTime(),
            vault.hasDynamicFees()
        );
    }

    function disableLeverage(address _vault) external override onlyHandlerAndAbove {
        IVault vault = IVault(_vault);

        if (shouldToggleIsLeverageEnabled) {
            vault.setIsLeverageEnabled(false);
        }

        vault.setFees(
            vault.taxBasisPoints(),
            vault.stableTaxBasisPoints(),
            vault.mintBurnFeeBasisPoints(),
            vault.swapFeeBasisPoints(),
            vault.stableSwapFeeBasisPoints(),
            maxMarginFeeBasisPoints, // marginFeeBasisPoints
            vault.liquidationFeeUsd(),
            vault.minProfitTime(),
            vault.hasDynamicFees()
        );
    }

    function setIsLeverageEnabled(address _vault, bool _isLeverageEnabled) external override onlyHandlerAndAbove {
        IVault(_vault).setIsLeverageEnabled(_isLeverageEnabled);
    }

    function setTokenConfig(
        address _vault,
        address _token,
        uint256 _tokenWeight,
        uint256 _minProfitBps,
        uint256 _maxUsdgAmount,
        uint256 _bufferAmount,
        uint256 _usdgAmount
    ) external onlyKeeperAndAbove {
        require(_minProfitBps <= 500, "Timelock: invalid _minProfitBps");

        IVault vault = IVault(_vault);
        require(vault.whitelistedTokens(_token), "Timelock: token not yet whitelisted");

        uint256 tokenDecimals = vault.tokenDecimals(_token);
        bool isStable = vault.stableTokens(_token);
        bool isShortable = vault.shortableTokens(_token);

        IVault(_vault).setTokenConfig(
            _token,
            tokenDecimals,
            _tokenWeight,
            _minProfitBps,
            _maxUsdgAmount,
            isStable,
            isShortable
        );

        IVault(_vault).setBufferAmount(_token, _bufferAmount);

        IVault(_vault).setUsdgAmount(_token, _usdgAmount);
    }

    function setUsdgAmounts(address _vault, address[] memory _tokens, uint256[] memory _usdgAmounts) external onlyKeeperAndAbove {
        for (uint256 i = 0; i < _tokens.length; i++) {
            IVault(_vault).setUsdgAmount(_tokens[i], _usdgAmounts[i]);
        }
    }

    function updateUsdgSupply(uint256 usdgAmount) external onlyKeeperAndAbove {
        address usdg = IGlpManager(glpManager).usdg();
        uint256 balance = IERC20(usdg).balanceOf(glpManager);

        IUSDG(usdg).addVault(address(this));

        if (usdgAmount > balance) {
            uint256 mintAmount = usdgAmount.sub(balance);
            IUSDG(usdg).mint(glpManager, mintAmount);
        } else {
            uint256 burnAmount = balance.sub(usdgAmount);
            IUSDG(usdg).burn(glpManager, burnAmount);
        }

        IUSDG(usdg).removeVault(address(this));
    }

    function setShortsTrackerAveragePriceWeight(uint256 _shortsTrackerAveragePriceWeight) external onlyAdmin {
        IGlpManager(glpManager).setShortsTrackerAveragePriceWeight(_shortsTrackerAveragePriceWeight);
    }

    function setGlpCooldownDuration(uint256 _cooldownDuration) external onlyAdmin {
        IGlpManager(glpManager).setCooldownDuration(_cooldownDuration);
    }

    function setMaxGlobalShortSize(address _vault, address _token, uint256 _amount) external onlyAdmin {
        IVault(_vault).setMaxGlobalShortSize(_token, _amount);
    }

    function removeAdmin(address _token, address _account) external onlyAdmin {
        IYieldToken(_token).removeAdmin(_account);
    }

    function setIsSwapEnabled(address _vault, bool _isSwapEnabled) external onlyKeeperAndAbove {
        IVault(_vault).setIsSwapEnabled(_isSwapEnabled);
    }

    function setTier(address _referralStorage, uint256 _tierId, uint256 _totalRebate, uint256 _discountShare) external onlyKeeperAndAbove {
        IReferralStorage(_referralStorage).setTier(_tierId, _totalRebate, _discountShare);
    }

    function setReferrerTier(address _referralStorage, address _referrer, uint256 _tierId) external onlyKeeperAndAbove {
        IReferralStorage(_referralStorage).setReferrerTier(_referrer, _tierId);
    }

    function govSetCodeOwner(address _referralStorage, bytes32 _code, address _newAccount) external onlyKeeperAndAbove {
        IReferralStorage(_referralStorage).govSetCodeOwner(_code, _newAccount);
    }

    function setVaultUtils(address _vault, IVaultUtils _vaultUtils) external onlyAdmin {
        IVault(_vault).setVaultUtils(_vaultUtils);
    }

    function setMaxGasPrice(address _vault, uint256 _maxGasPrice) external onlyAdmin {
        require(_maxGasPrice > 5000000000, "Invalid _maxGasPrice");
        IVault(_vault).setMaxGasPrice(_maxGasPrice);
    }

    function withdrawFees(address _vault, address _token, address _receiver) external onlyAdmin {
        IVault(_vault).withdrawFees(_token, _receiver);
    }

    function batchWithdrawFees(address _vault, address[] memory _tokens) external onlyKeeperAndAbove {
        for (uint256 i = 0; i < _tokens.length; i++) {
            IVault(_vault).withdrawFees(_tokens[i], admin);
        }
    }

    function setInPrivateLiquidationMode(address _vault, bool _inPrivateLiquidationMode) external onlyAdmin {
        IVault(_vault).setInPrivateLiquidationMode(_inPrivateLiquidationMode);
    }

    function setLiquidator(address _vault, address _liquidator, bool _isActive) external onlyAdmin {
        IVault(_vault).setLiquidator(_liquidator, _isActive);
    }

    function setInPrivateTransferMode(address _token, bool _inPrivateTransferMode) external onlyAdmin {
        IBaseToken(_token).setInPrivateTransferMode(_inPrivateTransferMode);
    }

    function batchSetBonusRewards(address _vester, address[] memory _accounts, uint256[] memory _amounts) external onlyKeeperAndAbove {
        require(_accounts.length == _amounts.length, "Timelock: invalid lengths");

        if (!IHandlerTarget(_vester).isHandler(address(this))) {
            IHandlerTarget(_vester).setHandler(address(this), true);
        }

        for (uint256 i = 0; i < _accounts.length; i++) {
            address account = _accounts[i];
            uint256 amount = _amounts[i];
            IVester(_vester).setBonusRewards(account, amount);
        }
    }

    function transferIn(address _sender, address _token, uint256 _amount) external onlyAdmin {
        IERC20(_token).transferFrom(_sender, address(this), _amount);
    }

    function signalApprove(address _token, address _spender, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("approve", _token, _spender, _amount));
        _setPendingAction(action);
        emit SignalApprove(_token, _spender, _amount, action);
    }

    function approve(address _token, address _spender, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("approve", _token, _spender, _amount));
        _validateAction(action);
        _clearAction(action);
        IERC20(_token).approve(_spender, _amount);
    }

    function signalWithdrawToken(address _target, address _token, address _receiver, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("withdrawToken", _target, _token, _receiver, _amount));
        _setPendingAction(action);
        emit SignalWithdrawToken(_target, _token, _receiver, _amount, action);
    }

    function withdrawToken(address _target, address _token, address _receiver, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("withdrawToken", _target, _token, _receiver, _amount));
        _validateAction(action);
        _clearAction(action);
        IBaseToken(_target).withdrawToken(_token, _receiver, _amount);
    }

    function signalMint(address _token, address _receiver, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("mint", _token, _receiver, _amount));
        _setPendingAction(action);
        emit SignalMint(_token, _receiver, _amount, action);
    }

    function processMint(address _token, address _receiver, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("mint", _token, _receiver, _amount));
        _validateAction(action);
        _clearAction(action);

        _mint(_token, _receiver, _amount);
    }

    function signalSetGov(address _target, address _gov) external override onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("setGov", _target, _gov));
        _setPendingAction(action);
        emit SignalSetGov(_target, _gov, action);
    }

    function setGov(address _target, address _gov) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("setGov", _target, _gov));
        _validateAction(action);
        _clearAction(action);
        ITimelockTarget(_target).setGov(_gov);
    }

    function signalSetHandler(address _target, address _handler, bool _isActive) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("setHandler", _target, _handler, _isActive));
        _setPendingAction(action);
        emit SignalSetHandler(_target, _handler, _isActive, action);
    }

    function setHandler(address _target, address _handler, bool _isActive) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("setHandler", _target, _handler, _isActive));
        _validateAction(action);
        _clearAction(action);
        IHandlerTarget(_target).setHandler(_handler, _isActive);
    }

    function signalSetPriceFeed(address _vault, address _priceFeed) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("setPriceFeed", _vault, _priceFeed));
        _setPendingAction(action);
        emit SignalSetPriceFeed(_vault, _priceFeed, action);
    }

    function setPriceFeed(address _vault, address _priceFeed) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("setPriceFeed", _vault, _priceFeed));
        _validateAction(action);
        _clearAction(action);
        IVault(_vault).setPriceFeed(_priceFeed);
    }

    function signalRedeemUsdg(address _vault, address _token, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("redeemUsdg", _vault, _token, _amount));
        _setPendingAction(action);
        emit SignalRedeemUsdg(_vault, _token, _amount);
    }

    function redeemUsdg(address _vault, address _token, uint256 _amount) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("redeemUsdg", _vault, _token, _amount));
        _validateAction(action);
        _clearAction(action);

        address usdg = IVault(_vault).usdg();
        IVault(_vault).setManager(address(this), true);
        IUSDG(usdg).addVault(address(this));

        IUSDG(usdg).mint(address(this), _amount);
        IERC20(usdg).transfer(address(_vault), _amount);

        IVault(_vault).sellUSDG(_token, mintReceiver);

        IVault(_vault).setManager(address(this), false);
        IUSDG(usdg).removeVault(address(this));
    }

    function signalVaultSetTokenConfig(
        address _vault,
        address _token,
        uint256 _tokenDecimals,
        uint256 _tokenWeight,
        uint256 _minProfitBps,
        uint256 _maxUsdgAmount,
        bool _isStable,
        bool _isShortable
    ) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked(
            "vaultSetTokenConfig",
            _vault,
            _token,
            _tokenDecimals,
            _tokenWeight,
            _minProfitBps,
            _maxUsdgAmount,
            _isStable,
            _isShortable
        ));

        _setPendingAction(action);

        emit SignalVaultSetTokenConfig(
            _vault,
            _token,
            _tokenDecimals,
            _tokenWeight,
            _minProfitBps,
            _maxUsdgAmount,
            _isStable,
            _isShortable
        );
    }

    function vaultSetTokenConfig(
        address _vault,
        address _token,
        uint256 _tokenDecimals,
        uint256 _tokenWeight,
        uint256 _minProfitBps,
        uint256 _maxUsdgAmount,
        bool _isStable,
        bool _isShortable
    ) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked(
            "vaultSetTokenConfig",
            _vault,
            _token,
            _tokenDecimals,
            _tokenWeight,
            _minProfitBps,
            _maxUsdgAmount,
            _isStable,
            _isShortable
        ));

        _validateAction(action);
        _clearAction(action);

        IVault(_vault).setTokenConfig(
            _token,
            _tokenDecimals,
            _tokenWeight,
            _minProfitBps,
            _maxUsdgAmount,
            _isStable,
            _isShortable
        );
    }

    function cancelAction(bytes32 _action) external onlyAdmin {
        _clearAction(_action);
    }

    function _mint(address _token, address _receiver, uint256 _amount) private {
        IMintable mintable = IMintable(_token);

        if (!mintable.isMinter(address(this))) {
            mintable.setMinter(address(this), true);
        }

        mintable.mint(_receiver, _amount);
        require(IERC20(_token).totalSupply() <= maxTokenSupply, "Timelock: maxTokenSupply exceeded");
    }

    function _setPendingAction(bytes32 _action) private {
        require(pendingActions[_action] == 0, "Timelock: action already signalled");
        pendingActions[_action] = block.timestamp.add(buffer);
        emit SignalPendingAction(_action);
    }

    function _validateAction(bytes32 _action) private view {
        require(pendingActions[_action] != 0, "Timelock: action not signalled");
        require(pendingActions[_action] < block.timestamp, "Timelock: action time not yet passed");
    }

    function _clearAction(bytes32 _action) private {
        require(pendingActions[_action] != 0, "Timelock: invalid _action");
        delete pendingActions[_action];
        emit ClearAction(_action);
    }
}

File 11 of 16 : IReferralStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IReferralStorage {
    function codeOwners(bytes32 _code) external view returns (address);
    function getTraderReferralInfo(address _account) external view returns (bytes32, address);
    function setTraderReferralCode(address _account, bytes32 _code) external;
    function setTier(uint256 _tierId, uint256 _totalRebate, uint256 _discountShare) external;
    function setReferrerTier(address _referrer, uint256 _tierId) external;
    function govSetCodeOwner(bytes32 _code, address _newAccount) external;
}

File 12 of 16 : IVester.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IVester {
    function rewardTracker() external view returns (address);

    function claimForAccount(address _account, address _receiver) external returns (uint256);

    function claimable(address _account) external view returns (uint256);
    function cumulativeClaimAmounts(address _account) external view returns (uint256);
    function claimedAmounts(address _account) external view returns (uint256);
    function pairAmounts(address _account) external view returns (uint256);
    function getVestedAmount(address _account) external view returns (uint256);
    function transferredAverageStakedAmounts(address _account) external view returns (uint256);
    function transferredCumulativeRewards(address _account) external view returns (uint256);
    function cumulativeRewardDeductions(address _account) external view returns (uint256);
    function bonusRewards(address _account) external view returns (uint256);

    function transferStakeValues(address _sender, address _receiver) external;
    function setTransferredAverageStakedAmounts(address _account, uint256 _amount) external;
    function setTransferredCumulativeRewards(address _account, uint256 _amount) external;
    function setCumulativeRewardDeductions(address _account, uint256 _amount) external;
    function setBonusRewards(address _account, uint256 _amount) external;

    function getMaxVestableAmount(address _account) external view returns (uint256);
    function getCombinedAverageStakedAmount(address _account) external view returns (uint256);
}

File 13 of 16 : IBaseToken.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IBaseToken {
    function totalStaked() external view returns (uint256);
    function stakedBalance(address _account) external view returns (uint256);
    function removeAdmin(address _account) external;
    function setInPrivateTransferMode(bool _inPrivateTransferMode) external;
    function withdrawToken(address _token, address _account, uint256 _amount) external;
}

File 14 of 16 : IMintable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IMintable {
    function isMinter(address _account) external returns (bool);
    function setMinter(address _minter, bool _isActive) external;
    function mint(address _account, uint256 _amount) external;
    function burn(address _account, uint256 _amount) external;
}

File 15 of 16 : IUSDG.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IUSDG {
    function addVault(address _vault) external;
    function removeVault(address _vault) external;
    function mint(address _account, uint256 _amount) external;
    function burn(address _account, uint256 _amount) external;
}

File 16 of 16 : IYieldToken.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IYieldToken {
    function totalStaked() external view returns (uint256);
    function stakedBalance(address _account) external view returns (uint256);
    function removeAdmin(address _account) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"uint256","name":"_buffer","type":"uint256"},{"internalType":"address","name":"_tokenManager","type":"address"},{"internalType":"address","name":"_mintReceiver","type":"address"},{"internalType":"address","name":"_glpManager","type":"address"},{"internalType":"uint256","name":"_maxTokenSupply","type":"uint256"},{"internalType":"uint256","name":"_marginFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_maxMarginFeeBasisPoints","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"ClearAction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalApprove","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalPendingAction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SignalRedeemUsdg","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"gov","type":"address"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalSetGov","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"handler","type":"address"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalSetHandler","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"priceFeed","type":"address"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalSetPriceFeed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenDecimals","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenWeight","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minProfitBps","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxUsdgAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isStable","type":"bool"},{"indexed":false,"internalType":"bool","name":"isShortable","type":"bool"}],"name":"SignalVaultSetTokenConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalWithdrawToken","type":"event"},{"inputs":[],"name":"MAX_BUFFER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FUNDING_RATE_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_LEVERAGE_VALIDATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vester","type":"address"},{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"batchSetBonusRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"batchWithdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buffer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_action","type":"bytes32"}],"name":"cancelAction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"disableLeverage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"enableLeverage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"glpManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_referralStorage","type":"address"},{"internalType":"bytes32","name":"_code","type":"bytes32"},{"internalType":"address","name":"_newAccount","type":"address"}],"name":"govSetCodeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHandler","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isKeeper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marginFeeBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMarginFeeBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"pendingActions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"processMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeemUsdg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_account","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_buffer","type":"uint256"}],"name":"setBuffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setContractHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"name":"setExternalAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint256","name":"_taxBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_stableTaxBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_mintBurnFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_swapFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_stableSwapFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_marginFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_liquidationFeeUsd","type":"uint256"},{"internalType":"uint256","name":"_minProfitTime","type":"uint256"},{"internalType":"bool","name":"_hasDynamicFees","type":"bool"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint256","name":"_fundingInterval","type":"uint256"},{"internalType":"uint256","name":"_fundingRateFactor","type":"uint256"},{"internalType":"uint256","name":"_stableFundingRateFactor","type":"uint256"}],"name":"setFundingRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cooldownDuration","type":"uint256"}],"name":"setGlpCooldownDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"bool","name":"_inPrivateLiquidationMode","type":"bool"}],"name":"setInPrivateLiquidationMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_inPrivateTransferMode","type":"bool"}],"name":"setInPrivateTransferMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"bool","name":"_isLeverageEnabled","type":"bool"}],"name":"setIsLeverageEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"bool","name":"_isSwapEnabled","type":"bool"}],"name":"setIsSwapEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_liquidator","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setLiquidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_marginFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_maxMarginFeeBasisPoints","type":"uint256"}],"name":"setMarginFeeBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint256","name":"_maxGasPrice","type":"uint256"}],"name":"setMaxGasPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxGlobalShortSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint256","name":"_maxLeverage","type":"uint256"}],"name":"setMaxLeverage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"}],"name":"setPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referralStorage","type":"address"},{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_tierId","type":"uint256"}],"name":"setReferrerTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shortsTrackerAveragePriceWeight","type":"uint256"}],"name":"setShortsTrackerAveragePriceWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_shouldToggleIsLeverageEnabled","type":"bool"}],"name":"setShouldToggleIsLeverageEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint256","name":"_taxBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_stableTaxBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_mintBurnFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_swapFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"_stableSwapFeeBasisPoints","type":"uint256"}],"name":"setSwapFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referralStorage","type":"address"},{"internalType":"uint256","name":"_tierId","type":"uint256"},{"internalType":"uint256","name":"_totalRebate","type":"uint256"},{"internalType":"uint256","name":"_discountShare","type":"uint256"}],"name":"setTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenWeight","type":"uint256"},{"internalType":"uint256","name":"_minProfitBps","type":"uint256"},{"internalType":"uint256","name":"_maxUsdgAmount","type":"uint256"},{"internalType":"uint256","name":"_bufferAmount","type":"uint256"},{"internalType":"uint256","name":"_usdgAmount","type":"uint256"}],"name":"setTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_usdgAmounts","type":"uint256[]"}],"name":"setUsdgAmounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"contract IVaultUtils","name":"_vaultUtils","type":"address"}],"name":"setVaultUtils","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shouldToggleIsLeverageEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"signalApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"signalMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"signalRedeemUsdg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_gov","type":"address"}],"name":"signalSetGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"signalSetHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"}],"name":"signalSetPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenDecimals","type":"uint256"},{"internalType":"uint256","name":"_tokenWeight","type":"uint256"},{"internalType":"uint256","name":"_minProfitBps","type":"uint256"},{"internalType":"uint256","name":"_maxUsdgAmount","type":"uint256"},{"internalType":"bool","name":"_isStable","type":"bool"},{"internalType":"bool","name":"_isShortable","type":"bool"}],"name":"signalVaultSetTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"signalWithdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdgAmount","type":"uint256"}],"name":"updateUsdgSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenDecimals","type":"uint256"},{"internalType":"uint256","name":"_tokenWeight","type":"uint256"},{"internalType":"uint256","name":"_minProfitBps","type":"uint256"},{"internalType":"uint256","name":"_maxUsdgAmount","type":"uint256"},{"internalType":"bool","name":"_isStable","type":"bool"},{"internalType":"bool","name":"_isShortable","type":"bool"}],"name":"vaultSetTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620057cc380380620057cc83398181016040526101008110156200003857600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015195969495939492939192909162069780871115620000c4576040805162461bcd60e51b815260206004820152601960248201527f54696d656c6f636b3a20696e76616c6964205f62756666657200000000000000604482015290519081900360640190fd5b600180546001600160a01b03998a166001600160a01b0319918216179091556000979097556002805496891696881696909617909555600380549488169487169490941790935560048054929096169190941617909355600591909155600691909155600755615692806200013a6000396000f3fe608060405234801561001057600080fd5b50600436106103005760003560e01c80629a698e146103055780630191c2371461043a57806309cc9a08146104705780630e0dc426146104a65780630e9587f3146104f45780631154e8081461052c578063117cf20414610564578063185051c114610592578063204bbc54146105c057806321754d9e146105f657806321bd059214610632578063227f03eb1461066057806323aaad121461069857806324ccbe30146106b4578063268959e5146106ec5780632a709b141461071a5780632ba3725a1461073e578063318bc6891461075857806346ea87af1461076057806347de43e2146107865780634cd23f3b146107be5780634f5f6b5e146107fa57806350f7c2041461081757806351a6de0d1461081f578063558182941461084d57806355ef1395146108855780635b05348b146108b357806361d07569146108d05780636ba42aaa146108d85780636d63c1d0146108fe5780636e5227d414610924578063704b6c021461098557806370ac0a93146109ab57806376e11286146109e1578063781cc3d314610a0f5780637b6f775a14610a2c57806380894d6214610a5857806381774b3d14610a8657806386803c7214610aa35780638a39735a14610ad15780638bf22c4614610ad95780638e34c98f14610b0557806395082d2514610b24578063996a7a1e14610b2c578063996e2bc914610b5a5780639b53ad2214610b62578063adc7ea3714610c95578063bc476dfd14610cb2578063bc8a8ab914610ce0578063c142940a14610d16578063c7bb26a014610d4c578063cd2b123014610d54578063d1b9e85314610d82578063d3c87bbb14610db0578063da76231614610dd6578063db1c844114610e1a578063dce6e18d14610e73578063df3a66d914610ea9578063e1f21c6714610edf578063e21b459114610f15578063e30569e514610f38578063e3cbeb0f14610f55578063e4652f4914610fae578063e8ae227114610fe4578063edaafe2014611095578063f851a4401461109d578063fa6db1bc146110a5575b600080fd5b6104386004803603606081101561031b57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561034557600080fd5b82018360208201111561035757600080fd5b803590602001918460208302840111600160201b8311171561037857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103c757600080fd5b8201836020820111156103d957600080fd5b803590602001918460208302840111600160201b831117156103fa57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506110ad945050505050565b005b6104386004803603606081101561045057600080fd5b506001600160a01b0381358116916020810135909116906040013561131e565b6104386004803603606081101561048657600080fd5b506001600160a01b0381358116916020810135909116906040013561141c565b610438600480360360e08110156104bc57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060c0013561151b565b6104386004803603606081101561050a57600080fd5b506001600160a01b038135811691602081013582169160409091013516611994565b6104386004803603606081101561054257600080fd5b506001600160a01b038135811691602081013590911690604001351515611a72565b6104386004803603604081101561057a57600080fd5b506001600160a01b0381351690602001351515611ba3565b610438600480360360408110156105a857600080fd5b506001600160a01b0381351690602001351515611c88565b610438600480360360608110156105d657600080fd5b506001600160a01b03813581169160208101359160409091013516611d00565b6104386004803603608081101561060c57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135611df5565b6104386004803603604081101561064857600080fd5b506001600160a01b0381351690602001351515611f40565b6104386004803603608081101561067657600080fd5b506001600160a01b038135169060208101359060408101359060600135611fd5565b6106a061212a565b604080519115158252519081900360200190f35b610438600480360360608110156106ca57600080fd5b506001600160a01b038135811691602081013590911690604001351515612133565b6104386004803603604081101561070257600080fd5b506001600160a01b038135811691602001351661223c565b6107226122d8565b604080516001600160a01b039092168252519081900360200190f35b6107466122e7565b60408051918252519081900360200190f35b6107466122ee565b6106a06004803603602081101561077657600080fd5b50356001600160a01b03166122f4565b6104386004803603606081101561079c57600080fd5b506001600160a01b038135811691602081013590911690604001351515612309565b610438600480360360808110156107d457600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356123af565b6104386004803603602081101561081057600080fd5b50356124ca565b610746612576565b6104386004803603604081101561083557600080fd5b506001600160a01b038135811691602001351661257c565b6104386004803603608081101561086357600080fd5b506001600160a01b038135169060208101359060408101359060600135612676565b6104386004803603604081101561089b57600080fd5b506001600160a01b038135811691602001351661274d565b610438600480360360208110156108c957600080fd5b5035612843565b6107466128db565b6106a0600480360360208110156108ee57600080fd5b50356001600160a01b03166128e2565b6104386004803603602081101561091457600080fd5b50356001600160a01b03166128f7565b610438600480360361014081101561093b57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c08101359060e0810135906101008101359061012001351515612dad565b6104386004803603602081101561099b57600080fd5b50356001600160a01b0316612edd565b610438600480360360608110156109c157600080fd5b506001600160a01b03813581169160208101359091169060400135612f4c565b610438600480360360408110156109f757600080fd5b506001600160a01b038135811691602001351661334a565b61043860048036036020811015610a2557600080fd5b5035613449565b61043860048036036040811015610a4257600080fd5b506001600160a01b0381351690602001356134a2565b61043860048036036040811015610a6e57600080fd5b506001600160a01b038135811691602001351661358c565b61043860048036036020811015610a9c57600080fd5b5035613682565b61043860048036036040811015610ab957600080fd5b506001600160a01b03813516906020013515156139b3565b610746613a48565b61043860048036036040811015610aef57600080fd5b506001600160a01b038135169060200135613a4d565b61043860048036036020811015610b1b57600080fd5b50351515613b30565b610746613baa565b61043860048036036040811015610b4257600080fd5b506001600160a01b0381358116916020013516613bba565b610746613cab565b61043860048036036060811015610b7857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610ba257600080fd5b820183602082011115610bb457600080fd5b803590602001918460208302840111600160201b83111715610bd557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610c2457600080fd5b820183602082011115610c3657600080fd5b803590602001918460208302840111600160201b83111715610c5757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613cb1945050505050565b61043860048036036020811015610cab57600080fd5b5035613ddf565b61043860048036036040811015610cc857600080fd5b506001600160a01b0381358116916020013516613ec5565b61043860048036036060811015610cf657600080fd5b506001600160a01b03813581169160208101359091169060400135613f61565b61043860048036036060811015610d2c57600080fd5b506001600160a01b0381358116916020810135909116906040013561401d565b6107226140f5565b61043860048036036040811015610d6a57600080fd5b506001600160a01b0381351690602001351515614104565b61043860048036036040811015610d9857600080fd5b506001600160a01b03813516906020013515156141b3565b61043860048036036020811015610dc657600080fd5b50356001600160a01b031661422b565b610438600480360360c0811015610dec57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135614565565b6104386004803603610100811015610e3157600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060c081013515159060e0013515156147d6565b61043860048036036060811015610e8957600080fd5b506001600160a01b03813581169160208101359091169060400135614933565b61043860048036036060811015610ebf57600080fd5b506001600160a01b03813581169160208101359091169060400135614a35565b61043860048036036060811015610ef557600080fd5b506001600160a01b03813581169160208101359091169060400135614ad9565b61043860048036036040811015610f2b57600080fd5b5080359060200135614c0e565b61074660048036036020811015610f4e57600080fd5b5035614c80565b6104386004803603610100811015610f6c57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060c081013515159060e001351515614c92565b61043860048036036060811015610fc457600080fd5b506001600160a01b03813581169160208101359091169060400135614e17565b61043860048036036040811015610ffa57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561102457600080fd5b82018360208201111561103657600080fd5b803590602001918460208302840111600160201b8311171561105757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614ebd945050505050565b610746614ff9565b610722614fff565b61072261500e565b6001546001600160a01b03163314806110d55750336000908152600a602052604090205460ff165b806110ef5750336000908152600b602052604090205460ff165b61112e576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b8051825114611180576040805162461bcd60e51b815260206004820152601960248201527854696d656c6f636b3a20696e76616c6964206c656e6774687360381b604482015290519081900360640190fd5b604080516346ea87af60e01b815230600482015290516001600160a01b038516916346ea87af9160248083019260209291908290030181600087803b1580156111c857600080fd5b505af11580156111dc573d6000803e3d6000fd5b505050506040513d60208110156111f257600080fd5b505161125f5760408051639cb7de4b60e01b81523060048201526001602482015290516001600160a01b03851691639cb7de4b91604480830192600092919082900301818387803b15801561124657600080fd5b505af115801561125a573d6000803e3d6000fd5b505050505b60005b825181101561131857600083828151811061127957fe5b60200260200101519050600083838151811061129157fe5b60200260200101519050856001600160a01b03166341f2272483836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156112f257600080fd5b505af1158015611306573d6000803e3d6000fd5b50506001909401935061126292505050565b50505050565b6001546001600160a01b0316331461136b576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516972656465656d5573646760b01b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e830152605280830185905283518084039091018152607290920190925280519101206113cc8161501d565b604080516001600160a01b0380871682528516602082015280820184905290517fe6bd553b6ef21f3a22ebc877b3aaedc30fe15826b8156d4e8c8b373ebf11d78b9181900360600190a150505050565b6001546001600160a01b03163314611469576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60408051631b5a5b9d60e21b6020808301919091526001600160601b0319606087811b8216602485015286901b166038830152604c80830185905283518084039091018152606c90920190925280519101206114c48161501d565b604080516001600160a01b038087168252851660208201528082018490526060810183905290517f23d37bec99db82564427c9bbfe48ad7434bccf413a40fd357fb838c90a0d68289181900360800190a150505050565b6001546001600160a01b03163314806115435750336000908152600a602052604090205460ff165b8061155d5750336000908152600b602052604090205460ff165b61159c576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6101f48411156115f3576040805162461bcd60e51b815260206004820152601f60248201527f54696d656c6f636b3a20696e76616c6964205f6d696e50726f66697442707300604482015290519081900360640190fd5b60408051630daf9c2160e41b81526001600160a01b0388811660048301529151899283169163daf9c210916024808301926020929190829003018186803b15801561163d57600080fd5b505afa158015611651573d6000803e3d6000fd5b505050506040513d602081101561166757600080fd5b50516116a45760405162461bcd60e51b81526004018080602001828103825260238152602001806155876023913960400191505060405180910390fd5b6000816001600160a01b0316638ee573ac896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156116f357600080fd5b505afa158015611707573d6000803e3d6000fd5b505050506040513d602081101561171d57600080fd5b5051604080516342b60b0360e01b81526001600160a01b038b811660048301529151929350600092918516916342b60b0391602480820192602092909190829003018186803b15801561176f57600080fd5b505afa158015611783573d6000803e3d6000fd5b505050506040513d602081101561179957600080fd5b50516040805163db3555fb60e01b81526001600160a01b038c8116600483015291519293506000929186169163db3555fb91602480820192602092909190829003018186803b1580156117eb57600080fd5b505afa1580156117ff573d6000803e3d6000fd5b505050506040513d602081101561181557600080fd5b505160408051633c5a6e3560e01b81526001600160a01b038d8116600483015260248201879052604482018d9052606482018c9052608482018b905285151560a483015283151560c48301529151929350908d1691633c5a6e359160e48082019260009290919082900301818387803b15801561189157600080fd5b505af11580156118a5573d6000803e3d6000fd5b505050508a6001600160a01b0316638585f4d28b886040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561190057600080fd5b505af1158015611914573d6000803e3d6000fd5b505050508a6001600160a01b031663d66b000d8b876040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561196f57600080fd5b505af1158015611983573d6000803e3d6000fd5b505050505050505050505050505050565b6001546001600160a01b031633146119e1576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b826001600160a01b031663f255527883836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b158015611a4157600080fd5b505af1158015611a55573d6000803e3d6000fd5b505050506040513d6020811015611a6b57600080fd5b5050505050565b6001546001600160a01b03163314611abf576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516939b2ba2430b7323632b960b11b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e83015283151560f81b60528301528251603381840301815260539092019092528051910120611b23816150c1565b611b2c8161516d565b836001600160a01b0316639cb7de4b84846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001821515815260200192505050600060405180830381600087803b158015611b8557600080fd5b505af1158015611b99573d6000803e3d6000fd5b5050505050505050565b6001546001600160a01b0316331480611bcb5750336000908152600a602052604090205460ff165b80611be55750336000908152600b602052604090205460ff165b611c24576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b816001600160a01b03166330455ede826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c6c57600080fd5b505af1158015611c80573d6000803e3d6000fd5b505050505050565b6001546001600160a01b03163314611cd5576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6001546001600160a01b0316331480611d285750336000908152600a602052604090205460ff165b80611d425750336000908152600b602052604090205460ff165b611d81576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b826001600160a01b031663dfcfa25083836040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015611dd857600080fd5b505af1158015611dec573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b03163314611e42576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516c3bb4ba34323930bbaa37b5b2b760991b6020808301919091526001600160601b0319606088811b8216602d85015287811b8216604185015286901b16605583015260698083018590528351808403909101815260899092019092528051910120611eb0816150c1565b611eb98161516d565b846001600160a01b03166301e336678585856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611f2157600080fd5b505af1158015611f35573d6000803e3d6000fd5b505050505050505050565b6001546001600160a01b03163314611f8d576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b816001600160a01b031663f07bbf77826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c6c57600080fd5b6001546001600160a01b0316331480611ffd5750336000908152600a602052604090205460ff165b806120175750336000908152600b602052604090205460ff165b612056576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60c882106120955760405162461bcd60e51b81526004018080602001828103825260248152602001806155416024913960400191505060405180910390fd5b60c881106120d45760405162461bcd60e51b815260040180806020018281038252602a815260200180615633602a913960400191505060405180910390fd5b836001600160a01b0316638a27d4688484846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611b8557600080fd5b60085460ff1681565b6001546001600160a01b03163314612180576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516939b2ba2430b7323632b960b11b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e83015283151560f81b605283015282516033818403018152605390920190925280519101206121e48161501d565b604080516001600160a01b03808716825285166020820152831515818301526060810183905290517f1929c4e13b0dbbad7856b9ce1fc9dca98c7bf7cedd56e22c04dd60ad1d34fe4b9181900360800190a150505050565b6001546001600160a01b03163314612289576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b816001600160a01b0316631785f53c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611c6c57600080fd5b6002546001600160a01b031681565b6207a12081565b60065481565b600a6020526000908152604090205460ff1681565b6001546001600160a01b03163314612356576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b826001600160a01b0316634453a37483836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001821515815260200192505050600060405180830381600087803b158015611dd857600080fd5b6001546001600160a01b031633146123fc576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516c3bb4ba34323930bbaa37b5b2b760991b6020808301919091526001600160601b0319606088811b8216602d85015287811b8216604185015286901b1660558301526069808301859052835180840390910181526089909201909252805191012061246a8161501d565b604080516001600160a01b0380881682528087166020830152851681830152606081018490526080810183905290517f9ed7b0f07a9eed51079fab67f6d0f141f167f5b17fdb5a23282280e15fcafed39181900360a00190a15050505050565b6001546001600160a01b03163314612517576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60048054604080516327afb5af60e11b8152928301849052516001600160a01b0390911691634f5f6b5e91602480830192600092919082900301818387803b15801561256257600080fd5b505af1158015611a6b573d6000803e3d6000fd5b60055481565b6001546001600160a01b031633146125c9576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516539b2ba23b7bb60d11b6020808301919091526001600160601b0319606086811b8216602685015285901b16603a8301528251602e818403018152604e909201909252805191012061261e816150c1565b6126278161516d565b826001600160a01b031663cfad57a2836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611dd857600080fd5b6001546001600160a01b031633148061269e5750336000908152600a602052604090205460ff165b806126b85750336000908152600b602052604090205460ff165b6126f7576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b836001600160a01b031663836a01878484846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611b8557600080fd5b6001546001600160a01b0316331461279a576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6001600160a01b0382163014156127f4576040805162461bcd60e51b8152602060048201526019602482015278151a5b595b1bd8dace881a5b9d985b1a590817dd185c99d95d603a1b604482015290519081900360640190fd5b816001600160a01b031663704b6c02826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611c6c57600080fd5b6001546001600160a01b03163314612890576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b600480546040805163966be07560e01b8152928301849052516001600160a01b039091169163966be07591602480830192600092919082900301818387803b15801561256257600080fd5b6206978081565b600b6020526000908152604090205460ff1681565b6001546001600160a01b031633148061291f5750336000908152600a602052604090205460ff165b61295e576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b600854819060ff16156129cc5760408051637c2eb9f760e01b81526001600482015290516001600160a01b03831691637c2eb9f791602480830192600092919082900301818387803b1580156129b357600080fd5b505af11580156129c7573d6000803e3d6000fd5b505050505b806001600160a01b03166340eb3802826001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a1457600080fd5b505afa158015612a28573d6000803e3d6000fd5b505050506040513d6020811015612a3e57600080fd5b505160408051630875ab6160e11b815290516001600160a01b038616916310eb56c2916004808301926020929190829003018186803b158015612a8057600080fd5b505afa158015612a94573d6000803e3d6000fd5b505050506040513d6020811015612aaa57600080fd5b505160408051631351ecc160e21b815290516001600160a01b03871691634d47b304916004808301926020929190829003018186803b158015612aec57600080fd5b505afa158015612b00573d6000803e3d6000fd5b505050506040513d6020811015612b1657600080fd5b50516040805163511791c960e11b815290516001600160a01b0388169163a22f2392916004808301926020929190829003018186803b158015612b5857600080fd5b505afa158015612b6c573d6000803e3d6000fd5b505050506040513d6020811015612b8257600080fd5b50516040805163df73a26760e01b815290516001600160a01b0389169163df73a267916004808301926020929190829003018186803b158015612bc457600080fd5b505afa158015612bd8573d6000803e3d6000fd5b505050506040513d6020811015612bee57600080fd5b5051600654604080516305d349a560e21b815290516001600160a01b038b169163174d2694916004808301926020929190829003018186803b158015612c3357600080fd5b505afa158015612c47573d6000803e3d6000fd5b505050506040513d6020811015612c5d57600080fd5b50516040805163d9ac422560e01b815290516001600160a01b038c169163d9ac4225916004808301926020929190829003018186803b158015612c9f57600080fd5b505afa158015612cb3573d6000803e3d6000fd5b505050506040513d6020811015612cc957600080fd5b505160408051639f392eb360e01b815290516001600160a01b038d1691639f392eb3916004808301926020929190829003018186803b158015612d0b57600080fd5b505afa158015612d1f573d6000803e3d6000fd5b505050506040513d6020811015612d3557600080fd5b5051604080516001600160e01b031960e08d901b168152600481019a909a5260248a019890985260448901969096526064880194909452608487019290925260a486015260c485015260e484015215156101048301525161012480830192600092919082900301818387803b158015611c6c57600080fd5b6001546001600160a01b0316331480612dd55750336000908152600a602052604090205460ff165b80612def5750336000908152600b602052604090205460ff165b612e2e576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6006849055600754604080516320759c0160e11b8152600481018c9052602481018b9052604481018a9052606481018990526084810188905260a481019290925260c4820185905260e48201849052821515610104830152516001600160a01b038c16916340eb38029161012480830192600092919082900301818387803b158015612eb957600080fd5b505af1158015612ecd573d6000803e3d6000fd5b5050505050505050505050505050565b6002546001600160a01b03163314612f2a576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314612f99576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516972656465656d5573646760b01b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e83015260528083018590528351808403909101815260729092019092528051910120612ffa816150c1565b6130038161516d565b6000846001600160a01b031663f5b91b7b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561303e57600080fd5b505afa158015613052573d6000803e3d6000fd5b505050506040513d602081101561306857600080fd5b5051604080516352f4877760e11b81523060048201526001602482015290519192506001600160a01b0387169163a5e90eee9160448082019260009290919082900301818387803b1580156130bc57600080fd5b505af11580156130d0573d6000803e3d6000fd5b5050604080516312b5ad0160e11b815230600482015290516001600160a01b038516935063256b5a029250602480830192600092919082900301818387803b15801561311b57600080fd5b505af115801561312f573d6000803e3d6000fd5b5050604080516340c10f1960e01b81523060048201526024810187905290516001600160a01b03851693506340c10f199250604480830192600092919082900301818387803b15801561318157600080fd5b505af1158015613195573d6000803e3d6000fd5b50505050806001600160a01b031663a9059cbb86856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156131f057600080fd5b505af1158015613204573d6000803e3d6000fd5b505050506040513d602081101561321a57600080fd5b505060035460408051630711e61960e41b81526001600160a01b038781166004830152928316602482015290519187169163711e6190916044808201926020929091908290030181600087803b15801561327357600080fd5b505af1158015613287573d6000803e3d6000fd5b505050506040513d602081101561329d57600080fd5b5050604080516352f4877760e11b815230600482015260006024820181905291516001600160a01b0388169263a5e90eee926044808201939182900301818387803b1580156132eb57600080fd5b505af11580156132ff573d6000803e3d6000fd5b50506040805163ceb68c2360e01b815230600482015290516001600160a01b038516935063ceb68c239250602480830192600092919082900301818387803b158015611f2157600080fd5b6001546001600160a01b03163314613397576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516b1cd95d141c9a58d95199595960a21b6020808301919091526001600160601b0319606086811b8216602c85015285901b168284015282516034818403018152605490920190925280519101206133f1816150c1565b6133fa8161516d565b826001600160a01b031663724e78da836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611dd857600080fd5b6001546001600160a01b03163314613496576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b61349f8161516d565b50565b6001546001600160a01b031633146134ef576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6207a1208111613546576040805162461bcd60e51b815260206004820152601e60248201527f54696d656c6f636b3a20696e76616c6964205f6d61784c657665726167650000604482015290519081900360640190fd5b816001600160a01b031663d3127e63826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c6c57600080fd5b6001546001600160a01b031633146135d9576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516b1cd95d141c9a58d95199595960a21b6020808301919091526001600160601b0319606086811b8216602c85015285901b168284015282516034818403018152605490920190925280519101206136338161501d565b604080516001600160a01b0380861682528416602082015280820183905290517fb878dd4b5762f4118ad54995be907dd2bcd915d942e4ac75580fba9b4ee4727f9181900360600190a1505050565b6001546001600160a01b03163314806136aa5750336000908152600a602052604090205460ff165b806136c45750336000908152600b602052604090205460ff165b613703576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663f5b91b7b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561375357600080fd5b505afa158015613767573d6000803e3d6000fd5b505050506040513d602081101561377d57600080fd5b505160048054604080516370a0823160e01b81526001600160a01b039283169381019390935251929350600092908416916370a08231916024808301926020929190829003018186803b1580156137d357600080fd5b505afa1580156137e7573d6000803e3d6000fd5b505050506040513d60208110156137fd57600080fd5b5051604080516312b5ad0160e11b815230600482015290519192506001600160a01b0384169163256b5a029160248082019260009290919082900301818387803b15801561384a57600080fd5b505af115801561385e573d6000803e3d6000fd5b50505050808311156138ed5760006138768483615212565b60048054604080516340c10f1960e01b81526001600160a01b039283169381019390935260248301849052519293508516916340c10f199160448082019260009290919082900301818387803b1580156138cf57600080fd5b505af11580156138e3573d6000803e3d6000fd5b505050505061396c565b60006138f98285615212565b6004805460408051632770a7eb60e21b81526001600160a01b03928316938101939093526024830184905251929350851691639dc29fac9160448082019260009290919082900301818387803b15801561395257600080fd5b505af1158015613966573d6000803e3d6000fd5b50505050505b6040805163ceb68c2360e01b815230600482015290516001600160a01b0384169163ceb68c2391602480830192600092919082900301818387803b158015611dd857600080fd5b6001546001600160a01b03163314613a00576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b816001600160a01b0316635a47a1a7826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c6c57600080fd5b60c881565b6001546001600160a01b03163314613a9a576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b64012a05f2008111613aea576040805162461bcd60e51b8152602060048201526014602482015273496e76616c6964205f6d6178476173507269636560601b604482015290519081900360640190fd5b816001600160a01b031663d2fa635e826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c6c57600080fd5b6001546001600160a01b0316331480613b585750336000908152600a602052604090205460ff165b613b97576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6008805460ff1916911515919091179055565b68327cb2734119d3b7a9601e1b81565b6001546001600160a01b03163314613c07576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516539b2ba23b7bb60d11b6020808301919091526001600160601b0319606086811b8216602685015285901b16603a8301528251602e818403018152604e9092019092528051910120613c5c8161501d565b604080516001600160a01b0380861682528416602082015280820183905290517f2701a94fd55a560e291f3c54d36580040670d6fde558a77a75d619e38139f7139181900360600190a1505050565b60075481565b6001546001600160a01b0316331480613cd95750336000908152600a602052604090205460ff165b80613cf35750336000908152600b602052604090205460ff165b613d32576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60005b825181101561131857836001600160a01b031663d66b000d848381518110613d5957fe5b6020026020010151848481518110613d6d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015613dbb57600080fd5b505af1158015613dcf573d6000803e3d6000fd5b505060019092019150613d359050565b6001546001600160a01b03163314613e2c576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b62069780811115613e80576040805162461bcd60e51b81526020600482015260196024820152782a34b6b2b637b1b59d1034b73b30b634b2102fb13ab33332b960391b604482015290519081900360640190fd5b6000548111613ec05760405162461bcd60e51b81526004018080602001828103825260248152602001806155ce6024913960400191505060405180910390fd5b600055565b6001546001600160a01b03163314613f12576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b816001600160a01b03166371089f4d826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611c6c57600080fd5b6001546001600160a01b03163314613fae576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60408051631b5a5b9d60e21b6020808301919091526001600160601b0319606087811b8216602485015286901b166038830152604c80830185905283518084039091018152606c9092019092528051910120614009816150c1565b6140128161516d565b61131884848461525b565b6001546001600160a01b03163314806140455750336000908152600a602052604090205460ff165b8061405f5750336000908152600b602052604090205460ff165b61409e576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b826001600160a01b0316633fb8b32383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611dd857600080fd5b6003546001600160a01b031681565b6001546001600160a01b031633148061412c5750336000908152600a602052604090205460ff165b61416b576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b816001600160a01b0316637c2eb9f7826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c6c57600080fd5b6001546001600160a01b03163314614200576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6001546001600160a01b03163314806142535750336000908152600a602052604090205460ff165b614292576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b600854819060ff16156142fe5760408051637c2eb9f760e01b815260006004820181905291516001600160a01b03841692637c2eb9f7926024808201939182900301818387803b1580156142e557600080fd5b505af11580156142f9573d6000803e3d6000fd5b505050505b806001600160a01b03166340eb3802826001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561434657600080fd5b505afa15801561435a573d6000803e3d6000fd5b505050506040513d602081101561437057600080fd5b505160408051630875ab6160e11b815290516001600160a01b038616916310eb56c2916004808301926020929190829003018186803b1580156143b257600080fd5b505afa1580156143c6573d6000803e3d6000fd5b505050506040513d60208110156143dc57600080fd5b505160408051631351ecc160e21b815290516001600160a01b03871691634d47b304916004808301926020929190829003018186803b15801561441e57600080fd5b505afa158015614432573d6000803e3d6000fd5b505050506040513d602081101561444857600080fd5b50516040805163511791c960e11b815290516001600160a01b0388169163a22f2392916004808301926020929190829003018186803b15801561448a57600080fd5b505afa15801561449e573d6000803e3d6000fd5b505050506040513d60208110156144b457600080fd5b50516040805163df73a26760e01b815290516001600160a01b0389169163df73a267916004808301926020929190829003018186803b1580156144f657600080fd5b505afa15801561450a573d6000803e3d6000fd5b505050506040513d602081101561452057600080fd5b5051600754604080516305d349a560e21b815290516001600160a01b038b169163174d2694916004808301926020929190829003018186803b158015612c3357600080fd5b6001546001600160a01b031633148061458d5750336000908152600a602052604090205460ff165b806145a75750336000908152600b602052604090205460ff165b6145e6576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6000869050806001600160a01b03166340eb38028787878787600754886001600160a01b031663174d26946040518163ffffffff1660e01b815260040160206040518083038186803b15801561463b57600080fd5b505afa15801561464f573d6000803e3d6000fd5b505050506040513d602081101561466557600080fd5b50516040805163d9ac422560e01b815290516001600160a01b038c169163d9ac4225916004808301926020929190829003018186803b1580156146a757600080fd5b505afa1580156146bb573d6000803e3d6000fd5b505050506040513d60208110156146d157600080fd5b505160408051639f392eb360e01b815290516001600160a01b038d1691639f392eb3916004808301926020929190829003018186803b15801561471357600080fd5b505afa158015614727573d6000803e3d6000fd5b505050506040513d602081101561473d57600080fd5b5051604080516001600160e01b031960e08d901b168152600481019a909a5260248a019890985260448901969096526064880194909452608487019290925260a486015260c485015260e484015215156101048301525161012480830192600092919082900301818387803b1580156147b557600080fd5b505af11580156147c9573d6000803e3d6000fd5b5050505050505050505050565b6001546001600160a01b03163314614823576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60408051727661756c74536574546f6b656e436f6e66696760681b6020808301919091526001600160601b031960608c811b821660338501528b901b166047830152605b8201899052607b8201889052609b820187905260bb820186905284151560f890811b60db840152841515901b60dc830152825160bd81840301815260dd90920190925280519101206148b88161501d565b604080516001600160a01b03808c1682528a166020820152808201899052606081018890526080810187905260a0810186905284151560c082015283151560e082015290517f3510e9d8245371c6c1061c33781ce16bd0eafa03cd3d0781865036520af4c743918190036101000190a1505050505050505050565b6001546001600160a01b03163314614980576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6040805166617070726f766560c81b6020808301919091526001600160601b0319606087811b8216602785015286901b16603b830152604f80830185905283518084039091018152606f90920190925280519101206149de8161501d565b604080516001600160a01b038087168252851660208201528082018490526060810183905290517f6af9d86ba7407a934e941ed8ae5f779369a88fe8ba2cd1c204185d6f8a8287fd9181900360800190a150505050565b6001546001600160a01b03163314614a82576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b826001600160a01b031663efa10a6e83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611dd857600080fd5b6001546001600160a01b03163314614b26576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b6040805166617070726f766560c81b6020808301919091526001600160601b0319606087811b8216602785015286901b16603b830152604f80830185905283518084039091018152606f9092019092528051910120614b84816150c1565b614b8d8161516d565b836001600160a01b031663095ea7b384846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015614be457600080fd5b505af1158015614bf8573d6000803e3d6000fd5b505050506040513d6020811015611c8057600080fd5b6001546001600160a01b0316331480614c365750336000908152600a602052604090205460ff165b614c75576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b600691909155600755565b60096020526000908152604090205481565b6001546001600160a01b03163314614cdf576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60408051727661756c74536574546f6b656e436f6e66696760681b6020808301919091526001600160601b031960608c811b821660338501528b901b166047830152605b8201899052607b8201889052609b820187905260bb820186905284151560f890811b60db840152841515901b60dc830152825160bd81840301815260dd9092019092528051910120614d74816150c1565b614d7d8161516d565b60408051633c5a6e3560e01b81526001600160a01b038a81166004830152602482018a905260448201899052606482018890526084820187905285151560a483015284151560c48301529151918b1691633c5a6e359160e48082019260009290919082900301818387803b158015614df457600080fd5b505af1158015614e08573d6000803e3d6000fd5b50505050505050505050505050565b6001546001600160a01b03163314614e64576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b604080516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018490529151918416916323b872dd916064808201926020929091908290030181600087803b158015611a4157600080fd5b6001546001600160a01b0316331480614ee55750336000908152600a602052604090205460ff165b80614eff5750336000908152600b602052604090205460ff165b614f3e576040805162461bcd60e51b815260206004820152601360248201526000805160206155f2833981519152604482015290519081900360640190fd5b60005b8151811015614ff457826001600160a01b031663f2555278838381518110614f6557fe5b602090810291909101810151600154604080516001600160e01b031960e087901b1681526001600160a01b03938416600482015292909116602483015251604480830193928290030181600087803b158015614fc057600080fd5b505af1158015614fd4573d6000803e3d6000fd5b505050506040513d6020811015614fea57600080fd5b5050600101614f41565b505050565b60005481565b6001546001600160a01b031681565b6004546001600160a01b031681565b600081815260096020526040902054156150685760405162461bcd60e51b81526004018080602001828103825260228152602001806155656022913960400191505060405180910390fd5b600054615076904290615451565b60008281526009602090815260409182902092909255805183815290517f5fb9c0ecf7b4a28c4c480212e868f9da7f373a2ed4d23498b0be6aadf35242fb929181900390910190a150565b600081815260096020526040902054615121576040805162461bcd60e51b815260206004820152601e60248201527f54696d656c6f636b3a20616374696f6e206e6f74207369676e616c6c65640000604482015290519081900360640190fd5b600081815260096020526040902054421161349f5760405162461bcd60e51b81526004018080602001828103825260248152602001806155aa6024913960400191505060405180910390fd5b6000818152600960205260409020546151c9576040805162461bcd60e51b81526020600482015260196024820152782a34b6b2b637b1b59d1034b73b30b634b2102fb0b1ba34b7b760391b604482015290519081900360640190fd5b600081815260096020908152604080832092909255815183815291517f194ed6dd5e37e2acc44a19455c3f208c4831ee695fe362d9c4ef2d316bc53aec9281900390910190a150565b600061525483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506154a9565b9392505050565b604080516355138f0d60e11b8152306004820152905184916001600160a01b0383169163aa271e1a916024808201926020929091908290030181600087803b1580156152a657600080fd5b505af11580156152ba573d6000803e3d6000fd5b505050506040513d60208110156152d057600080fd5b505161533d576040805163cf456ae760e01b81523060048201526001602482015290516001600160a01b0383169163cf456ae791604480830192600092919082900301818387803b15801561532457600080fd5b505af1158015615338573d6000803e3d6000fd5b505050505b806001600160a01b03166340c10f1984846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561539457600080fd5b505af11580156153a8573d6000803e3d6000fd5b50505050600554846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156153e857600080fd5b505afa1580156153fc573d6000803e3d6000fd5b505050506040513d602081101561541257600080fd5b505111156113185760405162461bcd60e51b81526004018080602001828103825260218152602001806156126021913960400191505060405180910390fd5b600082820183811015615254576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b600081848411156155385760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156154fd5781810151838201526020016154e5565b50505050905090810190601f16801561552a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe54696d656c6f636b3a20696e76616c6964205f66756e64696e6752617465466163746f7254696d656c6f636b3a20616374696f6e20616c7265616479207369676e616c6c656454696d656c6f636b3a20746f6b656e206e6f74207965742077686974656c697374656454696d656c6f636b3a20616374696f6e2074696d65206e6f74207965742070617373656454696d656c6f636b3a206275666665722063616e6e6f742062652064656372656173656454696d656c6f636b3a20666f7262696464656e0000000000000000000000000054696d656c6f636b3a206d6178546f6b656e537570706c7920657863656564656454696d656c6f636b3a20696e76616c6964205f737461626c6546756e64696e6752617465466163746f72a264697066735822122025f1209e0c202e4b3a956154c0820896dca91f5e0b98625c160602ad79ae2f6264736f6c634300060c0033000000000000000000000000111e164336e0d0a2b9554f96a2cca80680fba44900000000000000000000000000000000000000000000000000000000000000050000000000000000000000009c945c3ceee3b7e47dbe1c1973957da25d6e753c0000000000000000000000009c945c3ceee3b7e47dbe1c1973957da25d6e753c000000000000000000000000aec6656c675bff4e891b88119e297f17ac42bbb20000000000000000000000000000000000000000000af5cbf0741b4c95400000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001f4

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

000000000000000000000000111e164336e0d0a2b9554f96a2cca80680fba44900000000000000000000000000000000000000000000000000000000000000050000000000000000000000009c945c3ceee3b7e47dbe1c1973957da25d6e753c0000000000000000000000009c945c3ceee3b7e47dbe1c1973957da25d6e753c000000000000000000000000aec6656c675bff4e891b88119e297f17ac42bbb20000000000000000000000000000000000000000000af5cbf0741b4c95400000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001f4

-----Decoded View---------------
Arg [0] : _admin (address): 0x111e164336e0d0a2b9554f96a2cca80680fba449
Arg [1] : _buffer (uint256): 5
Arg [2] : _tokenManager (address): 0x9c945c3ceee3b7e47dbe1c1973957da25d6e753c
Arg [3] : _mintReceiver (address): 0x9c945c3ceee3b7e47dbe1c1973957da25d6e753c
Arg [4] : _glpManager (address): 0xaec6656c675bff4e891b88119e297f17ac42bbb2
Arg [5] : _maxTokenSupply (uint256): 13250000000000000000000000
Arg [6] : _marginFeeBasisPoints (uint256): 10
Arg [7] : _maxMarginFeeBasisPoints (uint256): 500

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000111e164336e0d0a2b9554f96a2cca80680fba449
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [2] : 0000000000000000000000009c945c3ceee3b7e47dbe1c1973957da25d6e753c
Arg [3] : 0000000000000000000000009c945c3ceee3b7e47dbe1c1973957da25d6e753c
Arg [4] : 000000000000000000000000aec6656c675bff4e891b88119e297f17ac42bbb2
Arg [5] : 0000000000000000000000000000000000000000000af5cbf0741b4c95400000
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [7] : 00000000000000000000000000000000000000000000000000000000000001f4


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading