false
true
0

Contract Address Details

0xad469eA2813264475ABe13bb5E4656ee8725A2DD

Contract Name
DSChiefFab
Creator
0x00daa9–1d403f at 0x597985–729fac
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
5 Transactions
Transfers
0 Transfers
Gas Used
5,052,192
Last Balance Update
26352228
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify. View contract in Sourcify repository
Contract name:
DSChiefFab




Optimization enabled
true
Compiler version
v0.5.6+commit.b259423e




Optimization runs
200
EVM Version
petersburg




Verified at
2026-04-22T18:07:54.245856Z

DSChiefFab.sol

// hevm: flattened sources of src/chief.sol
pragma solidity >0.4.13 >0.4.20 >=0.4.23;

////// lib/ds-roles/lib/ds-auth/src/auth.sol
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

contract DSAuthority {
    function canCall(
        address src, address dst, bytes4 sig
    ) public view returns (bool);
}

contract DSAuthEvents {
    event LogSetAuthority (address indexed authority);
    event LogSetOwner     (address indexed owner);
}

contract DSAuth is DSAuthEvents {
    DSAuthority  public  authority;
    address      public  owner;

    constructor() public {
        owner = msg.sender;
        emit LogSetOwner(msg.sender);
    }

    function setOwner(address owner_)
        public
        auth
    {
        owner = owner_;
        emit LogSetOwner(owner);
    }

    function setAuthority(DSAuthority authority_)
        public
        auth
    {
        authority = authority_;
        emit LogSetAuthority(address(authority));
    }

    modifier auth {
        require(isAuthorized(msg.sender, msg.sig), "ds-auth-unauthorized");
        _;
    }

    function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
        if (src == address(this)) {
            return true;
        } else if (src == owner) {
            return true;
        } else if (authority == DSAuthority(0)) {
            return false;
        } else {
            return authority.canCall(src, address(this), sig);
        }
    }
}

////// lib/ds-roles/src/roles.sol
// roles.sol - roled based authentication

// Copyright (C) 2017  DappHub, LLC

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

/* import 'ds-auth/auth.sol'; */

contract DSRoles is DSAuth, DSAuthority
{
    mapping(address=>bool) _root_users;
    mapping(address=>bytes32) _user_roles;
    mapping(address=>mapping(bytes4=>bytes32)) _capability_roles;
    mapping(address=>mapping(bytes4=>bool)) _public_capabilities;

    function getUserRoles(address who)
        public
        view
        returns (bytes32)
    {
        return _user_roles[who];
    }

    function getCapabilityRoles(address code, bytes4 sig)
        public
        view
        returns (bytes32)
    {
        return _capability_roles[code][sig];
    }

    function isUserRoot(address who)
        public
        view
        returns (bool)
    {
        return _root_users[who];
    }

    function isCapabilityPublic(address code, bytes4 sig)
        public
        view
        returns (bool)
    {
        return _public_capabilities[code][sig];
    }

    function hasUserRole(address who, uint8 role)
        public
        view
        returns (bool)
    {
        bytes32 roles = getUserRoles(who);
        bytes32 shifted = bytes32(uint256(uint256(2) ** uint256(role)));
        return bytes32(0) != roles & shifted;
    }

    function canCall(address caller, address code, bytes4 sig)
        public
        view
        returns (bool)
    {
        if( isUserRoot(caller) || isCapabilityPublic(code, sig) ) {
            return true;
        } else {
            bytes32 has_roles = getUserRoles(caller);
            bytes32 needs_one_of = getCapabilityRoles(code, sig);
            return bytes32(0) != has_roles & needs_one_of;
        }
    }

    function BITNOT(bytes32 input) internal pure returns (bytes32 output) {
        return (input ^ bytes32(uint(-1)));
    }

    function setRootUser(address who, bool enabled)
        public
        auth
    {
        _root_users[who] = enabled;
    }

    function setUserRole(address who, uint8 role, bool enabled)
        public
        auth
    {
        bytes32 last_roles = _user_roles[who];
        bytes32 shifted = bytes32(uint256(uint256(2) ** uint256(role)));
        if( enabled ) {
            _user_roles[who] = last_roles | shifted;
        } else {
            _user_roles[who] = last_roles & BITNOT(shifted);
        }
    }

    function setPublicCapability(address code, bytes4 sig, bool enabled)
        public
        auth
    {
        _public_capabilities[code][sig] = enabled;
    }

    function setRoleCapability(uint8 role, address code, bytes4 sig, bool enabled)
        public
        auth
    {
        bytes32 last_roles = _capability_roles[code][sig];
        bytes32 shifted = bytes32(uint256(uint256(2) ** uint256(role)));
        if( enabled ) {
            _capability_roles[code][sig] = last_roles | shifted;
        } else {
            _capability_roles[code][sig] = last_roles & BITNOT(shifted);
        }

    }

}

////// lib/ds-thing/lib/ds-math/src/math.sol
/// math.sol -- mixin for inline numerical wizardry

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >0.4.13; */

contract DSMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, "ds-math-add-overflow");
    }
    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, "ds-math-sub-underflow");
    }
    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, "ds-math-mul-overflow");
    }

    function min(uint x, uint y) internal pure returns (uint z) {
        return x <= y ? x : y;
    }
    function max(uint x, uint y) internal pure returns (uint z) {
        return x >= y ? x : y;
    }
    function imin(int x, int y) internal pure returns (int z) {
        return x <= y ? x : y;
    }
    function imax(int x, int y) internal pure returns (int z) {
        return x >= y ? x : y;
    }

    uint constant WAD = 10 ** 18;
    uint constant RAY = 10 ** 27;

    function wmul(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, y), WAD / 2) / WAD;
    }
    function rmul(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, y), RAY / 2) / RAY;
    }
    function wdiv(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, WAD), y / 2) / y;
    }
    function rdiv(uint x, uint y) internal pure returns (uint z) {
        z = add(mul(x, RAY), y / 2) / y;
    }

    // This famous algorithm is called "exponentiation by squaring"
    // and calculates x^n with x as fixed-point and n as regular unsigned.
    //
    // It's O(log n), instead of O(n) for naive repeated multiplication.
    //
    // These facts are why it works:
    //
    //  If n is even, then x^n = (x^2)^(n/2).
    //  If n is odd,  then x^n = x * x^(n-1),
    //   and applying the equation for even x gives
    //    x^n = x * (x^2)^((n-1) / 2).
    //
    //  Also, EVM division is flooring and
    //    floor[(n-1) / 2] = floor[n / 2].
    //
    function rpow(uint x, uint n) internal pure returns (uint z) {
        z = n % 2 != 0 ? x : RAY;

        for (n /= 2; n != 0; n /= 2) {
            x = rmul(x, x);

            if (n % 2 != 0) {
                z = rmul(z, x);
            }
        }
    }
}

