Contract 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x280dabbf17d67b9b8afe43f2522a75c9098fd4b62d3b8fc487201c2fbba7ccc6Withdraw Fees163454302022-06-29 3:30:248 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000412130978 ETH
0x78944e00aef6db02b83cb494dfdcacedd4d9b95e13e31a8da6cb813f65f8777cWithdraw Fees163453932022-06-29 3:30:248 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000425322781 ETH
0xe6a61a1ec36d9eb9fe650fd216d3c0df6091af5ee1663227746d1ebdfcf2c6ffWithdraw Fees163453622022-06-29 3:30:109 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000479046222 ETH
0x33b7168e32e4a82a4900d30d3effe0a616ab34227830665f8b2b03a58242ae0fWithdraw Fees163453452022-06-29 3:30:109 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000491113315 ETH
0x7c84ffef81a0dc905ae1195e0cc6603889ba0dc95696d5442b21062be056309dWithdraw Fees163453042022-06-29 3:28:4110 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000495169723 ETH
0x4a4fe26c5218a3c49e07885a52c20998ceb7d364f11f876c7364df36901fb0e8Withdraw Fees163452782022-06-29 3:28:4110 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000482979468 ETH
0x9198bc0f16e37835b48afea4de0ab8c3637f17b7794a75e9d18f146d7246b83cWithdraw Fees163452292022-06-29 3:28:4110 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000479154458 ETH
0x7f7385658fee960f8876112ce98586f2412231ada474ba373fb8ac85a8c73f44Withdraw Fees163451792022-06-29 3:28:1910 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000489206705 ETH
0xe5834821e55f52cfa6f7d10571d019ef42b5e3c9495856b330e8c158965e3ea8Withdraw Fees163450452022-06-29 3:28:1910 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000556116747 ETH
0xaf0aff859e6cade777cfdffaf7ca9b4ddc9e60b04e5193c7d2ecf1d3126d414dWithdraw Fees163448702022-06-29 3:27:4311 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000554081331 ETH
0x3e3a67634f03242aef20ed95222bb34989430b9affdf69c8455b82804f63d077Set Token Config159959562022-06-27 3:04:042 days 35 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000225954876 ETH
0xd560ada4c43f8279ad3f050fcb52d37ea70f03bf1c0881979e7e00dfda1f0f01Set Token Config159093552022-06-26 12:28:342 days 15 hrs ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000183098075 ETH
0x55eef44f7307dafd9a75a111832c48f8c7ac3d57e078669df87ad04c23d97276Set Token Config159092382022-06-26 12:28:342 days 15 hrs ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000181507475 ETH
0x19aa98806d2572606734ebf78fed1e8442fb665aa920e282b0aecae9736f8409Set Token Config159092162022-06-26 12:28:342 days 15 hrs ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000183488241 ETH
0x1ec35e99fc9a50ad89aa8cd0c14629a7a46b0011ac283dd8b767a959bb9d1b89Set Token Config159092002022-06-26 12:28:342 days 15 hrs ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000182291156 ETH
0x8cd4833e4b073952a0a576a17d2fa67c0a8b731a98895893500bb9dcc5df06b4Withdraw Fees153183482022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000223481411 ETH
0x7bfe8fe3e7a796b4edbe58917c81a7598eca0623beca19fb7bb6d3827173acecWithdraw Fees153183312022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000224183409 ETH
0xfe56fc366506e3fd0340559ad5552ea10ea5b6abf960d86903f993272a8acc6fWithdraw Fees153183142022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000224594534 ETH
0x39a31105ae47e7335c35a5a3f237571c666e209bb96c65addbd0cfe32f00e7f5Withdraw Fees153182972022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000224750533 ETH
0x990ba8731a94e5dc0a0995d084554fd45751f8160641f30ecfc46e24f2b75b23Withdraw Fees153182822022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000224748096 ETH
0x8f12cd82bafa94066137abaf378221a2621289e41030cd6e0d1ff486da373e25Withdraw Fees153182672022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000224603065 ETH
0xf4fe10cf5517debc7a829268c98725cafec1ce06f895f163502d39e9856f7d8aWithdraw Fees153182512022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000223983129 ETH
0x0c26f51556b4d551018b0f1bfd149fdf24461bd627f0403708771872d5080cbaWithdraw Fees153182232022-06-22 3:01:547 days 37 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000224190316 ETH
0xb519170d88ea3adb2f7ae83301ceae7113da3ae33018d6f32303a0dd1a07896dSet Token Config150469732022-06-19 2:57:5910 days 41 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000350608695 ETH
0xa0e9c68f749174393e692bf00e63550e0f3ce528373bc29516f65aad4d64ff95Set Token Config150467652022-06-19 2:53:2210 days 45 mins ago0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b IN  0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH0.000352929376 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x3d6ba331e3d9702c5e8a8d254e5d8a285f223aba 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x3d6ba331e3d9702c5e8a8d254e5d8a285f223aba 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x3d6ba331e3d9702c5e8a8d254e5d8a285f223aba 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x3d6ba331e3d9702c5e8a8d254e5d8a285f223aba 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d90 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
0x7ea1d84d5022b010383124628e609f19e900433ed53de8377827117b59f4abbd163467972022-06-29 3:38:4038 secs ago 0x1e0fd2cc7329ddf6bda35f85579e1bc2996db0d9 0x489ee077994b6658eafa855c308275ead8097c4a0 ETH
[ 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 : 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/IVaultPriceFeed.sol";
import "../core/interfaces/IRouter.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 rewardManager;
    address public mintReceiver;
    uint256 public maxTokenSupply;

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

    mapping (bytes32 => uint256) public pendingActions;
    mapping (address => bool) public excludedTokens;

    mapping (address => bool) public isHandler;

    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 SignalAddPlugin(address router, address plugin, 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 SignalPriceFeedSetTokenConfig(
        address vaultPriceFeed,
        address token,
        address priceFeed,
        uint256 priceDecimals,
        bool isStrictStable
    );
    event ClearAction(bytes32 action);

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

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

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

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

    constructor(
        address _admin,
        uint256 _buffer,
        address _rewardManager,
        address _tokenManager,
        address _mintReceiver,
        uint256 _maxTokenSupply,
        uint256 _marginFeeBasisPoints,
        uint256 _maxMarginFeeBasisPoints
    ) public {
        require(_buffer <= MAX_BUFFER, "Timelock: invalid _buffer");
        admin = _admin;
        buffer = _buffer;
        rewardManager = _rewardManager;
        tokenManager = _tokenManager;
        mintReceiver = _mintReceiver;
        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 setBuffer(uint256 _buffer) external onlyAdmin {
        require(_buffer <= MAX_BUFFER, "Timelock: invalid _buffer");
        require(_buffer > buffer, "Timelock: buffer cannot be decreased");
        buffer = _buffer;
    }

    function mint(address _token, uint256 _amount) external onlyAdmin {
        _mint(_token, mintReceiver, _amount);
    }

    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 onlyAdmin {
        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 onlyAdmin {
        shouldToggleIsLeverageEnabled = _shouldToggleIsLeverageEnabled;
    }

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

    // 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 onlyAdmin {
        marginFeeBasisPoints = _marginFeeBasisPoints;

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

    function enableLeverage(address _vault) external override onlyAdminOrHandler {
        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 onlyAdminOrHandler {
        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 setTokenConfig(
        address _vault,
        address _token,
        uint256 _tokenWeight,
        uint256 _minProfitBps,
        uint256 _maxUsdgAmount,
        uint256 _bufferAmount,
        uint256 _usdgAmount
    ) external onlyAdmin {
        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 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 setIsAmmEnabled(address _priceFeed, bool _isEnabled) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setIsAmmEnabled(_isEnabled);
    }

    function setIsSecondaryPriceEnabled(address _priceFeed, bool _isEnabled) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setIsSecondaryPriceEnabled(_isEnabled);
    }

    function setMaxStrictPriceDeviation(address _priceFeed, uint256 _maxStrictPriceDeviation) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setMaxStrictPriceDeviation(_maxStrictPriceDeviation);
    }

    function setUseV2Pricing(address _priceFeed, bool _useV2Pricing) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setUseV2Pricing(_useV2Pricing);
    }

    function setAdjustment(address _priceFeed, address _token, bool _isAdditive, uint256 _adjustmentBps) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setAdjustment(_token, _isAdditive, _adjustmentBps);
    }

    function setSpreadBasisPoints(address _priceFeed, address _token, uint256 _spreadBasisPoints) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setSpreadBasisPoints(_token, _spreadBasisPoints);
    }

    function setSpreadThresholdBasisPoints(address _priceFeed, uint256 _spreadThresholdBasisPoints) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setSpreadThresholdBasisPoints(_spreadThresholdBasisPoints);
    }

    function setFavorPrimaryPrice(address _priceFeed, bool _favorPrimaryPrice) external onlyAdmin {
        IVaultPriceFeed(_priceFeed).setFavorPrimaryPrice(_favorPrimaryPrice);
    }

    function setPriceSampleSpace(address _priceFeed,uint256 _priceSampleSpace) external onlyAdmin {
        require(_priceSampleSpace <= 5, "Invalid _priceSampleSpace");
        IVaultPriceFeed(_priceFeed).setPriceSampleSpace(_priceSampleSpace);
    }

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

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

    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 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 addExcludedToken(address _token) external onlyAdmin {
        excludedTokens[_token] = true;
    }

    function setInPrivateTransferMode(address _token, bool _inPrivateTransferMode) external onlyAdmin {
        if (excludedTokens[_token]) {
            // excludedTokens can only have their transfers enabled
            require(_inPrivateTransferMode == false, "Timelock: invalid _inPrivateTransferMode");
        }

        IBaseToken(_token).setInPrivateTransferMode(_inPrivateTransferMode);
    }

    function managedSetHandler(address _target, address _handler, bool _isActive) external override onlyRewardManager {
        IHandlerTarget(_target).setHandler(_handler, _isActive);
    }

    function managedSetMinter(address _target, address _minter, bool _isActive) external override onlyRewardManager {
        IMintable(_target).setMinter(_minter, _isActive);
    }

    function batchSetBonusRewards(address _vester, address[] memory _accounts, uint256[] memory _amounts) external onlyAdmin {
        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 signalAddPlugin(address _router, address _plugin) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("addPlugin", _router, _plugin));
        _setPendingAction(action);
        emit SignalAddPlugin(_router, _plugin, action);
    }

    function addPlugin(address _router, address _plugin) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked("addPlugin", _router, _plugin));
        _validateAction(action);
        _clearAction(action);
        IRouter(_router).addPlugin(_plugin);
    }

    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 signalPriceFeedSetTokenConfig(
        address _vaultPriceFeed,
        address _token,
        address _priceFeed,
        uint256 _priceDecimals,
        bool _isStrictStable
    ) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked(
            "priceFeedSetTokenConfig",
            _vaultPriceFeed,
            _token,
            _priceFeed,
            _priceDecimals,
            _isStrictStable
        ));

        _setPendingAction(action);

        emit SignalPriceFeedSetTokenConfig(
            _vaultPriceFeed,
            _token,
            _priceFeed,
            _priceDecimals,
            _isStrictStable
        );
    }

    function priceFeedSetTokenConfig(
        address _vaultPriceFeed,
        address _token,
        address _priceFeed,
        uint256 _priceDecimals,
        bool _isStrictStable
    ) external onlyAdmin {
        bytes32 action = keccak256(abi.encodePacked(
            "priceFeedSetTokenConfig",
            _vaultPriceFeed,
            _token,
            _priceFeed,
            _priceDecimals,
            _isStrictStable
        ));

        _validateAction(action);
        _clearAction(action);

        IVaultPriceFeed(_vaultPriceFeed).setTokenConfig(
            _token,
            _priceFeed,
            _priceDecimals,
            _isStrictStable
        );
    }

    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 {
        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 2 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 3 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;
    function managedSetHandler(address _target, address _handler, bool _isActive) external;
    function managedSetMinter(address _target, address _minter, bool _isActive) external;
}

