ERC-20
Algorithmic Stablecoin
Overview
Max Total Supply
118,085,696.013201747040103821 ESD
Holders
1,828 (0.00%)
Market
Price
$0.00 @ 0.000000 ETH (-3.11%)
Onchain Market Cap
$75,016.06
Circulating Supply Market Cap
$283,337.21
Other Info
Token Contract (WITH 18 Decimals)
Balance
582.251704122834736417 ESDValue
$0.37 ( ~0.000110935691116768 Eth) [0.0005%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Dollar
Compiler Version
v0.5.17+commit.d19bba13
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-08-24 */ pragma solidity ^0.5.17; pragma experimental ABIEncoderV2; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } } /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public { _burn(_msgSender(), amount); } /** * @dev See {ERC20-_burnFrom}. */ function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); } } /** * @dev Optional functions from the ERC20 standard. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } } /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } contract MinterRole is Context { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private _minters; constructor () internal { _addMinter(_msgSender()); } modifier onlyMinter() { require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role"); _; } function isMinter(address account) public view returns (bool) { return _minters.has(account); } function addMinter(address account) public onlyMinter { _addMinter(account); } function renounceMinter() public { _removeMinter(_msgSender()); } function _addMinter(address account) internal { _minters.add(account); emit MinterAdded(account); } function _removeMinter(address account) internal { _minters.remove(account); emit MinterRemoved(account); } } /* Copyright 2019 dYdX Trading Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * @title Require * @author dYdX * * Stringifies parameters to pretty-print revert messages. Costs more gas than regular require() */ library Require { // ============ Constants ============ uint256 constant ASCII_ZERO = 48; // '0' uint256 constant ASCII_RELATIVE_ZERO = 87; // 'a' - 10 uint256 constant ASCII_LOWER_EX = 120; // 'x' bytes2 constant COLON = 0x3a20; // ': ' bytes2 constant COMMA = 0x2c20; // ', ' bytes2 constant LPAREN = 0x203c; // ' <' byte constant RPAREN = 0x3e; // '>' uint256 constant FOUR_BIT_MASK = 0xf; // ============ Library Functions ============ function that( bool must, bytes32 file, bytes32 reason ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason) ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, uint256 payloadA ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, uint256 payloadA, uint256 payloadB ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, address payloadA ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, address payloadA, uint256 payloadB ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, address payloadA, uint256 payloadB, uint256 payloadC ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), COMMA, stringify(payloadC), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, bytes32 payloadA ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), RPAREN ) ) ); } } function that( bool must, bytes32 file, bytes32 reason, bytes32 payloadA, uint256 payloadB, uint256 payloadC ) internal pure { if (!must) { revert( string( abi.encodePacked( stringifyTruncated(file), COLON, stringifyTruncated(reason), LPAREN, stringify(payloadA), COMMA, stringify(payloadB), COMMA, stringify(payloadC), RPAREN ) ) ); } } // ============ Private Functions ============ function stringifyTruncated( bytes32 input ) private pure returns (bytes memory) { // put the input bytes into the result bytes memory result = abi.encodePacked(input); // determine the length of the input by finding the location of the last non-zero byte for (uint256 i = 32; i > 0; ) { // reverse-for-loops with unsigned integer /* solium-disable-next-line security/no-modify-for-iter-var */ i--; // find the last non-zero byte in order to determine the length if (result[i] != 0) { uint256 length = i + 1; /* solium-disable-next-line security/no-inline-assembly */ assembly { mstore(result, length) // r.length = length; } return result; } } // all bytes are zero return new bytes(0); } function stringify( uint256 input ) private pure returns (bytes memory) { if (input == 0) { return "0"; } // get the final string length uint256 j = input; uint256 length; while (j != 0) { length++; j /= 10; } // allocate the string bytes memory bstr = new bytes(length); // populate the string starting with the least-significant character j = input; for (uint256 i = length; i > 0; ) { // reverse-for-loops with unsigned integer /* solium-disable-next-line security/no-modify-for-iter-var */ i--; // take last decimal digit bstr[i] = byte(uint8(ASCII_ZERO + (j % 10))); // remove the last decimal digit j /= 10; } return bstr; } function stringify( address input ) private pure returns (bytes memory) { uint256 z = uint256(input); // addresses are "0x" followed by 20 bytes of data which take up 2 characters each bytes memory result = new bytes(42); // populate the result with "0x" result[0] = byte(uint8(ASCII_ZERO)); result[1] = byte(uint8(ASCII_LOWER_EX)); // for each byte (starting from the lowest byte), populate the result with two characters for (uint256 i = 0; i < 20; i++) { // each byte takes two characters uint256 shift = i * 2; // populate the least-significant character result[41 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; // populate the most-significant character result[40 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; } return result; } function stringify( bytes32 input ) private pure returns (bytes memory) { uint256 z = uint256(input); // bytes32 are "0x" followed by 32 bytes of data which take up 2 characters each bytes memory result = new bytes(66); // populate the result with "0x" result[0] = byte(uint8(ASCII_ZERO)); result[1] = byte(uint8(ASCII_LOWER_EX)); // for each byte (starting from the lowest byte), populate the result with two characters for (uint256 i = 0; i < 32; i++) { // each byte takes two characters uint256 shift = i * 2; // populate the least-significant character result[65 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; // populate the most-significant character result[64 - shift] = char(z & FOUR_BIT_MASK); z = z >> 4; } return result; } function char( uint256 input ) private pure returns (byte) { // return ASCII digit (0-9) if (input < 10) { return byte(uint8(input + ASCII_ZERO)); } // return ASCII letter (a-f) return byte(uint8(input + ASCII_RELATIVE_ZERO)); } } /* Copyright 2019 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ library LibEIP712 { // Hash of the EIP712 Domain Separator Schema // keccak256(abi.encodePacked( // "EIP712Domain(", // "string name,", // "string version,", // "uint256 chainId,", // "address verifyingContract", // ")" // )) bytes32 constant internal _EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f; /// @dev Calculates a EIP712 domain separator. /// @param name The EIP712 domain name. /// @param version The EIP712 domain version. /// @param verifyingContract The EIP712 verifying contract. /// @return EIP712 domain separator. function hashEIP712Domain( string memory name, string memory version, uint256 chainId, address verifyingContract ) internal pure returns (bytes32 result) { bytes32 schemaHash = _EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH; // Assembly for more efficient computing: // keccak256(abi.encodePacked( // _EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH, // keccak256(bytes(name)), // keccak256(bytes(version)), // chainId, // uint256(verifyingContract) // )) assembly { // Calculate hashes of dynamic data let nameHash := keccak256(add(name, 32), mload(name)) let versionHash := keccak256(add(version, 32), mload(version)) // Load free memory pointer let memPtr := mload(64) // Store params in memory mstore(memPtr, schemaHash) mstore(add(memPtr, 32), nameHash) mstore(add(memPtr, 64), versionHash) mstore(add(memPtr, 96), chainId) mstore(add(memPtr, 128), verifyingContract) // Compute hash result := keccak256(memPtr, 160) } return result; } /// @dev Calculates EIP712 encoding for a hash struct with a given domain hash. /// @param eip712DomainHash Hash of the domain domain separator data, computed /// with getDomainHash(). /// @param hashStruct The EIP712 hash struct. /// @return EIP712 hash applied to the given EIP712 Domain. function hashEIP712Message(bytes32 eip712DomainHash, bytes32 hashStruct) internal pure returns (bytes32 result) { // Assembly for more efficient computing: // keccak256(abi.encodePacked( // EIP191_HEADER, // EIP712_DOMAIN_HASH, // hashStruct // )); assembly { // Load free memory pointer let memPtr := mload(64) mstore(memPtr, 0x1901000000000000000000000000000000000000000000000000000000000000) // EIP191 header mstore(add(memPtr, 2), eip712DomainHash) // EIP712 domain hash mstore(add(memPtr, 34), hashStruct) // Hash of struct // Compute hash result := keccak256(memPtr, 66) } return result; } } /* Copyright 2019 dYdX Trading Inc. Copyright 2020 Empty Set Squad <[email protected]> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * @title Decimal * @author dYdX * * Library that defines a fixed-point number with 18 decimal places. */ library Decimal { using SafeMath for uint256; // ============ Constants ============ uint256 constant BASE = 10**18; // ============ Structs ============ struct D256 { uint256 value; } // ============ Static Functions ============ function zero() internal pure returns (D256 memory) { return D256({ value: 0 }); } function one() internal pure returns (D256 memory) { return D256({ value: BASE }); } function from( uint256 a ) internal pure returns (D256 memory) { return D256({ value: a.mul(BASE) }); } function ratio( uint256 a, uint256 b ) internal pure returns (D256 memory) { return D256({ value: getPartial(a, BASE, b) }); } // ============ Self Functions ============ function add( D256 memory self, uint256 b ) internal pure returns (D256 memory) { return D256({ value: self.value.add(b.mul(BASE)) }); } function sub( D256 memory self, uint256 b ) internal pure returns (D256 memory) { return D256({ value: self.value.sub(b.mul(BASE)) }); } function sub( D256 memory self, uint256 b, string memory reason ) internal pure returns (D256 memory) { return D256({ value: self.value.sub(b.mul(BASE), reason) }); } function mul( D256 memory self, uint256 b ) internal pure returns (D256 memory) { return D256({ value: self.value.mul(b) }); } function div( D256 memory self, uint256 b ) internal pure returns (D256 memory) { return D256({ value: self.value.div(b) }); } function pow( D256 memory self, uint256 b ) internal pure returns (D256 memory) { if (b == 0) { return from(1); } D256 memory temp = D256({ value: self.value }); for (uint256 i = 1; i < b; i++) { temp = mul(temp, self); } return temp; } function add( D256 memory self, D256 memory b ) internal pure returns (D256 memory) { return D256({ value: self.value.add(b.value) }); } function sub( D256 memory self, D256 memory b ) internal pure returns (D256 memory) { return D256({ value: self.value.sub(b.value) }); } function sub( D256 memory self, D256 memory b, string memory reason ) internal pure returns (D256 memory) { return D256({ value: self.value.sub(b.value, reason) }); } function mul( D256 memory self, D256 memory b ) internal pure returns (D256 memory) { return D256({ value: getPartial(self.value, b.value, BASE) }); } function div( D256 memory self, D256 memory b ) internal pure returns (D256 memory) { return D256({ value: getPartial(self.value, BASE, b.value) }); } function equals(D256 memory self, D256 memory b) internal pure returns (bool) { return self.value == b.value; } function greaterThan(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) == 2; } function lessThan(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) == 0; } function greaterThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) > 0; } function lessThanOrEqualTo(D256 memory self, D256 memory b) internal pure returns (bool) { return compareTo(self, b) < 2; } function isZero(D256 memory self) internal pure returns (bool) { return self.value == 0; } function asUint256(D256 memory self) internal pure returns (uint256) { return self.value.div(BASE); } // ============ Core Methods ============ function getPartial( uint256 target, uint256 numerator, uint256 denominator ) private pure returns (uint256) { return target.mul(numerator).div(denominator); } function compareTo( D256 memory a, D256 memory b ) private pure returns (uint256) { if (a.value == b.value) { return 1; } return a.value > b.value ? 2 : 0; } } /* Copyright 2020 Empty Set Squad <[email protected]> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ library Constants { /* Chain */ uint256 private constant CHAIN_ID = 1; // Mainnet /* Bootstrapping */ uint256 private constant BOOTSTRAPPING_PERIOD = 90; uint256 private constant BOOTSTRAPPING_PRICE = 11e17; // 1.10 USDC uint256 private constant BOOTSTRAPPING_SPEEDUP_FACTOR = 3; // 30 days @ 8 hours /* Oracle */ address private constant USDC = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 private constant ORACLE_RESERVE_MINIMUM = 1e10; // 10,000 USDC /* Bonding */ uint256 private constant INITIAL_STAKE_MULTIPLE = 1e6; // 100 ESD -> 100M ESDS /* Epoch */ uint256 private constant EPOCH_PERIOD = 86400; // 1 day /* Governance */ uint256 private constant GOVERNANCE_PERIOD = 7; uint256 private constant GOVERNANCE_QUORUM = 33e16; // 33% /* DAO */ uint256 private constant ADVANCE_INCENTIVE = 1e20; // 100 ESD /* Market */ uint256 private constant COUPON_EXPIRATION = 90; /* Regulator */ uint256 private constant SUPPLY_CHANGE_LIMIT = 1e17; // 10% uint256 private constant ORACLE_POOL_RATIO = 5; // 5% /** * Getters */ function getUsdc() internal pure returns (address) { return USDC; } function getOracleReserveMinimum() internal pure returns (uint256) { return ORACLE_RESERVE_MINIMUM; } function getEpochPeriod() internal pure returns (uint256) { return EPOCH_PERIOD; } function getInitialStakeMultiple() internal pure returns (uint256) { return INITIAL_STAKE_MULTIPLE; } function getBootstrappingPeriod() internal pure returns (uint256) { return BOOTSTRAPPING_PERIOD; } function getBootstrappingPrice() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: BOOTSTRAPPING_PRICE}); } function getBootstrappingSpeedupFactor() internal pure returns (uint256) { return BOOTSTRAPPING_SPEEDUP_FACTOR; } function getGovernancePeriod() internal pure returns (uint256) { return GOVERNANCE_PERIOD; } function getGovernanceQuorum() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: GOVERNANCE_QUORUM}); } function getAdvanceIncentive() internal pure returns (uint256) { return ADVANCE_INCENTIVE; } function getCouponExpiration() internal pure returns (uint256) { return COUPON_EXPIRATION; } function getSupplyChangeLimit() internal pure returns (Decimal.D256 memory) { return Decimal.D256({value: SUPPLY_CHANGE_LIMIT}); } function getOraclePoolRatio() internal pure returns (uint256) { return ORACLE_POOL_RATIO; } function getChainId() internal pure returns (uint256) { return CHAIN_ID; } } /* Copyright 2020 Empty Set Squad <[email protected]> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ contract Permittable is ERC20Detailed, ERC20 { bytes32 constant FILE = "Permittable"; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant EIP712_PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; string private constant EIP712_VERSION = "1"; bytes32 public EIP712_DOMAIN_SEPARATOR; mapping(address => uint256) nonces; constructor() public { EIP712_DOMAIN_SEPARATOR = LibEIP712.hashEIP712Domain(name(), EIP712_VERSION, Constants.getChainId(), address(this)); } function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external { bytes32 digest = LibEIP712.hashEIP712Message( EIP712_DOMAIN_SEPARATOR, keccak256(abi.encode( EIP712_PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline )) ); address recovered = ecrecover(digest, v, r, s); Require.that( recovered == owner, FILE, "Invalid signature" ); Require.that( recovered != address(0), FILE, "Zero address" ); Require.that( now <= deadline, FILE, "Expired" ); _approve(owner, spender, value); } } /* Copyright 2020 Empty Set Squad <[email protected]> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ contract IDollar is IERC20 { function burn(uint256 amount) public; function burnFrom(address account, uint256 amount) public; function mint(address account, uint256 amount) public returns (bool); } /* Copyright 2020 Empty Set Squad <[email protected]> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ contract Dollar is IDollar, MinterRole, ERC20Detailed, Permittable, ERC20Burnable { constructor() ERC20Detailed("Empty Set Dollar", "ESD", 18) Permittable() public { } function mint(address account, uint256 amount) public onlyMinter returns (bool) { _mint(account, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); if (allowance(sender, _msgSender()) != uint256(-1)) { _approve( sender, _msgSender(), allowance(sender, _msgSender()).sub(amount, "Dollar: transfer amount exceeds allowance")); } return true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"EIP712_DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EIP712_PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040518060400160405280601081526020016f22b6b83a3c9029b2ba102237b63630b960811b815250604051806040016040528060038152602001621154d160ea1b81525060126200007c6200006d6200011760201b60201c565b6001600160e01b036200011c16565b82516200009190600190602086019062000311565b508151620000a790600290602085019062000311565b506003805460ff191660ff92909216919091179055506200010e9050620000cd6200016e565b604051806040016040528060018152602001603160f81b815250620000fc6200020760201b620016341760201c565b306200020c60201b620016391760201c565b60075562000467565b335b90565b620001378160006200026360201b62000d7e1790919060201c565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b60018054604080516020601f60026000196101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015620001fd5780601f10620001d157610100808354040283529160200191620001fd565b820191906000526020600020905b815481529060010190602001808311620001df57829003601f168201915b5050505050905090565b600190565b8351602094850120835193850193909320604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815295860194909452928401929092526060830152608082015260a0902090565b6200027882826001600160e01b03620002c616565b15620002a15760405162461bcd60e51b8152600401620002989062000434565b60405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b038216620002f15760405162461bcd60e51b815260040162000298906200044c565b506001600160a01b03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200035457805160ff191683800117855562000384565b8280016001018555821562000384579182015b828111156200038457825182559160200191906001019062000367565b506200039292915062000396565b5090565b6200011991905b808211156200039257600081556001016200039d565b6000620003c2601f836200045e565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b6000620003fd6022836200045e565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b602080825281016200044681620003b3565b92915050565b602080825281016200044681620003ee565b90815260200190565b61178d80620004776000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806395d89b41116100ad578063aa271e1a11610071578063aa271e1a14610256578063d505accf14610269578063dab400f31461027c578063dd62ed3e14610284578063e879c19f146102975761012c565b806395d89b411461020d578063983b2d56146102155780639865027514610228578063a457c2d714610230578063a9059cbb146102435761012c565b806339509351116100f457806339509351146101ac57806340c10f19146101bf57806342966c68146101d257806370a08231146101e757806379cc6790146101fa5761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461016f57806323b872dd14610184578063313ce56714610197575b600080fd5b61013961029f565b60405161014691906114c6565b60405180910390f35b61016261015d366004610ffc565b610334565b604051610146919061141b565b610177610352565b6040516101469190611429565b610162610192366004610f13565b610358565b61019f6103ca565b6040516101469190611587565b6101626101ba366004610ffc565b6103d3565b6101626101cd366004610ffc565b610427565b6101e56101e036600461102c565b610463565b005b6101776101f5366004610eb3565b610477565b6101e5610208366004610ffc565b610496565b6101396104a4565b6101e5610223366004610eb3565b610502565b6101e5610532565b61016261023e366004610ffc565b610544565b610162610251366004610ffc565b6105b2565b610162610264366004610eb3565b6105c6565b6101e5610277366004610f60565b6105d8565b61017761075f565b610177610292366004610ed9565b610765565b610177610790565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561032a5780601f106102ff5761010080835404028352916020019161032a565b820191906000526020600020905b81548152906001019060200180831161030d57829003601f168201915b5050505050905090565b60006103486103416107b4565b84846107b8565b5060015b92915050565b60065490565b600061036584848461086c565b600019610374856102926107b4565b146103c0576103c0846103856107b4565b6103bb856040518060600160405280602981526020016116fd602991396103ae8a6102926107b4565b919063ffffffff61098216565b6107b8565b5060019392505050565b60035460ff1690565b60006103486103e06107b4565b846103bb85600560006103f16107b4565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6109ae16565b60006104346102646107b4565b6104595760405162461bcd60e51b815260040161045090611517565b60405180910390fd5b61034883836109da565b61047461046e6107b4565b82610a9a565b50565b6001600160a01b0381166000908152600460205260409020545b919050565b6104a08282610b70565b5050565b60028054604080516020601f600019610100600187161502019094168590049384018190048102820181019092528281526060939092909183018282801561032a5780601f106102ff5761010080835404028352916020019161032a565b61050d6102646107b4565b6105295760405162461bcd60e51b815260040161045090611517565b61047481610beb565b61054261053d6107b4565b610c33565b565b60006103486105516107b4565b846103bb85604051806060016040528060258152602001611726602591396005600061057b6107b4565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61098216565b60006103486105bf6107b4565b848461086c565b600061034c818363ffffffff610c7b16565b6007546001600160a01b03881660009081526008602090815260408083208054600181019091559051929361065a93909261063f927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928e928e928e9290918e9101611437565b60405160208183030381529060405280519060200120610cc3565b90506000600182868686604051600081526020016040526040516106819493929190611491565b6020604051602081039080840390855afa1580156106a3573d6000803e3d6000fd5b5050506020604051035190506106f0896001600160a01b0316826001600160a01b0316146a5065726d69747461626c6560a81b70496e76616c6964207369676e617475726560781b610ce2565b6107236001600160a01b03821615156a5065726d69747461626c6560a81b6b5a65726f206164647265737360a01b610ce2565b610749864211156a5065726d69747461626c6560a81b66115e1c1a5c995960ca1b610ce2565b6107548989896107b8565b505050505050505050565b60075481565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3390565b6001600160a01b0383166107de5760405162461bcd60e51b815260040161045090611567565b6001600160a01b0382166108045760405162461bcd60e51b8152600401610450906114f7565b6001600160a01b0380841660008181526005602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061085f908590611429565b60405180910390a3505050565b6001600160a01b0383166108925760405162461bcd60e51b815260040161045090611557565b6001600160a01b0382166108b85760405162461bcd60e51b8152600401610450906114d7565b6108fb816040518060600160405280602681526020016116b3602691396001600160a01b038616600090815260046020526040902054919063ffffffff61098216565b6001600160a01b038085166000908152600460205260408082209390935590841681522054610930908263ffffffff6109ae16565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061085f908590611429565b600081848411156109a65760405162461bcd60e51b815260040161045091906114c6565b505050900390565b6000828201838110156109d35760405162461bcd60e51b815260040161045090611507565b9392505050565b6001600160a01b038216610a005760405162461bcd60e51b815260040161045090611577565b600654610a13908263ffffffff6109ae16565b6006556001600160a01b038216600090815260046020526040902054610a3f908263ffffffff6109ae16565b6001600160a01b0383166000818152600460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a8e908590611429565b60405180910390a35050565b6001600160a01b038216610ac05760405162461bcd60e51b815260040161045090611547565b610b0381604051806060016040528060228152602001611691602291396001600160a01b038516600090815260046020526040902054919063ffffffff61098216565b6001600160a01b038316600090815260046020526040902055600654610b2f908263ffffffff610d3c16565b6006556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a8e908590611429565b610b7a8282610a9a565b6104a082610b866107b4565b6103bb846040518060600160405280602481526020016116d9602491396001600160a01b038816600090815260056020526040812090610bc46107b4565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61098216565b610bfc60008263ffffffff610d7e16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b610c4460008263ffffffff610dca16565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b038216610ca35760405162461bcd60e51b815260040161045090611537565b506001600160a01b03166000908152602091909152604090205460ff1690565b60405161190160f01b8152600281019290925260228201526042902090565b82610d3757610cf082610e12565b6101d160f51b610cff83610e12565b604051602001610d11939291906113ea565b60408051601f198184030181529082905262461bcd60e51b8252610450916004016114c6565b505050565b60006109d383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610982565b610d888282610c7b565b15610da55760405162461bcd60e51b8152600401610450906114e7565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610dd48282610c7b565b610df05760405162461bcd60e51b815260040161045090611527565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b60608082604051602001610e2691906113d5565b60408051601f19818403018152919052905060205b8015610e7b57815160001990910190829082908110610e5657fe5b01602001516001600160f81b03191615610e765760010181529050610491565b610e3b565b505060408051600081526020810190915292915050565b803561034c8161160e565b803561034c81611622565b803561034c8161162b565b600060208284031215610ec557600080fd5b6000610ed18484610e92565b949350505050565b60008060408385031215610eec57600080fd5b6000610ef88585610e92565b9250506020610f0985828601610e92565b9150509250929050565b600080600060608486031215610f2857600080fd5b6000610f348686610e92565b9350506020610f4586828701610e92565b9250506040610f5686828701610e9d565b9150509250925092565b600080600080600080600060e0888a031215610f7b57600080fd5b6000610f878a8a610e92565b9750506020610f988a828b01610e92565b9650506040610fa98a828b01610e9d565b9550506060610fba8a828b01610e9d565b9450506080610fcb8a828b01610ea8565b93505060a0610fdc8a828b01610e9d565b92505060c0610fed8a828b01610e9d565b91505092959891949750929550565b6000806040838503121561100f57600080fd5b600061101b8585610e92565b9250506020610f0985828601610e9d565b60006020828403121561103e57600080fd5b6000610ed18484610e9d565b611053816115a2565b82525050565b611053816115ad565b61105361106e826115b2565b6115bf565b611053816115bf565b61105361106e826115bf565b600061109382611595565b61109d8185610491565b93506110ad8185602086016115d4565b9290920192915050565b60006110c282611595565b6110cc8185611599565b93506110dc8185602086016115d4565b6110e581611604565b9093019392505050565b60006110fc602383611599565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647281526265737360e81b602082015260400192915050565b6000611141601f83611599565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b600061117a602283611599565b7f45524332303a20617070726f766520746f20746865207a65726f206164647265815261737360f01b602082015260400192915050565b60006111be601b83611599565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006111f7603083611599565b7f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526f20746865204d696e74657220726f6c6560801b602082015260400192915050565b6000611249602183611599565b7f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c8152606560f81b602082015260400192915050565b600061128c602283611599565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b60006112d0602183611599565b7f45524332303a206275726e2066726f6d20746865207a65726f206164647265738152607360f81b602082015260400192915050565b6000611313602583611599565b7f45524332303a207472616e736665722066726f6d20746865207a65726f206164815264647265737360d81b602082015260400192915050565b600061135a602483611599565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164648152637265737360e01b602082015260400192915050565b60006113a0601f83611599565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300815260200192915050565b611053816115ce565b60006113e1828461107c565b50602001919050565b60006113f68286611088565b91506114028285611062565b6002820191506114128284611088565b95945050505050565b6020810161034c8284611059565b6020810161034c8284611073565b60c081016114458289611073565b611452602083018861104a565b61145f604083018761104a565b61146c6060830186611073565b6114796080830185611073565b61148660a0830184611073565b979650505050505050565b6080810161149f8287611073565b6114ac60208301866113cc565b6114b96040830185611073565b6114126060830184611073565b602080825281016109d381846110b7565b6020808252810161034c816110ef565b6020808252810161034c81611134565b6020808252810161034c8161116d565b6020808252810161034c816111b1565b6020808252810161034c816111ea565b6020808252810161034c8161123c565b6020808252810161034c8161127f565b6020808252810161034c816112c3565b6020808252810161034c81611306565b6020808252810161034c8161134d565b6020808252810161034c81611393565b6020810161034c82846113cc565b5190565b90815260200190565b600061034c826115c2565b151590565b6001600160f01b03191690565b90565b6001600160a01b031690565b60ff1690565b60005b838110156115ef5781810151838201526020016115d7565b838111156115fe576000848401525b50505050565b601f01601f191690565b611617816115a2565b811461047457600080fd5b611617816115bf565b611617816115ce565b600190565b8351602094850120835193850193909320604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815295860194909452928401929092526060830152608082015260a090209056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365446f6c6c61723a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa365627a7a72315820aefb40e07b1f8c8befa280d890e926a44bc6f25738b112a483aadbb1748cce7a6c6578706572696d656e74616cf564736f6c63430005110040
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806395d89b41116100ad578063aa271e1a11610071578063aa271e1a14610256578063d505accf14610269578063dab400f31461027c578063dd62ed3e14610284578063e879c19f146102975761012c565b806395d89b411461020d578063983b2d56146102155780639865027514610228578063a457c2d714610230578063a9059cbb146102435761012c565b806339509351116100f457806339509351146101ac57806340c10f19146101bf57806342966c68146101d257806370a08231146101e757806379cc6790146101fa5761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461016f57806323b872dd14610184578063313ce56714610197575b600080fd5b61013961029f565b60405161014691906114c6565b60405180910390f35b61016261015d366004610ffc565b610334565b604051610146919061141b565b610177610352565b6040516101469190611429565b610162610192366004610f13565b610358565b61019f6103ca565b6040516101469190611587565b6101626101ba366004610ffc565b6103d3565b6101626101cd366004610ffc565b610427565b6101e56101e036600461102c565b610463565b005b6101776101f5366004610eb3565b610477565b6101e5610208366004610ffc565b610496565b6101396104a4565b6101e5610223366004610eb3565b610502565b6101e5610532565b61016261023e366004610ffc565b610544565b610162610251366004610ffc565b6105b2565b610162610264366004610eb3565b6105c6565b6101e5610277366004610f60565b6105d8565b61017761075f565b610177610292366004610ed9565b610765565b610177610790565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561032a5780601f106102ff5761010080835404028352916020019161032a565b820191906000526020600020905b81548152906001019060200180831161030d57829003601f168201915b5050505050905090565b60006103486103416107b4565b84846107b8565b5060015b92915050565b60065490565b600061036584848461086c565b600019610374856102926107b4565b146103c0576103c0846103856107b4565b6103bb856040518060600160405280602981526020016116fd602991396103ae8a6102926107b4565b919063ffffffff61098216565b6107b8565b5060019392505050565b60035460ff1690565b60006103486103e06107b4565b846103bb85600560006103f16107b4565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6109ae16565b60006104346102646107b4565b6104595760405162461bcd60e51b815260040161045090611517565b60405180910390fd5b61034883836109da565b61047461046e6107b4565b82610a9a565b50565b6001600160a01b0381166000908152600460205260409020545b919050565b6104a08282610b70565b5050565b60028054604080516020601f600019610100600187161502019094168590049384018190048102820181019092528281526060939092909183018282801561032a5780601f106102ff5761010080835404028352916020019161032a565b61050d6102646107b4565b6105295760405162461bcd60e51b815260040161045090611517565b61047481610beb565b61054261053d6107b4565b610c33565b565b60006103486105516107b4565b846103bb85604051806060016040528060258152602001611726602591396005600061057b6107b4565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61098216565b60006103486105bf6107b4565b848461086c565b600061034c818363ffffffff610c7b16565b6007546001600160a01b03881660009081526008602090815260408083208054600181019091559051929361065a93909261063f927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928e928e928e9290918e9101611437565b60405160208183030381529060405280519060200120610cc3565b90506000600182868686604051600081526020016040526040516106819493929190611491565b6020604051602081039080840390855afa1580156106a3573d6000803e3d6000fd5b5050506020604051035190506106f0896001600160a01b0316826001600160a01b0316146a5065726d69747461626c6560a81b70496e76616c6964207369676e617475726560781b610ce2565b6107236001600160a01b03821615156a5065726d69747461626c6560a81b6b5a65726f206164647265737360a01b610ce2565b610749864211156a5065726d69747461626c6560a81b66115e1c1a5c995960ca1b610ce2565b6107548989896107b8565b505050505050505050565b60075481565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3390565b6001600160a01b0383166107de5760405162461bcd60e51b815260040161045090611567565b6001600160a01b0382166108045760405162461bcd60e51b8152600401610450906114f7565b6001600160a01b0380841660008181526005602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061085f908590611429565b60405180910390a3505050565b6001600160a01b0383166108925760405162461bcd60e51b815260040161045090611557565b6001600160a01b0382166108b85760405162461bcd60e51b8152600401610450906114d7565b6108fb816040518060600160405280602681526020016116b3602691396001600160a01b038616600090815260046020526040902054919063ffffffff61098216565b6001600160a01b038085166000908152600460205260408082209390935590841681522054610930908263ffffffff6109ae16565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061085f908590611429565b600081848411156109a65760405162461bcd60e51b815260040161045091906114c6565b505050900390565b6000828201838110156109d35760405162461bcd60e51b815260040161045090611507565b9392505050565b6001600160a01b038216610a005760405162461bcd60e51b815260040161045090611577565b600654610a13908263ffffffff6109ae16565b6006556001600160a01b038216600090815260046020526040902054610a3f908263ffffffff6109ae16565b6001600160a01b0383166000818152600460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a8e908590611429565b60405180910390a35050565b6001600160a01b038216610ac05760405162461bcd60e51b815260040161045090611547565b610b0381604051806060016040528060228152602001611691602291396001600160a01b038516600090815260046020526040902054919063ffffffff61098216565b6001600160a01b038316600090815260046020526040902055600654610b2f908263ffffffff610d3c16565b6006556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a8e908590611429565b610b7a8282610a9a565b6104a082610b866107b4565b6103bb846040518060600160405280602481526020016116d9602491396001600160a01b038816600090815260056020526040812090610bc46107b4565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61098216565b610bfc60008263ffffffff610d7e16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b610c4460008263ffffffff610dca16565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b038216610ca35760405162461bcd60e51b815260040161045090611537565b506001600160a01b03166000908152602091909152604090205460ff1690565b60405161190160f01b8152600281019290925260228201526042902090565b82610d3757610cf082610e12565b6101d160f51b610cff83610e12565b604051602001610d11939291906113ea565b60408051601f198184030181529082905262461bcd60e51b8252610450916004016114c6565b505050565b60006109d383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610982565b610d888282610c7b565b15610da55760405162461bcd60e51b8152600401610450906114e7565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610dd48282610c7b565b610df05760405162461bcd60e51b815260040161045090611527565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b60608082604051602001610e2691906113d5565b60408051601f19818403018152919052905060205b8015610e7b57815160001990910190829082908110610e5657fe5b01602001516001600160f81b03191615610e765760010181529050610491565b610e3b565b505060408051600081526020810190915292915050565b803561034c8161160e565b803561034c81611622565b803561034c8161162b565b600060208284031215610ec557600080fd5b6000610ed18484610e92565b949350505050565b60008060408385031215610eec57600080fd5b6000610ef88585610e92565b9250506020610f0985828601610e92565b9150509250929050565b600080600060608486031215610f2857600080fd5b6000610f348686610e92565b9350506020610f4586828701610e92565b9250506040610f5686828701610e9d565b9150509250925092565b600080600080600080600060e0888a031215610f7b57600080fd5b6000610f878a8a610e92565b9750506020610f988a828b01610e92565b9650506040610fa98a828b01610e9d565b9550506060610fba8a828b01610e9d565b9450506080610fcb8a828b01610ea8565b93505060a0610fdc8a828b01610e9d565b92505060c0610fed8a828b01610e9d565b91505092959891949750929550565b6000806040838503121561100f57600080fd5b600061101b8585610e92565b9250506020610f0985828601610e9d565b60006020828403121561103e57600080fd5b6000610ed18484610e9d565b611053816115a2565b82525050565b611053816115ad565b61105361106e826115b2565b6115bf565b611053816115bf565b61105361106e826115bf565b600061109382611595565b61109d8185610491565b93506110ad8185602086016115d4565b9290920192915050565b60006110c282611595565b6110cc8185611599565b93506110dc8185602086016115d4565b6110e581611604565b9093019392505050565b60006110fc602383611599565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647281526265737360e81b602082015260400192915050565b6000611141601f83611599565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b600061117a602283611599565b7f45524332303a20617070726f766520746f20746865207a65726f206164647265815261737360f01b602082015260400192915050565b60006111be601b83611599565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006111f7603083611599565b7f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526f20746865204d696e74657220726f6c6560801b602082015260400192915050565b6000611249602183611599565b7f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c8152606560f81b602082015260400192915050565b600061128c602283611599565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b60006112d0602183611599565b7f45524332303a206275726e2066726f6d20746865207a65726f206164647265738152607360f81b602082015260400192915050565b6000611313602583611599565b7f45524332303a207472616e736665722066726f6d20746865207a65726f206164815264647265737360d81b602082015260400192915050565b600061135a602483611599565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164648152637265737360e01b602082015260400192915050565b60006113a0601f83611599565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300815260200192915050565b611053816115ce565b60006113e1828461107c565b50602001919050565b60006113f68286611088565b91506114028285611062565b6002820191506114128284611088565b95945050505050565b6020810161034c8284611059565b6020810161034c8284611073565b60c081016114458289611073565b611452602083018861104a565b61145f604083018761104a565b61146c6060830186611073565b6114796080830185611073565b61148660a0830184611073565b979650505050505050565b6080810161149f8287611073565b6114ac60208301866113cc565b6114b96040830185611073565b6114126060830184611073565b602080825281016109d381846110b7565b6020808252810161034c816110ef565b6020808252810161034c81611134565b6020808252810161034c8161116d565b6020808252810161034c816111b1565b6020808252810161034c816111ea565b6020808252810161034c8161123c565b6020808252810161034c8161127f565b6020808252810161034c816112c3565b6020808252810161034c81611306565b6020808252810161034c8161134d565b6020808252810161034c81611393565b6020810161034c82846113cc565b5190565b90815260200190565b600061034c826115c2565b151590565b6001600160f01b03191690565b90565b6001600160a01b031690565b60ff1690565b60005b838110156115ef5781810151838201526020016115d7565b838111156115fe576000848401525b50505050565b601f01601f191690565b611617816115a2565b811461047457600080fd5b611617816115bf565b611617816115ce565b600190565b8351602094850120835193850193909320604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815295860194909452928401929092526060830152608082015260a090209056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365446f6c6c61723a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa365627a7a72315820aefb40e07b1f8c8befa280d890e926a44bc6f25738b112a483aadbb1748cce7a6c6578706572696d656e74616cf564736f6c63430005110040
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.