////// lib/ds-thing/lib/ds-note/src/note.sol
/// note.sol -- the `note' modifier, for logging calls as events

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

contract DSNote {
    event LogNote(
        bytes4   indexed  sig,
        address  indexed  guy,
        bytes32  indexed  foo,
        bytes32  indexed  bar,
        uint256           wad,
        bytes             fax
    ) anonymous;

    modifier note {
        bytes32 foo;
        bytes32 bar;
        uint256 wad;

        assembly {
            foo := calldataload(4)
            bar := calldataload(36)
            wad := callvalue
        }

        emit LogNote(msg.sig, msg.sender, foo, bar, wad, msg.data);

        _;
    }
}

////// lib/ds-thing/src/thing.sol
// thing.sol - `auth` with handy mixins. your things should be DSThings

// Copyright (C) 2017  DappHub, LLC

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

/* import 'ds-auth/auth.sol'; */
/* import 'ds-note/note.sol'; */
/* import 'ds-math/math.sol'; */

contract DSThing is DSAuth, DSNote, DSMath {
    function S(string memory s) internal pure returns (bytes4) {
        return bytes4(keccak256(abi.encodePacked(s)));
    }

}

////// lib/ds-token/lib/ds-stop/src/stop.sol
/// stop.sol -- mixin for enable/disable functionality

// Copyright (C) 2017  DappHub, LLC

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

/* import "ds-auth/auth.sol"; */
/* import "ds-note/note.sol"; */

contract DSStop is DSNote, DSAuth {
    bool public stopped;

    modifier stoppable {
        require(!stopped, "ds-stop-is-stopped");
        _;
    }
    function stop() public auth note {
        stopped = true;
    }
    function start() public auth note {
        stopped = false;
    }

}

////// lib/ds-token/lib/erc20/src/erc20.sol
/// erc20.sol -- API for the ERC20 token standard

// See <https://github.com/ethereum/EIPs/issues/20>.

// This file likely does not meet the threshold of originality
// required for copyright to apply.  As a result, this is free and
// unencumbered software belonging to the public domain.

/* pragma solidity >0.4.20; */

contract ERC20Events {
    event Approval(address indexed src, address indexed guy, uint wad);
    event Transfer(address indexed src, address indexed dst, uint wad);
}

contract ERC20 is ERC20Events {
    function totalSupply() public view returns (uint);
    function balanceOf(address guy) public view returns (uint);
    function allowance(address src, address guy) public view returns (uint);

    function approve(address guy, uint wad) public returns (bool);
    function transfer(address dst, uint wad) public returns (bool);
    function transferFrom(
        address src, address dst, uint wad
    ) public returns (bool);
}

////// lib/ds-token/src/base.sol
/// base.sol -- basic ERC20 implementation

// Copyright (C) 2015, 2016, 2017  DappHub, LLC

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

/* import "erc20/erc20.sol"; */
/* import "ds-math/math.sol"; */

contract DSTokenBase is ERC20, DSMath {
    uint256                                            _supply;
    mapping (address => uint256)                       _balances;
    mapping (address => mapping (address => uint256))  _approvals;

    constructor(uint supply) public {
        _balances[msg.sender] = supply;
        _supply = supply;
    }

    function totalSupply() public view returns (uint) {
        return _supply;
    }
    function balanceOf(address src) public view returns (uint) {
        return _balances[src];
    }
    function allowance(address src, address guy) public view returns (uint) {
        return _approvals[src][guy];
    }

    function transfer(address dst, uint wad) public returns (bool) {
        return transferFrom(msg.sender, dst, wad);
    }

    function transferFrom(address src, address dst, uint wad)
        public
        returns (bool)
    {
        if (src != msg.sender) {
            require(_approvals[src][msg.sender] >= wad, "ds-token-insufficient-approval");
            _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad);
        }

        require(_balances[src] >= wad, "ds-token-insufficient-balance");
        _balances[src] = sub(_balances[src], wad);
        _balances[dst] = add(_balances[dst], wad);

        emit Transfer(src, dst, wad);

        return true;
    }

    function approve(address guy, uint wad) public returns (bool) {
        _approvals[msg.sender][guy] = wad;

        emit Approval(msg.sender, guy, wad);

        return true;
    }
}

////// lib/ds-token/src/token.sol
/// token.sol -- ERC20 implementation with minting and burning

// Copyright (C) 2015, 2016, 2017  DappHub, LLC

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

/* import "ds-stop/stop.sol"; */

/* import "./base.sol"; */