File 4 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 5 of 16 : IAdmin.sol
//SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

File 6 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 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 7 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 8 of 16 : IVaultPriceFeed.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IVaultPriceFeed {
    function adjustmentBasisPoints(address _token) external view returns (uint256);
    function isAdjustmentAdditive(address _token) external view returns (bool);
    function setAdjustment(address _token, bool _isAdditive, uint256 _adjustmentBps) external;
    function setUseV2Pricing(bool _useV2Pricing) external;
    function setIsAmmEnabled(bool _isEnabled) external;
    function setIsSecondaryPriceEnabled(bool _isEnabled) external;
    function setSpreadBasisPoints(address _token, uint256 _spreadBasisPoints) external;
    function setSpreadThresholdBasisPoints(uint256 _spreadThresholdBasisPoints) external;
    function setFavorPrimaryPrice(bool _favorPrimaryPrice) external;
    function setPriceSampleSpace(uint256 _priceSampleSpace) external;
    function setMaxStrictPriceDeviation(uint256 _maxStrictPriceDeviation) external;
    function getPrice(address _token, bool _maximise, bool _includeAmmPrice, bool _useSwapPricing) external view returns (uint256);
    function getAmmPrice(address _token) external view returns (uint256);
    function getPrimaryPrice(address _token, bool _maximise) external view returns (uint256);
    function setTokenConfig(
        address _token,
        address _priceFeed,
        uint256 _priceDecimals,
        bool _isStrictStable
    ) external;
}

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

