[ Download CSV Export ]
OVERVIEW
Trisolaris is a Dex on the Aurora engine, an EVM compatible blockchain running in the near ecosystem.Contract Name:
Tri
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity =0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; contract Tri { /// @notice EIP-20 token name for this token string public constant name = "Trisolaris"; /// @notice EIP-20 token symbol for this token string public constant symbol = "TRI"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint public totalSupply = 0; // 500 million Tri /// @notice Address which may mint new tokens address public minter; /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice The EIP-712 typehash for the permit struct used by the contract bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when the minter address is changed event MinterChanged(address minter, address newMinter); /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Construct a new Tri token * @param minter_ The account with minting ability */ constructor(address minter_) public { minter = minter_; emit MinterChanged(address(0), minter); } /** * @notice Change the minter address * @param minter_ The address of the new minter */ function setMinter(address minter_) external { require(msg.sender == minter, "Tri::setMinter: only the minter can change the minter address"); emit MinterChanged(minter, minter_); minter = minter_; } /** * @notice Mint new tokens * @param dst The address of the destination account * @param rawAmount The number of tokens to be minted */ function mint(address dst, uint rawAmount) external { require(msg.sender == minter, "Tri::mint: only the minter can mint"); require(dst != address(0), "Tri::mint: cannot transfer to the zero address"); // mint the amount uint96 amount = safe96(rawAmount, "Tri::mint: amount exceeds 96 bits"); totalSupply = safe96(SafeMath.add(totalSupply, amount), "Tri::mint: totalSupply exceeds 96 bits"); // transfer the amount to the recipient balances[dst] = add96(balances[dst], amount, "Tri::mint: transfer amount overflows"); emit Transfer(address(0), dst, amount); // move delegates _moveDelegates(address(0), delegates[dst], amount); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Tri::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Triggers an approval from owner to spends * @param owner The address to approve from * @param spender The address to be approved * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @param deadline The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function permit(address owner, address spender, uint rawAmount, uint deadline, uint8 v, bytes32 r, bytes32 s) external { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Tri::permit: amount exceeds 96 bits"); } bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, rawAmount, nonces[owner]++, deadline)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Tri::permit: invalid signature"); require(signatory == owner, "Tri::permit: unauthorized"); require(now <= deadline, "Tri::permit: signature expired"); allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "Tri::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "Tri::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "Tri::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Tri::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "Tri::delegateBySig: invalid nonce"); require(now <= expiry, "Tri::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "Tri::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "Tri::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "Tri::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "Tri::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "Tri::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "Tri::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "Tri::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Tri::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"minter_","type":"address"}],"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":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"address","name":"newMinter","type":"address"}],"name":"MinterChanged","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":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"rawAmount","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":"address","name":"minter_","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","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":"dst","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"rawAmount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000805534801561001457600080fd5b506040516122133803806122138339818101604052602081101561003757600080fd5b5051600180546001600160a01b0319166001600160a01b038084169190911791829055604080516000815292909116602083015280517f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f69281900390910190a15061216c806100a76000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c806370a08231116100e3578063c3cda5201161008c578063e7a324dc11610066578063e7a324dc14610569578063f1127ed814610571578063fca3b5aa146105cb57610198565b8063c3cda520146104a3578063d505accf146104ea578063dd62ed3e1461053b57610198565b806395d89b41116100bd57806395d89b4114610449578063a9059cbb14610451578063b4b5ea571461047d57610198565b806370a08231146103b5578063782d6fe1146103db5780637ecebe001461042357610198565b806330adf81f11610145578063587cde1e1161011f578063587cde1e1461032a5780635c19a95c146103505780636fcfff451461037657610198565b806330adf81f146102d6578063313ce567146102de57806340c10f19146102fc57610198565b806318160ddd1161017657806318160ddd1461027e57806320606b701461029857806323b872dd146102a057610198565b806306fdde031461019d578063075461721461021a578063095ea7b31461023e575b600080fd5b6101a56105f1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101df5781810151838201526020016101c7565b50505050905090810190601f16801561020c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610222610617565b604080516001600160a01b039092168252519081900360200190f35b61026a6004803603604081101561025457600080fd5b506001600160a01b038135169060200135610626565b604080519115158252519081900360200190f35b6102866106e9565b60408051918252519081900360200190f35b6102866106ef565b61026a600480360360608110156102b657600080fd5b506001600160a01b03813581169160208101359091169060400135610713565b61028661085d565b6102e6610881565b6040805160ff9092168252519081900360200190f35b6103286004803603604081101561031257600080fd5b506001600160a01b038135169060200135610886565b005b6102226004803603602081101561034057600080fd5b50356001600160a01b0316610a5c565b6103286004803603602081101561036657600080fd5b50356001600160a01b0316610a77565b61039c6004803603602081101561038c57600080fd5b50356001600160a01b0316610a84565b6040805163ffffffff9092168252519081900360200190f35b610286600480360360208110156103cb57600080fd5b50356001600160a01b0316610a9c565b610407600480360360408110156103f157600080fd5b506001600160a01b038135169060200135610ac0565b604080516001600160601b039092168252519081900360200190f35b6102866004803603602081101561043957600080fd5b50356001600160a01b0316610cf0565b6101a5610d02565b61026a6004803603604081101561046757600080fd5b506001600160a01b038135169060200135610d21565b6104076004803603602081101561049357600080fd5b50356001600160a01b0316610d5d565b610328600480360360c08110156104b957600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a00135610dcf565b610328600480360360e081101561050057600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611076565b6102866004803603604081101561055157600080fd5b506001600160a01b038135811691602001351661146c565b6102866114a0565b6105a36004803603604081101561058757600080fd5b5080356001600160a01b0316906020013563ffffffff166114c4565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b610328600480360360208110156105e157600080fd5b50356001600160a01b03166114fa565b6040518060400160405280600a815260200169547269736f6c6172697360b01b81525081565b6001546001600160a01b031681565b60008060001983141561063c5750600019610661565b61065e83604051806060016040528060248152602001611e37602491396115ba565b90505b3360008181526002602090815260408083206001600160a01b0389168085529083529281902080546bffffffffffffffffffffffff19166001600160601b038716908117909155815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a360019150505b92915050565b60005481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6001600160a01b03831660009081526002602090815260408083203380855290835281842054825160608101909352602480845291936001600160601b0390911692859261076b9288929190611e37908301396115ba565b9050866001600160a01b0316836001600160a01b03161415801561079857506001600160601b0382811614155b156108455760006107c283836040518060600160405280603c8152602001611dd6603c913961165d565b6001600160a01b038981166000818152600260209081526040808320948a168084529482529182902080546bffffffffffffffffffffffff19166001600160601b03871690811790915582519081529151949550929391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92592918290030190a3505b6108508787836116ca565b5060019695505050505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b6001546001600160a01b031633146108cf5760405162461bcd60e51b8152600401808060200182810382526023815260200180611eaf6023913960400191505060405180910390fd5b6001600160a01b0382166109145760405162461bcd60e51b815260040180806020018281038252602e815260200180611e81602e913960400191505060405180910390fd5b600061093882604051806060016040528060218152602001612029602191396115ba565b9050610970610952600054836001600160601b03166118b4565b604051806060016040528060268152602001611f7b602691396115ba565b6001600160601b0390811660009081556001600160a01b0385168152600360209081526040918290205482516060810190935260248084526109c2949190911692859290919061204a9083013961190e565b6001600160a01b038416600081815260036020908152604080832080546bffffffffffffffffffffffff19166001600160601b039687161790558051948616855251929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a36001600160a01b03808416600090815260046020526040812054610a57921683611978565b505050565b6004602052600090815260409020546001600160a01b031681565b610a813382611b0c565b50565b60066020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600360205260409020546001600160601b031690565b6000438210610b005760405162461bcd60e51b8152600401808060200182810382526026815260200180611e5b6026913960400191505060405180910390fd5b6001600160a01b03831660009081526006602052604090205463ffffffff1680610b2e5760009150506106e3565b6001600160a01b038416600090815260056020908152604080832063ffffffff600019860181168552925290912054168310610bab576001600160a01b03841660009081526005602090815260408083206000199490940163ffffffff168352929052205464010000000090046001600160601b031690506106e3565b6001600160a01b038416600090815260056020908152604080832083805290915290205463ffffffff16831015610be65760009150506106e3565b600060001982015b8163ffffffff168163ffffffff161115610caa57600282820363ffffffff16048103610c18611dbe565b506001600160a01b038716600090815260056020908152604080832063ffffffff8581168552908352928190208151808301909252549283168082526401000000009093046001600160601b03169181019190915290871415610c85576020015194506106e39350505050565b805163ffffffff16871115610c9c57819350610ca3565b6001820392505b5050610bee565b506001600160a01b038516600090815260056020908152604080832063ffffffff909416835292905220546001600160601b036401000000009091041691505092915050565b60076020526000908152604090205481565b6040518060400160405280600381526020016254524960e81b81525081565b600080610d46836040518060600160405280602581526020016120e1602591396115ba565b9050610d533385836116ca565b5060019392505050565b6001600160a01b03811660009081526006602052604081205463ffffffff1680610d88576000610dc8565b6001600160a01b0383166000908152600560209081526040808320600019850163ffffffff16845290915290205464010000000090046001600160601b03165b9392505050565b60408051808201909152600a815269547269736f6c6172697360b01b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f4e0553bdd6e585d05c02ad0ff78bc7a8dab2ef42230716e8bf390f640ac71125610e3d611ba3565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a9052825180850390910181526101408401835280519085012061190160f01b6101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a90526102228601899052935192965090949293909260019261024280840193601f198301929081900390910190855afa158015610f70573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610fc25760405162461bcd60e51b8152600401808060200182810382526025815260200180611e126025913960400191505060405180910390fd5b6001600160a01b038116600090815260076020526040902080546001810190915589146110205760405162461bcd60e51b815260040180806020018281038252602181526020018061206e6021913960400191505060405180910390fd5b8742111561105f5760405162461bcd60e51b8152600401808060200182810382526025815260200180611fa16025913960400191505060405180910390fd5b611069818b611b0c565b505050505b505050505050565b600060001986141561108b57506000196110b0565b6110ad866040518060600160405280602381526020016120be602391396115ba565b90505b60408051808201909152600a815269547269736f6c6172697360b01b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f4e0553bdd6e585d05c02ad0ff78bc7a8dab2ef42230716e8bf390f640ac7112561111e611ba3565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401206001600160a01b038d8116600081815260078752848120805460018082019092557f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960c089015260e0880193909352928f1661010087015261012086018e90526101408601919091526101608086018d9052845180870390910181526101808601855280519087012061190160f01b6101a08701526101a286018490526101c2808701829052855180880390910181526101e2870180875281519189019190912090839052610202870180875281905260ff8d1661022288015261024287018c905261026287018b90529451939750959394909391926102828083019392601f198301929081900390910190855afa15801561127a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112e2576040805162461bcd60e51b815260206004820152601e60248201527f5472693a3a7065726d69743a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b8b6001600160a01b0316816001600160a01b031614611348576040805162461bcd60e51b815260206004820152601960248201527f5472693a3a7065726d69743a20756e617574686f72697a656400000000000000604482015290519081900360640190fd5b8842111561139d576040805162461bcd60e51b815260206004820152601e60248201527f5472693a3a7065726d69743a207369676e617475726520657870697265640000604482015290519081900360640190fd5b84600260008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b031602179055508a6001600160a01b03168c6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258760405180826001600160601b0316815260200191505060405180910390a3505050505050505050505050565b6001600160a01b0391821660009081526002602090815260408083209390941682529190915220546001600160601b031690565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600560209081526000928352604080842090915290825290205463ffffffff81169064010000000090046001600160601b031682565b6001546001600160a01b031633146115435760405162461bcd60e51b815260040180806020018281038252603d815260200180611fc6603d913960400191505060405180910390fd5b600154604080516001600160a01b039283168152918316602083015280517f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f69281900390910190a16001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000816c0100000000000000000000000084106116555760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561161a578181015183820152602001611602565b50505050905090810190601f1680156116475780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6000836001600160601b0316836001600160601b0316111582906116c25760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561161a578181015183820152602001611602565b505050900390565b6001600160a01b03831661170f5760405162461bcd60e51b815260040180806020018281038252603b815260200180611ed2603b913960400191505060405180910390fd5b6001600160a01b0382166117545760405162461bcd60e51b8152600401808060200182810382526039815260200180611f0d6039913960400191505060405180910390fd5b6001600160a01b03831660009081526003602090815260409182902054825160608101909352603580845261179f936001600160601b039092169285929190611f469083013961165d565b6001600160a01b03848116600090815260036020908152604080832080546bffffffffffffffffffffffff19166001600160601b0396871617905592861682529082902054825160608101909352602f80845261180c949190911692859290919061208f9083013961190e565b6001600160a01b0383811660008181526003602090815260409182902080546bffffffffffffffffffffffff19166001600160601b039687161790558151948616855290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a36001600160a01b03808416600090815260046020526040808220548584168352912054610a5792918216911683611978565b600082820183811015610dc8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000838301826001600160601b03808716908316101561196f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561161a578181015183820152602001611602565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156119a357506000816001600160601b0316115b15610a57576001600160a01b03831615611a5c576001600160a01b03831660009081526006602052604081205463ffffffff1690816119e3576000611a23565b6001600160a01b0385166000908152600560209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b90506000611a4a82856040518060600160405280602781526020016121066027913961165d565b9050611a5886848484611ba7565b5050505b6001600160a01b03821615610a57576001600160a01b03821660009081526006602052604081205463ffffffff169081611a97576000611ad7565b6001600160a01b0384166000908152600560209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b90506000611afe82856040518060600160405280602681526020016120036026913961190e565b905061106e85848484611ba7565b6001600160a01b038083166000818152600460208181526040808420805460038452828620549490935287871673ffffffffffffffffffffffffffffffffffffffff1984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4611b9d828483611978565b50505050565b4690565b6000611bcb4360405180606001604052806033815260200161212d60339139611d68565b905060008463ffffffff16118015611c1457506001600160a01b038516600090815260056020908152604080832063ffffffff6000198901811685529252909120548282169116145b15611c74576001600160a01b0385166000908152600560209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff0000000019166401000000006001600160601b03851602179055611d14565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600583528781208c871682528352878120965187549451909516640100000000026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600690935292909220805460018801909316929091169190911790555b604080516001600160601b0380861682528416602082015281516001600160a01b038816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b60008164010000000084106116555760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561161a578181015183820152602001611602565b60408051808201909152600080825260208201529056fe5472693a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e63655472693a3a64656c656761746542795369673a20696e76616c6964207369676e61747572655472693a3a617070726f76653a20616d6f756e74206578636565647320393620626974735472693a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e65645472693a3a6d696e743a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573735472693a3a6d696e743a206f6e6c7920746865206d696e7465722063616e206d696e745472693a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f20616464726573735472693a3a5f7472616e73666572546f6b656e733a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573735472693a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e63655472693a3a6d696e743a20746f74616c537570706c79206578636565647320393620626974735472693a3a64656c656761746542795369673a207369676e617475726520657870697265645472693a3a7365744d696e7465723a206f6e6c7920746865206d696e7465722063616e206368616e676520746865206d696e74657220616464726573735472693a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77735472693a3a6d696e743a20616d6f756e74206578636565647320393620626974735472693a3a6d696e743a207472616e7366657220616d6f756e74206f766572666c6f77735472693a3a64656c656761746542795369673a20696e76616c6964206e6f6e63655472693a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f77735472693a3a7065726d69743a20616d6f756e74206578636565647320393620626974735472693a3a7472616e736665723a20616d6f756e74206578636565647320393620626974735472693a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f77735472693a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473a164736f6c634300060c000a000000000000000000000000af22b40ab6352368b3f224e016ff9af962734ba5
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000af22b40ab6352368b3f224e016ff9af962734ba5
-----Decoded View---------------
Arg [0] : minter_ (address): 0xaf22b40ab6352368b3f224e016ff9af962734ba5
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000af22b40ab6352368b3f224e016ff9af962734ba5
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.