Overview
Max Total Supply
498,375.621705343224764469 WAR
Holders
19 (0.00%)
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
WarToken
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//██████╗ █████╗ ██╗ █████╗ ██████╗ ██╗███╗ ██╗ //██╔══██╗██╔══██╗██║ ██╔══██╗██╔══██╗██║████╗ ██║ //██████╔╝███████║██║ ███████║██║ ██║██║██╔██╗ ██║ //██╔═══╝ ██╔══██║██║ ██╔══██║██║ ██║██║██║╚██╗██║ //██║ ██║ ██║███████╗██║ ██║██████╔╝██║██║ ╚████║ //╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝╚═╝ ╚═══╝ pragma solidity 0.8.16; //SPDX-License-Identifier: BUSL-1.1 import {ERC20} from "solmate/tokens/ERC20.sol"; import {AccessControl} from "openzeppelin/access/AccessControl.sol"; import {Errors} from "utils/Errors.sol"; /** * @title Warlord Token contract * @author Paladin * @notice ERC20 token minted by deposit in Warlord */ contract WarToken is ERC20, AccessControl { /** * @notice Event emitted when a new pending owner is set */ event NewPendingOwner(address indexed previousPendingOwner, address indexed newPendingOwner); /** * @notice Address of the current pending owner */ address public pendingOwner; /** * @notice Address of the current owner */ address public owner; /** * @notice Minter role */ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /** * @notice Burner role */ bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); // Constructor constructor() ERC20("Warlord token", "WAR", 18) { owner = msg.sender; _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _setRoleAdmin(DEFAULT_ADMIN_ROLE, keccak256("NO_ROLE")); } /** * @notice Set the given address as the new pending owner * @param newOwner Address to set as pending owner */ function transferOwnership(address newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { if (newOwner == address(0)) revert Errors.ZeroAddress(); if (newOwner == owner) revert Errors.CannotBeOwner(); address oldPendingOwner = pendingOwner; pendingOwner = newOwner; emit NewPendingOwner(oldPendingOwner, newOwner); } /** * @notice Accept the ownership transfer (only callable by the current pending owner) */ function acceptOwnership() external { if (msg.sender != pendingOwner) revert Errors.CallerNotPendingOwner(); address newOwner = pendingOwner; // Revoke the previous owner ADMIN role and set it for the new owner _revokeRole(DEFAULT_ADMIN_ROLE, owner); _grantRole(DEFAULT_ADMIN_ROLE, newOwner); owner = newOwner; // Reset the pending owner pendingOwner = address(0); emit NewPendingOwner(newOwner, address(0)); } /** * @notice Mints the given amount of tokens to the given address * @param to Address to mint token to * @param amount Amount of token to mint */ function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { _mint(to, amount); } /** * @notice Burns the given amount of tokens from the given address * @param from Address to burn token from * @param amount Amount of token to burn */ function burn(address from, uint256 amount) external onlyRole(BURNER_ROLE) { _burn(from, amount); } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * @param spender The address of the spender * @param addedValue Amount of token to increase the allowance */ function increaseAllowance(address spender, uint256 addedValue) external returns (bool) { uint256 newAllowance = allowance[msg.sender][spender] + addedValue; allowance[msg.sender][spender] = newAllowance; emit Approval(msg.sender, spender, newAllowance); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * @param spender The address of the spender * @param subtractedValue Amount of token to increase the allowance */ function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) { uint256 currentAllowance = allowance[msg.sender][spender]; if (subtractedValue > currentAllowance) revert Errors.AllowanceUnderflow(); uint256 newAllowance = currentAllowance - subtractedValue; allowance[msg.sender][spender] = newAllowance; emit Approval(msg.sender, spender, newAllowance); return true; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
pragma solidity 0.8.16; //SPDX-License-Identifier: Unlicensed library Errors { // Argument validation error ZeroAddress(); error ZeroValue(); error DifferentSizeArrays(uint256 size1, uint256 size2); error EmptyArray(); error AlreadySet(); error SameAddress(); error InvalidParameter(); // Ownership error CannotBeOwner(); error CallerNotPendingOwner(); error CallerNotAllowed(); // Token error AllowanceUnderflow(); // Controller error ListedLocker(); error ListedFarmer(); error InvalidFeeRatio(); error HarvestNotAllowed(); // Locker error NoWarLocker(); // _locker[token] == 0x0 error LockerShutdown(); error MismatchingLocker(address expected, address actual); // Minter error MintAmountBiggerThanSupply(); // Redeemer error NotListedLocker(); error InvalidIndex(); error CannotRedeemYet(); error AlreadyRedeemed(); error InvalidWeightSum(); // Staker error AlreadyListedDepositor(); error NotListedDepositor(); error MismatchingFarmer(); // MintRatio error ZeroMintAmount(); error SupplyAlreadySet(); error RatioAlreadySet(); // Harvestable error NotRewardToken(); // IFarmer error IncorrectToken(); error UnstakingMoreThanBalance(); // Maths error NumberExceed128Bits(); // AuraBalFarmer error SlippageTooHigh(); // Admin error RecoverForbidden(); // AuraLocker error DelegationRequiresLock(); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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 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. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "interfaces/=src/interfaces/", "mocks/=test/mocks/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "solgen/=lib/solidity-generators/src/", "solidity-generators/=lib/solidity-generators/src/", "solmate/=lib/solmate/src/", "utils/=src/utils/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowanceUnderflow","type":"error"},{"inputs":[],"name":"CallerNotPendingOwner","type":"error"},{"inputs":[],"name":"CannotBeOwner","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousPendingOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newPendingOwner","type":"address"}],"name":"NewPendingOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"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":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b506040518060400160405280600d81526020016c2bb0b93637b932103a37b5b2b760991b815250604051806040016040528060038152602001622ba0a960e91b8152506012826000908162000067919062000319565b50600162000076838262000319565b5060ff81166080524660a0526200008c620000e8565b60c0525050600880546001600160a01b03191633908117909155620000b5915060009062000184565b620000e260007fd022807ea312421efb536c4eee26b377aa093289ff3a0cedfa83ecef6b836ab162000229565b62000463565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516200011c9190620003e5565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620002255760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001e43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600082815260066020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200029f57607f821691505b602082108103620002c057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200031457600081815260208120601f850160051c81016020861015620002ef5750805b601f850160051c820191505b818110156200031057828155600101620002fb565b5050505b505050565b81516001600160401b0381111562000335576200033562000274565b6200034d816200034684546200028a565b84620002c6565b602080601f8311600181146200038557600084156200036c5750858301515b600019600386901b1c1916600185901b17855562000310565b600085815260208120601f198616915b82811015620003b65788860151825594840194600190910190840162000395565b5085821015620003d55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000808354620003f5816200028a565b60018281168015620004105760018114620004265762000457565b60ff198416875282151583028701945062000457565b8760005260208060002060005b858110156200044e5781548a82015290840190820162000433565b50505082870194505b50929695505050505050565b60805160a05160c0516116456200049360003960006106f6015260006106c1015260006102b201526116456000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806379ba509711610104578063a457c2d7116100a2578063d547741f11610071578063d547741f14610430578063dd62ed3e14610443578063e30c39781461046e578063f2fde38b1461048157600080fd5b8063a457c2d7146103d0578063a9059cbb146103e3578063d505accf146103f6578063d53913931461040957600080fd5b806391d14854116100de57806391d148541461039a57806395d89b41146103ad5780639dc29fac146103b5578063a217fddf146103c857600080fd5b806379ba5097146103475780637ecebe001461034f5780638da5cb5b1461036f57600080fd5b80632f2ff15d1161017157806336568abe1161014b57806336568abe146102ee578063395093511461030157806340c10f191461031457806370a082311461032757600080fd5b80632f2ff15d14610298578063313ce567146102ad5780633644e515146102e657600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd1461023b578063248a9ca31461024e578063282c51f31461027157600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e23660046111e3565b610494565b60405190151581526020015b60405180910390f35b6102046104cb565b6040516101f39190611231565b6101e761021f366004611280565b610559565b61022d60025481565b6040519081526020016101f3565b6101e76102493660046112aa565b6105b3565b61022d61025c3660046112e6565b60009081526006602052604090206001015490565b61022d7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6102ab6102a63660046112ff565b610693565b005b6102d47f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101f3565b61022d6106bd565b6102ab6102fc3660046112ff565b610718565b6101e761030f366004611280565b61079b565b6102ab610322366004611280565b610821565b61022d61033536600461132b565b60036020526000908152604090205481565b6102ab610855565b61022d61035d36600461132b565b60056020526000908152604090205481565b600854610382906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b6101e76103a83660046112ff565b610901565b61020461092c565b6102ab6103c3366004611280565b610939565b61022d600081565b6101e76103de366004611280565b61096d565b6101e76103f1366004611280565b610a14565b6102ab610404366004611346565b610a7a565b61022d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102ab61043e3660046112ff565b610cac565b61022d6104513660046113b9565b600460209081526000928352604080842090915290825290205481565b600754610382906001600160a01b031681565b6102ab61048f36600461132b565b610cd1565b60006001600160e01b03198216637965db0b60e01b14806104c557506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080546104d8906113e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610504906113e3565b80156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290916000805160206115f0833981519152906105a29086815260200190565b60405180910390a350600192915050565b6001600160a01b0383166000908152600460209081526040808320338452909152812054600019811461060f576105ea8382611433565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b03851660009081526003602052604081208054859290610637908490611433565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716906000805160206115d0833981519152906106809087815260200190565b60405180910390a3506001949350505050565b6000828152600660205260409020600101546106ae81610d85565b6106b88383610d92565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146106f3576106ee610e18565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b038116331461078d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107978282610eb2565b5050565b3360009081526004602090815260408083206001600160a01b038616845290915281205481906107cc908490611446565b3360008181526004602090815260408083206001600160a01b038a16808552908352928190208590555184815293945090926000805160206115f0833981519152910160405180910390a35060019392505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661084b81610d85565b6106b88383610f19565b6007546001600160a01b03163314610880576040516305e05b4b60e31b815260040160405180910390fd5b6007546008546001600160a01b039182169161089f9160009116610eb2565b6108aa600082610d92565b600880546001600160a01b0383166001600160a01b03199182168117909255600780549091169055604051600091907fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b908390a350565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600180546104d8906113e3565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84861096381610d85565b6106b88383610f73565b3360009081526004602090815260408083206001600160a01b0386168452909152812054808311156109b257604051631060356760e31b815260040160405180910390fd5b60006109be8483611433565b3360008181526004602090815260408083206001600160a01b038b16808552908352928190208590555184815293945090926000805160206115f0833981519152910160405180910390a3506001949350505050565b33600090815260036020526040812080548391908390610a35908490611433565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133906000805160206115d0833981519152906105a29086815260200190565b42841015610aca5760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610784565b60006001610ad66106bd565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610be2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610c185750876001600160a01b0316816001600160a01b0316145b610c555760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401610784565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16916000805160206115f0833981519152910160405180910390a350505050505050565b600082815260066020526040902060010154610cc781610d85565b6106b88383610eb2565b6000610cdc81610d85565b6001600160a01b038216610d035760405163d92e233d60e01b815260040160405180910390fd5b6008546001600160a01b0390811690831603610d325760405163d5e889bf60e01b815260040160405180910390fd5b600780546001600160a01b038481166001600160a01b0319831681179093556040519116919082907fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b90600090a3505050565b610d8f8133610fd5565b50565b610d9c8282610901565b6107975760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dd43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610e4a9190611459565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b610ebc8282610901565b156107975760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8060026000828254610f2b9190611446565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481526000805160206115d083398151915291015b60405180910390a35050565b6001600160a01b03821660009081526003602052604081208054839290610f9b908490611433565b90915550506002805482900390556040518181526000906001600160a01b038416906000805160206115d083398151915290602001610f67565b610fdf8282610901565b61079757610fec8161102e565b610ff7836020611040565b6040516020016110089291906114f8565b60408051601f198184030181529082905262461bcd60e51b825261078491600401611231565b60606104c56001600160a01b03831660145b6060600061104f83600261156d565b61105a906002611446565b67ffffffffffffffff8111156110725761107261158c565b6040519080825280601f01601f19166020018201604052801561109c576020820181803683370190505b509050600360fc1b816000815181106110b7576110b76115a2565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106110e6576110e66115a2565b60200101906001600160f81b031916908160001a905350600061110a84600261156d565b611115906001611446565b90505b600181111561118d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611149576111496115a2565b1a60f81b82828151811061115f5761115f6115a2565b60200101906001600160f81b031916908160001a90535060049490941c93611186816115b8565b9050611118565b5083156111dc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610784565b9392505050565b6000602082840312156111f557600080fd5b81356001600160e01b0319811681146111dc57600080fd5b60005b83811015611228578181015183820152602001611210565b50506000910152565b602081526000825180602084015261125081604085016020870161120d565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461127b57600080fd5b919050565b6000806040838503121561129357600080fd5b61129c83611264565b946020939093013593505050565b6000806000606084860312156112bf57600080fd5b6112c884611264565b92506112d660208501611264565b9150604084013590509250925092565b6000602082840312156112f857600080fd5b5035919050565b6000806040838503121561131257600080fd5b8235915061132260208401611264565b90509250929050565b60006020828403121561133d57600080fd5b6111dc82611264565b600080600080600080600060e0888a03121561136157600080fd5b61136a88611264565b965061137860208901611264565b95506040880135945060608801359350608088013560ff8116811461139c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156113cc57600080fd5b6113d583611264565b915061132260208401611264565b600181811c908216806113f757607f821691505b60208210810361141757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104c5576104c561141d565b808201808211156104c5576104c561141d565b600080835481600182811c91508083168061147557607f831692505b6020808410820361149457634e487b7160e01b86526022600452602486fd5b8180156114a857600181146114bd576114ea565b60ff19861689528415158502890196506114ea565b60008a81526020902060005b868110156114e25781548b8201529085019083016114c9565b505084890196505b509498975050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161153081601785016020880161120d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161156181602884016020880161120d565b01602801949350505050565b60008160001904831182151516156115875761158761141d565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115c7576115c761141d565b50600019019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a2646970667358221220aa8a5e8976ed31c51d96ccd53a22d103de806a1e3fc573686560ce6ac8ae20b664736f6c63430008100033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806379ba509711610104578063a457c2d7116100a2578063d547741f11610071578063d547741f14610430578063dd62ed3e14610443578063e30c39781461046e578063f2fde38b1461048157600080fd5b8063a457c2d7146103d0578063a9059cbb146103e3578063d505accf146103f6578063d53913931461040957600080fd5b806391d14854116100de57806391d148541461039a57806395d89b41146103ad5780639dc29fac146103b5578063a217fddf146103c857600080fd5b806379ba5097146103475780637ecebe001461034f5780638da5cb5b1461036f57600080fd5b80632f2ff15d1161017157806336568abe1161014b57806336568abe146102ee578063395093511461030157806340c10f191461031457806370a082311461032757600080fd5b80632f2ff15d14610298578063313ce567146102ad5780633644e515146102e657600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd1461023b578063248a9ca31461024e578063282c51f31461027157600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e23660046111e3565b610494565b60405190151581526020015b60405180910390f35b6102046104cb565b6040516101f39190611231565b6101e761021f366004611280565b610559565b61022d60025481565b6040519081526020016101f3565b6101e76102493660046112aa565b6105b3565b61022d61025c3660046112e6565b60009081526006602052604090206001015490565b61022d7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b6102ab6102a63660046112ff565b610693565b005b6102d47f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016101f3565b61022d6106bd565b6102ab6102fc3660046112ff565b610718565b6101e761030f366004611280565b61079b565b6102ab610322366004611280565b610821565b61022d61033536600461132b565b60036020526000908152604090205481565b6102ab610855565b61022d61035d36600461132b565b60056020526000908152604090205481565b600854610382906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b6101e76103a83660046112ff565b610901565b61020461092c565b6102ab6103c3366004611280565b610939565b61022d600081565b6101e76103de366004611280565b61096d565b6101e76103f1366004611280565b610a14565b6102ab610404366004611346565b610a7a565b61022d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102ab61043e3660046112ff565b610cac565b61022d6104513660046113b9565b600460209081526000928352604080842090915290825290205481565b600754610382906001600160a01b031681565b6102ab61048f36600461132b565b610cd1565b60006001600160e01b03198216637965db0b60e01b14806104c557506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080546104d8906113e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610504906113e3565b80156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290916000805160206115f0833981519152906105a29086815260200190565b60405180910390a350600192915050565b6001600160a01b0383166000908152600460209081526040808320338452909152812054600019811461060f576105ea8382611433565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b03851660009081526003602052604081208054859290610637908490611433565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716906000805160206115d0833981519152906106809087815260200190565b60405180910390a3506001949350505050565b6000828152600660205260409020600101546106ae81610d85565b6106b88383610d92565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000146146106f3576106ee610e18565b905090565b507fd01826984f7ff535bcfe87a1c1f374c28126e5425f407520a1cc2299d95f9ad190565b6001600160a01b038116331461078d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107978282610eb2565b5050565b3360009081526004602090815260408083206001600160a01b038616845290915281205481906107cc908490611446565b3360008181526004602090815260408083206001600160a01b038a16808552908352928190208590555184815293945090926000805160206115f0833981519152910160405180910390a35060019392505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661084b81610d85565b6106b88383610f19565b6007546001600160a01b03163314610880576040516305e05b4b60e31b815260040160405180910390fd5b6007546008546001600160a01b039182169161089f9160009116610eb2565b6108aa600082610d92565b600880546001600160a01b0383166001600160a01b03199182168117909255600780549091169055604051600091907fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b908390a350565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600180546104d8906113e3565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84861096381610d85565b6106b88383610f73565b3360009081526004602090815260408083206001600160a01b0386168452909152812054808311156109b257604051631060356760e31b815260040160405180910390fd5b60006109be8483611433565b3360008181526004602090815260408083206001600160a01b038b16808552908352928190208590555184815293945090926000805160206115f0833981519152910160405180910390a3506001949350505050565b33600090815260036020526040812080548391908390610a35908490611433565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133906000805160206115d0833981519152906105a29086815260200190565b42841015610aca5760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610784565b60006001610ad66106bd565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610be2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610c185750876001600160a01b0316816001600160a01b0316145b610c555760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401610784565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16916000805160206115f0833981519152910160405180910390a350505050505050565b600082815260066020526040902060010154610cc781610d85565b6106b88383610eb2565b6000610cdc81610d85565b6001600160a01b038216610d035760405163d92e233d60e01b815260040160405180910390fd5b6008546001600160a01b0390811690831603610d325760405163d5e889bf60e01b815260040160405180910390fd5b600780546001600160a01b038481166001600160a01b0319831681179093556040519116919082907fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b90600090a3505050565b610d8f8133610fd5565b50565b610d9c8282610901565b6107975760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610dd43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610e4a9190611459565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b610ebc8282610901565b156107975760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8060026000828254610f2b9190611446565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481526000805160206115d083398151915291015b60405180910390a35050565b6001600160a01b03821660009081526003602052604081208054839290610f9b908490611433565b90915550506002805482900390556040518181526000906001600160a01b038416906000805160206115d083398151915290602001610f67565b610fdf8282610901565b61079757610fec8161102e565b610ff7836020611040565b6040516020016110089291906114f8565b60408051601f198184030181529082905262461bcd60e51b825261078491600401611231565b60606104c56001600160a01b03831660145b6060600061104f83600261156d565b61105a906002611446565b67ffffffffffffffff8111156110725761107261158c565b6040519080825280601f01601f19166020018201604052801561109c576020820181803683370190505b509050600360fc1b816000815181106110b7576110b76115a2565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106110e6576110e66115a2565b60200101906001600160f81b031916908160001a905350600061110a84600261156d565b611115906001611446565b90505b600181111561118d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611149576111496115a2565b1a60f81b82828151811061115f5761115f6115a2565b60200101906001600160f81b031916908160001a90535060049490941c93611186816115b8565b9050611118565b5083156111dc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610784565b9392505050565b6000602082840312156111f557600080fd5b81356001600160e01b0319811681146111dc57600080fd5b60005b83811015611228578181015183820152602001611210565b50506000910152565b602081526000825180602084015261125081604085016020870161120d565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461127b57600080fd5b919050565b6000806040838503121561129357600080fd5b61129c83611264565b946020939093013593505050565b6000806000606084860312156112bf57600080fd5b6112c884611264565b92506112d660208501611264565b9150604084013590509250925092565b6000602082840312156112f857600080fd5b5035919050565b6000806040838503121561131257600080fd5b8235915061132260208401611264565b90509250929050565b60006020828403121561133d57600080fd5b6111dc82611264565b600080600080600080600060e0888a03121561136157600080fd5b61136a88611264565b965061137860208901611264565b95506040880135945060608801359350608088013560ff8116811461139c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156113cc57600080fd5b6113d583611264565b915061132260208401611264565b600181811c908216806113f757607f821691505b60208210810361141757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104c5576104c561141d565b808201808211156104c5576104c561141d565b600080835481600182811c91508083168061147557607f831692505b6020808410820361149457634e487b7160e01b86526022600452602486fd5b8180156114a857600181146114bd576114ea565b60ff19861689528415158502890196506114ea565b60008a81526020902060005b868110156114e25781548b8201529085019083016114c9565b505084890196505b509498975050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161153081601785016020880161120d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161156181602884016020880161120d565b01602801949350505050565b60008160001904831182151516156115875761158761141d565b500290565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816115c7576115c761141d565b50600019019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a2646970667358221220aa8a5e8976ed31c51d96ccd53a22d103de806a1e3fc573686560ce6ac8ae20b664736f6c63430008100033
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.