pragma solidity 0.6.12;

interface IRouter {
    function addPlugin(address _plugin) external;
    function pluginTransfer(address _token, address _account, address _receiver, uint256 _amount) external;
    function pluginIncreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _sizeDelta, bool _isLong) external;
    function pluginDecreasePosition(address _account, address _collateralToken, address _indexToken, uint256 _collateralDelta, uint256 _sizeDelta, bool _isLong, address _receiver) external returns (uint256);
    function swap(address[] memory _path, uint256 _amountIn, uint256 _minOut, address _receiver) external;
}

File 10 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;
}

File 11 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 12 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 13 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 14 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 15 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 16 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);
}

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":"_rewardManager","type":"address"},{"internalType":"address","name":"_tokenManager","type":"address"},{"internalType":"address","name":"_mintReceiver","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":"router","type":"address"},{"indexed":false,"internalType":"address","name":"plugin","type":"address"},{"indexed":false,"internalType":"bytes32","name":"action","type":"bytes32"}],"name":"SignalAddPlugin","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":"vaultPriceFeed","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"priceFeed","type":"address"},{"indexed":false,"internalType":"uint256","name":"priceDecimals","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isStrictStable","type":"bool"}],"name":"SignalPriceFeedSetTokenConfig","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":[{"internalType":"address","name":"_token","type":"address"}],"name":"addExcludedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_plugin","type":"address"}],"name":"addPlugin","outputs":[],"stateMutability":"nonpayable","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":[],"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":[{"internalType":"address","name":"","type":"address"}],"name":"excludedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHandler","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_handler","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"managedSetHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"managedSetMinter","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"_vaultPriceFeed","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_priceDecimals","type":"uint256"},{"internalType":"bool","name":"_isStrictStable","type":"bool"}],"name":"priceFeedSetTokenConfig","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":"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":[],"name":"rewardManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isAdditive","type":"bool"},{"internalType":"uint256","name":"_adjustmentBps","type":"uint256"}],"name":"setAdjustment","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":"_priceFeed","type":"address"},{"internalType":"bool","name":"_favorPrimaryPrice","type":"bool"}],"name":"setFavorPrimaryPrice","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":"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":"_priceFeed","type":"address"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setIsAmmEnabled","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":"_priceFeed","type":"address"},{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setIsSecondaryPriceEnabled","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":"_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":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_maxStrictPriceDeviation","type":"uint256"}],"name":"setMaxStrictPriceDeviation","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":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_priceSampleSpace","type":"uint256"}],"name":"setPriceSampleSpace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_shouldToggleIsLeverageEnabled","type":"bool"}],"name":"setShouldToggleIsLeverageEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_spreadBasisPoints","type":"uint256"}],"name":"setSpreadBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_spreadThresholdBasisPoints","type":"uint256"}],"name":"setSpreadThresholdBasisPoints","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":"_priceFeed","type":"address"},{"internalType":"bool","name":"_useV2Pricing","type":"bool"}],"name":"setUseV2Pricing","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":"_router","type":"address"},{"internalType":"address","name":"_plugin","type":"address"}],"name":"signalAddPlugin","outputs":[],"stateMutability":"nonpayable","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":"_vaultPriceFeed","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_priceDecimals","type":"uint256"},{"internalType":"bool","name":"_isStrictStable","type":"bool"}],"name":"signalPriceFeedSetTokenConfig","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":"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"}]

