Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Token | 10531153 | 21 hrs ago | IN | 0 S | 0.01591956 |
Latest 2 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
10531153 | 21 hrs ago | Contract Creation | 0 S | |||
10528247 | 22 hrs ago | Contract Creation | 0 S |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
TokenFactoryUpgraded
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 100 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.28; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/proxy/Clones.sol"; // Contrato base do token que será clonado contract CustomToken is ERC20, Ownable { struct TokenMetadata { string tokenURI; string description; string website; string twitter; string telegram; } TokenMetadata public metadata; bool public canMint; bool public canFreeze; bool public canUpdateMetadata; uint8 private _decimalsValue; // Mapeamento para contas congeladas mapping(address => bool) private _frozen; // Variáveis adicionais para armazenar nome e símbolo string private _tokenName; string private _tokenSymbol; bool private _initialized; // Inicializador chamado após clonagem function initialize( string memory tokenName_, string memory tokenSymbol_, uint256 initialSupply, uint8 decimals_, address creator, TokenMetadata memory metadata_, bool canMint_, bool canFreeze_, bool canUpdateMetadata_ ) external { // Garantir que só possa ser inicializado uma vez require(!_initialized, "Already initialized"); // Armazenar nome e símbolo _tokenName = tokenName_; _tokenSymbol = tokenSymbol_; // Inicializar propriedades _transferOwnership(creator); metadata = metadata_; _decimalsValue = decimals_; canMint = canMint_; canFreeze = canFreeze_; canUpdateMetadata = canUpdateMetadata_; _initialized = true; // Mintar supply inicial _mint(creator, initialSupply); } // Construtor com valores iniciais que serão sobrescritos pela inicialização constructor() ERC20("", "") Ownable(msg.sender) {} // Sobreescrevemos name() e symbol() para usar nossas próprias variáveis function name() public view override returns (string memory) { return _initialized ? _tokenName : super.name(); } function symbol() public view override returns (string memory) { return _initialized ? _tokenSymbol : super.symbol(); } // Decimal personalizado function decimals() public view override returns (uint8) { return _decimalsValue; } // Getters para metadata function tokenURI() public view returns (string memory) { return metadata.tokenURI; } function description() public view returns (string memory) { return metadata.description; } function website() public view returns (string memory) { return metadata.website; } function twitter() public view returns (string memory) { return metadata.twitter; } function telegram() public view returns (string memory) { return metadata.telegram; } // Permissões function permissions() public view returns (bool, bool, bool) { return (canMint, canFreeze, canUpdateMetadata); } // Função para mintar novos tokens - só será permitida se canMint for true function mint(address to, uint256 amount) external { require(canMint, "Minting not allowed"); require(msg.sender == owner(), "Only owner can mint"); _mint(to, amount); } // Função para congelar contas - só será permitida se canFreeze for true function freezeAccount(address account, bool freeze) external { require(canFreeze, "Freezing not allowed"); require(msg.sender == owner(), "Only owner can freeze"); _frozen[account] = freeze; } // Verificar se uma conta está congelada - só será permitida se canFreeze for true function isFrozen(address account) external view returns (bool) { require(canFreeze, "Freezing not allowed"); return _frozen[account]; } // Override da função _update para verificar contas congeladas function _update(address from, address to, uint256 value) internal override { if (canFreeze && from != address(0)) { require(!_frozen[from], "Account is frozen"); } super._update(from, to, value); } // Função para atualizar metadados - só será permitida se canUpdateMetadata for true function updateMetadata( string memory tokenURI_, string memory description_, string memory website_, string memory twitter_, string memory telegram_ ) external { require(canUpdateMetadata, "Metadata updates not allowed"); require(msg.sender == owner(), "Only owner can update metadata"); metadata.tokenURI = tokenURI_; metadata.description = description_; metadata.website = website_; metadata.twitter = twitter_; metadata.telegram = telegram_; } } // Factory contrato usando o padrão de proxy mínimo contract TokenFactoryUpgraded is Ownable { using Clones for address; // Endereço da implementação address public immutable tokenImplementation; struct TokenPermissions { bool canMint; bool canFreeze; bool canUpdateMetadata; } event TokenCreated( address indexed tokenAddress, string name, string symbol, uint256 totalSupply, address creator ); constructor() Ownable(msg.sender) { // Deploy do contrato de implementação uma única vez tokenImplementation = address(new CustomToken()); } function createToken( string memory name, string memory symbol, uint256 initialSupply, uint8 decimals_, CustomToken.TokenMetadata memory metadata, TokenPermissions memory permissions ) external returns (address) { // Cria um clone do contrato de implementação (proxy mínimo) address clone = tokenImplementation.clone(); // Inicializa o clone CustomToken(clone).initialize( name, symbol, initialSupply, decimals_, msg.sender, metadata, permissions.canMint, permissions.canFreeze, permissions.canUpdateMetadata ); emit TokenCreated( clone, name, symbol, initialSupply, msg.sender ); return clone; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 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 ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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.2.0) (proxy/Clones.sol) pragma solidity ^0.8.20; import {Create2} from "../utils/Create2.sol"; import {Errors} from "../utils/Errors.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[ERC-1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. */ library Clones { error CloneArgumentsTooLong(); /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { return clone(implementation, 0); } /** * @dev Same as {xref-Clones-clone-address-}[clone], but with a `value` parameter to send native currency * to the new contract. * * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) * to always have enough balance for new deployments. Consider exposing this function under a payable method. */ function clone(address implementation, uint256 value) internal returns (address instance) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } assembly ("memory-safe") { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create(value, 0x09, 0x37) } if (instance == address(0)) { revert Errors.FailedDeployment(); } } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple times will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { return cloneDeterministic(implementation, salt, 0); } /** * @dev Same as {xref-Clones-cloneDeterministic-address-bytes32-}[cloneDeterministic], but with * a `value` parameter to send native currency to the new contract. * * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) * to always have enough balance for new deployments. Consider exposing this function under a payable method. */ function cloneDeterministic( address implementation, bytes32 salt, uint256 value ) internal returns (address instance) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } assembly ("memory-safe") { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create2(value, 0x09, 0x37, salt) } if (instance == address(0)) { revert Errors.FailedDeployment(); } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly ("memory-safe") { let ptr := mload(0x40) mstore(add(ptr, 0x38), deployer) mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) mstore(add(ptr, 0x14), implementation) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) mstore(add(ptr, 0x58), salt) mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) predicted := and(keccak256(add(ptr, 0x43), 0x55), 0xffffffffffffffffffffffffffffffffffffffff) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt ) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } /** * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom * immutable arguments. These are provided through `args` and cannot be changed after deployment. To * access the arguments within the implementation, use {fetchCloneArgs}. * * This function uses the create opcode, which should never revert. */ function cloneWithImmutableArgs(address implementation, bytes memory args) internal returns (address instance) { return cloneWithImmutableArgs(implementation, args, 0); } /** * @dev Same as {xref-Clones-cloneWithImmutableArgs-address-bytes-}[cloneWithImmutableArgs], but with a `value` * parameter to send native currency to the new contract. * * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) * to always have enough balance for new deployments. Consider exposing this function under a payable method. */ function cloneWithImmutableArgs( address implementation, bytes memory args, uint256 value ) internal returns (address instance) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args); assembly ("memory-safe") { instance := create(value, add(bytecode, 0x20), mload(bytecode)) } if (instance == address(0)) { revert Errors.FailedDeployment(); } } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation` with custom * immutable arguments. These are provided through `args` and cannot be changed after deployment. To * access the arguments within the implementation, use {fetchCloneArgs}. * * This function uses the create2 opcode and a `salt` to deterministically deploy the clone. Using the same * `implementation`, `args` and `salt` multiple times will revert, since the clones cannot be deployed twice * at the same address. */ function cloneDeterministicWithImmutableArgs( address implementation, bytes memory args, bytes32 salt ) internal returns (address instance) { return cloneDeterministicWithImmutableArgs(implementation, args, salt, 0); } /** * @dev Same as {xref-Clones-cloneDeterministicWithImmutableArgs-address-bytes-bytes32-}[cloneDeterministicWithImmutableArgs], * but with a `value` parameter to send native currency to the new contract. * * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) * to always have enough balance for new deployments. Consider exposing this function under a payable method. */ function cloneDeterministicWithImmutableArgs( address implementation, bytes memory args, bytes32 salt, uint256 value ) internal returns (address instance) { bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args); return Create2.deploy(value, salt, bytecode); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}. */ function predictDeterministicAddressWithImmutableArgs( address implementation, bytes memory args, bytes32 salt, address deployer ) internal pure returns (address predicted) { bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args); return Create2.computeAddress(salt, keccak256(bytecode), deployer); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}. */ function predictDeterministicAddressWithImmutableArgs( address implementation, bytes memory args, bytes32 salt ) internal view returns (address predicted) { return predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this)); } /** * @dev Get the immutable args attached to a clone. * * - If `instance` is a clone that was deployed using `clone` or `cloneDeterministic`, this * function will return an empty array. * - If `instance` is a clone that was deployed using `cloneWithImmutableArgs` or * `cloneDeterministicWithImmutableArgs`, this function will return the args array used at * creation. * - If `instance` is NOT a clone deployed using this library, the behavior is undefined. This * function should only be used to check addresses that are known to be clones. */ function fetchCloneArgs(address instance) internal view returns (bytes memory) { bytes memory result = new bytes(instance.code.length - 45); // revert if length is too short assembly ("memory-safe") { extcodecopy(instance, add(result, 32), 45, mload(result)) } return result; } /** * @dev Helper that prepares the initcode of the proxy with immutable args. * * An assembly variant of this function requires copying the `args` array, which can be efficiently done using * `mcopy`. Unfortunately, that opcode is not available before cancun. A pure solidity implementation using * abi.encodePacked is more expensive but also more portable and easier to review. * * NOTE: https://eips.ethereum.org/EIPS/eip-170[EIP-170] limits the length of the contract code to 24576 bytes. * With the proxy code taking 45 bytes, that limits the length of the immutable args to 24531 bytes. */ function _cloneCodeWithImmutableArgs( address implementation, bytes memory args ) private pure returns (bytes memory) { if (args.length > 24531) revert CloneArgumentsTooLong(); return abi.encodePacked( hex"61", uint16(args.length + 45), hex"3d81600a3d39f3363d3d373d3d3d363d73", implementation, hex"5af43d82803e903d91602b57fd5bf3", args ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.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 ERC-20 * applications. */ 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}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * 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: * * ```solidity * 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.1.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 ERC-20 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.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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.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 // OpenZeppelin Contracts (last updated v5.1.0) (utils/Create2.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. * `CREATE2` can be used to compute in advance the address where a smart * contract will be deployed, which allows for interesting new mechanisms known * as 'counterfactual interactions'. * * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more * information. */ library Create2 { /** * @dev There's no code to deploy. */ error Create2EmptyBytecode(); /** * @dev Deploys a contract using `CREATE2`. The address where the contract * will be deployed can be known in advance via {computeAddress}. * * The bytecode for a contract can be obtained from Solidity with * `type(contractName).creationCode`. * * Requirements: * * - `bytecode` must not be empty. * - `salt` must have not been used for `bytecode` already. * - the factory must have a balance of at least `amount`. * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. */ function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } if (bytecode.length == 0) { revert Create2EmptyBytecode(); } assembly ("memory-safe") { addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) // if no address was created, and returndata is not empty, bubble revert if and(iszero(addr), not(iszero(returndatasize()))) { let p := mload(0x40) returndatacopy(p, 0, returndatasize()) revert(p, returndatasize()) } } if (addr == address(0)) { revert Errors.FailedDeployment(); } } /** * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the * `bytecodeHash` or `salt` will result in a new destination address. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { return computeAddress(salt, bytecodeHash, address(this)); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { assembly ("memory-safe") { let ptr := mload(0x40) // Get free memory pointer // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | // |-------------------|---------------------------------------------------------------------------| // | bytecodeHash | CCCCCCCCCCCCC...CC | // | salt | BBBBBBBBBBBBB...BB | // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | // | 0xFF | FF | // |-------------------|---------------------------------------------------------------------------| // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | mstore(add(ptr, 0x40), bytecodeHash) mstore(add(ptr, 0x20), salt) mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff mstore8(start, 0xff) addr := and(keccak256(start, 85), 0xffffffffffffffffffffffffffffffffffffffff) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
{ "optimizer": { "enabled": true, "runs": 100 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedDeployment","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"address","name":"creator","type":"address"}],"name":"TokenCreated","type":"event"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"components":[{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"website","type":"string"},{"internalType":"string","name":"twitter","type":"string"},{"internalType":"string","name":"telegram","type":"string"}],"internalType":"struct CustomToken.TokenMetadata","name":"metadata","type":"tuple"},{"components":[{"internalType":"bool","name":"canMint","type":"bool"},{"internalType":"bool","name":"canFreeze","type":"bool"},{"internalType":"bool","name":"canUpdateMetadata","type":"bool"}],"internalType":"struct TokenFactoryUpgraded.TokenPermissions","name":"permissions","type":"tuple"}],"name":"createToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100408161007b565b5060405161004d906100cb565b604051809103906000f080158015610069573d6000803e3d6000fd5b506001600160a01b03166080526100d8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611a248061095683390190565b60805161085e6100f8600039600081816061015260f6015261085e6000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632f3a3d5d1461005c578063715018a6146100995780638da5cb5b146100a3578063b1c4733a146100b4578063f2fde38b146100c7575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516100909190610359565b60405180910390f35b6100a16100da565b005b6000546001600160a01b0316610083565b6100836100c23660046105ae565b6100ee565b6100a16100d5366004610673565b6101ec565b6100e2610233565b6100ec6000610260565b565b6000806101237f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166102b0565b8351602085015160408087015190516351916dbb60e11b81529394506001600160a01b0385169363a322db7693610168938e938e938e938e9333938f936004016106e9565b600060405180830381600087803b15801561018257600080fd5b505af1158015610196573d6000803e3d6000fd5b50505050806001600160a01b03167fb7d8fd3c9d56d12c15c8e139bc4e6febd6ad2349b3ebe6a1a91c0a9e7797710d898989336040516101d994939291906107e1565b60405180910390a2979650505050505050565b6101f4610233565b6001600160a01b038116610227576000604051631e4fbdf760e01b815260040161021e9190610359565b60405180910390fd5b61023081610260565b50565b6000546001600160a01b031633146100ec573360405163118cdaa760e01b815260040161021e9190610359565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006102bd8260006102c3565b92915050565b6000814710156102ef5760405163cf47918160e01b81524760048201526024810183905260440161021e565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b176020526037600983f090506001600160a01b0381166102bd5760405163b06ebf3d60e01b815260040160405180910390fd5b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156103a5576103a561036d565b60405290565b600082601f8301126103bc57600080fd5b81356001600160401b038111156103d5576103d561036d565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104035761040361036d565b60405281815283820160200185101561041b57600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561044a57600080fd5b610452610383565b905081356001600160401b0381111561046a57600080fd5b610476848285016103ab565b82525060208201356001600160401b0381111561049257600080fd5b61049e848285016103ab565b60208301525060408201356001600160401b038111156104bd57600080fd5b6104c9848285016103ab565b60408301525060608201356001600160401b038111156104e857600080fd5b6104f4848285016103ab565b60608301525060808201356001600160401b0381111561051357600080fd5b61051f848285016103ab565b60808301525092915050565b8035801515811461053b57600080fd5b919050565b60006060828403121561055257600080fd5b604051606081016001600160401b03811182821017156105745761057461036d565b6040529050806105838361052b565b81526105916020840161052b565b60208201526105a26040840161052b565b60408201525092915050565b60008060008060008061010087890312156105c857600080fd5b86356001600160401b038111156105de57600080fd5b6105ea89828a016103ab565b96505060208701356001600160401b0381111561060657600080fd5b61061289828a016103ab565b95505060408701359350606087013560ff8116811461063057600080fd5b925060808701356001600160401b0381111561064b57600080fd5b61065789828a01610438565b9250506106678860a08901610540565b90509295509295509295565b60006020828403121561068557600080fd5b81356001600160a01b038116811461069c57600080fd5b9392505050565b6000815180845260005b818110156106c9576020818501810151868301820152016106ad565b506000602082860101526020601f19601f83011685010191505092915050565b610120815260006106fe61012083018c6106a3565b8281036020840152610710818c6106a3565b905089604084015260ff8916606084015260018060a01b038816608084015282810360a0840152865160a0825261074a60a08301826106a3565b90506020880151828203602084015261076382826106a3565b9150506040880151828203604084015261077d82826106a3565b9150506060880151828203606084015261079782826106a3565b915050608088015182820360808401526107b182826106a3565b93505050506107c460c083018615159052565b92151560e082015290151561010090910152979650505050505050565b6080815260006107f460808301876106a3565b828103602084015261080681876106a3565b604084019590955250506001600160a01b03919091166060909101529291505056fea26469706673582212209ac7db9c96559917e91f1eb8c13b9d441691d7c8113a21de6493cdbcda546eb864736f6c634300081c0033608060405234801561001057600080fd5b506040805160208082018352600080835283519182019093529182523391600361003a8382610178565b5060046100478282610178565b5050506001600160a01b03811661007857604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61008181610087565b50610236565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061010357607f821691505b60208210810361012357634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561017357806000526020600020601f840160051c810160208510156101505750805b601f840160051c820191505b81811015610170576000815560010161015c565b50505b505050565b81516001600160401b03811115610191576101916100d9565b6101a58161019f84546100ef565b84610129565b6020601f8211600181146101d957600083156101c15750848201515b600019600385901b1c1916600184901b178455610170565b600084815260208120601f198516915b8281101561020957878501518255602094850194600190920191016101e9565b50848210156102275786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6117df806102456000396000f3fe608060405234801561001057600080fd5b50600436106101795760003560e01c80638025c61d116100d9578063beb0a41611610087578063beb0a41614610321578063beb9716d14610329578063dd62ed3e14610336578063e583983614610349578063e724529c1461035c578063f2fde38b1461036f578063fbc6e84e1461038257600080fd5b80638025c61d1461028d5780638da5cb5b146102a057806395d89b41146102b5578063a322db76146102bd578063a9059cbb146102d0578063ab8c71c0146102e3578063abfaeee01461031957600080fd5b8063392f37e911610136578063392f37e9146102165780633c130d901461022f57806340c10f191461023757806347ecb6651461024c57806370a0823114610254578063715018a61461027d5780637284e4161461028557600080fd5b806306fdde031461017e578063095ea7b31461019c5780630facaef3146101bf57806318160ddd146101d257806323b872dd146101e4578063313ce567146101f7575b600080fd5b610186610394565b60405161019391906110a8565b60405180910390f35b6101af6101aa3660046110de565b61043e565b6040519015158152602001610193565b600b546101af9062010000900460ff1681565b6002545b604051908152602001610193565b6101af6101f2366004611108565b610458565b600b546301000000900460ff1660405160ff9091168152602001610193565b61021e61047c565b604051610193959493929190611145565b610186610746565b61024a6102453660046110de565b610758565b005b610186610811565b6101d66102623660046111b2565b6001600160a01b031660009081526020819052604090205490565b61024a610823565b610186610837565b61024a61029b366004611298565b610849565b6102a8610951565b604051610193919061137f565b610186610960565b61024a6102cb3660046114a7565b610982565b6101af6102de3660046110de565b610abc565b600b546040805160ff80841615158252610100840481161515602083015262010000909304909216151590820152606001610193565b610186610aca565b610186610adc565b600b546101af9060ff1681565b6101d6610344366004611596565b610aee565b6101af6103573660046111b2565b610b19565b61024a61036a3660046115c9565b610b62565b61024a61037d3660046111b2565b610c14565b600b546101af90610100900460ff1681565b600f5460609060ff166103ae576103a9610c52565b905090565b600d80546103bb906115f3565b80601f01602080910402602001604051908101604052809291908181526020018280546103e7906115f3565b80156104345780601f1061040957610100808354040283529160200191610434565b820191906000526020600020905b81548152906001019060200180831161041757829003601f168201915b5050505050905090565b60003361044c818585610c61565b60019150505b92915050565b600033610466858285610c73565b610471858585610cc7565b506001949350505050565b60068054819061048b906115f3565b80601f01602080910402602001604051908101604052809291908181526020018280546104b7906115f3565b80156105045780601f106104d957610100808354040283529160200191610504565b820191906000526020600020905b8154815290600101906020018083116104e757829003601f168201915b505050505090806001018054610519906115f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610545906115f3565b80156105925780601f1061056757610100808354040283529160200191610592565b820191906000526020600020905b81548152906001019060200180831161057557829003601f168201915b5050505050908060020180546105a7906115f3565b80601f01602080910402602001604051908101604052809291908181526020018280546105d3906115f3565b80156106205780601f106105f557610100808354040283529160200191610620565b820191906000526020600020905b81548152906001019060200180831161060357829003601f168201915b505050505090806003018054610635906115f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610661906115f3565b80156106ae5780601f10610683576101008083540402835291602001916106ae565b820191906000526020600020905b81548152906001019060200180831161069157829003601f168201915b5050505050908060040180546106c3906115f3565b80601f01602080910402602001604051908101604052809291908181526020018280546106ef906115f3565b801561073c5780601f106107115761010080835404028352916020019161073c565b820191906000526020600020905b81548152906001019060200180831161071f57829003601f168201915b5050505050905085565b6060600660000180546103bb906115f3565b600b5460ff166107a55760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd08185b1b1bddd959606a1b60448201526064015b60405180910390fd5b6107ad610951565b6001600160a01b0316336001600160a01b0316146108035760405162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b881b5a5b9d606a1b604482015260640161079c565b61080d8282610d26565b5050565b6060600660040180546103bb906115f3565b61082b610d5c565b6108356000610d8e565b565b6060600660010180546103bb906115f3565b600b5462010000900460ff166108a15760405162461bcd60e51b815260206004820152601c60248201527f4d657461646174612075706461746573206e6f7420616c6c6f77656400000000604482015260640161079c565b6108a9610951565b6001600160a01b0316336001600160a01b0316146109095760405162461bcd60e51b815260206004820152601e60248201527f4f6e6c79206f776e65722063616e20757064617465206d657461646174610000604482015260640161079c565b6006610915868261167b565b506007610922858261167b565b50600861092f848261167b565b50600961093c838261167b565b50600a610949828261167b565b505050505050565b6005546001600160a01b031690565b600f5460609060ff16610975576103a9610de0565b600e80546103bb906115f3565b600f5460ff16156109cb5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015260640161079c565b600d6109d78a8261167b565b50600e6109e4898261167b565b506109ee85610d8e565b835184906006908190610a01908261167b565b5060208201516001820190610a16908261167b565b5060408201516002820190610a2b908261167b565b5060608201516003820190610a40908261167b565b5060808201516004820190610a55908261167b565b5050600b805463ff0000ff1916630100000060ff8a160260ff19908116919091178615151762ffff0019166101008615150262ff0000191617620100008515150217909155600f8054909116600117905550610ab18588610d26565b505050505050505050565b60003361044c818585610cc7565b6060600660030180546103bb906115f3565b6060600660020180546103bb906115f3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600b54600090610100900460ff16610b435760405162461bcd60e51b815260040161079c90611739565b506001600160a01b03166000908152600c602052604090205460ff1690565b600b54610100900460ff16610b895760405162461bcd60e51b815260040161079c90611739565b610b91610951565b6001600160a01b0316336001600160a01b031614610be95760405162461bcd60e51b81526020600482015260156024820152744f6e6c79206f776e65722063616e20667265657a6560581b604482015260640161079c565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b610c1c610d5c565b6001600160a01b038116610c46576000604051631e4fbdf760e01b815260040161079c919061137f565b610c4f81610d8e565b50565b6060600380546103bb906115f3565b610c6e8383836001610def565b505050565b6000610c7f8484610aee565b9050600019811015610cc15781811015610cb257828183604051637dc7a0d960e11b815260040161079c93929190611767565b610cc184848484036000610def565b50505050565b6001600160a01b038316610cf1576000604051634b637e8f60e11b815260040161079c919061137f565b6001600160a01b038216610d1b57600060405163ec442f0560e01b815260040161079c919061137f565b610c6e838383610ec4565b6001600160a01b038216610d5057600060405163ec442f0560e01b815260040161079c919061137f565b61080d60008383610ec4565b33610d65610951565b6001600160a01b031614610835573360405163118cdaa760e01b815260040161079c919061137f565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060600480546103bb906115f3565b6001600160a01b038416610e1957600060405163e602df0560e01b815260040161079c919061137f565b6001600160a01b038316610e43576000604051634a1406b160e11b815260040161079c919061137f565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610cc157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610eb691815260200190565b60405180910390a350505050565b600b54610100900460ff168015610ee357506001600160a01b03831615155b15610f45576001600160a01b0383166000908152600c602052604090205460ff1615610f455760405162461bcd60e51b815260206004820152601160248201527020b1b1b7bab73a1034b990333937bd32b760791b604482015260640161079c565b610c6e8383836001600160a01b038316610f76578060026000828254610f6b9190611788565b90915550610fd59050565b6001600160a01b03831660009081526020819052604090205481811015610fb65783818360405163391434e360e21b815260040161079c93929190611767565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610ff157600280548290039055611010565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161105591815260200190565b60405180910390a3505050565b6000815180845260005b818110156110885760208185018101518683018201520161106c565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110bb6020830184611062565b9392505050565b80356001600160a01b03811681146110d957600080fd5b919050565b600080604083850312156110f157600080fd5b6110fa836110c2565b946020939093013593505050565b60008060006060848603121561111d57600080fd5b611126846110c2565b9250611134602085016110c2565b929592945050506040919091013590565b60a08152600061115860a0830188611062565b828103602084015261116a8188611062565b9050828103604084015261117e8187611062565b905082810360608401526111928186611062565b905082810360808401526111a68185611062565b98975050505050505050565b6000602082840312156111c457600080fd5b6110bb826110c2565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b0381118282101715611205576112056111cd565b60405290565b600082601f83011261121c57600080fd5b81356001600160401b03811115611235576112356111cd565b604051601f8201601f19908116603f011681016001600160401b0381118282101715611263576112636111cd565b60405281815283820160200185101561127b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156112b057600080fd5b85356001600160401b038111156112c657600080fd5b6112d28882890161120b565b95505060208601356001600160401b038111156112ee57600080fd5b6112fa8882890161120b565b94505060408601356001600160401b0381111561131657600080fd5b6113228882890161120b565b93505060608601356001600160401b0381111561133e57600080fd5b61134a8882890161120b565b92505060808601356001600160401b0381111561136657600080fd5b6113728882890161120b565b9150509295509295909350565b6001600160a01b0391909116815260200190565b803560ff811681146110d957600080fd5b600060a082840312156113b657600080fd5b6113be6111e3565b905081356001600160401b038111156113d657600080fd5b6113e28482850161120b565b82525060208201356001600160401b038111156113fe57600080fd5b61140a8482850161120b565b60208301525060408201356001600160401b0381111561142957600080fd5b6114358482850161120b565b60408301525060608201356001600160401b0381111561145457600080fd5b6114608482850161120b565b60608301525060808201356001600160401b0381111561147f57600080fd5b61148b8482850161120b565b60808301525092915050565b803580151581146110d957600080fd5b60008060008060008060008060006101208a8c0312156114c657600080fd5b89356001600160401b038111156114dc57600080fd5b6114e88c828d0161120b565b99505060208a01356001600160401b0381111561150457600080fd5b6115108c828d0161120b565b98505060408a0135965061152660608b01611393565b955061153460808b016110c2565b945060a08a01356001600160401b0381111561154f57600080fd5b61155b8c828d016113a4565b94505061156a60c08b01611497565b925061157860e08b01611497565b91506115876101008b01611497565b90509295985092959850929598565b600080604083850312156115a957600080fd5b6115b2836110c2565b91506115c0602084016110c2565b90509250929050565b600080604083850312156115dc57600080fd5b6115e5836110c2565b91506115c060208401611497565b600181811c9082168061160757607f821691505b60208210810361162757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c6e57806000526020600020601f840160051c810160208510156116545750805b601f840160051c820191505b818110156116745760008155600101611660565b5050505050565b81516001600160401b03811115611694576116946111cd565b6116a8816116a284546115f3565b8461162d565b6020601f8211600181146116dc57600083156116c45750848201515b600019600385901b1c1916600184901b178455611674565b600084815260208120601f198516915b8281101561170c57878501518255602094850194600190920191016116ec565b508482101561172a5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b602080825260149082015273119c99595e9a5b99c81b9bdd08185b1b1bddd95960621b604082015260600190565b6001600160a01b039390931683526020830191909152604082015260600190565b8082018082111561045257634e487b7160e01b600052601160045260246000fdfea26469706673582212205167776d81360014f30290dd986e5610d61135e0c7f3926dd432a08e206cafee64736f6c634300081c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c80632f3a3d5d1461005c578063715018a6146100995780638da5cb5b146100a3578063b1c4733a146100b4578063f2fde38b146100c7575b600080fd5b6100837f00000000000000000000000099ed83f6922fcdbbb9460f6d4628e84eb7d8acbe81565b6040516100909190610359565b60405180910390f35b6100a16100da565b005b6000546001600160a01b0316610083565b6100836100c23660046105ae565b6100ee565b6100a16100d5366004610673565b6101ec565b6100e2610233565b6100ec6000610260565b565b6000806101237f00000000000000000000000099ed83f6922fcdbbb9460f6d4628e84eb7d8acbe6001600160a01b03166102b0565b8351602085015160408087015190516351916dbb60e11b81529394506001600160a01b0385169363a322db7693610168938e938e938e938e9333938f936004016106e9565b600060405180830381600087803b15801561018257600080fd5b505af1158015610196573d6000803e3d6000fd5b50505050806001600160a01b03167fb7d8fd3c9d56d12c15c8e139bc4e6febd6ad2349b3ebe6a1a91c0a9e7797710d898989336040516101d994939291906107e1565b60405180910390a2979650505050505050565b6101f4610233565b6001600160a01b038116610227576000604051631e4fbdf760e01b815260040161021e9190610359565b60405180910390fd5b61023081610260565b50565b6000546001600160a01b031633146100ec573360405163118cdaa760e01b815260040161021e9190610359565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006102bd8260006102c3565b92915050565b6000814710156102ef5760405163cf47918160e01b81524760048201526024810183905260440161021e565b763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b176020526037600983f090506001600160a01b0381166102bd5760405163b06ebf3d60e01b815260040160405180910390fd5b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156103a5576103a561036d565b60405290565b600082601f8301126103bc57600080fd5b81356001600160401b038111156103d5576103d561036d565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104035761040361036d565b60405281815283820160200185101561041b57600080fd5b816020850160208301376000918101602001919091529392505050565b600060a0828403121561044a57600080fd5b610452610383565b905081356001600160401b0381111561046a57600080fd5b610476848285016103ab565b82525060208201356001600160401b0381111561049257600080fd5b61049e848285016103ab565b60208301525060408201356001600160401b038111156104bd57600080fd5b6104c9848285016103ab565b60408301525060608201356001600160401b038111156104e857600080fd5b6104f4848285016103ab565b60608301525060808201356001600160401b0381111561051357600080fd5b61051f848285016103ab565b60808301525092915050565b8035801515811461053b57600080fd5b919050565b60006060828403121561055257600080fd5b604051606081016001600160401b03811182821017156105745761057461036d565b6040529050806105838361052b565b81526105916020840161052b565b60208201526105a26040840161052b565b60408201525092915050565b60008060008060008061010087890312156105c857600080fd5b86356001600160401b038111156105de57600080fd5b6105ea89828a016103ab565b96505060208701356001600160401b0381111561060657600080fd5b61061289828a016103ab565b95505060408701359350606087013560ff8116811461063057600080fd5b925060808701356001600160401b0381111561064b57600080fd5b61065789828a01610438565b9250506106678860a08901610540565b90509295509295509295565b60006020828403121561068557600080fd5b81356001600160a01b038116811461069c57600080fd5b9392505050565b6000815180845260005b818110156106c9576020818501810151868301820152016106ad565b506000602082860101526020601f19601f83011685010191505092915050565b610120815260006106fe61012083018c6106a3565b8281036020840152610710818c6106a3565b905089604084015260ff8916606084015260018060a01b038816608084015282810360a0840152865160a0825261074a60a08301826106a3565b90506020880151828203602084015261076382826106a3565b9150506040880151828203604084015261077d82826106a3565b9150506060880151828203606084015261079782826106a3565b915050608088015182820360808401526107b182826106a3565b93505050506107c460c083018615159052565b92151560e082015290151561010090910152979650505050505050565b6080815260006107f460808301876106a3565b828103602084015261080681876106a3565b604084019590955250506001600160a01b03919091166060909101529291505056fea26469706673582212209ac7db9c96559917e91f1eb8c13b9d441691d7c8113a21de6493cdbcda546eb864736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.