contract DSToken is DSTokenBase(0), DSStop {

    bytes32  public  symbol;
    uint256  public  decimals = 18; // standard token precision. override to customize

    constructor(bytes32 symbol_) public {
        symbol = symbol_;
    }

    event Mint(address indexed guy, uint wad);
    event Burn(address indexed guy, uint wad);

    function approve(address guy) public stoppable returns (bool) {
        return super.approve(guy, uint(-1));
    }

    function approve(address guy, uint wad) public stoppable returns (bool) {
        return super.approve(guy, wad);
    }

    function transferFrom(address src, address dst, uint wad)
        public
        stoppable
        returns (bool)
    {
        if (src != msg.sender && _approvals[src][msg.sender] != uint(-1)) {
            require(_approvals[src][msg.sender] >= wad, "ds-token-insufficient-approval");
            _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad);
        }

        require(_balances[src] >= wad, "ds-token-insufficient-balance");
        _balances[src] = sub(_balances[src], wad);
        _balances[dst] = add(_balances[dst], wad);

        emit Transfer(src, dst, wad);

        return true;
    }

    function push(address dst, uint wad) public {
        transferFrom(msg.sender, dst, wad);
    }
    function pull(address src, uint wad) public {
        transferFrom(src, msg.sender, wad);
    }
    function move(address src, address dst, uint wad) public {
        transferFrom(src, dst, wad);
    }

    function mint(uint wad) public {
        mint(msg.sender, wad);
    }
    function burn(uint wad) public {
        burn(msg.sender, wad);
    }
    function mint(address guy, uint wad) public auth stoppable {
        _balances[guy] = add(_balances[guy], wad);
        _supply = add(_supply, wad);
        emit Mint(guy, wad);
    }
    function burn(address guy, uint wad) public auth stoppable {
        if (guy != msg.sender && _approvals[guy][msg.sender] != uint(-1)) {
            require(_approvals[guy][msg.sender] >= wad, "ds-token-insufficient-approval");
            _approvals[guy][msg.sender] = sub(_approvals[guy][msg.sender], wad);
        }

        require(_balances[guy] >= wad, "ds-token-insufficient-balance");
        _balances[guy] = sub(_balances[guy], wad);
        _supply = sub(_supply, wad);
        emit Burn(guy, wad);
    }

    // Optional token name
    bytes32   public  name = "";

    function setName(bytes32 name_) public auth {
        name = name_;
    }
}

////// src/chief.sol
// chief.sol - select an authority by consensus

// Copyright (C) 2017  DappHub, LLC

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* pragma solidity >=0.4.23; */

/* import 'ds-token/token.sol'; */
/* import 'ds-roles/roles.sol'; */
/* import 'ds-thing/thing.sol'; */

// The right way to use this contract is probably to mix it with some kind
// of `DSAuthority`, like with `ds-roles`.
//   SEE DSChief
contract DSChiefApprovals is DSThing {
    mapping(bytes32=>address[]) public slates;
    mapping(address=>bytes32) public votes;
    mapping(address=>uint256) public approvals;
    mapping(address=>uint256) public deposits;
    DSToken public GOV; // voting token that gets locked up
    DSToken public IOU; // non-voting representation of a token, for e.g. secondary voting mechanisms
    address public hat; // the chieftain's hat

    uint256 public MAX_YAYS;

    event Etch(bytes32 indexed slate);

    // IOU constructed outside this contract reduces deployment costs significantly
    // lock/free/vote are quite sensitive to token invariants. Caution is advised.
    constructor(DSToken GOV_, DSToken IOU_, uint MAX_YAYS_) public
    {
        GOV = GOV_;
        IOU = IOU_;
        MAX_YAYS = MAX_YAYS_;
    }

    function lock(uint wad)
        public
        note
    {
        GOV.pull(msg.sender, wad);
        IOU.mint(msg.sender, wad);
        deposits[msg.sender] = add(deposits[msg.sender], wad);
        addWeight(wad, votes[msg.sender]);
    }

    function free(uint wad)
        public
        note
    {
        deposits[msg.sender] = sub(deposits[msg.sender], wad);
        subWeight(wad, votes[msg.sender]);
        IOU.burn(msg.sender, wad);
        GOV.push(msg.sender, wad);
    }

    function etch(address[] memory yays)
        public
        note
        returns (bytes32 slate)
    {
        require( yays.length <= MAX_YAYS );
        requireByteOrderedSet(yays);

        bytes32 hash = keccak256(abi.encodePacked(yays));
        slates[hash] = yays;
        emit Etch(hash);
        return hash;
    }

    function vote(address[] memory yays) public returns (bytes32)
        // note  both sub-calls note
    {
        bytes32 slate = etch(yays);
        vote(slate);
        return slate;
    }

    function vote(bytes32 slate)
        public
        note
    {
        require(slates[slate].length > 0 || 
            slate == 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, "ds-chief-invalid-slate");
        uint weight = deposits[msg.sender];
        subWeight(weight, votes[msg.sender]);
        votes[msg.sender] = slate;
        addWeight(weight, votes[msg.sender]);
    }

    // like `drop`/`swap` except simply "elect this address if it is higher than current hat"
    function lift(address whom)
        public
        note
    {
        require(approvals[whom] > approvals[hat]);
        hat = whom;
    }

    function addWeight(uint weight, bytes32 slate)
        internal
    {
        address[] storage yays = slates[slate];
        for( uint i = 0; i < yays.length; i++) {
            approvals[yays[i]] = add(approvals[yays[i]], weight);
        }
    }

    function subWeight(uint weight, bytes32 slate)
        internal
    {
        address[] storage yays = slates[slate];
        for( uint i = 0; i < yays.length; i++) {
            approvals[yays[i]] = sub(approvals[yays[i]], weight);
        }
    }

    // Throws unless the array of addresses is a ordered set.
    function requireByteOrderedSet(address[] memory yays)
        internal
        pure
    {
        if( yays.length == 0 || yays.length == 1 ) {
            return;
        }
        for( uint i = 0; i < yays.length - 1; i++ ) {
            // strict inequality ensures both ordering and uniqueness
            require(uint(yays[i]) < uint(yays[i+1]));
        }
    }
}


// `hat` address is unique root user (has every role) and the
// unique owner of role 0 (typically 'sys' or 'internal')
contract DSChief is DSRoles, DSChiefApprovals {

    constructor(DSToken GOV, DSToken IOU, uint MAX_YAYS)
             DSChiefApprovals (GOV, IOU, MAX_YAYS)
        public
    {
        authority = this;
        owner = address(0);
    }

    function setOwner(address owner_) public {
        owner_;
        revert();
    }

    function setAuthority(DSAuthority authority_) public {
        authority_;
        revert();
    }

    function isUserRoot(address who)
        public view
        returns (bool)
    {
        return (who == hat);
    }
    function setRootUser(address who, bool enabled) public {
        who; enabled;
        revert();
    }
}

contract DSChiefFab {
    function newChief(DSToken gov, uint MAX_YAYS) public returns (DSChief chief) {
        DSToken iou = new DSToken('IOU');
        chief = new DSChief(gov, iou, MAX_YAYS);
        iou.setOwner(address(chief));
    }
}
        

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"petersburg","compilationTarget":{"DSChiefFab.sol":"DSChiefFab"}}
              