60806040523480156200001157600080fd5b506040516200562c3803806200562c83398181016040526101008110156200003857600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015195969495939492939192909162069780871115620000c4576040805162461bcd60e51b815260206004820152601960248201527f54696d656c6f636b3a20696e76616c6964205f62756666657200000000000000604482015290519081900360640190fd5b600180546001600160a01b03998a166001600160a01b03199182161790915560009790975560038054968916968816969096179095556002805494881694871694909417909355600480549290961691909416179093556005919091556006919091556007556154f2806200013a6000396000f3fe608060405234801561001057600080fd5b506004361061034d5760003560e01c80629a698e146103525780630191c2371461048757806309cc9a08146104bd5780630e0dc426146104f35780630e9587f3146105415780630f4ef8a6146105795780631154e8081461059d578063117cf204146105d557806314aea30714610603578063185051c11461062f57806321754d9e1461065d57806321bd059214610699578063227f03eb146106c757806323aaad12146106ff57806324ccbe301461071b578063268959e5146107535780632877f4c3146107815780632965c8c7146107ad578063296b07e5146107db5780632a709b14146108195780632ba3725a14610821578063318bc6891461083b5780633335e38a14610843578063384cae731461088757806340c10f19146108cb578063454ffa46146108f757806346ea87af1461092557806347de43e21461094b5780634cd23f3b1461098357806350f7c204146109bf57806351a6de0d146109c757806353b6bfdd146109f557806355ef139514610a235780635843752f14610a515780635dae884114610a7f57806361d0756914610aa557806369623ae214610aad5780636d63c1d014610adb5780636e5227d414610b01578063704b6c0214610b6257806370ac0a9314610b8857806376e1128614610bbe578063781cc3d314610bec5780637b6f775a14610c095780637b9fb22714610c3557806380894d6214610c6357806386803c7214610c915780638a39735a14610cbf5780638bf22c4614610cc75780638e34c98f14610cf357806395082d2514610d12578063996a7a1e14610d1a578063996e2bc914610d48578063a0a316a214610d50578063adc7ea3714610d7c578063bc476dfd14610d99578063bc8a8ab914610dc7578063c7bb26a014610dfd578063cd2b123014610e05578063d3c87bbb14610e33578063d63a352e14610e59578063d7c2e92f14610e91578063da29012014610eb7578063db1c844114610eef578063dce6e18d14610f48578063df3a66d914610f7e578063e1f21c6714610fb4578063e21b459114610fea578063e30569e51461100d578063e3cbeb0f1461102a578063e4652f4914611083578063e7b0a3a1146110b9578063edaafe20146110ef578063f851a440146110f7575b600080fd5b6104856004803603606081101561036857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561039257600080fd5b8201836020820111156103a457600080fd5b803590602001918460208302840111600160201b831117156103c557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561041457600080fd5b82018360208201111561042657600080fd5b803590602001918460208302840111600160201b8311171561044757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506110ff945050505050565b005b6104856004803603606081101561049d57600080fd5b506001600160a01b0381358116916020810135909116906040013561133c565b610485600480360360608110156104d357600080fd5b506001600160a01b0381358116916020810135909116906040013561143a565b610485600480360360e081101561050957600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060c00135611539565b6104856004803603606081101561055757600080fd5b506001600160a01b03813581169160208101358216916040909101351661197e565b610581611a5c565b604080516001600160a01b039092168252519081900360200190f35b610485600480360360608110156105b357600080fd5b506001600160a01b038135811691602081013590911690604001351515611a6b565b610485600480360360408110156105eb57600080fd5b506001600160a01b0381351690602001351515611b9c565b6104856004803603604081101561061957600080fd5b506001600160a01b038135169060200135611c4d565b6104856004803603604081101561064557600080fd5b506001600160a01b0381351690602001351515611ce0565b6104856004803603608081101561067357600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135611d58565b610485600480360360408110156106af57600080fd5b506001600160a01b0381351690602001351515611ea3565b610485600480360360808110156106dd57600080fd5b506001600160a01b038135169060208101359060408101359060600135611f38565b610707612059565b604080519115158252519081900360200190f35b6104856004803603606081101561073157600080fd5b506001600160a01b038135811691602081013590911690604001351515612062565b6104856004803603604081101561076957600080fd5b506001600160a01b038135811691602001351661216b565b6104856004803603604081101561079757600080fd5b506001600160a01b038135169060200135612207565b610485600480360360408110156107c357600080fd5b506001600160a01b03813516906020013515156122ec565b610485600480360360808110156107f157600080fd5b506001600160a01b038135811691602081013590911690604081013515159060600135612381565b61058161242f565b61082961243e565b60408051918252519081900360200190f35b610829612445565b610485600480360360a081101561085957600080fd5b506001600160a01b03813581169160208101358216916040820135169060608101359060800135151561244b565b610485600480360360a081101561089d57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060810135906080013515156125a5565b610485600480360360408110156108e157600080fd5b506001600160a01b0381351690602001356126d6565b6104856004803603604081101561090d57600080fd5b506001600160a01b038135169060200135151561273f565b6107076004803603602081101561093b57600080fd5b50356001600160a01b03166127d4565b6104856004803603606081101561096157600080fd5b506001600160a01b0381358116916020810135909116906040013515156127e9565b6104856004803603608081101561099957600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356128ac565b6108296129c7565b610485600480360360408110156109dd57600080fd5b506001600160a01b03813581169160200135166129cd565b61048560048036036040811015610a0b57600080fd5b506001600160a01b0381358116916020013516612ac7565b61048560048036036040811015610a3957600080fd5b506001600160a01b0381358116916020013516612bbb565b61048560048036036040811015610a6757600080fd5b506001600160a01b0381351690602001351515612cb1565b61070760048036036020811015610a9557600080fd5b50356001600160a01b0316612d46565b610829612d5b565b61048560048036036040811015610ac357600080fd5b506001600160a01b0381358116916020013516612d62565b61048560048036036020811015610af157600080fd5b50356001600160a01b0316612e5f565b6104856004803603610140811015610b1857600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c08101359060e0810135906101008101359061012001351515613315565b61048560048036036020811015610b7857600080fd5b50356001600160a01b0316613411565b61048560048036036060811015610b9e57600080fd5b506001600160a01b03813581169160208101359091169060400135613480565b61048560048036036040811015610bd457600080fd5b506001600160a01b0381358116916020013516613880565b61048560048036036020811015610c0257600080fd5b503561397f565b61048560048036036040811015610c1f57600080fd5b506001600160a01b0381351690602001356139d8565b61048560048036036040811015610c4b57600080fd5b506001600160a01b0381351690602001351515613ac2565b61048560048036036040811015610c7957600080fd5b506001600160a01b0381358116916020013516613b57565b61048560048036036040811015610ca757600080fd5b506001600160a01b0381351690602001351515613c4d565b610829613d40565b61048560048036036040811015610cdd57600080fd5b506001600160a01b038135169060200135613d45565b61048560048036036020811015610d0957600080fd5b50351515613e28565b610829613e88565b61048560048036036040811015610d3057600080fd5b506001600160a01b0381358116916020013516613e98565b610829613f89565b61048560048036036040811015610d6657600080fd5b506001600160a01b038135169060200135613f8f565b61048560048036036020811015610d9257600080fd5b5035614022565b61048560048036036040811015610daf57600080fd5b506001600160a01b0381358116916020013516614108565b61048560048036036060811015610ddd57600080fd5b506001600160a01b038135811691602081013590911690604001356141a4565b610581614260565b61048560048036036040811015610e1b57600080fd5b506001600160a01b038135169060200135151561426f565b61048560048036036020811015610e4957600080fd5b50356001600160a01b031661431e565b61048560048036036060811015610e6f57600080fd5b506001600160a01b038135811691602081013590911690604001351515614658565b61048560048036036020811015610ea757600080fd5b50356001600160a01b03166146fe565b61048560048036036060811015610ecd57600080fd5b506001600160a01b03813581169160208101359091169060400135151561476f565b6104856004803603610100811015610f0657600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060c081013515159060e001351515614815565b61048560048036036060811015610f5e57600080fd5b506001600160a01b03813581169160208101359091169060400135614972565b61048560048036036060811015610f9457600080fd5b506001600160a01b03813581169160208101359091169060400135614a74565b61048560048036036060811015610fca57600080fd5b506001600160a01b03813581169160208101359091169060400135614b18565b6104856004803603604081101561100057600080fd5b5080359060200135614c4d565b6108296004803603602081101561102357600080fd5b5035614ca5565b610485600480360361010081101561104157600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060c081013515159060e001351515614cb7565b6104856004803603606081101561109957600080fd5b506001600160a01b03813581169160208101359091169060400135614e3c565b610485600480360360608110156110cf57600080fd5b506001600160a01b03813581169160208101359091169060400135614ee2565b610829614f86565b610581614f8c565b6001546001600160a01b0316331461114c576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b805182511461119e576040805162461bcd60e51b815260206004820152601960248201527854696d656c6f636b3a20696e76616c6964206c656e6774687360381b604482015290519081900360640190fd5b604080516346ea87af60e01b815230600482015290516001600160a01b038516916346ea87af9160248083019260209291908290030181600087803b1580156111e657600080fd5b505af11580156111fa573d6000803e3d6000fd5b505050506040513d602081101561121057600080fd5b505161127d5760408051639cb7de4b60e01b81523060048201526001602482015290516001600160a01b03851691639cb7de4b91604480830192600092919082900301818387803b15801561126457600080fd5b505af1158015611278573d6000803e3d6000fd5b505050505b60005b825181101561133657600083828151811061129757fe5b6020026020010151905060008383815181106112af57fe5b60200260200101519050856001600160a01b03166341f2272483836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561131057600080fd5b505af1158015611324573d6000803e3d6000fd5b50506001909401935061128092505050565b50505050565b6001546001600160a01b03163314611389576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516972656465656d5573646760b01b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e830152605280830185905283518084039091018152607290920190925280519101206113ea81614f9b565b604080516001600160a01b0380871682528516602082015280820184905290517fe6bd553b6ef21f3a22ebc877b3aaedc30fe15826b8156d4e8c8b373ebf11d78b9181900360600190a150505050565b6001546001600160a01b03163314611487576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60408051631b5a5b9d60e21b6020808301919091526001600160601b0319606087811b8216602485015286901b166038830152604c80830185905283518084039091018152606c90920190925280519101206114e281614f9b565b604080516001600160a01b038087168252851660208201528082018490526060810183905290517f23d37bec99db82564427c9bbfe48ad7434bccf413a40fd357fb838c90a0d68289181900360800190a150505050565b6001546001600160a01b03163314611586576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6101f48411156115dd576040805162461bcd60e51b815260206004820152601f60248201527f54696d656c6f636b3a20696e76616c6964205f6d696e50726f66697442707300604482015290519081900360640190fd5b60408051630daf9c2160e41b81526001600160a01b0388811660048301529151899283169163daf9c210916024808301926020929190829003018186803b15801561162757600080fd5b505afa15801561163b573d6000803e3d6000fd5b505050506040513d602081101561165157600080fd5b505161168e5760405162461bcd60e51b81526004018080602001828103825260238152602001806153bf6023913960400191505060405180910390fd5b6000816001600160a01b0316638ee573ac896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156116dd57600080fd5b505afa1580156116f1573d6000803e3d6000fd5b505050506040513d602081101561170757600080fd5b5051604080516342b60b0360e01b81526001600160a01b038b811660048301529151929350600092918516916342b60b0391602480820192602092909190829003018186803b15801561175957600080fd5b505afa15801561176d573d6000803e3d6000fd5b505050506040513d602081101561178357600080fd5b50516040805163db3555fb60e01b81526001600160a01b038c8116600483015291519293506000929186169163db3555fb91602480820192602092909190829003018186803b1580156117d557600080fd5b505afa1580156117e9573d6000803e3d6000fd5b505050506040513d60208110156117ff57600080fd5b505160408051633c5a6e3560e01b81526001600160a01b038d8116600483015260248201879052604482018d9052606482018c9052608482018b905285151560a483015283151560c48301529151929350908d1691633c5a6e359160e48082019260009290919082900301818387803b15801561187b57600080fd5b505af115801561188f573d6000803e3d6000fd5b505050508a6001600160a01b0316638585f4d28b886040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156118ea57600080fd5b505af11580156118fe573d6000803e3d6000fd5b505050508a6001600160a01b031663d66b000d8b876040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561195957600080fd5b505af115801561196d573d6000803e3d6000fd5b505050505050505050505050505050565b6001546001600160a01b031633146119cb576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b826001600160a01b031663f255527883836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b158015611a2b57600080fd5b505af1158015611a3f573d6000803e3d6000fd5b505050506040513d6020811015611a5557600080fd5b5050505050565b6003546001600160a01b031681565b6001546001600160a01b03163314611ab8576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516939b2ba2430b7323632b960b11b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e83015283151560f81b60528301528251603381840301815260539092019092528051910120611b1c81614ff4565b611b25816150a0565b836001600160a01b0316639cb7de4b84846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001821515815260200192505050600060405180830381600087803b158015611b7e57600080fd5b505af1158015611b92573d6000803e3d6000fd5b5050505050505050565b6001546001600160a01b03163314611be9576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b03166330455ede826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b505af1158015611c45573d6000803e3d6000fd5b505050505050565b6001546001600160a01b03163314611c9a576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b031663b731dd87826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314611d2d576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6001546001600160a01b03163314611da5576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516c3bb4ba34323930bbaa37b5b2b760991b6020808301919091526001600160601b0319606088811b8216602d85015287811b8216604185015286901b16605583015260698083018590528351808403909101815260899092019092528051910120611e1381614ff4565b611e1c816150a0565b846001600160a01b03166301e336678585856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611e8457600080fd5b505af1158015611e98573d6000803e3d6000fd5b505050505050505050565b6001546001600160a01b03163314611ef0576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b031663f07bbf77826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314611f85576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60c88210611fc45760405162461bcd60e51b815260040180806020018281038252602481526020018061539b6024913960400191505060405180910390fd5b60c881106120035760405162461bcd60e51b815260040180806020018281038252602a815260200180615493602a913960400191505060405180910390fd5b836001600160a01b0316638a27d4688484846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611b7e57600080fd5b60085460ff1681565b6001546001600160a01b031633146120af576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516939b2ba2430b7323632b960b11b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e83015283151560f81b6052830152825160338184030181526053909201909252805191012061211381614f9b565b604080516001600160a01b03808716825285166020820152831515818301526060810183905290517f1929c4e13b0dbbad7856b9ce1fc9dca98c7bf7cedd56e22c04dd60ad1d34fe4b9181900360800190a150505050565b6001546001600160a01b031633146121b8576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b0316631785f53c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314612254576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60058111156122a6576040805162461bcd60e51b8152602060048201526019602482015278496e76616c6964205f707269636553616d706c65537061636560381b604482015290519081900360640190fd5b816001600160a01b0316632fa03b8f826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314612339576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b031663eb1c92a9826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b031633146123ce576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b836001600160a01b031663d694376c8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183151581526020018281526020019350505050600060405180830381600087803b158015611b7e57600080fd5b6002546001600160a01b031681565b6207a12081565b60065481565b6001546001600160a01b03163314612498576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6040805176707269636546656564536574546f6b656e436f6e66696760481b6020808301919091526001600160601b0319606089811b8216603785015288811b8216604b85015287901b16605f8301526073820185905283151560f81b6093830152825160748184030181526094909201909252805191012061251a81614ff4565b612523816150a0565b60408051634b9ade4760e01b81526001600160a01b0387811660048301528681166024830152604482018690528415156064830152915191881691634b9ade479160848082019260009290919082900301818387803b15801561258557600080fd5b505af1158015612599573d6000803e3d6000fd5b50505050505050505050565b6001546001600160a01b031633146125f2576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6040805176707269636546656564536574546f6b656e436f6e66696760481b6020808301919091526001600160601b0319606089811b8216603785015288811b8216604b85015287901b16605f8301526073820185905283151560f81b6093830152825160748184030181526094909201909252805191012061267481614f9b565b604080516001600160a01b038089168252808816602083015286168183015260608101859052831515608082015290517f1b2ddf357ae016d8c127dcd3a73c34744fdeaeeb4b7ef1e04490cebf7f4816fe9181900360a00190a1505050505050565b6001546001600160a01b03163314612723576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60045461273b9083906001600160a01b031683615145565b5050565b6001546001600160a01b0316331461278c576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b031663fd34ec40826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b600b6020526000908152604090205460ff1681565b6001546001600160a01b03163314612836576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b826001600160a01b0316634453a37483836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001821515815260200192505050600060405180830381600087803b15801561288f57600080fd5b505af11580156128a3573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b031633146128f9576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516c3bb4ba34323930bbaa37b5b2b760991b6020808301919091526001600160601b0319606088811b8216602d85015287811b8216604185015286901b1660558301526069808301859052835180840390910181526089909201909252805191012061296781614f9b565b604080516001600160a01b0380881682528087166020830152851681830152606081018490526080810183905290517f9ed7b0f07a9eed51079fab67f6d0f141f167f5b17fdb5a23282280e15fcafed39181900360a00190a15050505050565b60055481565b6001546001600160a01b03163314612a1a576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516539b2ba23b7bb60d11b6020808301919091526001600160601b0319606086811b8216602685015285901b16603a8301528251602e818403018152604e9092019092528051910120612a6f81614ff4565b612a78816150a0565b826001600160a01b031663cfad57a2836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561288f57600080fd5b6001546001600160a01b03163314612b14576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516830b23228363ab3b4b760b91b6020808301919091526001600160601b0319606086811b8216602985015285901b16603d8301528251603181840301815260519092019092528051910120612b6c81614f9b565b604080516001600160a01b0380861682528416602082015280820183905290517fc0ad20f21e0e6b9c02a7ecfb229e39b214cb1914a4d6f202e7f9ec7ffb9445f69181900360600190a1505050565b6001546001600160a01b03163314612c08576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6001600160a01b038216301415612c62576040805162461bcd60e51b8152602060048201526019602482015278151a5b595b1bd8dace881a5b9d985b1a590817dd185c99d95d603a1b604482015290519081900360640190fd5b816001600160a01b031663704b6c02826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314612cfe576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b0316639917dc74826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b600a6020526000908152604090205460ff1681565b6206978081565b6001546001600160a01b03163314612daf576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516830b23228363ab3b4b760b91b6020808301919091526001600160601b0319606086811b8216602985015285901b16603d8301528251603181840301815260519092019092528051910120612e0781614ff4565b612e10816150a0565b826001600160a01b031663d8867fc8836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561288f57600080fd5b6001546001600160a01b0316331480612e875750336000908152600b602052604090205460ff165b612ec6576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b600854819060ff1615612f345760408051637c2eb9f760e01b81526001600482015290516001600160a01b03831691637c2eb9f791602480830192600092919082900301818387803b158015612f1b57600080fd5b505af1158015612f2f573d6000803e3d6000fd5b505050505b806001600160a01b03166340eb3802826001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f7c57600080fd5b505afa158015612f90573d6000803e3d6000fd5b505050506040513d6020811015612fa657600080fd5b505160408051630875ab6160e11b815290516001600160a01b038616916310eb56c2916004808301926020929190829003018186803b158015612fe857600080fd5b505afa158015612ffc573d6000803e3d6000fd5b505050506040513d602081101561301257600080fd5b505160408051631351ecc160e21b815290516001600160a01b03871691634d47b304916004808301926020929190829003018186803b15801561305457600080fd5b505afa158015613068573d6000803e3d6000fd5b505050506040513d602081101561307e57600080fd5b50516040805163511791c960e11b815290516001600160a01b0388169163a22f2392916004808301926020929190829003018186803b1580156130c057600080fd5b505afa1580156130d4573d6000803e3d6000fd5b505050506040513d60208110156130ea57600080fd5b50516040805163df73a26760e01b815290516001600160a01b0389169163df73a267916004808301926020929190829003018186803b15801561312c57600080fd5b505afa158015613140573d6000803e3d6000fd5b505050506040513d602081101561315657600080fd5b5051600654604080516305d349a560e21b815290516001600160a01b038b169163174d2694916004808301926020929190829003018186803b15801561319b57600080fd5b505afa1580156131af573d6000803e3d6000fd5b505050506040513d60208110156131c557600080fd5b50516040805163d9ac422560e01b815290516001600160a01b038c169163d9ac4225916004808301926020929190829003018186803b15801561320757600080fd5b505afa15801561321b573d6000803e3d6000fd5b505050506040513d602081101561323157600080fd5b505160408051639f392eb360e01b815290516001600160a01b038d1691639f392eb3916004808301926020929190829003018186803b15801561327357600080fd5b505afa158015613287573d6000803e3d6000fd5b505050506040513d602081101561329d57600080fd5b5051604080516001600160e01b031960e08d901b168152600481019a909a5260248a019890985260448901969096526064880194909452608487019290925260a486015260c485015260e484015215156101048301525161012480830192600092919082900301818387803b158015611c3157600080fd5b6001546001600160a01b03163314613362576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6006849055600754604080516320759c0160e11b8152600481018c9052602481018b9052604481018a9052606481018990526084810188905260a481019290925260c4820185905260e48201849052821515610104830152516001600160a01b038c16916340eb38029161012480830192600092919082900301818387803b1580156133ed57600080fd5b505af1158015613401573d6000803e3d6000fd5b5050505050505050505050505050565b6002546001600160a01b0316331461345e576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146134cd576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516972656465656d5573646760b01b6020808301919091526001600160601b0319606087811b8216602a85015286901b16603e8301526052808301859052835180840390910181526072909201909252805191012061352e81614ff4565b613537816150a0565b6000846001600160a01b031663f5b91b7b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561357257600080fd5b505afa158015613586573d6000803e3d6000fd5b505050506040513d602081101561359c57600080fd5b5051604080516352f4877760e11b81523060048201526001602482015290519192506001600160a01b0387169163a5e90eee9160448082019260009290919082900301818387803b1580156135f057600080fd5b505af1158015613604573d6000803e3d6000fd5b5050604080516312b5ad0160e11b815230600482015290516001600160a01b038516935063256b5a029250602480830192600092919082900301818387803b15801561364f57600080fd5b505af1158015613663573d6000803e3d6000fd5b5050604080516340c10f1960e01b81523060048201526024810187905290516001600160a01b03851693506340c10f199250604480830192600092919082900301818387803b1580156136b557600080fd5b505af11580156136c9573d6000803e3d6000fd5b50505050806001600160a01b031663a9059cbb86856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561372457600080fd5b505af1158015613738573d6000803e3d6000fd5b505050506040513d602081101561374e57600080fd5b50506004805460408051630711e61960e41b81526001600160a01b03888116948201949094529183166024830152519187169163711e6190916044808201926020929091908290030181600087803b1580156137a957600080fd5b505af11580156137bd573d6000803e3d6000fd5b505050506040513d60208110156137d357600080fd5b5050604080516352f4877760e11b815230600482015260006024820181905291516001600160a01b0388169263a5e90eee926044808201939182900301818387803b15801561382157600080fd5b505af1158015613835573d6000803e3d6000fd5b50506040805163ceb68c2360e01b815230600482015290516001600160a01b038516935063ceb68c239250602480830192600092919082900301818387803b158015611e8457600080fd5b6001546001600160a01b031633146138cd576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516b1cd95d141c9a58d95199595960a21b6020808301919091526001600160601b0319606086811b8216602c85015285901b1682840152825160348184030181526054909201909252805191012061392781614ff4565b613930816150a0565b826001600160a01b031663724e78da836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561288f57600080fd5b6001546001600160a01b031633146139cc576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6139d5816150a0565b50565b6001546001600160a01b03163314613a25576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6207a1208111613a7c576040805162461bcd60e51b815260206004820152601e60248201527f54696d656c6f636b3a20696e76616c6964205f6d61784c657665726167650000604482015290519081900360640190fd5b816001600160a01b031663d3127e63826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314613b0f576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b031663604f37e9826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314613ba4576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516b1cd95d141c9a58d95199595960a21b6020808301919091526001600160601b0319606086811b8216602c85015285901b16828401528251603481840301815260549092019092528051910120613bfe81614f9b565b604080516001600160a01b0380861682528416602082015280820183905290517fb878dd4b5762f4118ad54995be907dd2bcd915d942e4ac75580fba9b4ee4727f9181900360600190a1505050565b6001546001600160a01b03163314613c9a576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600a602052604090205460ff1615613cf8578015613cf85760405162461bcd60e51b81526004018080602001828103825260288152602001806153e26028913960400191505060405180910390fd5b816001600160a01b0316635a47a1a7826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b60c881565b6001546001600160a01b03163314613d92576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b64012a05f2008111613de2576040805162461bcd60e51b8152602060048201526014602482015273496e76616c6964205f6d6178476173507269636560601b604482015290519081900360640190fd5b816001600160a01b031663d2fa635e826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314613e75576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6008805460ff1916911515919091179055565b68327cb2734119d3b7a9601e1b81565b6001546001600160a01b03163314613ee5576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516539b2ba23b7bb60d11b6020808301919091526001600160601b0319606086811b8216602685015285901b16603a8301528251602e818403018152604e9092019092528051910120613f3a81614f9b565b604080516001600160a01b0380861682528416602082015280820183905290517f2701a94fd55a560e291f3c54d36580040670d6fde558a77a75d619e38139f7139181900360600190a1505050565b60075481565b6001546001600160a01b03163314613fdc576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b0316632fbfe3d3826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b0316331461406f576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b620697808111156140c3576040805162461bcd60e51b81526020600482015260196024820152782a34b6b2b637b1b59d1034b73b30b634b2102fb13ab33332b960391b604482015290519081900360640190fd5b60005481116141035760405162461bcd60e51b815260040180806020018281038252602481526020018061542e6024913960400191505060405180910390fd5b600055565b6001546001600160a01b03163314614155576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b03166371089f4d826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b031633146141f1576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60408051631b5a5b9d60e21b6020808301919091526001600160601b0319606087811b8216602485015286901b166038830152604c80830185905283518084039091018152606c909201909252805191012061424c81614ff4565b614255816150a0565b611336848484615145565b6004546001600160a01b031681565b6001546001600160a01b03163314806142975750336000908152600b602052604090205460ff165b6142d6576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b816001600160a01b0316637c2eb9f7826040518263ffffffff1660e01b8152600401808215158152602001915050600060405180830381600087803b158015611c3157600080fd5b6001546001600160a01b03163314806143465750336000908152600b602052604090205460ff165b614385576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b600854819060ff16156143f15760408051637c2eb9f760e01b815260006004820181905291516001600160a01b03841692637c2eb9f7926024808201939182900301818387803b1580156143d857600080fd5b505af11580156143ec573d6000803e3d6000fd5b505050505b806001600160a01b03166340eb3802826001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561443957600080fd5b505afa15801561444d573d6000803e3d6000fd5b505050506040513d602081101561446357600080fd5b505160408051630875ab6160e11b815290516001600160a01b038616916310eb56c2916004808301926020929190829003018186803b1580156144a557600080fd5b505afa1580156144b9573d6000803e3d6000fd5b505050506040513d60208110156144cf57600080fd5b505160408051631351ecc160e21b815290516001600160a01b03871691634d47b304916004808301926020929190829003018186803b15801561451157600080fd5b505afa158015614525573d6000803e3d6000fd5b505050506040513d602081101561453b57600080fd5b50516040805163511791c960e11b815290516001600160a01b0388169163a22f2392916004808301926020929190829003018186803b15801561457d57600080fd5b505afa158015614591573d6000803e3d6000fd5b505050506040513d60208110156145a757600080fd5b50516040805163df73a26760e01b815290516001600160a01b0389169163df73a267916004808301926020929190829003018186803b1580156145e957600080fd5b505afa1580156145fd573d6000803e3d6000fd5b505050506040513d602081101561461357600080fd5b5051600754604080516305d349a560e21b815290516001600160a01b038b169163174d2694916004808301926020929190829003018186803b15801561319b57600080fd5b6003546001600160a01b031633146146a5576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b826001600160a01b0316639cb7de4b83836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001821515815260200192505050600060405180830381600087803b15801561288f57600080fd5b6001546001600160a01b0316331461474b576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600a60205260409020805460ff19166001179055565b6003546001600160a01b031633146147bc576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b826001600160a01b031663cf456ae783836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001821515815260200192505050600060405180830381600087803b15801561288f57600080fd5b6001546001600160a01b03163314614862576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60408051727661756c74536574546f6b656e436f6e66696760681b6020808301919091526001600160601b031960608c811b821660338501528b901b166047830152605b8201899052607b8201889052609b820187905260bb820186905284151560f890811b60db840152841515901b60dc830152825160bd81840301815260dd90920190925280519101206148f781614f9b565b604080516001600160a01b03808c1682528a166020820152808201899052606081018890526080810187905260a0810186905284151560c082015283151560e082015290517f3510e9d8245371c6c1061c33781ce16bd0eafa03cd3d0781865036520af4c743918190036101000190a1505050505050505050565b6001546001600160a01b031633146149bf576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6040805166617070726f766560c81b6020808301919091526001600160601b0319606087811b8216602785015286901b16603b830152604f80830185905283518084039091018152606f9092019092528051910120614a1d81614f9b565b604080516001600160a01b038087168252851660208201528082018490526060810183905290517f6af9d86ba7407a934e941ed8ae5f779369a88fe8ba2cd1c204185d6f8a8287fd9181900360800190a150505050565b6001546001600160a01b03163314614ac1576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b826001600160a01b031663efa10a6e83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561288f57600080fd5b6001546001600160a01b03163314614b65576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b6040805166617070726f766560c81b6020808301919091526001600160601b0319606087811b8216602785015286901b16603b830152604f80830185905283518084039091018152606f9092019092528051910120614bc381614ff4565b614bcc816150a0565b836001600160a01b031663095ea7b384846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015614c2357600080fd5b505af1158015614c37573d6000803e3d6000fd5b505050506040513d6020811015611c4557600080fd5b6001546001600160a01b03163314614c9a576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b600691909155600755565b60096020526000908152604090205481565b6001546001600160a01b03163314614d04576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b60408051727661756c74536574546f6b656e436f6e66696760681b6020808301919091526001600160601b031960608c811b821660338501528b901b166047830152605b8201899052607b8201889052609b820187905260bb820186905284151560f890811b60db840152841515901b60dc830152825160bd81840301815260dd9092019092528051910120614d9981614ff4565b614da2816150a0565b60408051633c5a6e3560e01b81526001600160a01b038a81166004830152602482018a905260448201899052606482018890526084820187905285151560a483015284151560c48301529151918b1691633c5a6e359160e48082019260009290919082900301818387803b158015614e1957600080fd5b505af1158015614e2d573d6000803e3d6000fd5b50505050505050505050505050565b6001546001600160a01b03163314614e89576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b604080516323b872dd60e01b81526001600160a01b038581166004830152306024830152604482018490529151918416916323b872dd916064808201926020929091908290030181600087803b158015611a2b57600080fd5b6001546001600160a01b03163314614f2f576040805162461bcd60e51b81526020600482015260136024820152600080516020615452833981519152604482015290519081900360640190fd5b826001600160a01b0316639b88938083836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561288f57600080fd5b60005481565b6001546001600160a01b031681565b600054614fa990429061533b565b60008281526009602090815260409182902092909255805183815290517f5fb9c0ecf7b4a28c4c480212e868f9da7f373a2ed4d23498b0be6aadf35242fb929181900390910190a150565b600081815260096020526040902054615054576040805162461bcd60e51b815260206004820152601e60248201527f54696d656c6f636b3a20616374696f6e206e6f74207369676e616c6c65640000604482015290519081900360640190fd5b60008181526009602052604090205442116139d55760405162461bcd60e51b815260040180806020018281038252602481526020018061540a6024913960400191505060405180910390fd5b6000818152600960205260409020546150fc576040805162461bcd60e51b81526020600482015260196024820152782a34b6b2b637b1b59d1034b73b30b634b2102fb0b1ba34b7b760391b604482015290519081900360640190fd5b600081815260096020908152604080832092909255815183815291517f194ed6dd5e37e2acc44a19455c3f208c4831ee695fe362d9c4ef2d316bc53aec9281900390910190a150565b604080516355138f0d60e11b8152306004820152905184916001600160a01b0383169163aa271e1a916024808201926020929091908290030181600087803b15801561519057600080fd5b505af11580156151a4573d6000803e3d6000fd5b505050506040513d60208110156151ba57600080fd5b5051615227576040805163cf456ae760e01b81523060048201526001602482015290516001600160a01b0383169163cf456ae791604480830192600092919082900301818387803b15801561520e57600080fd5b505af1158015615222573d6000803e3d6000fd5b505050505b806001600160a01b03166340c10f1984846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561527e57600080fd5b505af1158015615292573d6000803e3d6000fd5b50505050600554846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156152d257600080fd5b505afa1580156152e6573d6000803e3d6000fd5b505050506040513d60208110156152fc57600080fd5b505111156113365760405162461bcd60e51b81526004018080602001828103825260218152602001806154726021913960400191505060405180910390fd5b600082820183811015615393576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a20696e76616c6964205f66756e64696e6752617465466163746f7254696d656c6f636b3a20746f6b656e206e6f74207965742077686974656c697374656454696d656c6f636b3a20696e76616c6964205f696e507269766174655472616e736665724d6f646554696d656c6f636b3a20616374696f6e2074696d65206e6f74207965742070617373656454696d656c6f636b3a206275666665722063616e6e6f742062652064656372656173656454696d656c6f636b3a20666f7262696464656e0000000000000000000000000054696d656c6f636b3a206d6178546f6b656e537570706c7920657863656564656454696d656c6f636b3a20696e76616c6964205f737461626c6546756e64696e6752617465466163746f72a2646970667358221220968576b972e5734c551c3925b88cf732d257f82a08c9715a1a4df1d38211e37f64736f6c634300060c003300000000000000000000000049b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e29d2ee6973e5bd093df40ef9d0b28bd56c9e4e00000000000000000000000050f22389c10fcc3ba9b1ab9bcdafe40448a357fb0000000000000000000000000000000000000000000af5cbf0741b4c95400000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a

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

