Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BrainCredits
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* ____ _ ____ _____ ____ _ ___ | __ ) / \ / ___|| ____| _ \ / \ |_ _| | _ \ / _ \ \___ \| _| | | | | / _ \ | | | |_) / ___ \ ___) | |___| |_| | / ___ \ | | |____/_/___\_\____/|_____|____/ /_/___\_\___|_____ ____ ___ _____ ____ | __ )| _ \ / \ |_ _| \ | | / ___| _ \| ____| _ \_ _|_ _/ ___| | _ \| |_) | / _ \ | || \| | | | | |_) | _| | | | | | | | \___ \ | |_) | _ < / ___ \ | || |\ | | |___| _ <| |___| |_| | | | | ___) | |____/|_| \_\/_/ \_\___|_| \_| \____|_| \_\_____|____/___| |_| |____/ */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; interface ITotalSupplyAdjuster { function increaseTotalSupply() external; function decreaseTotalSupply() external; } contract BrainCredits is ERC20, ERC20Burnable, ReentrancyGuard, Ownable { IERC20 public pepecoin = IERC20(0x07f7Cf033541aBe8364a11eD9795AC50A5ff4abf); address public totalSupplyAdjuster; uint256 public totalMinted; uint256 public nextThreshold = 1000 * 10**decimals(); uint256 public priceIncrement = 200; uint256 public currentPrice = 1000; uint256 private _totalSupply = 0; uint256 public SUPPLY = 1024000 * 10**18; uint256 public SUPPLY_HARD_CAP = 1024000 * 10**18; bool public mintingFrozen = false; event MintingFrozen(); event MintingUnfrozen(); event TotalSupplyIncreased(uint256 amount); event TotalSupplyDecreased(uint256 amount); event TotalSupplyAdjusterChanged(address adjuster); constructor() ERC20("1000 BRAIN CREDITS = 1 BRAIN", "CREDIT") Ownable(msg.sender) {} function mint(uint256 pepecoinsBurned) public nonReentrant { require( !mintingFrozen && pepecoinsBurned >= currentPrice, "Minting: conditions not met" ); pepecoin.transferFrom(msg.sender, address(this), pepecoinsBurned); uint256 tokensToMint = 0; uint256 remainingPepecoins = pepecoinsBurned; while (remainingPepecoins >= currentPrice) { uint256 possibleMintAmount = (nextThreshold - totalMinted) / 1000 * 1000; uint256 pepecoinsForThisThreshold = possibleMintAmount * currentPrice / 1000; if (remainingPepecoins >= pepecoinsForThisThreshold) { tokensToMint += possibleMintAmount; remainingPepecoins -= pepecoinsForThisThreshold; totalMinted += possibleMintAmount; nextThreshold += 1000 * 10**decimals(); currentPrice += priceIncrement; } else { uint256 mintableTokens = remainingPepecoins / currentPrice * 1000; tokensToMint += mintableTokens; totalMinted += mintableTokens; remainingPepecoins = 0; } } require(_totalSupply + tokensToMint <= SUPPLY, "Minting: exceeds supply cap"); _totalSupply += tokensToMint; _mint(msg.sender, tokensToMint); } function totalSupply() public view override returns (uint256) { return SUPPLY; } function freezeMinting() public onlyOwner { mintingFrozen = true; emit MintingFrozen(); } function unfreezeMinting() public onlyOwner { mintingFrozen = false; emit MintingUnfrozen(); } function burnBulk(address tokenAddress) public onlyOwner { ERC20Burnable token = ERC20Burnable(tokenAddress); uint256 tokenBalance = token.balanceOf(address(this)); token.burn(tokenBalance); } function transferBulk(address tokenAddress, address to) public onlyOwner { require(to != address(0), "Invalid address"); IERC20 token = IERC20(tokenAddress); uint256 tokenBalance = token.balanceOf(address(this)); require(token.transfer(to, tokenBalance), "Transfer failed"); } // Staked Pepecoin removes the matching amount of Brain Credits from the market so there can never be more than 1024 Brains. function setTotalSupplyAdjuster(address _adjuster) public onlyOwner { totalSupplyAdjuster = _adjuster; emit TotalSupplyAdjusterChanged(_adjuster); } function setBurnAddress(address _burnAddress) public onlyOwner { pepecoin = IERC20(_burnAddress); } // Staked Pepecoin removes the matching amount of Brain Credits from the market so there can never be more than 1024 Brains. function increaseTotalSupply() external { require(msg.sender == totalSupplyAdjuster, "Unauthorized"); require(SUPPLY + (1000 * 10**decimals()) <= SUPPLY_HARD_CAP, "Total supply cannot exceed 1024000 credits."); SUPPLY += (1000 * 10**decimals()); emit TotalSupplyIncreased(SUPPLY); } // Staked Pepecoin removes the matching amount of Brain Credits from the market so there can never be more than 1024 Brains. function decreaseTotalSupply() external { require(msg.sender == totalSupplyAdjuster, "Unauthorized"); require(SUPPLY >= (1000 * 10**decimals()), "There must be a minimum of 1000 credits in circulation."); SUPPLY -= (1000 * 10**decimals()); emit TotalSupplyDecreased(SUPPLY); } }
// 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 v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.20; import {ERC20} from "../ERC20.sol"; import {Context} from "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) public virtual { _burn(_msgSender(), value); } /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) public virtual { _spendAllowance(account, _msgSender(), value); _burn(account, value); } }
// 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) (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; } }
// 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/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.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); }
{ "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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"},{"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":"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":[],"name":"MintingFrozen","type":"event"},{"anonymous":false,"inputs":[],"name":"MintingUnfrozen","type":"event"},{"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":false,"internalType":"address","name":"adjuster","type":"address"}],"name":"TotalSupplyAdjusterChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TotalSupplyDecreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TotalSupplyIncreased","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":"SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPLY_HARD_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"burnBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decreaseTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"increaseTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pepecoinsBurned","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintingFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pepecoin","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceIncrement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_burnAddress","type":"address"}],"name":"setBurnAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adjuster","type":"address"}],"name":"setTotalSupplyAdjuster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupplyAdjuster","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"tokenAddress","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"transferBulk","outputs":[],"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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unfreezeMinting","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600780546001600160a01b0319167307f7cf033541abe8364a11ed9795ac50a5ff4abf179055610032601290565b61003d90600a610281565b610049906103e8610296565b600a5560c8600b556103e8600c555f600d5569d8d726b7177a80000000600e819055600f556010805460ff19169055348015610083575f80fd5b50336040518060400160405280601c81526020017f3130303020425241494e2043524544495453203d203120425241494e000000008152506040518060400160405280600681526020016510d49151125560d21b81525081600390816100e99190610345565b5060046100f68282610345565b50506001600555506001600160a01b03811661012b57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6101348161013a565b50610404565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52601160045260245ffd5b600181815b808511156101d957815f19048211156101bf576101bf61018b565b808516156101cc57918102915b93841c93908002906101a4565b509250929050565b5f826101ef5750600161027b565b816101fb57505f61027b565b8160018114610211576002811461021b57610237565b600191505061027b565b60ff84111561022c5761022c61018b565b50506001821b61027b565b5060208310610133831016604e8410600b841016171561025a575081810a61027b565b610264838361019f565b805f19048211156102775761027761018b565b0290505b92915050565b5f61028f60ff8416836101e1565b9392505050565b808202811582820484141761027b5761027b61018b565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102d557607f821691505b6020821081036102f357634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561034057805f5260205f20601f840160051c8101602085101561031e5750805b601f840160051c820191505b8181101561033d575f815560010161032a565b50505b505050565b81516001600160401b0381111561035e5761035e6102ad565b6103728161036c84546102c1565b846102f9565b602080601f8311600181146103a5575f841561038e5750858301515b5f19600386901b1c1916600185901b1785556103fc565b5f85815260208120601f198616915b828110156103d3578886015182559484019460019091019084016103b4565b50858210156103f057878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b61155e806104115f395ff3fe608060405234801561000f575f80fd5b50600436106101e7575f3560e01c80638da5cb5b11610109578063a9059cbb1161009e578063dd62ed3e1161006e578063dd62ed3e146103d4578063de0f2be11461040c578063ea7e9cec14610414578063f2fde38b1461041c575f80fd5b8063a9059cbb1461039d578063b2f7d1ce146103b0578063c013f30f146103c3578063c50497ae146103cb575f80fd5b80639d1b464a116100d95780639d1b464a1461036b578063a0712d6814610374578063a2309ff814610387578063a284de0214610390575f80fd5b80638da5cb5b1461033757806390578ae11461034857806395d89b41146103505780639a7e9e5614610358575f80fd5b806345af1dd31161017f57806370a082311161014f57806370a08231146102eb578063715018a61461031357806379cc67901461031b57806380ddcc621461032e575f80fd5b806345af1dd3146102a95780634b0e7216146102bc57806359d58bcd146102cf5780636990f35c146102d8575f80fd5b806326fcfced116101ba57806326fcfced14610251578063280d62ac1461027c578063313ce5671461028557806342966c6814610294575f80fd5b806306fdde03146101eb578063095ea7b31461020957806318160ddd1461022c57806323b872dd1461023e575b5f80fd5b6101f361042f565b6040516102009190611243565b60405180910390f35b61021c610217366004611293565b6104bf565b6040519015158152602001610200565b600e545b604051908152602001610200565b61021c61024c3660046112bb565b6104d8565b600854610264906001600160a01b031681565b6040516001600160a01b039091168152602001610200565b610230600b5481565b60405160128152602001610200565b6102a76102a23660046112f4565b6104fb565b005b6102a76102b736600461130b565b610508565b6102a76102ca36600461130b565b610571565b610230600a5481565b6102a76102e636600461130b565b6105a8565b6102306102f936600461130b565b6001600160a01b03165f9081526020819052604090205490565b6102a7610677565b6102a7610329366004611293565b61068a565b610230600f5481565b6006546001600160a01b0316610264565b6102a76106a3565b6101f36107e6565b6102a761036636600461132b565b6107f5565b610230600c5481565b6102a76103823660046112f4565b610983565b61023060095481565b60105461021c9060ff1681565b61021c6103ab366004611293565b610c14565b600754610264906001600160a01b031681565b6102a7610c21565b610230600e5481565b6102306103e236600461132b565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6102a7610c60565b6102a7610da5565b6102a761042a36600461130b565b610de1565b60606003805461043e9061135c565b80601f016020809104026020016040519081016040528092919081815260200182805461046a9061135c565b80156104b55780601f1061048c576101008083540402835291602001916104b5565b820191905f5260205f20905b81548152906001019060200180831161049857829003601f168201915b5050505050905090565b5f336104cc818585610e1b565b60019150505b92915050565b5f336104e5858285610e2d565b6104f0858585610ea2565b506001949350505050565b6105053382610eff565b50565b610510610f33565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f4bf95ba2c31dde5c0ae66780389b91c59fe5e64a74593aea7691c81d63e1b3619060200160405180910390a150565b610579610f33565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6105b0610f33565b6040516370a0823160e01b815230600482015281905f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156105f6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061061a9190611394565b604051630852cd8d60e31b8152600481018290529091506001600160a01b038316906342966c68906024015f604051808303815f87803b15801561065c575f80fd5b505af115801561066e573d5f803e3d5ffd5b50505050505050565b61067f610f33565b6106885f610f60565b565b610695823383610e2d565b61069f8282610eff565b5050565b6008546001600160a01b031633146106f15760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064015b60405180910390fd5b6106fd6012600a61149f565b610709906103e86114ad565b600e5410156107805760405162461bcd60e51b815260206004820152603760248201527f5468657265206d7573742062652061206d696e696d756d206f6620313030302060448201527f6372656469747320696e2063697263756c6174696f6e2e00000000000000000060648201526084016106e8565b61078c6012600a61149f565b610798906103e86114ad565b600e5f8282546107a891906114c4565b9091555050600e546040519081527f7cecaeb2d7d2005c8b5d3f72dc76c9434d9313d1f01bf63e3cf95f6f61fd9742906020015b60405180910390a1565b60606004805461043e9061135c565b6107fd610f33565b6001600160a01b0381166108535760405162461bcd60e51b815260206004820152600f60248201527f496e76616c69642061646472657373000000000000000000000000000000000060448201526064016106e8565b6040516370a0823160e01b815230600482015282905f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610899573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108bd9190611394565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509083169063a9059cbb906044016020604051808303815f875af115801561090d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061093191906114d7565b61097d5760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c6564000000000000000000000000000000000060448201526064016106e8565b50505050565b61098b610fbe565b60105460ff161580156109a05750600c548110155b6109ec5760405162461bcd60e51b815260206004820152601b60248201527f4d696e74696e673a20636f6e646974696f6e73206e6f74206d6574000000000060448201526064016106e8565b6007546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015610a40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a6491906114d7565b505f815b600c548110610b88575f6103e8600954600a54610a8591906114c4565b610a8f91906114f6565b610a9b906103e86114ad565b90505f6103e8600c5483610aaf91906114ad565b610ab991906114f6565b9050808310610b3d57610acc8285611515565b9350610ad881846114c4565b92508160095f828254610aeb9190611515565b90915550610afd90506012600a61149f565b610b09906103e86114ad565b600a5f828254610b199190611515565b9091555050600b54600c80545f90610b32908490611515565b90915550610b819050565b5f600c5484610b4c91906114f6565b610b58906103e86114ad565b9050610b648186611515565b94508060095f828254610b779190611515565b909155505f945050505b5050610a68565b600e5482600d54610b999190611515565b1115610be75760405162461bcd60e51b815260206004820152601b60248201527f4d696e74696e673a206578636565647320737570706c7920636170000000000060448201526064016106e8565b81600d5f828254610bf89190611515565b90915550610c0890503383611017565b50506105056001600555565b5f336104cc818585610ea2565b610c29610f33565b6010805460ff191660011790556040517f3dc34c8d54038db7df8b5f173f23163503c50d053521beb84d9f2597a98a70d8905f90a1565b6008546001600160a01b03163314610ca95760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016106e8565b600f54610cb86012600a61149f565b610cc4906103e86114ad565b600e54610cd19190611515565b1115610d455760405162461bcd60e51b815260206004820152602b60248201527f546f74616c20737570706c792063616e6e6f742065786365656420313032343060448201527f303020637265646974732e00000000000000000000000000000000000000000060648201526084016106e8565b610d516012600a61149f565b610d5d906103e86114ad565b600e5f828254610d6d9190611515565b9091555050600e546040519081527f3ed9f2ae524f56b7b1960ca403bfc34fc142aac14d5f298a2267871212ed0096906020016107dc565b610dad610f33565b6010805460ff191690556040517fdcf81b1e28d58e650853b1f9d6f868c8101f1f9eb3382b458ef1adc2805b23fc905f90a1565b610de9610f33565b6001600160a01b038116610e1257604051631e4fbdf760e01b81525f60048201526024016106e8565b61050581610f60565b610e28838383600161104b565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461097d5781811015610e9457604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016106e8565b61097d84848484035f61104b565b6001600160a01b038316610ecb57604051634b637e8f60e11b81525f60048201526024016106e8565b6001600160a01b038216610ef45760405163ec442f0560e01b81525f60048201526024016106e8565b610e2883838361111d565b6001600160a01b038216610f2857604051634b637e8f60e11b81525f60048201526024016106e8565b61069f825f8361111d565b6006546001600160a01b031633146106885760405163118cdaa760e01b81523360048201526024016106e8565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6002600554036110105760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106e8565b6002600555565b6001600160a01b0382166110405760405163ec442f0560e01b81525f60048201526024016106e8565b61069f5f838361111d565b6001600160a01b0384166110745760405163e602df0560e01b81525f60048201526024016106e8565b6001600160a01b03831661109d57604051634a1406b160e11b81525f60048201526024016106e8565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561097d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161110f91815260200190565b60405180910390a350505050565b6001600160a01b038316611147578060025f82825461113c9190611515565b909155506111b79050565b6001600160a01b0383165f90815260208190526040902054818110156111995760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016106e8565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166111d3576002805482900390556111f1565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161123691815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461128e575f80fd5b919050565b5f80604083850312156112a4575f80fd5b6112ad83611278565b946020939093013593505050565b5f805f606084860312156112cd575f80fd5b6112d684611278565b92506112e460208501611278565b9150604084013590509250925092565b5f60208284031215611304575f80fd5b5035919050565b5f6020828403121561131b575f80fd5b61132482611278565b9392505050565b5f806040838503121561133c575f80fd5b61134583611278565b915061135360208401611278565b90509250929050565b600181811c9082168061137057607f821691505b60208210810361138e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f602082840312156113a4575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b600181815b808511156113f957815f19048211156113df576113df6113ab565b808516156113ec57918102915b93841c93908002906113c4565b509250929050565b5f8261140f575060016104d2565b8161141b57505f6104d2565b8160018114611431576002811461143b57611457565b60019150506104d2565b60ff84111561144c5761144c6113ab565b50506001821b6104d2565b5060208310610133831016604e8410600b841016171561147a575081810a6104d2565b61148483836113bf565b805f1904821115611497576114976113ab565b029392505050565b5f61132460ff841683611401565b80820281158282048414176104d2576104d26113ab565b818103818111156104d2576104d26113ab565b5f602082840312156114e7575f80fd5b81518015158114611324575f80fd5b5f8261151057634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156104d2576104d26113ab56fea2646970667358221220f639c60cf06a0093c5b9bfd49fef90739649535b9afa9daf1a6dedc98c36345164736f6c63430008190033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106101e7575f3560e01c80638da5cb5b11610109578063a9059cbb1161009e578063dd62ed3e1161006e578063dd62ed3e146103d4578063de0f2be11461040c578063ea7e9cec14610414578063f2fde38b1461041c575f80fd5b8063a9059cbb1461039d578063b2f7d1ce146103b0578063c013f30f146103c3578063c50497ae146103cb575f80fd5b80639d1b464a116100d95780639d1b464a1461036b578063a0712d6814610374578063a2309ff814610387578063a284de0214610390575f80fd5b80638da5cb5b1461033757806390578ae11461034857806395d89b41146103505780639a7e9e5614610358575f80fd5b806345af1dd31161017f57806370a082311161014f57806370a08231146102eb578063715018a61461031357806379cc67901461031b57806380ddcc621461032e575f80fd5b806345af1dd3146102a95780634b0e7216146102bc57806359d58bcd146102cf5780636990f35c146102d8575f80fd5b806326fcfced116101ba57806326fcfced14610251578063280d62ac1461027c578063313ce5671461028557806342966c6814610294575f80fd5b806306fdde03146101eb578063095ea7b31461020957806318160ddd1461022c57806323b872dd1461023e575b5f80fd5b6101f361042f565b6040516102009190611243565b60405180910390f35b61021c610217366004611293565b6104bf565b6040519015158152602001610200565b600e545b604051908152602001610200565b61021c61024c3660046112bb565b6104d8565b600854610264906001600160a01b031681565b6040516001600160a01b039091168152602001610200565b610230600b5481565b60405160128152602001610200565b6102a76102a23660046112f4565b6104fb565b005b6102a76102b736600461130b565b610508565b6102a76102ca36600461130b565b610571565b610230600a5481565b6102a76102e636600461130b565b6105a8565b6102306102f936600461130b565b6001600160a01b03165f9081526020819052604090205490565b6102a7610677565b6102a7610329366004611293565b61068a565b610230600f5481565b6006546001600160a01b0316610264565b6102a76106a3565b6101f36107e6565b6102a761036636600461132b565b6107f5565b610230600c5481565b6102a76103823660046112f4565b610983565b61023060095481565b60105461021c9060ff1681565b61021c6103ab366004611293565b610c14565b600754610264906001600160a01b031681565b6102a7610c21565b610230600e5481565b6102306103e236600461132b565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6102a7610c60565b6102a7610da5565b6102a761042a36600461130b565b610de1565b60606003805461043e9061135c565b80601f016020809104026020016040519081016040528092919081815260200182805461046a9061135c565b80156104b55780601f1061048c576101008083540402835291602001916104b5565b820191905f5260205f20905b81548152906001019060200180831161049857829003601f168201915b5050505050905090565b5f336104cc818585610e1b565b60019150505b92915050565b5f336104e5858285610e2d565b6104f0858585610ea2565b506001949350505050565b6105053382610eff565b50565b610510610f33565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f4bf95ba2c31dde5c0ae66780389b91c59fe5e64a74593aea7691c81d63e1b3619060200160405180910390a150565b610579610f33565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6105b0610f33565b6040516370a0823160e01b815230600482015281905f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156105f6573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061061a9190611394565b604051630852cd8d60e31b8152600481018290529091506001600160a01b038316906342966c68906024015f604051808303815f87803b15801561065c575f80fd5b505af115801561066e573d5f803e3d5ffd5b50505050505050565b61067f610f33565b6106885f610f60565b565b610695823383610e2d565b61069f8282610eff565b5050565b6008546001600160a01b031633146106f15760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064015b60405180910390fd5b6106fd6012600a61149f565b610709906103e86114ad565b600e5410156107805760405162461bcd60e51b815260206004820152603760248201527f5468657265206d7573742062652061206d696e696d756d206f6620313030302060448201527f6372656469747320696e2063697263756c6174696f6e2e00000000000000000060648201526084016106e8565b61078c6012600a61149f565b610798906103e86114ad565b600e5f8282546107a891906114c4565b9091555050600e546040519081527f7cecaeb2d7d2005c8b5d3f72dc76c9434d9313d1f01bf63e3cf95f6f61fd9742906020015b60405180910390a1565b60606004805461043e9061135c565b6107fd610f33565b6001600160a01b0381166108535760405162461bcd60e51b815260206004820152600f60248201527f496e76616c69642061646472657373000000000000000000000000000000000060448201526064016106e8565b6040516370a0823160e01b815230600482015282905f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610899573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108bd9190611394565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509083169063a9059cbb906044016020604051808303815f875af115801561090d573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061093191906114d7565b61097d5760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c6564000000000000000000000000000000000060448201526064016106e8565b50505050565b61098b610fbe565b60105460ff161580156109a05750600c548110155b6109ec5760405162461bcd60e51b815260206004820152601b60248201527f4d696e74696e673a20636f6e646974696f6e73206e6f74206d6574000000000060448201526064016106e8565b6007546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015610a40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a6491906114d7565b505f815b600c548110610b88575f6103e8600954600a54610a8591906114c4565b610a8f91906114f6565b610a9b906103e86114ad565b90505f6103e8600c5483610aaf91906114ad565b610ab991906114f6565b9050808310610b3d57610acc8285611515565b9350610ad881846114c4565b92508160095f828254610aeb9190611515565b90915550610afd90506012600a61149f565b610b09906103e86114ad565b600a5f828254610b199190611515565b9091555050600b54600c80545f90610b32908490611515565b90915550610b819050565b5f600c5484610b4c91906114f6565b610b58906103e86114ad565b9050610b648186611515565b94508060095f828254610b779190611515565b909155505f945050505b5050610a68565b600e5482600d54610b999190611515565b1115610be75760405162461bcd60e51b815260206004820152601b60248201527f4d696e74696e673a206578636565647320737570706c7920636170000000000060448201526064016106e8565b81600d5f828254610bf89190611515565b90915550610c0890503383611017565b50506105056001600555565b5f336104cc818585610ea2565b610c29610f33565b6010805460ff191660011790556040517f3dc34c8d54038db7df8b5f173f23163503c50d053521beb84d9f2597a98a70d8905f90a1565b6008546001600160a01b03163314610ca95760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016106e8565b600f54610cb86012600a61149f565b610cc4906103e86114ad565b600e54610cd19190611515565b1115610d455760405162461bcd60e51b815260206004820152602b60248201527f546f74616c20737570706c792063616e6e6f742065786365656420313032343060448201527f303020637265646974732e00000000000000000000000000000000000000000060648201526084016106e8565b610d516012600a61149f565b610d5d906103e86114ad565b600e5f828254610d6d9190611515565b9091555050600e546040519081527f3ed9f2ae524f56b7b1960ca403bfc34fc142aac14d5f298a2267871212ed0096906020016107dc565b610dad610f33565b6010805460ff191690556040517fdcf81b1e28d58e650853b1f9d6f868c8101f1f9eb3382b458ef1adc2805b23fc905f90a1565b610de9610f33565b6001600160a01b038116610e1257604051631e4fbdf760e01b81525f60048201526024016106e8565b61050581610f60565b610e28838383600161104b565b505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461097d5781811015610e9457604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016106e8565b61097d84848484035f61104b565b6001600160a01b038316610ecb57604051634b637e8f60e11b81525f60048201526024016106e8565b6001600160a01b038216610ef45760405163ec442f0560e01b81525f60048201526024016106e8565b610e2883838361111d565b6001600160a01b038216610f2857604051634b637e8f60e11b81525f60048201526024016106e8565b61069f825f8361111d565b6006546001600160a01b031633146106885760405163118cdaa760e01b81523360048201526024016106e8565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6002600554036110105760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106e8565b6002600555565b6001600160a01b0382166110405760405163ec442f0560e01b81525f60048201526024016106e8565b61069f5f838361111d565b6001600160a01b0384166110745760405163e602df0560e01b81525f60048201526024016106e8565b6001600160a01b03831661109d57604051634a1406b160e11b81525f60048201526024016106e8565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561097d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161110f91815260200190565b60405180910390a350505050565b6001600160a01b038316611147578060025f82825461113c9190611515565b909155506111b79050565b6001600160a01b0383165f90815260208190526040902054818110156111995760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016106e8565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166111d3576002805482900390556111f1565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161123691815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461128e575f80fd5b919050565b5f80604083850312156112a4575f80fd5b6112ad83611278565b946020939093013593505050565b5f805f606084860312156112cd575f80fd5b6112d684611278565b92506112e460208501611278565b9150604084013590509250925092565b5f60208284031215611304575f80fd5b5035919050565b5f6020828403121561131b575f80fd5b61132482611278565b9392505050565b5f806040838503121561133c575f80fd5b61134583611278565b915061135360208401611278565b90509250929050565b600181811c9082168061137057607f821691505b60208210810361138e57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f602082840312156113a4575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b600181815b808511156113f957815f19048211156113df576113df6113ab565b808516156113ec57918102915b93841c93908002906113c4565b509250929050565b5f8261140f575060016104d2565b8161141b57505f6104d2565b8160018114611431576002811461143b57611457565b60019150506104d2565b60ff84111561144c5761144c6113ab565b50506001821b6104d2565b5060208310610133831016604e8410600b841016171561147a575081810a6104d2565b61148483836113bf565b805f1904821115611497576114976113ab565b029392505050565b5f61132460ff841683611401565b80820281158282048414176104d2576104d26113ab565b818103818111156104d2576104d26113ab565b5f602082840312156114e7575f80fd5b81518015158114611324575f80fd5b5f8261151057634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156104d2576104d26113ab56fea2646970667358221220f639c60cf06a0093c5b9bfd49fef90739649535b9afa9daf1a6dedc98c36345164736f6c63430008190033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.