Contract ABI

[{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"address","name":"chief"}],"name":"newChief","inputs":[{"type":"address","name":"gov"},{"type":"uint256","name":"MAX_YAYS"}],"constant":false}]
              

Contract Creation Code

Verify & Publish
0x608060405234801561001057600080fd5b50612b43806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80633435e5f314610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b038135169060200135610078565b604080516001600160a01b039092168252519081900360200190f35b6000806040516100879061017d565b600160e81b62494f5502815260405190819003602001906000f0801580156100b3573d6000803e3d6000fd5b5090508381846040516100c59061018a565b6001600160a01b039384168152919092166020820152604080820192909252905190819003606001906000f080158015610103573d6000803e3d6000fd5b509150806001600160a01b03166313af4035836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561015e57600080fd5b505af1158015610172573d6000803e3d6000fd5b505050505092915050565b6113228061019883390190565b61165e806114ba8339019056fe60806040526012600655600060075534801561001a57600080fd5b506040516020806113228339810180604052602081101561003a57600080fd5b505133600081815260016020526040808220829055818055600480546001600160a01b03191684179055517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed949190a26005556112878061009b6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80637a9e5e4b116100de578063b753a98c11610097578063bf7e214f11610071578063bf7e214f1461040d578063daea85c514610415578063dd62ed3e1461043b578063f2d5d56b1461046957610173565b8063b753a98c146103a3578063bb35783b146103cf578063be9a65551461040557610173565b80637a9e5e4b146102dc5780638da5cb5b1461030257806395d89b41146103265780639dc29fac1461032e578063a0712d681461035a578063a9059cbb1461037757610173565b8063313ce56711610130578063313ce5671461024057806340c10f191461024857806342966c68146102745780635ac801fe1461029157806370a08231146102ae57806375f12b21146102d457610173565b806306fdde031461017857806307da68f514610192578063095ea7b31461019c57806313af4035146101dc57806318160ddd1461020257806323b872dd1461020a575b600080fd5b610180610495565b60408051918252519081900360200190f35b61019a61049b565b005b6101c8600480360360408110156101b257600080fd5b506001600160a01b038135169060200135610572565b604080519115158252519081900360200190f35b61019a600480360360208110156101f257600080fd5b50356001600160a01b03166105e2565b61018061068a565b6101c86004803603606081101561022057600080fd5b506001600160a01b03813581169160208101359091169060400135610690565b610180610921565b61019a6004803603604081101561025e57600080fd5b506001600160a01b038135169060200135610927565b61019a6004803603602081101561028a57600080fd5b5035610a69565b61019a600480360360208110156102a757600080fd5b5035610a76565b610180600480360360208110156102c457600080fd5b50356001600160a01b0316610ad3565b6101c8610aee565b61019a600480360360208110156102f257600080fd5b50356001600160a01b0316610afe565b61030a610ba6565b604080516001600160a01b039092168252519081900360200190f35b610180610bb5565b61019a6004803603604081101561034457600080fd5b506001600160a01b038135169060200135610bbb565b61019a6004803603602081101561037057600080fd5b5035610e7e565b6101c86004803603604081101561038d57600080fd5b506001600160a01b038135169060200135610e88565b61019a600480360360408110156103b957600080fd5b506001600160a01b038135169060200135610e95565b61019a600480360360608110156103e557600080fd5b506001600160a01b03813581169160208101359091169060400135610ea5565b61019a610eb6565b61030a610f87565b6101c86004803603602081101561042b57600080fd5b50356001600160a01b0316610f96565b6101806004803603604081101561045157600080fd5b506001600160a01b0381358116916020013516610fff565b61019a6004803603604081101561047f57600080fd5b506001600160a01b03813516906020013561102a565b60075481565b6104b1336000356001600160e01b031916611035565b6104f35760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916600160a01b17905550565b600454600090600160a01b900460ff16156105cf5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105d9838361111f565b90505b92915050565b6105f8336000356001600160e01b031916611035565b61063a5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b600454600090600160a01b900460ff16156106ed5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b038416331480159061072b57506001600160a01b038416600090815260026020908152604080832033845290915290205460001914155b156107fe576001600160a01b03841660009081526002602090815260408083203384529091529020548211156107ab5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020546107d99083611185565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b03841660009081526001602052604090205482111561086e5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600160205260409020546108919083611185565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546108c090836111e0565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60065481565b61093d336000356001600160e01b031916611035565b61097f5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff16156109d95760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546109fc90826111e0565b6001600160a01b03831660009081526001602052604081209190915554610a2390826111e0565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a25050565b610a733382610bbb565b50565b610a8c336000356001600160e01b031916611035565b610ace5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600755565b6001600160a01b031660009081526001602052604090205490565b600454600160a01b900460ff1681565b610b14336000356001600160e01b031916611035565b610b565760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b60055481565b610bd1336000356001600160e01b031916611035565b610c135760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff1615610c6d5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382163314801590610cab57506001600160a01b038216600090815260026020908152604080832033845290915290205460001914155b15610d7e576001600160a01b0382166000908152600260209081526040808320338452909152902054811115610d2b5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0382166000908152600260209081526040808320338452909152902054610d599082611185565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b038216600090815260016020526040902054811115610dee5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610e119082611185565b6001600160a01b03831660009081526001602052604081209190915554610e389082611185565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a733382610927565b60006105d9338484610690565b610ea0338383610690565b505050565b610eb0838383610690565b50505050565b610ecc336000356001600160e01b031916611035565b610f0e5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916905550565b6003546001600160a01b031681565b600454600090600160a01b900460ff1615610ff35760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105dc8260001961111f565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610ea0823383610690565b60006001600160a01b038316301415611050575060016105dc565b6004546001600160a01b038481169116141561106e575060016105dc565b6003546001600160a01b0316611086575060006105dc565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b505190506105dc565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b808203828111156105dc5760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b808201828110156105dc5760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820f1663addfbcf2fda3d0c18d381e5c652f343964d749ece4b6f37a8d73fb9e1440029608060405234801561001057600080fd5b5060405160608061165e8339810180604052606081101561003057600080fd5b5080516020820151604092830151600180546001600160a01b0319163390811790915593519293919290918491849184917fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2600a80546001600160a01b039485166001600160a01b031991821617909155600b80549390941692811692909217909255600d919091556000805482163017905560018054909116905550505061157b806100e36000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063a078f737116100f9578063d8bff5a511610097578063ed08132911610071578063ed081329146105d6578063fbf8077314610679578063fc7e286d1461069f578063fe95a5ce146106c5576101c4565b8063d8bff5a514610576578063d8ccd0f31461059c578063dd467064146105b9576101c4565b8063bf7e214f116100d3578063bf7e214f146104df578063c2ffc7bb146104e7578063c6b0263e1461050a578063d381ba7c14610548576101c4565b8063a078f73714610452578063a69beaba14610481578063b70096131461049e576101c4565b80633c278bd51161016657806367aff4841161014057806367aff484146103cc5780637a9e5e4b146102255780637d40583d146104035780638da5cb5b1461044a576101c4565b80633c278bd5146102dd5780635123e1fa146103035780635d0341ba146103a6576101c4565b8063180cb47f116101a2578063180cb47f1461024d57806327538e90146102555780632f47571f1461028b578063362344b8146102d5576101c4565b8063046c472f146101c957806306a36aee146101ed57806313af403514610225575b600080fd5b6101d16106cd565b604080516001600160a01b039092168252519081900360200190f35b6102136004803603602081101561020357600080fd5b50356001600160a01b03166106dc565b60408051918252519081900360200190f35b61024b6004803603602081101561023b57600080fd5b50356001600160a01b03166101c4565b005b6101d16106f7565b6102136004803603604081101561026b57600080fd5b5080356001600160a01b031690602001356001600160e01b031916610706565b6102c1600480360360408110156102a157600080fd5b5080356001600160a01b031690602001356001600160e01b03191661073b565b604080519115158252519081900360200190f35b610213610772565b61024b600480360360208110156102f357600080fd5b50356001600160a01b0316610778565b6102136004803603602081101561031957600080fd5b81019060208101813564010000000081111561033457600080fd5b82018360208201111561034657600080fd5b8035906020019184602083028401116401000000008311171561036857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610832945050505050565b610213600480360360208110156103bc57600080fd5b50356001600160a01b0316610961565b61024b600480360360608110156103e257600080fd5b506001600160a01b038135169060ff60208201351690604001351515610973565b61024b6004803603608081101561041957600080fd5b5060ff813516906001600160a01b03602082013516906001600160e01b031960408201351690606001351515610a4d565b6101d1610b67565b6102c16004803603604081101561046857600080fd5b5080356001600160a01b0316906020013560ff16610b76565b61024b6004803603602081101561049757600080fd5b5035610b95565b6102c1600480360360608110156104b457600080fd5b5080356001600160a01b0390811691602081013590911690604001356001600160e01b031916610ccb565b6101d1610d22565b6101d1600480360360408110156104fd57600080fd5b5080359060200135610d31565b61024b6004803603606081101561052057600080fd5b506001600160a01b03813516906001600160e01b031960208201351690604001351515610d66565b61024b6004803603604081101561055e57600080fd5b506001600160a01b03813516906020013515156101c4565b6102136004803603602081101561058c57600080fd5b50356001600160a01b0316610e0b565b61024b600480360360208110156105b257600080fd5b5035610e1d565b61024b600480360360208110156105cf57600080fd5b5035610fa4565b610213600480360360208110156105ec57600080fd5b81019060208101813564010000000081111561060757600080fd5b82018360208201111561061957600080fd5b8035906020019184602083028401116401000000008311171561063b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061112c945050505050565b6102c16004803603602081101561068f57600080fd5b50356001600160a01b0316611143565b610213600480360360208110156106b557600080fd5b50356001600160a01b0316611157565b6101d1611169565b600b546001600160a01b031681565b6001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031681565b6001600160a01b03821660009081526004602090815260408083206001600160e01b0319851684529091529020545b92915050565b6001600160a01b03821660009081526005602090815260408083206001600160e01b03198516845290915290205460ff1692915050565b600d5481565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600c546001600160a01b039081166000908152600860205260408082205492871682529020541161080c57600080fd5b5050600c80546001600160a01b0319166001600160a01b03939093169290921790915550565b604080513480825260208201838152369383018490526000936004359360243593928492869233926001600160e01b03198a35169287928b9260608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600d54855111156108a757600080fd5b6108b085611178565b60008560405160200180828051906020019060200280838360005b838110156108e35781810151838201526020016108cb565b505050509050019150506040516020818303038152906040528051906020012090508560066000838152602001908152602001600020908051906020019061092c9291906114c3565b5060405181907f4f0892983790f53eea39a7a496f6cb40e8811b313871337b6a761efc6c67bb1f90600090a295945050505050565b60086020526000908152604090205481565b610989336000356001600160e01b0319166111f4565b6109d75760408051600160e51b62461bcd0281526020600482015260146024820152600160621b73191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995902604482015290519081900360640190fd5b6001600160a01b03831660009081526003602052604090205460ff831660020a8215610a1f576001600160a01b03851660009081526003602052604090208282179055610a46565b610a28816112de565b6001600160a01b038616600090815260036020526040902090831690555b5050505050565b610a63336000356001600160e01b0319166111f4565b610ab15760408051600160e51b62461bcd0281526020600482015260146024820152600160621b73191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995902604482015290519081900360640190fd5b6001600160a01b03831660009081526004602090815260408083206001600160e01b03198616845290915290205460ff851660020a8215610b23576001600160a01b03851660009081526004602090815260408083206001600160e01b03198816845290915290208282179055610b5f565b610b2c816112de565b6001600160a01b03861660009081526004602090815260408083206001600160e01b031989168452909152902090831690555b505050505050565b6001546001600160a01b031681565b600080610b82846106dc565b60ff841660020a16151591505092915050565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600084815260066020526040902054151580610c3457507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47084145b610c885760408051600160e51b62461bcd02815260206004820152601660248201527f64732d63686965662d696e76616c69642d736c61746500000000000000000000604482015290519081900360640190fd5b33600090815260096020908152604080832054600790925290912054610caf9082906112e5565b336000908152600760205260409020859055610a468186611379565b6000610cd684611143565b80610ce65750610ce6838361073b565b15610cf357506001610d1b565b6000610cfe856106dc565b90506000610d0c8585610706565b9190911615159150610d1b9050565b9392505050565b6000546001600160a01b031681565b60066020528160005260406000208181548110610d4a57fe5b6000918252602090912001546001600160a01b03169150829050565b610d7c336000356001600160e01b0319166111f4565b610dca5760408051600160e51b62461bcd0281526020600482015260146024820152600160621b73191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995902604482015290519081900360640190fd5b6001600160a01b0390921660009081526005602090815260408083206001600160e01b0319909416835292905220805491151560ff19909216919091179055565b60076020526000908152604090205481565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a433600090815260096020526040902054610e9b908561140d565b33600090815260096020908152604080832093909355600790522054610ec29085906112e5565b600b5460408051600160e21b632770a7eb0281523360048201526024810187905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b5050600a5460408051600160e21b632dd4ea630281523360048201526024810189905290516001600160a01b03909216935063b753a98c925060448082019260009290919082900301818387803b158015610f8657600080fd5b505af1158015610f9a573d6000803e3d6000fd5b5050505050505050565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600a5460408051600160e01b63f2d5d56b0281523360048201526024810187905290516001600160a01b039092169163f2d5d56b9160448082019260009290919082900301818387803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b5050600b5460408051600160e01b6340c10f190281523360048201526024810189905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b1580156110cc57600080fd5b505af11580156110e0573d6000803e3d6000fd5b5050336000908152600960205260409020546110ff9250905085611468565b33600090815260096020908152604080832093909355600790522054611126908590611379565b50505050565b60008061113883610832565b905061073581610b95565b600c546001600160a01b0390811691161490565b60096020526000908152604090205481565b600c546001600160a01b031681565b80511580611187575080516001145b15611191576111f1565b60005b60018251038110156111ef578181600101815181106111af57fe5b60200260200101516001600160a01b03168282815181106111cc57fe5b60200260200101516001600160a01b0316106111e757600080fd5b600101611194565b505b50565b60006001600160a01b03831630141561120f57506001610735565b6001546001600160a01b038481169116141561122d57506001610735565b6000546001600160a01b031661124557506000610735565b60005460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156112ab57600080fd5b505afa1580156112bf573d6000803e3d6000fd5b505050506040513d60208110156112d557600080fd5b50519050610735565b6000191890565b6000818152600660205260408120905b81548110156111265761133c6008600084848154811061131157fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548561140d565b6008600084848154811061134c57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556001016112f5565b6000818152600660205260408120905b8154811015611126576113d0600860008484815481106113a557fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205485611468565b600860008484815481106113e057fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902055600101611389565b808203828111156107355760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b808201828110156107355760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b828054828255906000526020600020908101928215611518579160200282015b8281111561151857825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906114e3565b50611524929150611528565b5090565b61154c91905b808211156115245780546001600160a01b031916815560010161152e565b9056fea165627a7a7230582004a927adcabdb6ee38ef93e9f658eaa07572ddbd81c21327c69700da73f5196d0029a165627a7a72305820e8b417ef2418f93595e7e1dc3769e5d7e6d33520bea1f615a21c15205eecf2280029

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80633435e5f314610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b038135169060200135610078565b604080516001600160a01b039092168252519081900360200190f35b6000806040516100879061017d565b600160e81b62494f5502815260405190819003602001906000f0801580156100b3573d6000803e3d6000fd5b5090508381846040516100c59061018a565b6001600160a01b039384168152919092166020820152604080820192909252905190819003606001906000f080158015610103573d6000803e3d6000fd5b509150806001600160a01b03166313af4035836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561015e57600080fd5b505af1158015610172573d6000803e3d6000fd5b505050505092915050565b6113228061019883390190565b61165e806114ba8339019056fe60806040526012600655600060075534801561001a57600080fd5b506040516020806113228339810180604052602081101561003a57600080fd5b505133600081815260016020526040808220829055818055600480546001600160a01b03191684179055517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed949190a26005556112878061009b6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80637a9e5e4b116100de578063b753a98c11610097578063bf7e214f11610071578063bf7e214f1461040d578063daea85c514610415578063dd62ed3e1461043b578063f2d5d56b1461046957610173565b8063b753a98c146103a3578063bb35783b146103cf578063be9a65551461040557610173565b80637a9e5e4b146102dc5780638da5cb5b1461030257806395d89b41146103265780639dc29fac1461032e578063a0712d681461035a578063a9059cbb1461037757610173565b8063313ce56711610130578063313ce5671461024057806340c10f191461024857806342966c68146102745780635ac801fe1461029157806370a08231146102ae57806375f12b21146102d457610173565b806306fdde031461017857806307da68f514610192578063095ea7b31461019c57806313af4035146101dc57806318160ddd1461020257806323b872dd1461020a575b600080fd5b610180610495565b60408051918252519081900360200190f35b61019a61049b565b005b6101c8600480360360408110156101b257600080fd5b506001600160a01b038135169060200135610572565b604080519115158252519081900360200190f35b61019a600480360360208110156101f257600080fd5b50356001600160a01b03166105e2565b61018061068a565b6101c86004803603606081101561022057600080fd5b506001600160a01b03813581169160208101359091169060400135610690565b610180610921565b61019a6004803603604081101561025e57600080fd5b506001600160a01b038135169060200135610927565b61019a6004803603602081101561028a57600080fd5b5035610a69565b61019a600480360360208110156102a757600080fd5b5035610a76565b610180600480360360208110156102c457600080fd5b50356001600160a01b0316610ad3565b6101c8610aee565b61019a600480360360208110156102f257600080fd5b50356001600160a01b0316610afe565b61030a610ba6565b604080516001600160a01b039092168252519081900360200190f35b610180610bb5565b61019a6004803603604081101561034457600080fd5b506001600160a01b038135169060200135610bbb565b61019a6004803603602081101561037057600080fd5b5035610e7e565b6101c86004803603604081101561038d57600080fd5b506001600160a01b038135169060200135610e88565b61019a600480360360408110156103b957600080fd5b506001600160a01b038135169060200135610e95565b61019a600480360360608110156103e557600080fd5b506001600160a01b03813581169160208101359091169060400135610ea5565b61019a610eb6565b61030a610f87565b6101c86004803603602081101561042b57600080fd5b50356001600160a01b0316610f96565b6101806004803603604081101561045157600080fd5b506001600160a01b0381358116916020013516610fff565b61019a6004803603604081101561047f57600080fd5b506001600160a01b03813516906020013561102a565b60075481565b6104b1336000356001600160e01b031916611035565b6104f35760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916600160a01b17905550565b600454600090600160a01b900460ff16156105cf5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105d9838361111f565b90505b92915050565b6105f8336000356001600160e01b031916611035565b61063a5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b600454600090600160a01b900460ff16156106ed5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b038416331480159061072b57506001600160a01b038416600090815260026020908152604080832033845290915290205460001914155b156107fe576001600160a01b03841660009081526002602090815260408083203384529091529020548211156107ab5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020546107d99083611185565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b03841660009081526001602052604090205482111561086e5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600160205260409020546108919083611185565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546108c090836111e0565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60065481565b61093d336000356001600160e01b031916611035565b61097f5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff16156109d95760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546109fc90826111e0565b6001600160a01b03831660009081526001602052604081209190915554610a2390826111e0565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a25050565b610a733382610bbb565b50565b610a8c336000356001600160e01b031916611035565b610ace5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600755565b6001600160a01b031660009081526001602052604090205490565b600454600160a01b900460ff1681565b610b14336000356001600160e01b031916611035565b610b565760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b60055481565b610bd1336000356001600160e01b031916611035565b610c135760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff1615610c6d5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382163314801590610cab57506001600160a01b038216600090815260026020908152604080832033845290915290205460001914155b15610d7e576001600160a01b0382166000908152600260209081526040808320338452909152902054811115610d2b5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0382166000908152600260209081526040808320338452909152902054610d599082611185565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b038216600090815260016020526040902054811115610dee5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610e119082611185565b6001600160a01b03831660009081526001602052604081209190915554610e389082611185565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a733382610927565b60006105d9338484610690565b610ea0338383610690565b505050565b610eb0838383610690565b50505050565b610ecc336000356001600160e01b031916611035565b610f0e5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916905550565b6003546001600160a01b031681565b600454600090600160a01b900460ff1615610ff35760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105dc8260001961111f565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610ea0823383610690565b60006001600160a01b038316301415611050575060016105dc565b6004546001600160a01b038481169116141561106e575060016105dc565b6003546001600160a01b0316611086575060006105dc565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b505190506105dc565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b808203828111156105dc5760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b808201828110156105dc5760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820f1663addfbcf2fda3d0c18d381e5c652f343964d749ece4b6f37a8d73fb9e1440029608060405234801561001057600080fd5b5060405160608061165e8339810180604052606081101561003057600080fd5b5080516020820151604092830151600180546001600160a01b0319163390811790915593519293919290918491849184917fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2600a80546001600160a01b039485166001600160a01b031991821617909155600b80549390941692811692909217909255600d919091556000805482163017905560018054909116905550505061157b806100e36000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063a078f737116100f9578063d8bff5a511610097578063ed08132911610071578063ed081329146105d6578063fbf8077314610679578063fc7e286d1461069f578063fe95a5ce146106c5576101c4565b8063d8bff5a514610576578063d8ccd0f31461059c578063dd467064146105b9576101c4565b8063bf7e214f116100d3578063bf7e214f146104df578063c2ffc7bb146104e7578063c6b0263e1461050a578063d381ba7c14610548576101c4565b8063a078f73714610452578063a69beaba14610481578063b70096131461049e576101c4565b80633c278bd51161016657806367aff4841161014057806367aff484146103cc5780637a9e5e4b146102255780637d40583d146104035780638da5cb5b1461044a576101c4565b80633c278bd5146102dd5780635123e1fa146103035780635d0341ba146103a6576101c4565b8063180cb47f116101a2578063180cb47f1461024d57806327538e90146102555780632f47571f1461028b578063362344b8146102d5576101c4565b8063046c472f146101c957806306a36aee146101ed57806313af403514610225575b600080fd5b6101d16106cd565b604080516001600160a01b039092168252519081900360200190f35b6102136004803603602081101561020357600080fd5b50356001600160a01b03166106dc565b60408051918252519081900360200190f35b61024b6004803603602081101561023b57600080fd5b50356001600160a01b03166101c4565b005b6101d16106f7565b6102136004803603604081101561026b57600080fd5b5080356001600160a01b031690602001356001600160e01b031916610706565b6102c1600480360360408110156102a157600080fd5b5080356001600160a01b031690602001356001600160e01b03191661073b565b604080519115158252519081900360200190f35b610213610772565b61024b600480360360208110156102f357600080fd5b50356001600160a01b0316610778565b6102136004803603602081101561031957600080fd5b81019060208101813564010000000081111561033457600080fd5b82018360208201111561034657600080fd5b8035906020019184602083028401116401000000008311171561036857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610832945050505050565b610213600480360360208110156103bc57600080fd5b50356001600160a01b0316610961565b61024b600480360360608110156103e257600080fd5b506001600160a01b038135169060ff60208201351690604001351515610973565b61024b6004803603608081101561041957600080fd5b5060ff813516906001600160a01b03602082013516906001600160e01b031960408201351690606001351515610a4d565b6101d1610b67565b6102c16004803603604081101561046857600080fd5b5080356001600160a01b0316906020013560ff16610b76565b61024b6004803603602081101561049757600080fd5b5035610b95565b6102c1600480360360608110156104b457600080fd5b5080356001600160a01b0390811691602081013590911690604001356001600160e01b031916610ccb565b6101d1610d22565b6101d1600480360360408110156104fd57600080fd5b5080359060200135610d31565b61024b6004803603606081101561052057600080fd5b506001600160a01b03813516906001600160e01b031960208201351690604001351515610d66565b61024b6004803603604081101561055e57600080fd5b506001600160a01b03813516906020013515156101c4565b6102136004803603602081101561058c57600080fd5b50356001600160a01b0316610e0b565b61024b600480360360208110156105b257600080fd5b5035610e1d565b61024b600480360360208110156105cf57600080fd5b5035610fa4565b610213600480360360208110156105ec57600080fd5b81019060208101813564010000000081111561060757600080fd5b82018360208201111561061957600080fd5b8035906020019184602083028401116401000000008311171561063b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061112c945050505050565b6102c16004803603602081101561068f57600080fd5b50356001600160a01b0316611143565b610213600480360360208110156106b557600080fd5b50356001600160a01b0316611157565b6101d1611169565b600b546001600160a01b031681565b6001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031681565b6001600160a01b03821660009081526004602090815260408083206001600160e01b0319851684529091529020545b92915050565b6001600160a01b03821660009081526005602090815260408083206001600160e01b03198516845290915290205460ff1692915050565b600d5481565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600c546001600160a01b039081166000908152600860205260408082205492871682529020541161080c57600080fd5b5050600c80546001600160a01b0319166001600160a01b03939093169290921790915550565b604080513480825260208201838152369383018490526000936004359360243593928492869233926001600160e01b03198a35169287928b9260608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600d54855111156108a757600080fd5b6108b085611178565b60008560405160200180828051906020019060200280838360005b838110156108e35781810151838201526020016108cb565b505050509050019150506040516020818303038152906040528051906020012090508560066000838152602001908152602001600020908051906020019061092c9291906114c3565b5060405181907f4f0892983790f53eea39a7a496f6cb40e8811b313871337b6a761efc6c67bb1f90600090a295945050505050565b60086020526000908152604090205481565b610989336000356001600160e01b0319166111f4565b6109d75760408051600160e51b62461bcd0281526020600482015260146024820152600160621b73191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995902604482015290519081900360640190fd5b6001600160a01b03831660009081526003602052604090205460ff831660020a8215610a1f576001600160a01b03851660009081526003602052604090208282179055610a46565b610a28816112de565b6001600160a01b038616600090815260036020526040902090831690555b5050505050565b610a63336000356001600160e01b0319166111f4565b610ab15760408051600160e51b62461bcd0281526020600482015260146024820152600160621b73191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995902604482015290519081900360640190fd5b6001600160a01b03831660009081526004602090815260408083206001600160e01b03198616845290915290205460ff851660020a8215610b23576001600160a01b03851660009081526004602090815260408083206001600160e01b03198816845290915290208282179055610b5f565b610b2c816112de565b6001600160a01b03861660009081526004602090815260408083206001600160e01b031989168452909152902090831690555b505050505050565b6001546001600160a01b031681565b600080610b82846106dc565b60ff841660020a16151591505092915050565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600084815260066020526040902054151580610c3457507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47084145b610c885760408051600160e51b62461bcd02815260206004820152601660248201527f64732d63686965662d696e76616c69642d736c61746500000000000000000000604482015290519081900360640190fd5b33600090815260096020908152604080832054600790925290912054610caf9082906112e5565b336000908152600760205260409020859055610a468186611379565b6000610cd684611143565b80610ce65750610ce6838361073b565b15610cf357506001610d1b565b6000610cfe856106dc565b90506000610d0c8585610706565b9190911615159150610d1b9050565b9392505050565b6000546001600160a01b031681565b60066020528160005260406000208181548110610d4a57fe5b6000918252602090912001546001600160a01b03169150829050565b610d7c336000356001600160e01b0319166111f4565b610dca5760408051600160e51b62461bcd0281526020600482015260146024820152600160621b73191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995902604482015290519081900360640190fd5b6001600160a01b0390921660009081526005602090815260408083206001600160e01b0319909416835292905220805491151560ff19909216919091179055565b60076020526000908152604090205481565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a433600090815260096020526040902054610e9b908561140d565b33600090815260096020908152604080832093909355600790522054610ec29085906112e5565b600b5460408051600160e21b632770a7eb0281523360048201526024810187905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b5050600a5460408051600160e21b632dd4ea630281523360048201526024810189905290516001600160a01b03909216935063b753a98c925060448082019260009290919082900301818387803b158015610f8657600080fd5b505af1158015610f9a573d6000803e3d6000fd5b5050505050505050565b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4600a5460408051600160e01b63f2d5d56b0281523360048201526024810187905290516001600160a01b039092169163f2d5d56b9160448082019260009290919082900301818387803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b5050600b5460408051600160e01b6340c10f190281523360048201526024810189905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b1580156110cc57600080fd5b505af11580156110e0573d6000803e3d6000fd5b5050336000908152600960205260409020546110ff9250905085611468565b33600090815260096020908152604080832093909355600790522054611126908590611379565b50505050565b60008061113883610832565b905061073581610b95565b600c546001600160a01b0390811691161490565b60096020526000908152604090205481565b600c546001600160a01b031681565b80511580611187575080516001145b15611191576111f1565b60005b60018251038110156111ef578181600101815181106111af57fe5b60200260200101516001600160a01b03168282815181106111cc57fe5b60200260200101516001600160a01b0316106111e757600080fd5b600101611194565b505b50565b60006001600160a01b03831630141561120f57506001610735565b6001546001600160a01b038481169116141561122d57506001610735565b6000546001600160a01b031661124557506000610735565b60005460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156112ab57600080fd5b505afa1580156112bf573d6000803e3d6000fd5b505050506040513d60208110156112d557600080fd5b50519050610735565b6000191890565b6000818152600660205260408120905b81548110156111265761133c6008600084848154811061131157fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548561140d565b6008600084848154811061134c57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556001016112f5565b6000818152600660205260408120905b8154811015611126576113d0600860008484815481106113a557fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205485611468565b600860008484815481106113e057fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902055600101611389565b808203828111156107355760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b808201828110156107355760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b828054828255906000526020600020908101928215611518579160200282015b8281111561151857825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906114e3565b50611524929150611528565b5090565b61154c91905b808211156115245780546001600160a01b031916815560010161152e565b9056fea165627a7a7230582004a927adcabdb6ee38ef93e9f658eaa07572ddbd81c21327c69700da73f5196d0029a165627a7a72305820e8b417ef2418f93595e7e1dc3769e5d7e6d33520bea1f615a21c15205eecf2280029