00000000000000000000000049b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b000000000000000000000000000000000000000000000000000000000001518000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e29d2ee6973e5bd093df40ef9d0b28bd56c9e4e00000000000000000000000050f22389c10fcc3ba9b1ab9bcdafe40448a357fb0000000000000000000000000000000000000000000af5cbf0741b4c95400000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a

-----Decoded View---------------
Arg [0] : _admin (address): 0x49b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b
Arg [1] : _buffer (uint256): 86400
Arg [2] : _rewardManager (address): 0x0000000000000000000000000000000000000000
Arg [3] : _tokenManager (address): 0x4e29d2ee6973e5bd093df40ef9d0b28bd56c9e4e
Arg [4] : _mintReceiver (address): 0x50f22389c10fcc3ba9b1ab9bcdafe40448a357fb
Arg [5] : _maxTokenSupply (uint256): 13250000000000000000000000
Arg [6] : _marginFeeBasisPoints (uint256): 10
Arg [7] : _maxMarginFeeBasisPoints (uint256): 10

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000049b373d422bda4c6bfcdd5ec1e48a9a26fda2f8b
Arg [1] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000004e29d2ee6973e5bd093df40ef9d0b28bd56c9e4e
Arg [4] : 00000000000000000000000050f22389c10fcc3ba9b1ab9bcdafe40448a357fb
Arg [5] : 0000000000000000000000000000000000000000000af5cbf0741b4c95400000
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000a


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