Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
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:
- DSToken
- Optimization enabled
- true
- Compiler version
- v0.5.6+commit.b259423e
- Optimization runs
- 200
- EVM Version
- petersburg
- Verified at
- 2026-04-12T09:36:18.436521Z
Constructor Arguments
494f550000000000000000000000000000000000000000000000000000000000
Arg [0] (bytes32) : 494f550000000000000000000000000000000000000000000000000000000000
DSToken.sol
/**
*Submitted for verification at Etherscan.io on 2019-05-08
*/
// hevm: flattened sources of src/chief.sol
pragma solidity >=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_;
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"petersburg","compilationTarget":{"DSToken.sol":"DSToken"}}
Contract ABI
[{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"stop","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"approve","inputs":[{"type":"address","name":"guy"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setOwner","inputs":[{"type":"address","name":"owner_"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"transferFrom","inputs":[{"type":"address","name":"src"},{"type":"address","name":"dst"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"mint","inputs":[{"type":"address","name":"guy"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setName","inputs":[{"type":"bytes32","name":"name_"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"balanceOf","inputs":[{"type":"address","name":"src"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"stopped","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setAuthority","inputs":[{"type":"address","name":"authority_"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"owner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"burn","inputs":[{"type":"address","name":"guy"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"transfer","inputs":[{"type":"address","name":"dst"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"push","inputs":[{"type":"address","name":"dst"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"move","inputs":[{"type":"address","name":"src"},{"type":"address","name":"dst"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"start","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"authority","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"approve","inputs":[{"type":"address","name":"guy"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"allowance","inputs":[{"type":"address","name":"src"},{"type":"address","name":"guy"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"pull","inputs":[{"type":"address","name":"src"},{"type":"uint256","name":"wad"}],"constant":false},{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"bytes32","name":"symbol_"}]},{"type":"event","name":"Mint","inputs":[{"type":"address","name":"guy","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"type":"address","name":"guy","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false},{"type":"event","name":"LogSetAuthority","inputs":[{"type":"address","name":"authority","indexed":true}],"anonymous":false},{"type":"event","name":"LogSetOwner","inputs":[{"type":"address","name":"owner","indexed":true}],"anonymous":false},{"type":"event","name":"LogNote","inputs":[{"type":"bytes4","name":"sig","indexed":true},{"type":"address","name":"guy","indexed":true},{"type":"bytes32","name":"foo","indexed":true},{"type":"bytes32","name":"bar","indexed":true},{"type":"uint256","name":"wad","indexed":false},{"type":"bytes","name":"fax","indexed":false}],"anonymous":true},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"src","indexed":true},{"type":"address","name":"guy","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"src","indexed":true},{"type":"address","name":"dst","indexed":true},{"type":"uint256","name":"wad","indexed":false}],"anonymous":false}]
Contract Creation Code
0x60806040526012600655600060075534801561001a57600080fd5b506040516020806113228339810180604052602081101561003a57600080fd5b505133600081815260016020526040808220829055818055600480546001600160a01b03191684179055517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed949190a26005556112878061009b6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80637a9e5e4b116100de578063b753a98c11610097578063bf7e214f11610071578063bf7e214f1461040d578063daea85c514610415578063dd62ed3e1461043b578063f2d5d56b1461046957610173565b8063b753a98c146103a3578063bb35783b146103cf578063be9a65551461040557610173565b80637a9e5e4b146102dc5780638da5cb5b1461030257806395d89b41146103265780639dc29fac1461032e578063a0712d681461035a578063a9059cbb1461037757610173565b8063313ce56711610130578063313ce5671461024057806340c10f191461024857806342966c68146102745780635ac801fe1461029157806370a08231146102ae57806375f12b21146102d457610173565b806306fdde031461017857806307da68f514610192578063095ea7b31461019c57806313af4035146101dc57806318160ddd1461020257806323b872dd1461020a575b600080fd5b610180610495565b60408051918252519081900360200190f35b61019a61049b565b005b6101c8600480360360408110156101b257600080fd5b506001600160a01b038135169060200135610572565b604080519115158252519081900360200190f35b61019a600480360360208110156101f257600080fd5b50356001600160a01b03166105e2565b61018061068a565b6101c86004803603606081101561022057600080fd5b506001600160a01b03813581169160208101359091169060400135610690565b610180610921565b61019a6004803603604081101561025e57600080fd5b506001600160a01b038135169060200135610927565b61019a6004803603602081101561028a57600080fd5b5035610a69565b61019a600480360360208110156102a757600080fd5b5035610a76565b610180600480360360208110156102c457600080fd5b50356001600160a01b0316610ad3565b6101c8610aee565b61019a600480360360208110156102f257600080fd5b50356001600160a01b0316610afe565b61030a610ba6565b604080516001600160a01b039092168252519081900360200190f35b610180610bb5565b61019a6004803603604081101561034457600080fd5b506001600160a01b038135169060200135610bbb565b61019a6004803603602081101561037057600080fd5b5035610e7e565b6101c86004803603604081101561038d57600080fd5b506001600160a01b038135169060200135610e88565b61019a600480360360408110156103b957600080fd5b506001600160a01b038135169060200135610e95565b61019a600480360360608110156103e557600080fd5b506001600160a01b03813581169160208101359091169060400135610ea5565b61019a610eb6565b61030a610f87565b6101c86004803603602081101561042b57600080fd5b50356001600160a01b0316610f96565b6101806004803603604081101561045157600080fd5b506001600160a01b0381358116916020013516610fff565b61019a6004803603604081101561047f57600080fd5b506001600160a01b03813516906020013561102a565b60075481565b6104b1336000356001600160e01b031916611035565b6104f35760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916600160a01b17905550565b600454600090600160a01b900460ff16156105cf5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105d9838361111f565b90505b92915050565b6105f8336000356001600160e01b031916611035565b61063a5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b600454600090600160a01b900460ff16156106ed5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b038416331480159061072b57506001600160a01b038416600090815260026020908152604080832033845290915290205460001914155b156107fe576001600160a01b03841660009081526002602090815260408083203384529091529020548211156107ab5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020546107d99083611185565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b03841660009081526001602052604090205482111561086e5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600160205260409020546108919083611185565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546108c090836111e0565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60065481565b61093d336000356001600160e01b031916611035565b61097f5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff16156109d95760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546109fc90826111e0565b6001600160a01b03831660009081526001602052604081209190915554610a2390826111e0565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a25050565b610a733382610bbb565b50565b610a8c336000356001600160e01b031916611035565b610ace5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600755565b6001600160a01b031660009081526001602052604090205490565b600454600160a01b900460ff1681565b610b14336000356001600160e01b031916611035565b610b565760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b60055481565b610bd1336000356001600160e01b031916611035565b610c135760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff1615610c6d5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382163314801590610cab57506001600160a01b038216600090815260026020908152604080832033845290915290205460001914155b15610d7e576001600160a01b0382166000908152600260209081526040808320338452909152902054811115610d2b5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0382166000908152600260209081526040808320338452909152902054610d599082611185565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b038216600090815260016020526040902054811115610dee5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610e119082611185565b6001600160a01b03831660009081526001602052604081209190915554610e389082611185565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a733382610927565b60006105d9338484610690565b610ea0338383610690565b505050565b610eb0838383610690565b50505050565b610ecc336000356001600160e01b031916611035565b610f0e5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916905550565b6003546001600160a01b031681565b600454600090600160a01b900460ff1615610ff35760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105dc8260001961111f565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610ea0823383610690565b60006001600160a01b038316301415611050575060016105dc565b6004546001600160a01b038481169116141561106e575060016105dc565b6003546001600160a01b0316611086575060006105dc565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b505190506105dc565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b808203828111156105dc5760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b808201828110156105dc5760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820f1663addfbcf2fda3d0c18d381e5c652f343964d749ece4b6f37a8d73fb9e1440029494f550000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637a9e5e4b116100de578063b753a98c11610097578063bf7e214f11610071578063bf7e214f1461040d578063daea85c514610415578063dd62ed3e1461043b578063f2d5d56b1461046957610173565b8063b753a98c146103a3578063bb35783b146103cf578063be9a65551461040557610173565b80637a9e5e4b146102dc5780638da5cb5b1461030257806395d89b41146103265780639dc29fac1461032e578063a0712d681461035a578063a9059cbb1461037757610173565b8063313ce56711610130578063313ce5671461024057806340c10f191461024857806342966c68146102745780635ac801fe1461029157806370a08231146102ae57806375f12b21146102d457610173565b806306fdde031461017857806307da68f514610192578063095ea7b31461019c57806313af4035146101dc57806318160ddd1461020257806323b872dd1461020a575b600080fd5b610180610495565b60408051918252519081900360200190f35b61019a61049b565b005b6101c8600480360360408110156101b257600080fd5b506001600160a01b038135169060200135610572565b604080519115158252519081900360200190f35b61019a600480360360208110156101f257600080fd5b50356001600160a01b03166105e2565b61018061068a565b6101c86004803603606081101561022057600080fd5b506001600160a01b03813581169160208101359091169060400135610690565b610180610921565b61019a6004803603604081101561025e57600080fd5b506001600160a01b038135169060200135610927565b61019a6004803603602081101561028a57600080fd5b5035610a69565b61019a600480360360208110156102a757600080fd5b5035610a76565b610180600480360360208110156102c457600080fd5b50356001600160a01b0316610ad3565b6101c8610aee565b61019a600480360360208110156102f257600080fd5b50356001600160a01b0316610afe565b61030a610ba6565b604080516001600160a01b039092168252519081900360200190f35b610180610bb5565b61019a6004803603604081101561034457600080fd5b506001600160a01b038135169060200135610bbb565b61019a6004803603602081101561037057600080fd5b5035610e7e565b6101c86004803603604081101561038d57600080fd5b506001600160a01b038135169060200135610e88565b61019a600480360360408110156103b957600080fd5b506001600160a01b038135169060200135610e95565b61019a600480360360608110156103e557600080fd5b506001600160a01b03813581169160208101359091169060400135610ea5565b61019a610eb6565b61030a610f87565b6101c86004803603602081101561042b57600080fd5b50356001600160a01b0316610f96565b6101806004803603604081101561045157600080fd5b506001600160a01b0381358116916020013516610fff565b61019a6004803603604081101561047f57600080fd5b506001600160a01b03813516906020013561102a565b60075481565b6104b1336000356001600160e01b031916611035565b6104f35760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916600160a01b17905550565b600454600090600160a01b900460ff16156105cf5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105d9838361111f565b90505b92915050565b6105f8336000356001600160e01b031916611035565b61063a5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b600454600090600160a01b900460ff16156106ed5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b038416331480159061072b57506001600160a01b038416600090815260026020908152604080832033845290915290205460001914155b156107fe576001600160a01b03841660009081526002602090815260408083203384529091529020548211156107ab5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b03841660009081526002602090815260408083203384529091529020546107d99083611185565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b03841660009081526001602052604090205482111561086e5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b0384166000908152600160205260409020546108919083611185565b6001600160a01b0380861660009081526001602052604080822093909355908516815220546108c090836111e0565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b60065481565b61093d336000356001600160e01b031916611035565b61097f5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff16156109d95760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546109fc90826111e0565b6001600160a01b03831660009081526001602052604081209190915554610a2390826111e0565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a25050565b610a733382610bbb565b50565b610a8c336000356001600160e01b031916611035565b610ace5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600755565b6001600160a01b031660009081526001602052604090205490565b600454600160a01b900460ff1681565b610b14336000356001600160e01b031916611035565b610b565760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b60055481565b610bd1336000356001600160e01b031916611035565b610c135760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b600454600160a01b900460ff1615610c6d5760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6001600160a01b0382163314801590610cab57506001600160a01b038216600090815260026020908152604080832033845290915290205460001914155b15610d7e576001600160a01b0382166000908152600260209081526040808320338452909152902054811115610d2b5760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0382166000908152600260209081526040808320338452909152902054610d599082611185565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b038216600090815260016020526040902054811115610dee5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610e119082611185565b6001600160a01b03831660009081526001602052604081209190915554610e389082611185565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a733382610927565b60006105d9338484610690565b610ea0338383610690565b505050565b610eb0838383610690565b50505050565b610ecc336000356001600160e01b031916611035565b610f0e5760408051600160e51b62461bcd028152602060048201526014602482015260008051602061123c833981519152604482015290519081900360640190fd5b604080513480825260208201838152369383018490526004359360243593849286923392600080356001600160e01b03191693889391929060608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a4505060048054600160a01b60ff021916905550565b6003546001600160a01b031681565b600454600090600160a01b900460ff1615610ff35760408051600160e51b62461bcd0281526020600482015260126024820152600160721b71191ccb5cdd1bdc0b5a5ccb5cdd1bdc1c195902604482015290519081900360640190fd5b6105dc8260001961111f565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610ea0823383610690565b60006001600160a01b038316301415611050575060016105dc565b6004546001600160a01b038481169116141561106e575060016105dc565b6003546001600160a01b0316611086575060006105dc565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b505190506105dc565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b808203828111156105dc5760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b808201828110156105dc5760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820f1663addfbcf2fda3d0c18d381e5c652f343964d749ece4b6f37a8d73fb9e1440029