ERC-20
Blockchain
Overview
Max Total Supply
7,610,389,830.566409999982229948 CWEB
Holders
7,289 (0.00%)
Market
Price
$0.00 @ 0.000001 ETH (+2.64%)
Onchain Market Cap
$35,261,891.11
Circulating Supply Market Cap
$10,821,863.78
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000000000000001 CWEBValue
$0.00 ( ~0 Eth) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CoinwebToken
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import 'openzeppelin-solidity/contracts/token/ERC777/ERC777.sol'; import './TokenReleaser.sol'; contract CoinwebToken is ERC777 { event Deployed(address releaser ); TokenReleaser rel; constructor() ERC777("Coinweb", "CWEB", new address[](0) ) { // This is equivalent to the expresion `7_680_000_000 ether`, but // we prefer being more explicit here to avoid confusion. uint256 totalSupply = 7_680_000_000 * 10 ** decimals(); _mint(msg.sender, totalSupply, "", ""); ////////////////////////////////////////////////////////////////// // TokenReleaser Admins: rel = new TokenReleaser( 0x3C159347b33cABabdb6980081f9408759833129b // Admin A , 0xE147f1Ae58466A64Ca13Af6534FC1651ecd0af43 // Admin B , this , totalSupply ); emit Deployed(address(rel)); transfer(address(rel), totalSupply ); // Pass token control the token releaser. ////////////////////////////////////////////////////////////////// } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // We'll actually use ERC777, but any IERC20 instance (including ERC777) // is supported. import 'openzeppelin-solidity/contracts/token/ERC20/IERC20.sol'; contract TokenReleaser { ///////////////////////////////////////////////////////////////////////////////////////////////////// // This smart contract is divided into 3 parts: // // - The first part defines the different types of releases (i.e token release for seed round investor, // token release for team and advisor ...etc). Here we define the `ReleaseType` and `ReleaseSchedule` // types, and the function `setTokenomics` which associate to each ReleaseType its associated // `ReleaseSchedule`. The association between the type of release and its schedule is what we call // the `tokenomic`. Notice `setTokenomics` is called only once, therefore `tokenomic` behaves like // a constant (unfortunately, due to solidity limitations it couldn't get declared as such). // // - Second part defines the `Beneficiary`, which represent an user (or more generally an address), // that got some tokens booked; and the external function `releaseToken`. A beneficiary will call // `releaseToken` to receive tokens, which will be sent according to the Beneficiary's release // schedule type. Notice `releaseToken` is the only public function a non-admin user can call. // // - The third part defines the admins, and the action they control. Each of these actions // is represented by a function and an Event. For security and simplicity reason, we've decide // to keep a fixed max number of admins, 3 of them specifically (though by default we only enable 2 // of them). At any time, any admin can modify the list of admins. // // Types, variables and events are defined right before they are mentioned on code. IERC20 public tokenContract; constructor(address _adminA, address _adminB, IERC20 _contract, uint256 avaliableTokens){ tokenContract = _contract; adminA = _adminA; adminB = _adminB; setTokenomics(avaliableTokens); } ////////////////////////////////////////////////////////////////////////////////////////////////////// // First part: enum ReleaseType { SEED_ROUND , PRIVATE_ROUND , STRATEGIC_ROUND , PUBLIC_SALE , COMPANY_RESERVE , TEAM_AND_ADVISORS , STRATEGIC_PARTNERS , FOUNDERS_AND_EARLY_CONTRIBUTORS , MINING_RESERVE } // Information about how an specific ReleaseType will be scheduled. struct ReleaseSchedule { uint256 tokenLockTime ; // lockup time after the release time starts. uint256 tokenReleaseDuration ; // vesting time during which the token will be gradually released. // if 0, it means everything available at once. uint256 immediateAccessTimeWindow ; // When the release time starts, the beneficiary will have immediate access to } // all the tokens to be released to him during the his `immediateAccessTimeWindow`. mapping(ReleaseType => ReleaseSchedule) public tokenomic; uint256 public avaliableTokensToRelease; // Defines the total amount of tokens available to get release, and how the schedule // for each type of release will be. function setTokenomics(uint256 avaliableTokens) private{ // NOTICE: we take a month to be equivalent to 30 days, regardless of actual calendar months. // In particular, 12 month would not sum up a whole year, but 360 days. tokenomic[ ReleaseType.SEED_ROUND ] = ReleaseSchedule ({ tokenLockTime : 0 * 30 days , tokenReleaseDuration : 24 * 30 days , immediateAccessTimeWindow : 1 * 30 days } ); tokenomic[ ReleaseType.PRIVATE_ROUND ] = ReleaseSchedule ({ tokenLockTime : 0 * 30 days , tokenReleaseDuration : 12 * 30 days , immediateAccessTimeWindow : 1 * 30 days } ); tokenomic[ ReleaseType.STRATEGIC_ROUND ] = ReleaseSchedule ({ tokenLockTime : 0 * 30 days , tokenReleaseDuration : 12 * 30 days , immediateAccessTimeWindow : 1 * 30 days } ); tokenomic[ ReleaseType.PUBLIC_SALE ] = ReleaseSchedule ({ tokenLockTime : 0 * 30 days , tokenReleaseDuration : 0 * 30 days , immediateAccessTimeWindow : 0 * 30 days } // as `tokenReleaseDuration == 0` everything is available as soon as the release time starts. ); tokenomic[ ReleaseType.COMPANY_RESERVE ] = ReleaseSchedule ({ tokenLockTime : 0 * 30 days , tokenReleaseDuration : 36 * 30 days , immediateAccessTimeWindow : 1 * 30 days } ); tokenomic[ ReleaseType.TEAM_AND_ADVISORS ] = ReleaseSchedule ({ tokenLockTime : 12 * 30 days , tokenReleaseDuration : 36 * 30 days , immediateAccessTimeWindow : 0 * 30 days } ); tokenomic[ ReleaseType.STRATEGIC_PARTNERS ] = ReleaseSchedule ({ tokenLockTime : 12 * 30 days , tokenReleaseDuration : 36 * 30 days , immediateAccessTimeWindow : 0 * 30 days } ); tokenomic[ ReleaseType.FOUNDERS_AND_EARLY_CONTRIBUTORS] = ReleaseSchedule ({ tokenLockTime : 12 * 30 days , tokenReleaseDuration : 48 * 30 days , immediateAccessTimeWindow : 0 * 30 days } ); tokenomic[ ReleaseType.MINING_RESERVE ] = ReleaseSchedule ({ tokenLockTime : 6 * 30 days , tokenReleaseDuration : 60 * 30 days , immediateAccessTimeWindow : 0 * 30 days } ); avaliableTokensToRelease = avaliableTokens; } ////////////////////////////////////////////////////////////////////////////////////////// // Second Part: struct Beneficiary { ReleaseType releaseSchedule ; // public sale, seed round ... uint256 tokensAlreadyReleased ; uint256 tokenBookedAmount ; } uint256 public releaseStartTime; mapping(address => Beneficiary) public beneficiaries; function releaseToken() external{ require( releaseStartTime > 0 , 'Release time has not started yet' ) ; Beneficiary memory beneficiary = beneficiaries[msg.sender]; require( beneficiary.tokenBookedAmount != 0 , 'Address doesnt belong to a beneficiary set by an admin.' ) ; ReleaseSchedule memory releaseSchedule = tokenomic[beneficiary.releaseSchedule]; // Date the tokens locktime finish for the beneficiary. uint256 startTime = releaseSchedule.tokenLockTime + releaseStartTime; // After the locktime has finished, there's a time window defined as `tokenReleaseDuration`. // `timeCompleted` is how much of that time window has been completed. // A beneficiary can only release a fraction of his token proportional to how much of this time window // has been completed (or the totality of them if it is completed). uint256 timeCompleted = 0; uint256 unlockedTokens = 0; if (block.timestamp >= startTime){ timeCompleted = block.timestamp - startTime; // Time completed is the maximum between the time it has passed since start, and // the immediateAccessTimeWindow, capped to a max of tokenReleaseDuration. if (timeCompleted < releaseSchedule.immediateAccessTimeWindow){ timeCompleted = releaseSchedule.immediateAccessTimeWindow; } if (timeCompleted >= releaseSchedule.tokenReleaseDuration){ timeCompleted = releaseSchedule.tokenReleaseDuration; } // `tokenReleaseDuration == 0` means everything is available right after the release lock time if (releaseSchedule.tokenReleaseDuration == 0){ unlockedTokens = beneficiary.tokenBookedAmount; } else { unlockedTokens = (timeCompleted * beneficiary.tokenBookedAmount) / releaseSchedule.tokenReleaseDuration; } } uint256 toRelease = unlockedTokens - beneficiary.tokensAlreadyReleased; beneficiaries[msg.sender].tokensAlreadyReleased += toRelease; tokenContract.transfer( msg.sender, toRelease ); } ////////////////////////////////////////////////////////////////////////////////////////// address public adminA; // active admin address public adminB; // backup admin address public adminT; // temporary admin, only used during key rotation for one of the other admins. modifier adminOnly(){ require( (msg.sender == adminA) || (msg.sender == adminB) || (msg.sender == adminT) , 'Only admins allowed' ) ; _; } event NewAdminA(address adminA ); function changeAdminA(address newAdminA) external adminOnly{ if (adminA != newAdminA){ emit NewAdminA(newAdminA); adminA = newAdminA; } // Notice we don't fail when there's not a NewAdminX defined, // this is on purpose, so the function becomes idempotent and // it is easier to programatically interact with while // deployed on testnet. } event NewAdminB(address adminB ); function changeAdminB(address newAdminB) external adminOnly{ if (adminB != newAdminB){ emit NewAdminB(newAdminB); adminB = newAdminB; } } event NewAdminT(address adminT ); function changeAdminT(address newAdminT) external adminOnly{ if (adminT != newAdminT){ emit NewAdminT(newAdminT); adminT = newAdminT; } } event TokensBook(address beneficiary , uint256 tokenAmount, ReleaseType releaseSchedule); function bookTokensFor( address beneficiary , uint256 tokenAmount, ReleaseType releaseSchedule) external adminOnly{ require( avaliableTokensToRelease >= tokenAmount , 'Not enough token to book' ) ; require( beneficiaries[beneficiary].tokenBookedAmount == 0 , 'Beneficiaries can only be set once' ) ; require( tokenAmount > 0 , 'More than 0 token needs to be booked to set a beneficiary' ) ; avaliableTokensToRelease -= tokenAmount; emit TokensBook(beneficiary, tokenAmount, releaseSchedule); beneficiaries[beneficiary] = Beneficiary(releaseSchedule,0,tokenAmount); } event ReleaseTimeStarted(); function startReleaseTime() external adminOnly{ require( releaseStartTime == 0 , 'Release time has already started' ) ; releaseStartTime = block.timestamp; emit ReleaseTimeStarted(); } event ImmediateTokensSent(address beneficiary, uint256 amount); // Release tokens immediately without a release schedule. function immediateSendTokens(address beneficiary, uint256 amount) external adminOnly{ require( avaliableTokensToRelease >= amount , 'Not enough token avaliable' ) ; avaliableTokensToRelease -= amount; emit ImmediateTokensSent(beneficiary, amount); tokenContract.transfer( beneficiary, amount ); } ////////////////////////////////////////////////////////////////////////////////////////// }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the global ERC1820 Registry, as defined in the * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more * than a single interface for each account. Contracts can implement interfaces * for themselves, but externally-owned accounts (EOA) must delegate this to a * contract. * * {IERC165} interfaces can also be queried via the registry. * * For an in-depth explanation and source code analysis, see the EIP text. */ interface IERC1820Registry { /** * @dev Sets `newManager` as the manager for `account`. A manager of an * account is able to set interface implementers for it. * * By default, each account is its own manager. Passing a value of `0x0` in * `newManager` will reset the manager to this initial state. * * Emits a {ManagerChanged} event. * * Requirements: * * - the caller must be the current manager for `account`. */ function setManager(address account, address newManager) external; /** * @dev Returns the manager for `account`. * * See {setManager}. */ function getManager(address account) external view returns (address); /** * @dev Sets the `implementer` contract as ``account``'s implementer for * `interfaceHash`. * * `account` being the zero address is an alias for the caller's address. * The zero address can also be used in `implementer` to remove an old one. * * See {interfaceHash} to learn how these are created. * * Emits an {InterfaceImplementerSet} event. * * Requirements: * * - the caller must be the current manager for `account`. * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not * end in 28 zeroes). * - `implementer` must implement {IERC1820Implementer} and return true when * queried for support, unless `implementer` is the caller. See * {IERC1820Implementer-canImplementInterfaceForAddress}. */ function setInterfaceImplementer( address account, bytes32 _interfaceHash, address implementer ) external; /** * @dev Returns the implementer of `interfaceHash` for `account`. If no such * implementer is registered, returns the zero address. * * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 * zeroes), `account` will be queried for support of it. * * `account` being the zero address is an alias for the caller's address. */ function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address); /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** * @notice Updates the cache with whether the contract implements an ERC165 interface or not. * @param account Address of the contract for which to update the cache. * @param interfaceId ERC165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** * @notice Checks whether a contract implements an ERC165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC777TokensSender standard as defined in the EIP. * * {IERC777} Token holders can be notified of operations performed on their * tokens by having a contract implement this interface (contract holders can be * their own implementer) and registering it on the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. * * See {IERC1820Registry} and {ERC1820Implementer}. */ interface IERC777Sender { /** * @dev Called by an {IERC777} token contract whenever a registered holder's * (`from`) tokens are about to be moved or destroyed. The type of operation * is conveyed by `to` being the zero address or not. * * This call occurs _before_ the token contract's state is updated, so * {IERC777-balanceOf}, etc., can be used to query the pre-operation state. * * This function may revert to prevent the operation from being executed. */ function tokensToSend( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. * * Accounts can be notified of {IERC777} tokens being sent to them by having a * contract implement this interface (contract holders can be their own * implementer) and registering it on the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. * * See {IERC1820Registry} and {ERC1820Implementer}. */ interface IERC777Recipient { /** * @dev Called by an {IERC777} token contract whenever tokens are being * moved or created into a registered account (`to`). The type of operation * is conveyed by `from` being the zero address or not. * * This call occurs _after_ the token contract's state is updated, so * {IERC777-balanceOf}, etc., can be used to query the post-operation state. * * This function may revert to prevent the operation from being executed. */ function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC777Token standard as defined in the EIP. * * This contract uses the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let * token holders and recipients react to token movements by using setting implementers * for the associated interfaces in said registry. See {IERC1820Registry} and * {ERC1820Implementer}. */ interface IERC777 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() external view returns (string memory); /** * @dev Returns the smallest part of the token that is not divisible. This * means all token operations (creation, movement and destruction) must have * amounts that are a multiple of this number. * * For most token contracts, this value will equal 1. */ function granularity() external view returns (uint256); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by an account (`owner`). */ function balanceOf(address owner) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * If send or receive hooks are registered for the caller and `recipient`, * the corresponding functions will be called with `data` and empty * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - the caller must have at least `amount` tokens. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function send( address recipient, uint256 amount, bytes calldata data ) external; /** * @dev Destroys `amount` tokens from the caller's account, reducing the * total supply. * * If a send hook is registered for the caller, the corresponding function * will be called with `data` and empty `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - the caller must have at least `amount` tokens. */ function burn(uint256 amount, bytes calldata data) external; /** * @dev Returns true if an account is an operator of `tokenHolder`. * Operators can send and burn tokens on behalf of their owners. All * accounts are their own operator. * * See {operatorSend} and {operatorBurn}. */ function isOperatorFor(address operator, address tokenHolder) external view returns (bool); /** * @dev Make an account an operator of the caller. * * See {isOperatorFor}. * * Emits an {AuthorizedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function authorizeOperator(address operator) external; /** * @dev Revoke an account's operator status for the caller. * * See {isOperatorFor} and {defaultOperators}. * * Emits a {RevokedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function revokeOperator(address operator) external; /** * @dev Returns the list of default operators. These accounts are operators * for all token holders, even if {authorizeOperator} was never called on * them. * * This list is immutable, but individual holders may revoke these via * {revokeOperator}, in which case {isOperatorFor} will return false. */ function defaultOperators() external view returns (address[] memory); /** * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must * be an operator of `sender`. * * If send or receive hooks are registered for `sender` and `recipient`, * the corresponding functions will be called with `data` and * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - `sender` cannot be the zero address. * - `sender` must have at least `amount` tokens. * - the caller must be an operator for `sender`. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; /** * @dev Destroys `amount` tokens from `account`, reducing the total supply. * The caller must be an operator of `account`. * * If a send hook is registered for `account`, the corresponding function * will be called with `data` and `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. * - the caller must be an operator for `account`. */ function operatorBurn( address account, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; event Sent( address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData ); event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); event AuthorizedOperator(address indexed operator, address indexed tokenHolder); event RevokedOperator(address indexed operator, address indexed tokenHolder); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC777.sol"; import "./IERC777Recipient.sol"; import "./IERC777Sender.sol"; import "../ERC20/IERC20.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/IERC1820Registry.sol"; /** * @dev Implementation of the {IERC777} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * Support for ERC20 is included in this contract, as specified by the EIP: both * the ERC777 and ERC20 interfaces can be safely used when interacting with it. * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token * movements. * * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there * are no special restrictions in the amount of tokens that created, moved, or * destroyed. This makes integration with ERC20 applications seamless. */ contract ERC777 is Context, IERC777, IERC20 { using Address for address; IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); mapping(address => uint256) private _balances; uint256 private _totalSupply; string private _name; string private _symbol; bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender"); bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); // This isn't ever read from - it's only used to respond to the defaultOperators query. address[] private _defaultOperatorsArray; // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators). mapping(address => bool) private _defaultOperators; // For each account, a mapping of its operators and revoked default operators. mapping(address => mapping(address => bool)) private _operators; mapping(address => mapping(address => bool)) private _revokedDefaultOperators; // ERC20-allowances mapping(address => mapping(address => uint256)) private _allowances; /** * @dev `defaultOperators` may be an empty array. */ constructor( string memory name_, string memory symbol_, address[] memory defaultOperators_ ) { _name = name_; _symbol = symbol_; _defaultOperatorsArray = defaultOperators_; for (uint256 i = 0; i < defaultOperators_.length; i++) { _defaultOperators[defaultOperators_[i]] = true; } // register interfaces _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this)); _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this)); } /** * @dev See {IERC777-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC777-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {ERC20-decimals}. * * Always returns 18, as per the * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility). */ function decimals() public pure virtual returns (uint8) { return 18; } /** * @dev See {IERC777-granularity}. * * This implementation always returns `1`. */ function granularity() public view virtual override returns (uint256) { return 1; } /** * @dev See {IERC777-totalSupply}. */ function totalSupply() public view virtual override(IERC20, IERC777) returns (uint256) { return _totalSupply; } /** * @dev Returns the amount of tokens owned by an account (`tokenHolder`). */ function balanceOf(address tokenHolder) public view virtual override(IERC20, IERC777) returns (uint256) { return _balances[tokenHolder]; } /** * @dev See {IERC777-send}. * * Also emits a {IERC20-Transfer} event for ERC20 compatibility. */ function send( address recipient, uint256 amount, bytes memory data ) public virtual override { _send(_msgSender(), recipient, amount, data, "", true); } /** * @dev See {IERC20-transfer}. * * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient} * interface if it is a contract. * * Also emits a {Sent} event. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { require(recipient != address(0), "ERC777: transfer to the zero address"); address from = _msgSender(); _callTokensToSend(from, from, recipient, amount, "", ""); _move(from, from, recipient, amount, "", ""); _callTokensReceived(from, from, recipient, amount, "", "", false); return true; } /** * @dev See {IERC777-burn}. * * Also emits a {IERC20-Transfer} event for ERC20 compatibility. */ function burn(uint256 amount, bytes memory data) public virtual override { _burn(_msgSender(), amount, data, ""); } /** * @dev See {IERC777-isOperatorFor}. */ function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) { return operator == tokenHolder || (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) || _operators[tokenHolder][operator]; } /** * @dev See {IERC777-authorizeOperator}. */ function authorizeOperator(address operator) public virtual override { require(_msgSender() != operator, "ERC777: authorizing self as operator"); if (_defaultOperators[operator]) { delete _revokedDefaultOperators[_msgSender()][operator]; } else { _operators[_msgSender()][operator] = true; } emit AuthorizedOperator(operator, _msgSender()); } /** * @dev See {IERC777-revokeOperator}. */ function revokeOperator(address operator) public virtual override { require(operator != _msgSender(), "ERC777: revoking self as operator"); if (_defaultOperators[operator]) { _revokedDefaultOperators[_msgSender()][operator] = true; } else { delete _operators[_msgSender()][operator]; } emit RevokedOperator(operator, _msgSender()); } /** * @dev See {IERC777-defaultOperators}. */ function defaultOperators() public view virtual override returns (address[] memory) { return _defaultOperatorsArray; } /** * @dev See {IERC777-operatorSend}. * * Emits {Sent} and {IERC20-Transfer} events. */ function operatorSend( address sender, address recipient, uint256 amount, bytes memory data, bytes memory operatorData ) public virtual override { require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder"); _send(sender, recipient, amount, data, operatorData, true); } /** * @dev See {IERC777-operatorBurn}. * * Emits {Burned} and {IERC20-Transfer} events. */ function operatorBurn( address account, uint256 amount, bytes memory data, bytes memory operatorData ) public virtual override { require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder"); _burn(account, amount, data, operatorData); } /** * @dev See {IERC20-allowance}. * * Note that operator and allowance concepts are orthogonal: operators may * not have allowance, and accounts with allowance may not be operators * themselves. */ function allowance(address holder, address spender) public view virtual override returns (uint256) { return _allowances[holder][spender]; } /** * @dev See {IERC20-approve}. * * Note that accounts cannot have allowance issued by their operators. */ function approve(address spender, uint256 value) public virtual override returns (bool) { address holder = _msgSender(); _approve(holder, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Note that operator and allowance concepts are orthogonal: operators cannot * call `transferFrom` (unless they have allowance), and accounts with * allowance cannot call `operatorSend` (unless they are operators). * * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events. */ function transferFrom( address holder, address recipient, uint256 amount ) public virtual override returns (bool) { require(recipient != address(0), "ERC777: transfer to the zero address"); require(holder != address(0), "ERC777: transfer from the zero address"); address spender = _msgSender(); _callTokensToSend(spender, holder, recipient, amount, "", ""); _move(spender, holder, recipient, amount, "", ""); uint256 currentAllowance = _allowances[holder][spender]; require(currentAllowance >= amount, "ERC777: transfer amount exceeds allowance"); _approve(holder, spender, currentAllowance - amount); _callTokensReceived(spender, holder, recipient, amount, "", "", false); return true; } /** * @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * If a send hook is registered for `account`, the corresponding function * will be called with `operator`, `data` and `operatorData`. * * See {IERC777Sender} and {IERC777Recipient}. * * Emits {Minted} and {IERC20-Transfer} events. * * Requirements * * - `account` cannot be the zero address. * - if `account` is a contract, it must implement the {IERC777Recipient} * interface. */ function _mint( address account, uint256 amount, bytes memory userData, bytes memory operatorData ) internal virtual { _mint(account, amount, userData, operatorData, true); } /** * @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * If `requireReceptionAck` is set to true, and if a send hook is * registered for `account`, the corresponding function will be called with * `operator`, `data` and `operatorData`. * * See {IERC777Sender} and {IERC777Recipient}. * * Emits {Minted} and {IERC20-Transfer} events. * * Requirements * * - `account` cannot be the zero address. * - if `account` is a contract, it must implement the {IERC777Recipient} * interface. */ function _mint( address account, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) internal virtual { require(account != address(0), "ERC777: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, amount); // Update state variables _totalSupply += amount; _balances[account] += amount; _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck); emit Minted(operator, account, amount, userData, operatorData); emit Transfer(address(0), account, amount); } /** * @dev Send tokens * @param from address token holder address * @param to address recipient address * @param amount uint256 amount of tokens to transfer * @param userData bytes extra information provided by the token holder (if any) * @param operatorData bytes extra information provided by the operator (if any) * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient */ function _send( address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) internal virtual { require(from != address(0), "ERC777: send from the zero address"); require(to != address(0), "ERC777: send to the zero address"); address operator = _msgSender(); _callTokensToSend(operator, from, to, amount, userData, operatorData); _move(operator, from, to, amount, userData, operatorData); _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck); } /** * @dev Burn tokens * @param from address token holder address * @param amount uint256 amount of tokens to burn * @param data bytes extra information provided by the token holder * @param operatorData bytes extra information provided by the operator (if any) */ function _burn( address from, uint256 amount, bytes memory data, bytes memory operatorData ) internal virtual { require(from != address(0), "ERC777: burn from the zero address"); address operator = _msgSender(); _callTokensToSend(operator, from, address(0), amount, data, operatorData); _beforeTokenTransfer(operator, from, address(0), amount); // Update state variables uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC777: burn amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _totalSupply -= amount; emit Burned(operator, from, amount, data, operatorData); emit Transfer(from, address(0), amount); } function _move( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { _beforeTokenTransfer(operator, from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC777: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Sent(operator, from, to, amount, userData, operatorData); emit Transfer(from, to, amount); } /** * @dev See {ERC20-_approve}. * * Note that accounts cannot have allowance issued by their operators. */ function _approve( address holder, address spender, uint256 value ) internal { require(holder != address(0), "ERC777: approve from the zero address"); require(spender != address(0), "ERC777: approve to the zero address"); _allowances[holder][spender] = value; emit Approval(holder, spender, value); } /** * @dev Call from.tokensToSend() if the interface is registered * @param operator address operator requesting the transfer * @param from address token holder address * @param to address recipient address * @param amount uint256 amount of tokens to transfer * @param userData bytes extra information provided by the token holder (if any) * @param operatorData bytes extra information provided by the operator (if any) */ function _callTokensToSend( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH); if (implementer != address(0)) { IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData); } } /** * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but * tokensReceived() was not registered for the recipient * @param operator address operator requesting the transfer * @param from address token holder address * @param to address recipient address * @param amount uint256 amount of tokens to transfer * @param userData bytes extra information provided by the token holder (if any) * @param operatorData bytes extra information provided by the operator (if any) * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient */ function _callTokensReceived( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH); if (implementer != address(0)) { IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData); } else if (requireReceptionAck) { require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"); } } /** * @dev Hook that is called before any token transfer. This includes * calls to {send}, {transfer}, {operatorSend}, minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 2000 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenHolder","type":"address"}],"name":"AuthorizedOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"releaser","type":"address"}],"name":"Deployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenHolder","type":"address"}],"name":"RevokedOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"Sent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"holder","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":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"authorizeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenHolder","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"defaultOperators","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"granularity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"tokenHolder","type":"address"}],"name":"isOperatorFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"operatorBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"operatorData","type":"bytes"}],"name":"operatorSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"revokeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"send","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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252600781526621b7b4b73bb2b160c91b602080830191825283518085018552600481526321aba2a160e11b81830152845160008152918201909452825192939290916200006b916002919062000a72565b5081516200008190600390602085019062000a72565b5080516200009790600490602084019062000b01565b5060005b81518110156200010757600160056000848481518110620000c057620000c062000b7e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000fe8162000baa565b9150506200009b565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200018257600080fd5b505af115801562000197573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b1580156200021557600080fd5b505af11580156200022a573d6000803e3d6000fd5b505050505050506000620002436200038660201b60201c565b6200025090600a62000cc5565b62000261906401c9c3800062000cdd565b905062000295338260405180602001604052806000815250604051806020016040528060008152506200038b60201b60201c565b733c159347b33cababdb6980081f9408759833129b73e147f1ae58466a64ca13af6534fc1651ecd0af433083604051620002cf9062000b59565b6001600160a01b0394851681529284166020840152921660408201526060810191909152608001604051809103906000f08015801562000313573d6000803e3d6000fd5b50600980546001600160a01b0319166001600160a01b039290921691821790556040519081527ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e9060200160405180910390a16009546200037e906001600160a01b031682620003a1565b505062000e69565b601290565b6200039b848484846001620004ba565b50505050565b60006001600160a01b0383166200040b5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b600033905062000444818286866040518060200160405280600081525060405180602001604052806000815250620005fb60201b60201c565b620004788182868660405180602001604052806000815250604051806020016040528060008152506200072b60201b60201c565b620004ae81828686604051806020016040528060008152506040518060200160405280600081525060006200088760201b60201c565b60019150505b92915050565b6001600160a01b038516620005125760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000402565b600033905084600160008282546200052b919062000cff565b90915550506001600160a01b038616600090815260208190526040812080548792906200055a90849062000cff565b90915550620005729050816000888888888862000887565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d878787604051620005bb9392919062000d6a565b60405180910390a36040518581526001600160a01b0387169060009060008051602062003e6b8339815191529060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156200067d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006a3919062000da3565b90506001600160a01b038116156200072257604051633ad5cbc160e11b81526001600160a01b038216906375ab978290620006ed908a908a908a908a908a908a9060040162000dce565b600060405180830381600087803b1580156200070857600080fd5b505af11580156200071d573d6000803e3d6000fd5b505050505b50505050505050565b6001600160a01b03851660009081526020819052604090205483811015620007a65760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840162000402565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290620007df90849062000cff565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051620008399392919062000d6a565b60405180910390a4846001600160a01b0316866001600160a01b031660008051602062003e6b833981519152866040516200087691815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa15801562000909573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200092f919062000da3565b90506001600160a01b03811615620009b1576040516223de2960e01b81526001600160a01b038216906223de299062000977908b908b908b908b908b908b9060040162000dce565b600060405180830381600087803b1580156200099257600080fd5b505af1158015620009a7573d6000803e3d6000fd5b5050505062000a62565b811562000a6257620009d7866001600160a01b031662000a6c60201b62000ba21760201c565b1562000a625760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40162000402565b5050505050505050565b3b151590565b82805462000a809062000e2c565b90600052602060002090601f01602090048101928262000aa4576000855562000aef565b82601f1062000abf57805160ff191683800117855562000aef565b8280016001018555821562000aef579182015b8281111562000aef57825182559160200191906001019062000ad2565b5062000afd92915062000b67565b5090565b82805482825590600052602060002090810192821562000aef579160200282015b8281111562000aef57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000b22565b6115ee806200287d83390190565b5b8082111562000afd576000815560010162000b68565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141562000bc15762000bc162000b94565b5060010190565b600181815b8085111562000c0957816000190482111562000bed5762000bed62000b94565b8085161562000bfb57918102915b93841c939080029062000bcd565b509250929050565b60008262000c2257506001620004b4565b8162000c3157506000620004b4565b816001811462000c4a576002811462000c555762000c75565b6001915050620004b4565b60ff84111562000c695762000c6962000b94565b50506001821b620004b4565b5060208310610133831016604e8410600b841016171562000c9a575081810a620004b4565b62000ca6838362000bc8565b806000190482111562000cbd5762000cbd62000b94565b029392505050565b600062000cd660ff84168362000c11565b9392505050565b600081600019048311821515161562000cfa5762000cfa62000b94565b500290565b6000821982111562000d155762000d1562000b94565b500190565b6000815180845260005b8181101562000d425760208185018101518683018201520162000d24565b8181111562000d55576000602083870101525b50601f01601f19169290920160200192915050565b83815260606020820152600062000d85606083018562000d1a565b828103604084015262000d99818562000d1a565b9695505050505050565b60006020828403121562000db657600080fd5b81516001600160a01b038116811462000cd657600080fd5b6001600160a01b0387811682528681166020830152851660408201526060810184905260c06080820181905260009062000e0b9083018562000d1a565b82810360a084015262000e1f818562000d1a565b9998505050505050505050565b600181811c9082168062000e4157607f821691505b6020821081141562000e6357634e487b7160e01b600052602260045260246000fd5b50919050565b611a048062000e796000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063959b8c3f116100b2578063d95b637111610081578063fad8b32a11610066578063fad8b32a14610297578063fc673c4f146102aa578063fe9d9303146102bd57600080fd5b8063d95b63711461024b578063dd62ed3e1461025e57600080fd5b8063959b8c3f1461020a57806395d89b411461021d5780639bd9bbc614610225578063a9059cbb1461023857600080fd5b806323b872dd11610109578063556f0dc7116100ee578063556f0dc7146101c557806362ad1b83146101cc57806370a08231146101e157600080fd5b806323b872dd146101a3578063313ce567146101b657600080fd5b806306e485381461013b57806306fdde0314610159578063095ea7b31461016e57806318160ddd14610191575b600080fd5b6101436102d0565b60405161015091906114c5565b60405180910390f35b610161610332565b604051610150919061155f565b61018161017c36600461158a565b6103bb565b6040519015158152602001610150565b6001545b604051908152602001610150565b6101816101b13660046115b6565b6103d3565b60405160128152602001610150565b6001610195565b6101df6101da36600461169a565b610618565b005b6101956101ef36600461172d565b6001600160a01b031660009081526020819052604090205490565b6101df61021836600461172d565b6106aa565b6101616107e1565b6101df61023336600461174a565b6107f0565b61018161024636600461158a565b610813565b6101816102593660046117a3565b61091b565b61019561026c3660046117a3565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101df6102a536600461172d565b6109bd565b6101df6102b83660046117dc565b610af5565b6101df6102cb36600461185c565b610b83565b6060600480548060200260200160405190810160405280929190818152602001828054801561032857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161030a575b5050505050905090565b606060028054610341906118a3565b80601f016020809104026020016040519081016040528092919081815260200182805461036d906118a3565b80156103285780601f1061038f57610100808354040283529160200191610328565b820191906000526020600020905b81548152906001019060200180831161039d57509395945050505050565b6000336103c9818585610ba8565b5060019392505050565b60006001600160a01b0383166104555760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b0384166104d15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161044c565b6000339050610502818686866040518060200160405280600081525060405180602001604052806000815250610d01565b61052e818686866040518060200160405280600081525060405180602001604052806000815250610e5b565b6001600160a01b03808616600090815260086020908152604080832093851683529290522054838110156105ca5760405162461bcd60e51b815260206004820152602960248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201527f616c6c6f77616e63650000000000000000000000000000000000000000000000606482015260840161044c565b6105de86836105d987856118f4565b610ba8565b61060c8287878760405180602001604052806000815250604051806020016040528060008152506000610fd7565b50600195945050505050565b610622338661091b565b6106945760405162461bcd60e51b815260206004820152602c60248201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60448201527f7220666f7220686f6c6465720000000000000000000000000000000000000000606482015260840161044c565b6106a3858585858560016111de565b5050505050565b336001600160a01b03821614156107285760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201527f61746f7200000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03811660009081526005602052604090205460ff1615610779573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff191690556107a8565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b606060038054610341906118a3565b61080e338484846040518060200160405280600081525060016111de565b505050565b60006001600160a01b0383166108905760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161044c565b60003390506108c1818286866040518060200160405280600081525060405180602001604052806000815250610d01565b6108ed818286866040518060200160405280600081525060405180602001604052806000815250610e5b565b6103c98182868660405180602001604052806000815250604051806020016040528060008152506000610fd7565b6000816001600160a01b0316836001600160a01b0316148061098657506001600160a01b03831660009081526005602052604090205460ff16801561098657506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b806109b657506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b6001600160a01b038116331415610a3c5760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f60448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03811660009081526005602052604090205460ff1615610a90573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610abc565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b610aff338561091b565b610b715760405162461bcd60e51b815260206004820152602c60248201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60448201527f7220666f7220686f6c6465720000000000000000000000000000000000000000606482015260840161044c565b610b7d848484846112dc565b50505050565b610b9e338383604051806020016040528060008152506112dc565b5050565b3b151590565b6001600160a01b038316610c245760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b038216610ca05760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040517faabbb8ca0000000000000000000000000000000000000000000000000000000081526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf919061190b565b90506001600160a01b03811615610e52576040517f75ab97820000000000000000000000000000000000000000000000000000000081526001600160a01b038216906375ab978290610e1f908a908a908a908a908a908a90600401611928565b600060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050505b50505050505050565b6001600160a01b03851660009081526020819052604090205483811015610eea5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201527f62616c616e636500000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610f21908490611981565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610f7993929190611999565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610fc691815260200190565b60405180910390a350505050505050565b6040517faabbb8ca0000000000000000000000000000000000000000000000000000000081526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015611071573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611095919061190b565b90506001600160a01b0381161561112a576040517e23de290000000000000000000000000000000000000000000000000000000081526001600160a01b038216906223de29906110f3908b908b908b908b908b908b90600401611928565b600060405180830381600087803b15801561110d57600080fd5b505af1158015611121573d6000803e3d6000fd5b505050506111d4565b81156111d4576001600160a01b0386163b156111d45760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201527f6b656e73526563697069656e7400000000000000000000000000000000000000608482015260a40161044c565b5050505050505050565b6001600160a01b03861661125a5760405162461bcd60e51b815260206004820152602260248201527f4552433737373a2073656e642066726f6d20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b0385166112b05760405162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015260640161044c565b336112bf818888888888610d01565b6112cd818888888888610e5b565b610e5281888888888888610fd7565b6001600160a01b0384166113585760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161044c565b3361136881866000878787610d01565b6001600160a01b038516600090815260208190526040902054848110156113f75760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c6160448201527f6e63650000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03861660009081526020819052604081208683039055600180548792906114269084906118f4565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a409887878760405161147493929190611999565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b6020808252825182820181905260009190848201906040850190845b818110156115065783516001600160a01b0316835292840192918401916001016114e1565b50909695505050505050565b6000815180845260005b818110156115385760208185018101518683018201520161151c565b8181111561154a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006109b66020830184611512565b6001600160a01b038116811461158757600080fd5b50565b6000806040838503121561159d57600080fd5b82356115a881611572565b946020939093013593505050565b6000806000606084860312156115cb57600080fd5b83356115d681611572565b925060208401356115e681611572565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261161e57600080fd5b813567ffffffffffffffff80821115611639576116396115f7565b604051601f8301601f19908116603f01168101908282118183101715611661576116616115f7565b8160405283815286602085880101111561167a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156116b257600080fd5b85356116bd81611572565b945060208601356116cd81611572565b935060408601359250606086013567ffffffffffffffff808211156116f157600080fd5b6116fd89838a0161160d565b9350608088013591508082111561171357600080fd5b506117208882890161160d565b9150509295509295909350565b60006020828403121561173f57600080fd5b81356109b681611572565b60008060006060848603121561175f57600080fd5b833561176a81611572565b925060208401359150604084013567ffffffffffffffff81111561178d57600080fd5b6117998682870161160d565b9150509250925092565b600080604083850312156117b657600080fd5b82356117c181611572565b915060208301356117d181611572565b809150509250929050565b600080600080608085870312156117f257600080fd5b84356117fd81611572565b935060208501359250604085013567ffffffffffffffff8082111561182157600080fd5b61182d8883890161160d565b9350606087013591508082111561184357600080fd5b506118508782880161160d565b91505092959194509250565b6000806040838503121561186f57600080fd5b82359150602083013567ffffffffffffffff81111561188d57600080fd5b6118998582860161160d565b9150509250929050565b600181811c908216806118b757607f821691505b602082108114156118d857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015611906576119066118de565b500390565b60006020828403121561191d57600080fd5b81516109b681611572565b60006001600160a01b038089168352808816602084015280871660408401525084606083015260c0608083015261196260c0830185611512565b82810360a08401526119748185611512565b9998505050505050505050565b60008219821115611994576119946118de565b500190565b8381526060602082015260006119b26060830185611512565b82810360408401526119c48185611512565b969550505050505056fea264697066735822122052847b7e405970c031c329f871e38a6123f2f262013cc77486edfc84e1dfa28264736f6c634300080a003360806040523480156200001157600080fd5b50604051620015ee380380620015ee83398101604081905262000034916200051a565b600080546001600160a01b038085166001600160a01b0319928316179092556005805487841690831617905560068054928616929091169190911790556200007c8162000086565b505050506200058a565b6040518060600160405280600081526020016303b53800815260200162278d0081525060016000806008811115620000c257620000c262000574565b6008811115620000d657620000d662000574565b81526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506040518060600160405280600081526020016301da9c00815260200162278d00815250600160006001600881111562000142576200014262000574565b600881111562000156576200015662000574565b81526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506040518060600160405280600081526020016301da9c00815260200162278d008152506001600060026008811115620001c257620001c262000574565b6008811115620001d657620001d662000574565b815260200190815260200160002060008201518160000155602082015181600101556040820151816002015590505060405180606001604052806000815260200160008152602001600081525060016000600360088111156200023d576200023d62000574565b600881111562000251576200025162000574565b815260200190815260200160002060008201518160000155602082015181600101556040820151816002015590505060405180606001604052806000815260200163058fd400815260200162278d008152506001600060046008811115620002bd57620002bd62000574565b6008811115620002d157620002d162000574565b815260200190815260200160002060008201518160000155602082015181600101556040820151816002015590505060405180606001604052806301da9c00815260200163058fd4008152602001600081525060016000600560088111156200033e576200033e62000574565b600881111562000352576200035262000574565b815260200190815260200160002060008201518160000155602082015181600101556040820151816002015590505060405180606001604052806301da9c00815260200163058fd400815260200160008152506001600060066008811115620003bf57620003bf62000574565b6008811115620003d357620003d362000574565b815260200190815260200160002060008201518160000155602082015181600101556040820151816002015590505060405180606001604052806301da9c00815260200163076a700081526020016000815250600160006007600881111562000440576200044062000574565b600881111562000454576200045462000574565b8152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050604051806060016040528062ed4e0081526020016309450c008152602001600081525060016000600880811115620004bf57620004bf62000574565b6008811115620004d357620004d362000574565b8152602080820192909252604090810160002083518155918301516001830155919091015160029182015555565b6001600160a01b03811681146200051757600080fd5b50565b600080600080608085870312156200053157600080fd5b84516200053e8162000501565b6020860151909450620005518162000501565b6040860151909350620005648162000501565b6060959095015193969295505050565b634e487b7160e01b600052602160045260246000fd5b611054806200059a6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80637b14fcf611610097578063d87c10be11610066578063d87c10be1461024c578063e97d87d51461025f578063ec715a3114610268578063f71ad68e1461027057600080fd5b80637b14fcf6146101ca5780639ad13d96146101dd578063afc3e72e14610226578063c01c4cfc1461023957600080fd5b80631fb01587116100d35780631fb01587146101715780632066d8781461019c57806355a373d6146101af5780636fcf06f1146101c257600080fd5b806301567739146100fa5780630c4db24d146101455780631398c3271461015c575b600080fd5b61012d610108366004610e23565b60046020526000908152604090208054600182015460029092015460ff909116919083565b60405161013c93929190610e7d565b60405180910390f35b61014e60025481565b60405190815260200161013c565b61016f61016a366004610e9c565b610283565b005b600654610184906001600160a01b031681565b6040516001600160a01b03909116815260200161013c565b61016f6101aa366004610e23565b61044c565b600054610184906001600160a01b031681565b61016f61054d565b61016f6101d8366004610e23565b610650565b61020b6101eb366004610ed5565b600160208190526000918252604090912080549181015460029091015483565b6040805193845260208401929092529082015260600161013c565b61016f610234366004610e23565b610752565b600554610184906001600160a01b031681565b600754610184906001600160a01b031681565b61014e60035481565b61016f610854565b61016f61027e366004610ef0565b610b3b565b6005546001600160a01b03163314806102a657506006546001600160a01b031633145b806102bb57506007546001600160a01b031633145b61030c5760405162461bcd60e51b815260206004820152601360248201527f4f6e6c792061646d696e7320616c6c6f7765640000000000000000000000000060448201526064015b60405180910390fd5b80600254101561035e5760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820746f6b656e206176616c6961626c650000000000006044820152606401610303565b80600260008282546103709190610f42565b9091555050604080516001600160a01b0384168152602081018390527feec8d93f23b05d0f7682e69bd12d081c1fdf167e91bf593fd9b9e7ff741f57ed910160405180910390a16000546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af1158015610423573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104479190610f59565b505050565b6005546001600160a01b031633148061046f57506006546001600160a01b031633145b8061048457506007546001600160a01b031633145b6104d05760405162461bcd60e51b815260206004820152601360248201527f4f6e6c792061646d696e7320616c6c6f776564000000000000000000000000006044820152606401610303565b6005546001600160a01b0382811691161461054a576040516001600160a01b03821681527fc5a43ddba1724d0ee35d212371c8783751682ec96ecca48138a6bebe87837c059060200160405180910390a16005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b50565b6005546001600160a01b031633148061057057506006546001600160a01b031633145b8061058557506007546001600160a01b031633145b6105d15760405162461bcd60e51b815260206004820152601360248201527f4f6e6c792061646d696e7320616c6c6f776564000000000000000000000000006044820152606401610303565b600354156106215760405162461bcd60e51b815260206004820181905260248201527f52656c656173652074696d652068617320616c726561647920737461727465646044820152606401610303565b426003556040517fb2970d659ef3ac60e87bd9f4fde5ecc082d5f14946b5c6f509bad4954a99731a90600090a1565b6005546001600160a01b031633148061067357506006546001600160a01b031633145b8061068857506007546001600160a01b031633145b6106d45760405162461bcd60e51b815260206004820152601360248201527f4f6e6c792061646d696e7320616c6c6f776564000000000000000000000000006044820152606401610303565b6007546001600160a01b0382811691161461054a576040516001600160a01b03821681527f9a73b853d7e0d4401faf3d43710a0bc28e4cea4991dc955aec45fa1f466aa69d9060200160405180910390a1600780546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b6005546001600160a01b031633148061077557506006546001600160a01b031633145b8061078a57506007546001600160a01b031633145b6107d65760405162461bcd60e51b815260206004820152601360248201527f4f6e6c792061646d696e7320616c6c6f776564000000000000000000000000006044820152606401610303565b6006546001600160a01b0382811691161461054a576040516001600160a01b03821681527fd6d3af45177bc59b97d870b43a686cd537b82c80922178a602e27045dc3002029060200160405180910390a1600680546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b6000600354116108a65760405162461bcd60e51b815260206004820181905260248201527f52656c656173652074696d6520686173206e6f742073746172746564207965746044820152606401610303565b336000908152600460205260408082208151606081019092528054829060ff1660088111156108d7576108d7610e45565b60088111156108e8576108e8610e45565b8152600182015460208201526002909101546040918201528101519091506109785760405162461bcd60e51b815260206004820152603760248201527f4164647265737320646f65736e742062656c6f6e6720746f20612062656e656660448201527f6963696172792073657420627920616e2061646d696e2e0000000000000000006064820152608401610303565b6000600160008360000151600881111561099457610994610e45565b60088111156109a5576109a5610e45565b815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820154815250509050600060035482600001516109f29190610f7b565b9050600080824210610a6657610a088342610f42565b91508360400151821015610a1e57836040015191505b83602001518210610a3157836020015191505b6020840151610a4557506040840151610a66565b60208401516040860151610a599084610f93565b610a639190610fd0565b90505b6000856020015182610a789190610f42565b33600090815260046020526040812060010180549293508392909190610a9f908490610f7b565b90915550506000546040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b329190610f59565b50505050505050565b6005546001600160a01b0316331480610b5e57506006546001600160a01b031633145b80610b7357506007546001600160a01b031633145b610bbf5760405162461bcd60e51b815260206004820152601360248201527f4f6e6c792061646d696e7320616c6c6f776564000000000000000000000000006044820152606401610303565b816002541015610c115760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e20746f20626f6f6b00000000000000006044820152606401610303565b6001600160a01b03831660009081526004602052604090206002015415610ca05760405162461bcd60e51b815260206004820152602260248201527f42656e656669636961726965732063616e206f6e6c7920626520736574206f6e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610303565b60008211610d165760405162461bcd60e51b815260206004820152603960248201527f4d6f7265207468616e203020746f6b656e206e6565647320746f20626520626f60448201527f6f6b656420746f2073657420612062656e6566696369617279000000000000006064820152608401610303565b8160026000828254610d289190610f42565b90915550506040517ffd654da5fd4bc4ed30e1d98b165d78387a0d91a3721f65683c3f399f160d786c90610d6190859085908590610ff2565b60405180910390a16040518060600160405280826008811115610d8657610d86610e45565b81526000602080830182905260409283018690526001600160a01b038716825260049052208151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836008811115610de757610de7610e45565b021790555060208201516001820155604090910151600290910155505050565b80356001600160a01b0381168114610e1e57600080fd5b919050565b600060208284031215610e3557600080fd5b610e3e82610e07565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60098110610e7957634e487b7160e01b600052602160045260246000fd5b9052565b60608101610e8b8286610e5b565b602082019390935260400152919050565b60008060408385031215610eaf57600080fd5b610eb883610e07565b946020939093013593505050565b803560098110610e1e57600080fd5b600060208284031215610ee757600080fd5b610e3e82610ec6565b600080600060608486031215610f0557600080fd5b610f0e84610e07565b925060208401359150610f2360408501610ec6565b90509250925092565b634e487b7160e01b600052601160045260246000fd5b600082821015610f5457610f54610f2c565b500390565b600060208284031215610f6b57600080fd5b81518015158114610e3e57600080fd5b60008219821115610f8e57610f8e610f2c565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610fcb57610fcb610f2c565b500290565b600082610fed57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b038416815260208101839052606081016110166040830184610e5b565b94935050505056fea2646970667358221220598c1a6d1e043b35fb86098548c62e2b39d8733f08f58edfd8319582b53959af64736f6c634300080a0033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063959b8c3f116100b2578063d95b637111610081578063fad8b32a11610066578063fad8b32a14610297578063fc673c4f146102aa578063fe9d9303146102bd57600080fd5b8063d95b63711461024b578063dd62ed3e1461025e57600080fd5b8063959b8c3f1461020a57806395d89b411461021d5780639bd9bbc614610225578063a9059cbb1461023857600080fd5b806323b872dd11610109578063556f0dc7116100ee578063556f0dc7146101c557806362ad1b83146101cc57806370a08231146101e157600080fd5b806323b872dd146101a3578063313ce567146101b657600080fd5b806306e485381461013b57806306fdde0314610159578063095ea7b31461016e57806318160ddd14610191575b600080fd5b6101436102d0565b60405161015091906114c5565b60405180910390f35b610161610332565b604051610150919061155f565b61018161017c36600461158a565b6103bb565b6040519015158152602001610150565b6001545b604051908152602001610150565b6101816101b13660046115b6565b6103d3565b60405160128152602001610150565b6001610195565b6101df6101da36600461169a565b610618565b005b6101956101ef36600461172d565b6001600160a01b031660009081526020819052604090205490565b6101df61021836600461172d565b6106aa565b6101616107e1565b6101df61023336600461174a565b6107f0565b61018161024636600461158a565b610813565b6101816102593660046117a3565b61091b565b61019561026c3660046117a3565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101df6102a536600461172d565b6109bd565b6101df6102b83660046117dc565b610af5565b6101df6102cb36600461185c565b610b83565b6060600480548060200260200160405190810160405280929190818152602001828054801561032857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161030a575b5050505050905090565b606060028054610341906118a3565b80601f016020809104026020016040519081016040528092919081815260200182805461036d906118a3565b80156103285780601f1061038f57610100808354040283529160200191610328565b820191906000526020600020905b81548152906001019060200180831161039d57509395945050505050565b6000336103c9818585610ba8565b5060019392505050565b60006001600160a01b0383166104555760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b0384166104d15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161044c565b6000339050610502818686866040518060200160405280600081525060405180602001604052806000815250610d01565b61052e818686866040518060200160405280600081525060405180602001604052806000815250610e5b565b6001600160a01b03808616600090815260086020908152604080832093851683529290522054838110156105ca5760405162461bcd60e51b815260206004820152602960248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201527f616c6c6f77616e63650000000000000000000000000000000000000000000000606482015260840161044c565b6105de86836105d987856118f4565b610ba8565b61060c8287878760405180602001604052806000815250604051806020016040528060008152506000610fd7565b50600195945050505050565b610622338661091b565b6106945760405162461bcd60e51b815260206004820152602c60248201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60448201527f7220666f7220686f6c6465720000000000000000000000000000000000000000606482015260840161044c565b6106a3858585858560016111de565b5050505050565b336001600160a01b03821614156107285760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201527f61746f7200000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03811660009081526005602052604090205460ff1615610779573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff191690556107a8565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b606060038054610341906118a3565b61080e338484846040518060200160405280600081525060016111de565b505050565b60006001600160a01b0383166108905760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161044c565b60003390506108c1818286866040518060200160405280600081525060405180602001604052806000815250610d01565b6108ed818286866040518060200160405280600081525060405180602001604052806000815250610e5b565b6103c98182868660405180602001604052806000815250604051806020016040528060008152506000610fd7565b6000816001600160a01b0316836001600160a01b0316148061098657506001600160a01b03831660009081526005602052604090205460ff16801561098657506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b806109b657506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b6001600160a01b038116331415610a3c5760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f60448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03811660009081526005602052604090205460ff1615610a90573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610abc565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b610aff338561091b565b610b715760405162461bcd60e51b815260206004820152602c60248201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60448201527f7220666f7220686f6c6465720000000000000000000000000000000000000000606482015260840161044c565b610b7d848484846112dc565b50505050565b610b9e338383604051806020016040528060008152506112dc565b5050565b3b151590565b6001600160a01b038316610c245760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b038216610ca05760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040517faabbb8ca0000000000000000000000000000000000000000000000000000000081526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf919061190b565b90506001600160a01b03811615610e52576040517f75ab97820000000000000000000000000000000000000000000000000000000081526001600160a01b038216906375ab978290610e1f908a908a908a908a908a908a90600401611928565b600060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050505b50505050505050565b6001600160a01b03851660009081526020819052604090205483811015610eea5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201527f62616c616e636500000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610f21908490611981565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610f7993929190611999565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610fc691815260200190565b60405180910390a350505050505050565b6040517faabbb8ca0000000000000000000000000000000000000000000000000000000081526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015611071573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611095919061190b565b90506001600160a01b0381161561112a576040517e23de290000000000000000000000000000000000000000000000000000000081526001600160a01b038216906223de29906110f3908b908b908b908b908b908b90600401611928565b600060405180830381600087803b15801561110d57600080fd5b505af1158015611121573d6000803e3d6000fd5b505050506111d4565b81156111d4576001600160a01b0386163b156111d45760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201527f6b656e73526563697069656e7400000000000000000000000000000000000000608482015260a40161044c565b5050505050505050565b6001600160a01b03861661125a5760405162461bcd60e51b815260206004820152602260248201527f4552433737373a2073656e642066726f6d20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b0385166112b05760405162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015260640161044c565b336112bf818888888888610d01565b6112cd818888888888610e5b565b610e5281888888888888610fd7565b6001600160a01b0384166113585760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161044c565b3361136881866000878787610d01565b6001600160a01b038516600090815260208190526040902054848110156113f75760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c6160448201527f6e63650000000000000000000000000000000000000000000000000000000000606482015260840161044c565b6001600160a01b03861660009081526020819052604081208683039055600180548792906114269084906118f4565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a409887878760405161147493929190611999565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b6020808252825182820181905260009190848201906040850190845b818110156115065783516001600160a01b0316835292840192918401916001016114e1565b50909695505050505050565b6000815180845260005b818110156115385760208185018101518683018201520161151c565b8181111561154a576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006109b66020830184611512565b6001600160a01b038116811461158757600080fd5b50565b6000806040838503121561159d57600080fd5b82356115a881611572565b946020939093013593505050565b6000806000606084860312156115cb57600080fd5b83356115d681611572565b925060208401356115e681611572565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261161e57600080fd5b813567ffffffffffffffff80821115611639576116396115f7565b604051601f8301601f19908116603f01168101908282118183101715611661576116616115f7565b8160405283815286602085880101111561167a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156116b257600080fd5b85356116bd81611572565b945060208601356116cd81611572565b935060408601359250606086013567ffffffffffffffff808211156116f157600080fd5b6116fd89838a0161160d565b9350608088013591508082111561171357600080fd5b506117208882890161160d565b9150509295509295909350565b60006020828403121561173f57600080fd5b81356109b681611572565b60008060006060848603121561175f57600080fd5b833561176a81611572565b925060208401359150604084013567ffffffffffffffff81111561178d57600080fd5b6117998682870161160d565b9150509250925092565b600080604083850312156117b657600080fd5b82356117c181611572565b915060208301356117d181611572565b809150509250929050565b600080600080608085870312156117f257600080fd5b84356117fd81611572565b935060208501359250604085013567ffffffffffffffff8082111561182157600080fd5b61182d8883890161160d565b9350606087013591508082111561184357600080fd5b506118508782880161160d565b91505092959194509250565b6000806040838503121561186f57600080fd5b82359150602083013567ffffffffffffffff81111561188d57600080fd5b6118998582860161160d565b9150509250929050565b600181811c908216806118b757607f821691505b602082108114156118d857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015611906576119066118de565b500390565b60006020828403121561191d57600080fd5b81516109b681611572565b60006001600160a01b038089168352808816602084015280871660408401525084606083015260c0608083015261196260c0830185611512565b82810360a08401526119748185611512565b9998505050505050505050565b60008219821115611994576119946118de565b500190565b8381526060602082015260006119b26060830185611512565b82810360408401526119c48185611512565b969550505050505056fea264697066735822122052847b7e405970c031c329f871e38a6123f2f262013cc77486edfc84e1dfa28264736f6c634300080a0033
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.