ERC-20
Overview
Max Total Supply
8,888,888,888 MOCA
Holders
4,297 (0.00%)
Market
Price
$0.30 @ 0.000088 ETH (+3.24%)
Onchain Market Cap
$2,641,368,796.41
Circulating Supply Market Cap
$472,088,122.38
Other Info
Token Contract (WITH 18 Decimals)
Balance
59,473.2600996 MOCAValue
$17,672.72 ( ~5.2540 Eth) [0.0007%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x91787Bff...a0c268b60 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MocaToken
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.22; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { EIP3009 } from "./EIP3009.sol"; import { EIP712 } from "./utils/EIP712.sol"; contract MocaToken is EIP3009 { string internal constant _version = "v1"; constructor(string memory name, string memory symbol, address treasury) ERC20(name, symbol) { _DEPLOYMENT_CHAINID = block.chainid; _DOMAIN_SEPARATOR = EIP712.makeDomainSeparator(name, _version); _mint(treasury, (8_888_888_888 * 1e18)); } /*////////////////////////////////////////////////////////////// EIP721 //////////////////////////////////////////////////////////////*/ function _domainSeparator() internal override view returns (bytes32) { return block.chainid == _DEPLOYMENT_CHAINID ? _DOMAIN_SEPARATOR : EIP712.makeDomainSeparator(name(), _version); } /** * @notice Fn caller can only burn their own tokens * @param amount Amount of tokens to burn */ function burn(uint256 amount) external { _burn(msg.sender, amount); } /** * @notice Execute a transfer with a signed authorization * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external { _transferWithAuthorization( from, to, value, validAfter, validBefore, nonce, v, r, s ); } /** * @notice Attempt to cancel an authorization * @dev Works only if the authorization is not yet used. * EOA wallet signatures should be packed in the order of r, s, v. * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function cancelAuthorization(address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) external { _cancelAuthorization(authorizer, nonce, v, r, s); } /** * @notice Receive a transfer with a signed authorization from the payer * @dev This has an additional check to ensure that the payee's address * matches the caller of this function to prevent front-running attacks. * EOA wallet signatures should be packed in the order of r, s, v. * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function receiveWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external { _receiveWithAuthorization( from, to, value, validAfter, validBefore, nonce, v, r, s ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { EIP712Domain } from "./EIP712Domain.sol"; import { SignatureChecker } from "./utils/SignatureChecker.sol"; import { MessageHashUtils } from "./utils/MessageHashUtils.sol"; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; /** * @title EIP-3009 * @notice Provide internal implementation for gas-abstracted transfers * @dev Contracts that inherit from this must wrap these with publicly * accessible functions, optionally adding modifiers where necessary */ abstract contract EIP3009 is ERC20, EIP712Domain { // keccak256("TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)") bytes32 public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH = 0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267; // keccak256("ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)") bytes32 public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH = 0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8; // keccak256("CancelAuthorization(address authorizer,bytes32 nonce)") bytes32 public constant CANCEL_AUTHORIZATION_TYPEHASH = 0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429; /** * @dev authorizer address => nonce => bool (true if nonce is used) */ mapping(address => mapping(bytes32 => bool)) private _authorizationStates; event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce); event AuthorizationCanceled(address indexed authorizer, bytes32 indexed nonce); /** * @notice Returns the state of an authorization * @dev Nonces are randomly generated 32-byte data unique to the authorizer's address * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @return True if the nonce is used */ function authorizationState(address authorizer, bytes32 nonce) external view returns (bool) { return _authorizationStates[authorizer][nonce]; } /** * @notice Execute a transfer with a signed authorization * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function _transferWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) internal { _transferWithAuthorization( from, to, value, validAfter, validBefore, nonce, abi.encodePacked(r, s, v) ); } /** * @notice Execute a transfer with a signed authorization * @dev EOA wallet signatures should be packed in the order of r, s, v. * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param signature Signature byte array produced by an EOA wallet or a contract wallet */ function _transferWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, bytes memory signature ) internal { _requireValidAuthorization(from, nonce, validAfter, validBefore); _requireValidSignature( from, keccak256( abi.encode( TRANSFER_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce ) ), signature ); _markAuthorizationAsUsed(from, nonce); _transfer(from, to, value); } /** * @notice Receive a transfer with a signed authorization from the payer * @dev This has an additional check to ensure that the payee's address * matches the caller of this function to prevent front-running attacks. * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function _receiveWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) internal { _receiveWithAuthorization( from, to, value, validAfter, validBefore, nonce, abi.encodePacked(r, s, v) ); } /** * @notice Receive a transfer with a signed authorization from the payer * @dev This has an additional check to ensure that the payee's address * matches the caller of this function to prevent front-running attacks. * EOA wallet signatures should be packed in the order of r, s, v. * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param signature Signature byte array produced by an EOA wallet or a contract wallet */ function _receiveWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, bytes memory signature ) internal { require(to == msg.sender, "Caller must be the payee"); _requireValidAuthorization(from, nonce, validAfter, validBefore); _requireValidSignature( from, keccak256( abi.encode( RECEIVE_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce ) ), signature ); _markAuthorizationAsUsed(from, nonce); _transfer(from, to, value); } /** * @notice Attempt to cancel an authorization * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function _cancelAuthorization( address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) internal { _cancelAuthorization(authorizer, nonce, abi.encodePacked(r, s, v)); } /** * @notice Attempt to cancel an authorization * @dev EOA wallet signatures should be packed in the order of r, s, v. * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @param signature Signature byte array produced by an EOA wallet or a contract wallet */ function _cancelAuthorization(address authorizer, bytes32 nonce, bytes memory signature) internal { _requireUnusedAuthorization(authorizer, nonce); _requireValidSignature( authorizer, keccak256( abi.encode(CANCEL_AUTHORIZATION_TYPEHASH, authorizer, nonce) ), signature ); _authorizationStates[authorizer][nonce] = true; emit AuthorizationCanceled(authorizer, nonce); } /** * @notice Validates that signature against input data struct * @param signer Signer's address * @param dataHash Hash of encoded data struct * @param signature Signature byte array produced by an EOA wallet or a contract wallet */ function _requireValidSignature(address signer, bytes32 dataHash, bytes memory signature) private view { require( SignatureChecker.isValidSignatureNow(signer, MessageHashUtils.toTypedDataHash(_domainSeparator(), dataHash), signature), "Invalid signature"); } /** * @notice Check that an authorization is unused * @param authorizer Authorizer's address * @param nonce Nonce of the authorization */ function _requireUnusedAuthorization(address authorizer, bytes32 nonce) private view { require(!_authorizationStates[authorizer][nonce], "Authorization is used or canceled"); } /** * @notice Check that authorization is valid * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) */ function _requireValidAuthorization( address authorizer, bytes32 nonce, uint256 validAfter, uint256 validBefore ) private view { require(block.timestamp > validAfter, "Authorization is not yet valid"); require(block.timestamp < validBefore, "Authorization is expired"); _requireUnusedAuthorization(authorizer, nonce); } /** * @notice Mark an authorization as used * @param authorizer Authorizer's address * @param nonce Nonce of the authorization */ function _markAuthorizationAsUsed(address authorizer, bytes32 nonce) private { _authorizationStates[authorizer][nonce] = true; emit AuthorizationUsed(authorizer, nonce); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // solhint-disable func-name-mixedcase /** * @title EIP712 Domain */ contract EIP712Domain { bytes32 internal _DOMAIN_SEPARATOR; // to prevent signature replay attacks in the event the chain forks // fork chain would have different chain id to original chain uint256 internal immutable _DEPLOYMENT_CHAINID; /** * @notice Get the EIP712 Domain Separator. * @return The bytes32 EIP712 domain separator. */ function DOMAIN_SEPARATOR() external view returns (bytes32) { return _domainSeparator(); } /** * @dev Internal method to get the EIP712 Domain Separator. * @return The bytes32 EIP712 domain separator. */ function _domainSeparator() internal virtual view returns (bytes32) { return _DOMAIN_SEPARATOR; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with the provided data hash * @return magicValue bytes4 magic value 0x1626ba7e when function passes */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @title ECRecover * @notice A library that provides a safe ECDSA recovery function */ library ECRecover { /** * @notice Recover signer's address from a signed message * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/65e4ffde586ec89af3b7e9140bdc9235d1254853/contracts/cryptography/ECDSA.sol * Modifications: Accept v, r, and s as separate arguments * @param digest Keccak-256 hash digest of the signed message * @param v v of the signature * @param r r of the signature * @param s s of the signature * @return Signer address */ function recover( bytes32 digest, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if ( uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 ) { revert("ECRecover: invalid signature 's' value"); } if (v != 27 && v != 28) { revert("ECRecover: invalid signature 'v' value"); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(digest, v, r, s); require(signer != address(0), "ECRecover: invalid signature"); return signer; } /** * @notice Recover signer's address from a signed message * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/0053ee040a7ff1dbc39691c9e67a69f564930a88/contracts/utils/cryptography/ECDSA.sol * @param digest Keccak-256 hash digest of the signed message * @param signature Signature byte array associated with hash * @return Signer address */ function recover(bytes32 digest, bytes memory signature) internal pure returns (address) { require(signature.length == 65, "ECRecover: invalid signature length"); bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return recover(digest, v, r, s); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @title EIP712 * @notice A library that provides EIP712 helper functions */ library EIP712 { /** * @notice Make EIP712 domain separator * @param name Contract name * @param version Contract version * @param chainId Blockchain ID * @return Domain separator */ function makeDomainSeparator( string memory name, string memory version, uint256 chainId ) internal view returns (bytes32) { return keccak256( abi.encode( // keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)") 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f, keccak256(bytes(name)), keccak256(bytes(version)), chainId, address(this) ) ); } /** * @notice Make EIP712 domain separator * @param name Contract name * @param version Contract version * @return Domain separator */ function makeDomainSeparator(string memory name, string memory version) internal view returns (bytes32) { uint256 chainId; assembly { chainId := chainid() } return makeDomainSeparator(name, version, chainId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/21bb89ef5bfc789b9333eb05e3ba2b7b284ac77c/contracts/utils/cryptography/MessageHashUtils.sol * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * @param domainSeparator Domain separator * @param structHash Hashed EIP-712 data struct * @return digest The keccak256 digest of an EIP-712 typed data */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ECRecover } from "./ECRecover.sol"; import { IERC1271 } from "./../IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECRecover.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets. * * Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/21bb89ef5bfc789b9333eb05e3ba2b7b284ac77c/contracts/utils/cryptography/SignatureChecker.sol */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECRecover.recover`. * @param signer Address of the claimed signer * @param digest Keccak-256 hash digest of the signed message * @param signature Signature byte array associated with hash */ function isValidSignatureNow(address signer, bytes32 digest, bytes memory signature) internal view returns (bool) { if (!isContract(signer)) { return ECRecover.recover(digest, signature) == signer; } return isValidERC1271SignatureNow(signer, digest, signature); } /** * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated * against the signer smart contract using ERC1271. * @param signer Address of the claimed signer * @param digest Keccak-256 hash digest of the signed message * @param signature Signature byte array associated with hash * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidERC1271SignatureNow(address signer, bytes32 digest, bytes memory signature) internal view returns (bool) { (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector( IERC1271.isValidSignature.selector, digest, signature ) ); return (success && result.length >= 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } /** * @dev Checks if the input address is a smart contract. */ function isContract(address addr) internal view returns (bool) { uint256 size; assembly { size := extcodesize(addr) } return size > 0; } }
{ "viaIR": false, "optimizer": { "runs": 200, "enabled": true }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {}, "remappings": [ "@layerzerolabs/=node_modules/@layerzerolabs/", "@openzeppelin/=node_modules/@openzeppelin/", "@sphinx-labs/contracts/=lib/sphinx/packages/contracts/contracts/foundry/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "sphinx/=lib/sphinx/" ] }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationUsed","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":[],"name":"CANCEL_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECEIVE_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","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":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"authorizationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"receiveWithAuthorization","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":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b506040516200192c3803806200192c833981016040819052620000349162000369565b8282600362000044838262000487565b50600462000053828262000487565b50504660805250604080518082019091526002815261763160f01b602082015262000080908490620000a4565b6005556200009b816b1cb8b7702ae75fb695e000006200012c565b50505062000575565b600046620001228484838251602093840120825192840192909220604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187015280820194909452606084019190915260808301919091523060a0808401919091528151808403909101815260c09092019052805191012090565b9150505b92915050565b6001600160a01b0382166200015c5760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b6200016a600083836200016e565b5050565b6001600160a01b0383166200019d57806002600082825462000191919062000553565b90915550620002119050565b6001600160a01b03831660009081526020819052604090205481811015620001f25760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000153565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166200022f576002805482900390556200024e565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200029491815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002c957600080fd5b81516001600160401b0380821115620002e657620002e6620002a1565b604051601f8301601f19908116603f01168101908282118183101715620003115762000311620002a1565b81604052838152602092508660208588010111156200032f57600080fd5b600091505b8382101562000353578582018301518183018401529082019062000334565b6000602085830101528094505050505092915050565b6000806000606084860312156200037f57600080fd5b83516001600160401b03808211156200039757600080fd5b620003a587838801620002b7565b94506020860151915080821115620003bc57600080fd5b50620003cb86828701620002b7565b604086015190935090506001600160a01b0381168114620003eb57600080fd5b809150509250925092565b600181811c908216806200040b57607f821691505b6020821081036200042c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000482576000816000526020600020601f850160051c810160208610156200045d5750805b601f850160051c820191505b818110156200047e5782815560010162000469565b5050505b505050565b81516001600160401b03811115620004a357620004a3620002a1565b620004bb81620004b48454620003f6565b8462000432565b602080601f831160018114620004f35760008415620004da5750858301515b600019600386901b1c1916600185901b1785556200047e565b600085815260208120601f198616915b82811015620005245788860151825594840194600190910190840162000503565b5085821015620005435787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200012657634e487b7160e01b600052601160045260246000fd5b60805161139b620005916000396000610555015261139b6000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80637f2eecc3116100a2578063d916948711610071578063d916948714610252578063dd62ed3e14610279578063e3ee160e146102b2578063e94a0102146102c5578063ef55bec6146102fe57600080fd5b80637f2eecc3146101e957806395d89b4114610210578063a0cc6a6814610218578063a9059cbb1461023f57600080fd5b8063313ce567116100e9578063313ce567146101815780633644e5151461019057806342966c68146101985780635a049a70146101ad57806370a08231146101c057600080fd5b806306fdde031461011b578063095ea7b31461013957806318160ddd1461015c57806323b872dd1461016e575b600080fd5b610123610311565b6040516101309190611084565b60405180910390f35b61014c6101473660046110b3565b6103a3565b6040519015158152602001610130565b6002545b604051908152602001610130565b61014c61017c3660046110dd565b6103bd565b60405160128152602001610130565b6101606103e3565b6101ab6101a6366004611119565b6103f2565b005b6101ab6101bb366004611143565b6103ff565b6101606101ce366004611191565b6001600160a01b031660009081526020819052604090205490565b6101607fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b610123610413565b6101607f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b61014c61024d3660046110b3565b610422565b6101607f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b6101606102873660046111ac565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101ab6102c03660046111df565b610430565b61014c6102d33660046110b3565b6001600160a01b03919091166000908152600660209081526040808320938352929052205460ff1690565b6101ab61030c3660046111df565b61044c565b6060600380546103209061125d565b80601f016020809104026020016040519081016040528092919081815260200182805461034c9061125d565b80156103995780601f1061036e57610100808354040283529160200191610399565b820191906000526020600020905b81548152906001019060200180831161037c57829003601f168201915b5050505050905090565b6000336103b181858561045d565b60019150505b92915050565b6000336103cb85828561046f565b6103d68585856104f2565b60019150505b9392505050565b60006103ed610551565b905090565b6103fc33826105ac565b50565b61040c85858585856105e6565b5050505050565b6060600480546103209061125d565b6000336103b18185856104f2565b610441898989898989898989610614565b505050505050505050565b610441898989898989898989610646565b61046a8383836001610678565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146104ec57818110156104dd57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6104ec84848484036000610678565b50505050565b6001600160a01b03831661051c57604051634b637e8f60e11b8152600060048201526024016104d4565b6001600160a01b0382166105465760405163ec442f0560e01b8152600060048201526024016104d4565b61046a83838361074d565b60007f000000000000000000000000000000000000000000000000000000000000000046146105a5576103ed610585610311565b60405180604001604052806002815260200161763160f01b815250610877565b5060055490565b6001600160a01b0382166105d657604051634b637e8f60e11b8152600060048201526024016104d4565b6105e28260008361074d565b5050565b61040c858584848760405160200161060093929190611297565b6040516020818303038152906040526108fc565b61044189898989898988888b60405160200161063293929190611297565b6040516020818303038152906040526109c9565b61044189898989898988888b60405160200161066493929190611297565b604051602081830303815290604052610a37565b6001600160a01b0384166106a25760405163e602df0560e01b8152600060048201526024016104d4565b6001600160a01b0383166106cc57604051634a1406b160e11b8152600060048201526024016104d4565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156104ec57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161073f91815260200190565b60405180910390a350505050565b6001600160a01b03831661077857806002600082825461076d91906112ba565b909155506107ea9050565b6001600160a01b038316600090815260208190526040902054818110156107cb5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016104d4565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661080657600280548290039055610825565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161086a91815260200190565b60405180910390a3505050565b6000466108f48484838251602093840120825192840192909220604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187015280820194909452606084019190915260808301919091523060a0808401919091528151808403909101815260c09092019052805191012090565b949350505050565b6109068383610adf565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742960208201526001600160a01b038516918101919091526060810183905261096e9084906080015b6040516020818303038152906040528051906020012083610b5d565b6001600160a01b0383166000818152600660209081526040808320868452909152808220805460ff19166001179055518492917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050565b6109d587838686610bd2565b610a19877f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226760001b89898989898960405160200161095297969594939291906112db565b610a238783610c7a565b610a2e8787876104f2565b50505050505050565b6001600160a01b0386163314610a8f5760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206d75737420626520746865207061796565000000000000000060448201526064016104d4565b610a9b87838686610bd2565b610a19877fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de860001b89898989898960405160200161095297969594939291906112db565b6001600160a01b038216600090815260066020908152604080832084845290915290205460ff16156105e25760405162461bcd60e51b815260206004820152602160248201527f417574686f72697a6174696f6e2069732075736564206f722063616e63656c656044820152601960fa1b60648201526084016104d4565b610b9283610b8c610b6c610551565b8560405161190160f01b8152600281019290925260228201526042902090565b83610cd4565b61046a5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016104d4565b814211610c215760405162461bcd60e51b815260206004820152601e60248201527f417574686f72697a6174696f6e206973206e6f74207965742076616c6964000060448201526064016104d4565b804210610c705760405162461bcd60e51b815260206004820152601860248201527f417574686f72697a6174696f6e2069732065787069726564000000000000000060448201526064016104d4565b6104ec8484610adf565b6001600160a01b0382166000818152600660209081526040808320858452909152808220805460ff19166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b6000833b610d0157836001600160a01b0316610cf08484610d0c565b6001600160a01b03161490506103dc565b6108f4848484610d93565b60008151604114610d6b5760405162461bcd60e51b815260206004820152602360248201527f45435265636f7665723a20696e76616c6964207369676e6174757265206c656e6044820152620cee8d60eb1b60648201526084016104d4565b60208201516040830151606084015160001a610d8986828585610e7f565b9695505050505050565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401610dbd929190611317565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610dfb9190611330565b600060405180830381855afa9150503d8060008114610e36576040519150601f19603f3d011682016040523d82523d6000602084013e610e3b565b606091505b5091509150818015610e4f57506020815110155b8015610d8957508051630b135d3f60e11b90610e74908301602090810190840161134c565b149695505050505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610f005760405162461bcd60e51b815260206004820152602660248201527f45435265636f7665723a20696e76616c6964207369676e6174757265202773276044820152652076616c756560d01b60648201526084016104d4565b8360ff16601b14158015610f1857508360ff16601c14155b15610f745760405162461bcd60e51b815260206004820152602660248201527f45435265636f7665723a20696e76616c6964207369676e6174757265202776276044820152652076616c756560d01b60648201526084016104d4565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015610fc8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661102b5760405162461bcd60e51b815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e61747572650000000060448201526064016104d4565b95945050505050565b60005b8381101561104f578181015183820152602001611037565b50506000910152565b60008151808452611070816020860160208601611034565b601f01601f19169290920160200192915050565b6020815260006103dc6020830184611058565b80356001600160a01b03811681146110ae57600080fd5b919050565b600080604083850312156110c657600080fd5b6110cf83611097565b946020939093013593505050565b6000806000606084860312156110f257600080fd5b6110fb84611097565b925061110960208501611097565b9150604084013590509250925092565b60006020828403121561112b57600080fd5b5035919050565b803560ff811681146110ae57600080fd5b600080600080600060a0868803121561115b57600080fd5b61116486611097565b94506020860135935061117960408701611132565b94979396509394606081013594506080013592915050565b6000602082840312156111a357600080fd5b6103dc82611097565b600080604083850312156111bf57600080fd5b6111c883611097565b91506111d660208401611097565b90509250929050565b60008060008060008060008060006101208a8c0312156111fe57600080fd5b6112078a611097565b985061121560208b01611097565b975060408a0135965060608a0135955060808a0135945060a08a0135935061123f60c08b01611132565b925060e08a013591506101008a013590509295985092959850929598565b600181811c9082168061127157607f821691505b60208210810361129157634e487b7160e01b600052602260045260246000fd5b50919050565b928352602083019190915260f81b6001600160f81b031916604082015260410190565b808201808211156103b757634e487b7160e01b600052601160045260246000fd5b9687526001600160a01b0395861660208801529390941660408601526060850191909152608084015260a083019190915260c082015260e00190565b8281526040602082015260006108f46040830184611058565b60008251611342818460208701611034565b9190910192915050565b60006020828403121561135e57600080fd5b505191905056fea2646970667358221220e7f0ae5091d485a50b43b1bff5c82b0c5081e87651b36a514cd65993e70a1a8264736f6c63430008160033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000de05a1abb121113a33eed248bd91ddc254d5e9db00000000000000000000000000000000000000000000000000000000000000054c6174746500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054c61747465000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80637f2eecc3116100a2578063d916948711610071578063d916948714610252578063dd62ed3e14610279578063e3ee160e146102b2578063e94a0102146102c5578063ef55bec6146102fe57600080fd5b80637f2eecc3146101e957806395d89b4114610210578063a0cc6a6814610218578063a9059cbb1461023f57600080fd5b8063313ce567116100e9578063313ce567146101815780633644e5151461019057806342966c68146101985780635a049a70146101ad57806370a08231146101c057600080fd5b806306fdde031461011b578063095ea7b31461013957806318160ddd1461015c57806323b872dd1461016e575b600080fd5b610123610311565b6040516101309190611084565b60405180910390f35b61014c6101473660046110b3565b6103a3565b6040519015158152602001610130565b6002545b604051908152602001610130565b61014c61017c3660046110dd565b6103bd565b60405160128152602001610130565b6101606103e3565b6101ab6101a6366004611119565b6103f2565b005b6101ab6101bb366004611143565b6103ff565b6101606101ce366004611191565b6001600160a01b031660009081526020819052604090205490565b6101607fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b610123610413565b6101607f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b61014c61024d3660046110b3565b610422565b6101607f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b6101606102873660046111ac565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101ab6102c03660046111df565b610430565b61014c6102d33660046110b3565b6001600160a01b03919091166000908152600660209081526040808320938352929052205460ff1690565b6101ab61030c3660046111df565b61044c565b6060600380546103209061125d565b80601f016020809104026020016040519081016040528092919081815260200182805461034c9061125d565b80156103995780601f1061036e57610100808354040283529160200191610399565b820191906000526020600020905b81548152906001019060200180831161037c57829003601f168201915b5050505050905090565b6000336103b181858561045d565b60019150505b92915050565b6000336103cb85828561046f565b6103d68585856104f2565b60019150505b9392505050565b60006103ed610551565b905090565b6103fc33826105ac565b50565b61040c85858585856105e6565b5050505050565b6060600480546103209061125d565b6000336103b18185856104f2565b610441898989898989898989610614565b505050505050505050565b610441898989898989898989610646565b61046a8383836001610678565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146104ec57818110156104dd57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b6104ec84848484036000610678565b50505050565b6001600160a01b03831661051c57604051634b637e8f60e11b8152600060048201526024016104d4565b6001600160a01b0382166105465760405163ec442f0560e01b8152600060048201526024016104d4565b61046a83838361074d565b60007f000000000000000000000000000000000000000000000000000000000000000146146105a5576103ed610585610311565b60405180604001604052806002815260200161763160f01b815250610877565b5060055490565b6001600160a01b0382166105d657604051634b637e8f60e11b8152600060048201526024016104d4565b6105e28260008361074d565b5050565b61040c858584848760405160200161060093929190611297565b6040516020818303038152906040526108fc565b61044189898989898988888b60405160200161063293929190611297565b6040516020818303038152906040526109c9565b61044189898989898988888b60405160200161066493929190611297565b604051602081830303815290604052610a37565b6001600160a01b0384166106a25760405163e602df0560e01b8152600060048201526024016104d4565b6001600160a01b0383166106cc57604051634a1406b160e11b8152600060048201526024016104d4565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156104ec57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161073f91815260200190565b60405180910390a350505050565b6001600160a01b03831661077857806002600082825461076d91906112ba565b909155506107ea9050565b6001600160a01b038316600090815260208190526040902054818110156107cb5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016104d4565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661080657600280548290039055610825565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161086a91815260200190565b60405180910390a3505050565b6000466108f48484838251602093840120825192840192909220604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8187015280820194909452606084019190915260808301919091523060a0808401919091528151808403909101815260c09092019052805191012090565b949350505050565b6109068383610adf565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742960208201526001600160a01b038516918101919091526060810183905261096e9084906080015b6040516020818303038152906040528051906020012083610b5d565b6001600160a01b0383166000818152600660209081526040808320868452909152808220805460ff19166001179055518492917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050565b6109d587838686610bd2565b610a19877f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226760001b89898989898960405160200161095297969594939291906112db565b610a238783610c7a565b610a2e8787876104f2565b50505050505050565b6001600160a01b0386163314610a8f5760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206d75737420626520746865207061796565000000000000000060448201526064016104d4565b610a9b87838686610bd2565b610a19877fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de860001b89898989898960405160200161095297969594939291906112db565b6001600160a01b038216600090815260066020908152604080832084845290915290205460ff16156105e25760405162461bcd60e51b815260206004820152602160248201527f417574686f72697a6174696f6e2069732075736564206f722063616e63656c656044820152601960fa1b60648201526084016104d4565b610b9283610b8c610b6c610551565b8560405161190160f01b8152600281019290925260228201526042902090565b83610cd4565b61046a5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016104d4565b814211610c215760405162461bcd60e51b815260206004820152601e60248201527f417574686f72697a6174696f6e206973206e6f74207965742076616c6964000060448201526064016104d4565b804210610c705760405162461bcd60e51b815260206004820152601860248201527f417574686f72697a6174696f6e2069732065787069726564000000000000000060448201526064016104d4565b6104ec8484610adf565b6001600160a01b0382166000818152600660209081526040808320858452909152808220805460ff19166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b6000833b610d0157836001600160a01b0316610cf08484610d0c565b6001600160a01b03161490506103dc565b6108f4848484610d93565b60008151604114610d6b5760405162461bcd60e51b815260206004820152602360248201527f45435265636f7665723a20696e76616c6964207369676e6174757265206c656e6044820152620cee8d60eb1b60648201526084016104d4565b60208201516040830151606084015160001a610d8986828585610e7f565b9695505050505050565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401610dbd929190611317565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610dfb9190611330565b600060405180830381855afa9150503d8060008114610e36576040519150601f19603f3d011682016040523d82523d6000602084013e610e3b565b606091505b5091509150818015610e4f57506020815110155b8015610d8957508051630b135d3f60e11b90610e74908301602090810190840161134c565b149695505050505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610f005760405162461bcd60e51b815260206004820152602660248201527f45435265636f7665723a20696e76616c6964207369676e6174757265202773276044820152652076616c756560d01b60648201526084016104d4565b8360ff16601b14158015610f1857508360ff16601c14155b15610f745760405162461bcd60e51b815260206004820152602660248201527f45435265636f7665723a20696e76616c6964207369676e6174757265202776276044820152652076616c756560d01b60648201526084016104d4565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015610fc8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661102b5760405162461bcd60e51b815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e61747572650000000060448201526064016104d4565b95945050505050565b60005b8381101561104f578181015183820152602001611037565b50506000910152565b60008151808452611070816020860160208601611034565b601f01601f19169290920160200192915050565b6020815260006103dc6020830184611058565b80356001600160a01b03811681146110ae57600080fd5b919050565b600080604083850312156110c657600080fd5b6110cf83611097565b946020939093013593505050565b6000806000606084860312156110f257600080fd5b6110fb84611097565b925061110960208501611097565b9150604084013590509250925092565b60006020828403121561112b57600080fd5b5035919050565b803560ff811681146110ae57600080fd5b600080600080600060a0868803121561115b57600080fd5b61116486611097565b94506020860135935061117960408701611132565b94979396509394606081013594506080013592915050565b6000602082840312156111a357600080fd5b6103dc82611097565b600080604083850312156111bf57600080fd5b6111c883611097565b91506111d660208401611097565b90509250929050565b60008060008060008060008060006101208a8c0312156111fe57600080fd5b6112078a611097565b985061121560208b01611097565b975060408a0135965060608a0135955060808a0135945060a08a0135935061123f60c08b01611132565b925060e08a013591506101008a013590509295985092959850929598565b600181811c9082168061127157607f821691505b60208210810361129157634e487b7160e01b600052602260045260246000fd5b50919050565b928352602083019190915260f81b6001600160f81b031916604082015260410190565b808201808211156103b757634e487b7160e01b600052601160045260246000fd5b9687526001600160a01b0395861660208801529390941660408601526060850191909152608084015260a083019190915260c082015260e00190565b8281526040602082015260006108f46040830184611058565b60008251611342818460208701611034565b9190910192915050565b60006020828403121561135e57600080fd5b505191905056fea2646970667358221220e7f0ae5091d485a50b43b1bff5c82b0c5081e87651b36a514cd65993e70a1a8264736f6c63430008160033
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.