Source Code
Overview
APE Balance
APE Value
$0.00Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
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 Name:
Incinerator
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
/**
* @title Incinerator
* @dev Upgradeable contract for burning APE tokens on ApeChain
* @notice This contract serves as a centralized burning mechanism with access control,
* allowing authorized addresses to burn APE tokens directly from the contract balance.
*/
contract Incinerator is
UUPSUpgradeable,
OwnableUpgradeable,
PausableUpgradeable,
ReentrancyGuardUpgradeable
{
/// @notice Burn address for permanently destroying tokens
address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
/// @notice APE token contract address (DEPRECATED: On ApeChain, APE is the native token)
/// @dev Kept for storage layout compatibility in upgradeable contract
IERC20 public apeToken;
/// @notice DEPRECATED: No longer used, kept for storage compatibility
/// @dev This variable is kept at storage slot 1 for upgradeable contract compatibility
address public fundingWallet;
/// @notice Mapping of authorized addresses that can burn APE tokens
mapping(address => bool) public authorizedBurners;
/// @notice Mapping of burn caps (maximum amount) per authorized address
mapping(address => uint256) public burnCaps;
/// @notice Mapping of total amount burned by each address
mapping(address => uint256) public burnedByAddress;
/// @notice Total amount of APE tokens burned through this contract (all-time)
uint256 public totalBurned;
/// @notice Timestamp of the first burn operation (for rate calculations)
uint256 public firstBurnTimestamp;
/// @notice Timestamp of the last burn operation
uint256 public lastBurnTimestamp;
/// @notice Struct containing comprehensive contract statistics
struct ContractStats {
uint256 totalBurned;
uint256 authorizedBurnerCount;
uint256 lastBurnTimestamp;
}
/**
* @notice Emitted when APE tokens are burned
* @param burner Address that initiated the burn
* @param amount Amount of APE tokens burned
* @param timestamp Block timestamp of the burn
*/
event Incinerated(
address indexed burner,
uint256 amount,
uint256 timestamp
);
/**
* @notice Emitted when an address is added to the allowlist
* @param burner Address that was authorized
* @param cap Maximum burn cap set for this address
*/
event Authorized(address indexed burner, uint256 cap);
/**
* @notice Emitted when an address is removed from the allowlist
* @param burner Address that was deauthorized
*/
event Deauthorized(address indexed burner);
/**
* @notice Emitted when a burn cap is updated for an address
* @param burner Address whose cap was updated
* @param oldCap Previous burn cap value
* @param newCap New burn cap value
*/
event BurnCapUpdated(
address indexed burner,
uint256 oldCap,
uint256 newCap
);
/**
* @notice Emitted when ERC20 tokens are rescued from the contract
* @param token Address of the rescued token
* @param amount Amount of tokens rescued
*/
event RescuedERC20(address indexed token, uint256 amount);
/**
* @notice Emitted when an ERC721 NFT is rescued from the contract
* @param token Address of the NFT contract
* @param tokenId ID of the rescued NFT
*/
event RescuedNFT(address indexed token, uint256 tokenId);
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
/**
* @notice Initializes the Incinerator contract
* @param _apeToken Address of the APE token contract (can be zero address for native token mode on ApeChain)
* @param _owner Address that will own the contract (admin)
* @dev This function replaces the constructor for upgradeable contracts
* @dev On ApeChain, APE is the native token, so _apeToken can be zero address
* @dev The contract balance will be used for burning operations
*/
function initialize(
address _apeToken,
address _owner
) public initializer {
require(_owner != address(0), "Incinerator: Owner cannot be zero address");
__UUPSUpgradeable_init();
__Ownable_init(_owner);
__Pausable_init();
__ReentrancyGuard_init();
apeToken = IERC20(_apeToken); // Can be zero address for native token mode
// fundingWallet is kept for storage layout compatibility but is no longer used
}
/**
* @notice Internal helper function for safe native token transfers
* @param to Address to send native tokens to
* @param amount Amount of native tokens to send
* @dev Uses low-level call to transfer native tokens
*/
function _transferNative(address to, uint256 amount) internal {
(bool success, ) = payable(to).call{value: amount}("");
require(success, "Incinerator: Native transfer failed");
}
/**
* @notice Receive function to accept native APE tokens
* @dev Accepts native APE tokens (can be from any address)
* @dev These tokens can then be burned via incinerate() or incinerateFor()
*/
receive() external payable {
// Accept native tokens - no action needed, just receive them
}
/**
* @notice Fallback function
* @dev Accepts native APE tokens via fallback as well
*/
fallback() external payable {
// Accept native tokens via fallback as well
}
/**
* @notice Burns APE tokens from the contract balance
* @param amount Amount of APE tokens to burn
* @dev Only authorized addresses can call this function
* @dev The amount must not exceed the caller's remaining burn cap
* @dev The contract must have sufficient balance
*/
function incinerate(uint256 amount) external nonReentrant whenNotPaused {
require(authorizedBurners[msg.sender], "Incinerator: Not authorized to burn");
require(amount > 0, "Incinerator: Amount must be greater than zero");
uint256 currentBurned = burnedByAddress[msg.sender];
uint256 cap = burnCaps[msg.sender];
require(currentBurned + amount <= cap, "Incinerator: Burn cap exceeded");
// Check contract balance
require(address(this).balance >= amount, "Incinerator: Insufficient contract balance");
// Update state before external call (Checks-Effects-Interactions pattern)
burnedByAddress[msg.sender] += amount;
totalBurned += amount;
if (firstBurnTimestamp == 0) {
firstBurnTimestamp = block.timestamp;
}
lastBurnTimestamp = block.timestamp;
// Burn the native tokens by sending to burn address
_transferNative(BURN_ADDRESS, amount);
emit Incinerated(msg.sender, amount, block.timestamp);
}
/**
* @notice Burns APE tokens on behalf of an authorized address
* @param burner Address that is authorized to burn (will be credited with the burn)
* @param amount Amount of APE tokens to burn
* @dev Only the contract owner can call this function
* @dev The burner must be authorized and within their burn cap
* @dev The contract must have sufficient balance
*/
function incinerateFor(
address burner,
uint256 amount
) external onlyOwner nonReentrant whenNotPaused {
require(burner != address(0), "Incinerator: Burner cannot be zero address");
require(authorizedBurners[burner], "Incinerator: Burner not authorized");
require(amount > 0, "Incinerator: Amount must be greater than zero");
uint256 currentBurned = burnedByAddress[burner];
uint256 cap = burnCaps[burner];
require(currentBurned + amount <= cap, "Incinerator: Burn cap exceeded");
// Check contract balance
require(address(this).balance >= amount, "Incinerator: Insufficient contract balance");
// Update state before external call
burnedByAddress[burner] += amount;
totalBurned += amount;
if (firstBurnTimestamp == 0) {
firstBurnTimestamp = block.timestamp;
}
lastBurnTimestamp = block.timestamp;
// Burn the native tokens by sending to burn address
_transferNative(BURN_ADDRESS, amount);
emit Incinerated(burner, amount, block.timestamp);
}
/**
* @notice Adds an address to the allowlist with a burn cap
* @param burner Address to authorize
* @param cap Maximum amount this address can burn
* @dev Only the contract owner can call this function
*/
function addToAllowlist(
address burner,
uint256 cap
) external onlyOwner {
require(burner != address(0), "Incinerator: Burner cannot be zero address");
require(cap > 0, "Incinerator: Cap must be greater than zero");
require(!authorizedBurners[burner], "Incinerator: Already authorized");
authorizedBurners[burner] = true;
burnCaps[burner] = cap;
emit Authorized(burner, cap);
}
/**
* @notice Removes an address from the allowlist
* @param burner Address to deauthorize
* @dev Only the contract owner can call this function
* @dev This does not reset the burnedByAddress tracking for historical records
*/
function removeFromAllowlist(address burner) external onlyOwner {
require(burner != address(0), "Incinerator: Burner cannot be zero address");
require(authorizedBurners[burner], "Incinerator: Not authorized");
authorizedBurners[burner] = false;
// Note: We keep burnCaps and burnedByAddress for historical tracking
emit Deauthorized(burner);
}
/**
* @notice Updates the burn cap for an authorized address
* @param burner Address whose cap will be updated
* @param newCap New burn cap value
* @dev Only the contract owner can call this function
* @dev The new cap must be greater than or equal to the current burned amount
*/
function setBurnCap(
address burner,
uint256 newCap
) external onlyOwner {
require(burner != address(0), "Incinerator: Burner cannot be zero address");
require(authorizedBurners[burner], "Incinerator: Burner not authorized");
require(newCap >= burnedByAddress[burner], "Incinerator: New cap below current burned amount");
uint256 oldCap = burnCaps[burner];
burnCaps[burner] = newCap;
emit BurnCapUpdated(burner, oldCap, newCap);
}
/**
* @notice Pauses all burning operations
* @dev Only the contract owner can call this function
* @dev IMPORTANT: Pause only affects burning functions (incinerate, incinerateFor)
* @dev Admin functions (addToAllowlist, etc.) and emergency functions
* (rescueERC20, rescueNFT, emergencyWithdraw) remain available when paused
*/
function pause() external onlyOwner {
_pause();
}
/**
* @notice Unpauses all burning operations
* @dev Only the contract owner can call this function
* @dev Restores normal burning functionality after a pause
*/
function unpause() external onlyOwner {
_unpause();
}
/**
* @notice Rescues ERC20 tokens that were accidentally sent to this contract
* @param token Address of the token to rescue
* @param amount Amount of tokens to rescue
* @dev Only the contract owner can call this function
* @dev Cannot rescue APE tokens (they should be burned instead)
*/
function rescueERC20(
address token,
uint256 amount
) external onlyOwner nonReentrant {
require(token != address(0), "Incinerator: Token cannot be zero address");
require(amount > 0, "Incinerator: Amount must be greater than zero");
IERC20(token).transfer(owner(), amount);
emit RescuedERC20(token, amount);
}
/**
* @notice Rescues an ERC721 NFT that was accidentally sent to this contract
* @param token Address of the NFT contract
* @param tokenId ID of the NFT to rescue
* @dev Only the contract owner can call this function
*/
function rescueNFT(
address token,
uint256 tokenId
) external onlyOwner nonReentrant {
require(token != address(0), "Incinerator: Token cannot be zero address");
IERC721(token).safeTransferFrom(address(this), owner(), tokenId);
emit RescuedNFT(token, tokenId);
}
/**
* @notice Emergency function to withdraw all APE tokens from this contract to the owner
* @dev Only the contract owner can call this function
* @dev This can be used if tokens get stuck in the contract
*/
function emergencyWithdraw() external onlyOwner nonReentrant {
uint256 balance = address(this).balance;
if (balance > 0) {
_transferNative(owner(), balance);
}
}
/**
* @notice Returns the total amount of APE tokens burned through this contract
* @return Total burned amount
*/
function getTotalBurned() external view returns (uint256) {
return totalBurned;
}
/**
* @notice Returns the amount of APE tokens burned by a specific address
* @param burner Address to check
* @return Amount burned by this address
*/
function getBurnedByAddress(address burner) external view returns (uint256) {
return burnedByAddress[burner];
}
/**
* @notice Calculates the average burn rate since the first burn occurred
* @return Average burn rate in tokens per second since the first burn
* @dev Returns 0 if no burns have occurred yet
* @dev This calculates: totalBurned / elapsed_time_since_first_burn
* @dev For example, if 1,000,000 tokens were burned over 30 days (2,592,000 seconds),
* the rate would be approximately 0.386 tokens per second
*/
function getBurnRate() external view returns (uint256) {
if (firstBurnTimestamp == 0) {
return 0;
}
uint256 elapsedTime = block.timestamp - firstBurnTimestamp;
if (elapsedTime == 0) {
return 0;
}
return totalBurned / elapsedTime;
}
/**
* @notice Checks if an address is authorized to burn
* @param burner Address to check
* @return True if authorized, false otherwise
*/
function isAuthorized(address burner) external view returns (bool) {
return authorizedBurners[burner];
}
/**
* @notice Returns the burn cap for a specific address
* @param burner Address to check
* @return Burn cap for this address
*/
function getBurnCap(address burner) external view returns (uint256) {
return burnCaps[burner];
}
/**
* @notice Returns the remaining burn capacity for a specific address
* @param burner Address to check
* @return Remaining amount this address can burn
*/
function getRemainingCap(address burner) external view returns (uint256) {
uint256 cap = burnCaps[burner];
uint256 burned = burnedByAddress[burner];
if (burned >= cap) {
return 0;
}
return cap - burned;
}
/**
* @notice Returns comprehensive contract statistics
* @return stats Struct containing total burned, authorized count, and last burn timestamp
* @dev Note: authorizedBurnerCount requires iterating through all authorized addresses,
* which is not efficient. This implementation returns 0 for that field.
* Consider using an array to track authorized addresses if this is needed.
*/
function getContractStats() external view returns (ContractStats memory stats) {
stats.totalBurned = totalBurned;
stats.authorizedBurnerCount = 0; // Cannot efficiently calculate without additional storage
stats.lastBurnTimestamp = lastBurnTimestamp;
// Note: firstBurnTimestamp is available as a public state variable
}
/**
* @notice Authorizes an upgrade to a new implementation
* @param newImplementation Address of the new implementation contract
* @dev Only the contract owner can authorize upgrades
*/
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {
require(newImplementation != address(0), "Incinerator: Implementation cannot be zero address");
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable
struct OwnableStorage {
address _owner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;
function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
assembly {
$.slot := OwnableStorageLocation
}
}
/**
* @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.
*/
function __Ownable_init(address initialOwner) internal onlyInitializing {
__Ownable_init_unchained(initialOwner);
}
function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
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) {
OwnableStorage storage $ = _getOwnableStorage();
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 {
OwnableStorage storage $ = _getOwnableStorage();
address oldOwner = $._owner;
$._owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reinitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.
*
* NOTE: Consider following the ERC-7201 formula to derive storage locations.
*/
function _initializableStorageSlot() internal pure virtual returns (bytes32) {
return INITIALIZABLE_STORAGE;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
bytes32 slot = _initializableStorageSlot();
assembly {
$.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.22;
import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
_checkProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
_checkNotDelegated();
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/**
* @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC-1967 compliant implementation pointing to self.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self || // Must be called through delegatecall
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC-1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
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.3.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Pausable
struct PausableStorage {
bool _paused;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;
function _getPausableStorage() private pure returns (PausableStorage storage $) {
assembly {
$.slot := PausableStorageLocation
}
}
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
function __Pausable_init() internal onlyInitializing {
}
function __Pausable_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
PausableStorage storage $ = _getPausableStorage();
return $._paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* 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 ReentrancyGuardUpgradeable is Initializable {
// 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;
/// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
struct ReentrancyGuardStorage {
uint256 _status;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;
function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
assembly {
$.slot := ReentrancyGuardStorageLocation
}
}
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
$._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 {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// On the first call to nonReentrant, _status will be NOT_ENTERED
if ($._status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
$._status = ENTERED;
}
function _nonReentrantAfter() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// 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) {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
return $._status == ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol)
pragma solidity >=0.4.16;
/**
* @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)
pragma solidity >=0.4.11;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*/
interface IERC1967 {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)
pragma solidity >=0.4.16;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/ERC1967/ERC1967Utils.sol)
pragma solidity ^0.8.21;
import {IBeacon} from "../beacon/IBeacon.sol";
import {IERC1967} from "../../interfaces/IERC1967.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";
/**
* @dev This library provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.
*/
library ERC1967Utils {
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit IERC1967.Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit IERC1967.AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the ERC-1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit IERC1967.BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @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.4.0) (token/ERC721/IERC721.sol)
pragma solidity >=0.6.2;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC-721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC-721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
* {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, bytes memory returndata) = recipient.call{value: amount}("");
if (!success) {
_revert(returndata);
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
revert(add(returndata, 0x20), mload(returndata))
}
} else {
revert Errors.FailedCall();
}
}
}// 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC-1967 implementation slot:
* ```solidity
* contract ERC1967 {
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct Int256Slot {
int256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
*/
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
/**
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"Authorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"BurnCapUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"}],"name":"Deauthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Incinerated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RescuedERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RescuedNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"},{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"addToAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"apeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedBurners","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"burnCaps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"burnedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"firstBurnTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"getBurnCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"getBurnedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractStats","outputs":[{"components":[{"internalType":"uint256","name":"totalBurned","type":"uint256"},{"internalType":"uint256","name":"authorizedBurnerCount","type":"uint256"},{"internalType":"uint256","name":"lastBurnTimestamp","type":"uint256"}],"internalType":"struct Incinerator.ContractStats","name":"stats","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"getRemainingCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"incinerate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"incinerateFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_apeToken","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBurnTimestamp","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"removeFromAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rescueNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"},{"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"setBurnCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a06040523060805234801561001457600080fd5b5061001d610022565b6100d4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100725760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d15780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051611f676100fd600039600081816115ab015281816115d401526117860152611f676000f3fe6080604052600436106101e55760003560e01c80638da5cb5b11610101578063db2e21bc1161009a578063ec0cdf621161006c578063ec0cdf62146105b5578063f2fde38b146105e5578063f53141cd14610605578063fccc281314610632578063fe9fbb801461064857005b8063db2e21bc1461051c578063dfe6b5d614610531578063e55c07c514610568578063e7ee16f81461059557005b8063b55cd04b116100d3578063b55cd04b146104a5578063bd767b01146104ba578063c28cfeaf146104f0578063d89135cd1461050657005b80638da5cb5b146103fc57806390ca449514610411578063ad3cb1cc14610447578063b28555961461048557005b8063485cc9551161017e5780635d6062f7116101505780635d6062f7146103725780635da93d7e14610392578063715018a6146103b25780638456cb59146103c75780638cd4426d146103dc57005b8063485cc955146102f95780634f1ef2861461031957806352d1902d1461032c5780635c975abb1461034157005b80633c4b40b8116101b75780633c4b40b8146102995780633d3d937d146102b95780633f4ba83a146102cf578063482cd6c5146102e457005b8063050f06b5146101ee5780631287701a1461022b57806314d1578d1461024b57806338a55f0e1461027957005b366101ec57005b005b3480156101fa57600080fd5b5060005461020e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561023757600080fd5b506101ec610246366004611af0565b610681565b34801561025757600080fd5b5061026b610266366004611b1a565b610883565b604051908152602001610222565b34801561028557600080fd5b506101ec610294366004611af0565b6108ca565b3480156102a557600080fd5b5060015461020e906001600160a01b031681565b3480156102c557600080fd5b5061026b60075481565b3480156102db57600080fd5b506101ec6109d9565b3480156102f057600080fd5b5061026b6109eb565b34801561030557600080fd5b506101ec610314366004611b35565b610a33565b6101ec610327366004611b7e565b610bcb565b34801561033857600080fd5b5061026b610be6565b34801561034d57600080fd5b50600080516020611ef28339815191525460ff165b6040519015158152602001610222565b34801561037e57600080fd5b506101ec61038d366004611c40565b610c03565b34801561039e57600080fd5b506101ec6103ad366004611b1a565b610de5565b3480156103be57600080fd5b506101ec610ec4565b3480156103d357600080fd5b506101ec610ed6565b3480156103e857600080fd5b506101ec6103f7366004611af0565b610ee6565b34801561040857600080fd5b5061020e611000565b34801561041d57600080fd5b5061026b61042c366004611b1a565b6001600160a01b031660009081526003602052604090205490565b34801561045357600080fd5b50610478604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516102229190611c7d565b34801561049157600080fd5b506101ec6104a0366004611af0565b61102e565b3480156104b157600080fd5b5060055461026b565b3480156104c657600080fd5b5061026b6104d5366004611b1a565b6001600160a01b031660009081526004602052604090205490565b3480156104fc57600080fd5b5061026b60065481565b34801561051257600080fd5b5061026b60055481565b34801561052857600080fd5b506101ec61118d565b34801561053d57600080fd5b506105466111cd565b6040805182518152602080840151908201529181015190820152606001610222565b34801561057457600080fd5b5061026b610583366004611b1a565b60046020526000908152604090205481565b3480156105a157600080fd5b506101ec6105b0366004611af0565b611208565b3480156105c157600080fd5b506103626105d0366004611b1a565b60026020526000908152604090205460ff1681565b3480156105f157600080fd5b506101ec610600366004611b1a565b61134e565b34801561061157600080fd5b5061026b610620366004611b1a565b60036020526000908152604090205481565b34801561063e57600080fd5b5061020e61dead81565b34801561065457600080fd5b50610362610663366004611b1a565b6001600160a01b031660009081526002602052604090205460ff1690565b610689611389565b6106916113bb565b6106996113f3565b6001600160a01b0382166106c85760405162461bcd60e51b81526004016106bf90611cb0565b60405180910390fd5b6001600160a01b03821660009081526002602052604090205460ff166107005760405162461bcd60e51b81526004016106bf90611cfa565b600081116107205760405162461bcd60e51b81526004016106bf90611d3c565b6001600160a01b038216600090815260046020908152604080832054600390925290912054806107508484611d9f565b111561079e5760405162461bcd60e51b815260206004820152601e60248201527f496e63696e657261746f723a204275726e20636170206578636565646564000060448201526064016106bf565b824710156107be5760405162461bcd60e51b81526004016106bf90611db2565b6001600160a01b038416600090815260046020526040812080548592906107e6908490611d9f565b9250508190555082600560008282546107ff9190611d9f565b909155505060065460000361081357426006555b4260075561082361dead84611424565b604080518481524260208201526001600160a01b038616917f104c9626ecbce09f38090d2b57cde0fcd58af7763d0b9fdccc5d9d0987606944910160405180910390a2505061087f6001600080516020611f1283398151915255565b5050565b6001600160a01b03811660009081526003602090815260408083205460049092528220548181106108b8575060009392505050565b6108c28183611dfc565b949350505050565b6108d2611389565b6108da6113bb565b6001600160a01b0382166109005760405162461bcd60e51b81526004016106bf90611e0f565b816001600160a01b03166342842e0e30610918611000565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101849052606401600060405180830381600087803b15801561096757600080fd5b505af115801561097b573d6000803e3d6000fd5b50505050816001600160a01b03167f4f6086fecc1c9fe94cee6ed6d7fd9f146b89286e9c6f8d33681a60724c5b9b48826040516109ba91815260200190565b60405180910390a261087f6001600080516020611f1283398151915255565b6109e1611389565b6109e96114ec565b565b60006006546000036109fd5750600090565b600060065442610a0d9190611dfc565b905080600003610a1f57600091505090565b80600554610a2d9190611e58565b91505090565b6000610a3d61154c565b805490915060ff600160401b820416159067ffffffffffffffff16600081158015610a655750825b905060008267ffffffffffffffff166001148015610a825750303b155b905081158015610a90575080155b15610aae5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610ad857845460ff60401b1916600160401b1785555b6001600160a01b038616610b405760405162461bcd60e51b815260206004820152602960248201527f496e63696e657261746f723a204f776e65722063616e6e6f74206265207a65726044820152686f206164647265737360b81b60648201526084016106bf565b610b48611577565b610b518661157f565b610b59611577565b610b61611590565b600080546001600160a01b0319166001600160a01b0389161790558315610bc257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b610bd36115a0565b610bdc82611645565b61087f82826116be565b6000610bf061177b565b50600080516020611ed283398151915290565b610c0b6113bb565b610c136113f3565b3360009081526002602052604090205460ff16610c7e5760405162461bcd60e51b815260206004820152602360248201527f496e63696e657261746f723a204e6f7420617574686f72697a656420746f20626044820152623ab93760e91b60648201526084016106bf565b60008111610c9e5760405162461bcd60e51b81526004016106bf90611d3c565b3360009081526004602090815260408083205460039092529091205480610cc58484611d9f565b1115610d135760405162461bcd60e51b815260206004820152601e60248201527f496e63696e657261746f723a204275726e20636170206578636565646564000060448201526064016106bf565b82471015610d335760405162461bcd60e51b81526004016106bf90611db2565b3360009081526004602052604081208054859290610d52908490611d9f565b925050819055508260056000828254610d6b9190611d9f565b9091555050600654600003610d7f57426006555b42600755610d8f61dead84611424565b6040805184815242602082015233917f104c9626ecbce09f38090d2b57cde0fcd58af7763d0b9fdccc5d9d0987606944910160405180910390a25050610de26001600080516020611f1283398151915255565b50565b610ded611389565b6001600160a01b038116610e135760405162461bcd60e51b81526004016106bf90611cb0565b6001600160a01b03811660009081526002602052604090205460ff16610e7b5760405162461bcd60e51b815260206004820152601b60248201527f496e63696e657261746f723a204e6f7420617574686f72697a6564000000000060448201526064016106bf565b6001600160a01b038116600081815260026020526040808220805460ff19169055517fdbe7a3286b1096c0287460d58edc1fd5442d153b999918dbf922c06d3cc567ac9190a250565b610ecc611389565b6109e960006117c4565b610ede611389565b6109e9611835565b610eee611389565b610ef66113bb565b6001600160a01b038216610f1c5760405162461bcd60e51b81526004016106bf90611e0f565b60008111610f3c5760405162461bcd60e51b81526004016106bf90611d3c565b816001600160a01b031663a9059cbb610f53611000565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc49190611e7a565b50816001600160a01b03167f31825d4c640aea76c1e0968b29b11967c9a93a99b65072cf8db892b7ab737bbf826040516109ba91815260200190565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b611036611389565b6001600160a01b03821661105c5760405162461bcd60e51b81526004016106bf90611cb0565b600081116110bf5760405162461bcd60e51b815260206004820152602a60248201527f496e63696e657261746f723a20436170206d7573742062652067726561746572604482015269207468616e207a65726f60b01b60648201526084016106bf565b6001600160a01b03821660009081526002602052604090205460ff16156111285760405162461bcd60e51b815260206004820152601f60248201527f496e63696e657261746f723a20416c726561647920617574686f72697a65640060448201526064016106bf565b6001600160a01b0382166000818152600260209081526040808320805460ff19166001179055600382529182902084905590518381527fb39b5f240c7440b58c1c6cfd328b09ff9aa18b3c8ef4b829774e4f5bad039416910160405180910390a25050565b611195611389565b61119d6113bb565b4780156111b5576111b56111af611000565b82611424565b506109e96001600080516020611f1283398151915255565b6111f160405180606001604052806000815260200160008152602001600081525090565b600554815260006020820152600754604082015290565b611210611389565b6001600160a01b0382166112365760405162461bcd60e51b81526004016106bf90611cb0565b6001600160a01b03821660009081526002602052604090205460ff1661126e5760405162461bcd60e51b81526004016106bf90611cfa565b6001600160a01b0382166000908152600460205260409020548110156112ef5760405162461bcd60e51b815260206004820152603060248201527f496e63696e657261746f723a204e6577206361702062656c6f7720637572726560448201526f1b9d08189d5c9b995908185b5bdd5b9d60821b60648201526084016106bf565b6001600160a01b038216600081815260036020908152604091829020805490859055825181815291820185905292917fe93a12dc744a15da2ef715187ad9feafc064038373cc3ac896d80878c258ee39910160405180910390a2505050565b611356611389565b6001600160a01b03811661138057604051631e4fbdf760e01b8152600060048201526024016106bf565b610de2816117c4565b33611392611000565b6001600160a01b0316146109e95760405163118cdaa760e01b81523360048201526024016106bf565b600080516020611f128339815191528054600119016113ed57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b600080516020611ef28339815191525460ff16156109e95760405163d93c066560e01b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611471576040519150601f19603f3d011682016040523d82523d6000602084013e611476565b606091505b50509050806114d35760405162461bcd60e51b815260206004820152602360248201527f496e63696e657261746f723a204e6174697665207472616e73666572206661696044820152621b195960ea1b60648201526084016106bf565b505050565b6001600080516020611f1283398151915255565b6114f461187e565b600080516020611ef2833981519152805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b6000807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005b92915050565b6109e96118ae565b6115876118ae565b610de2816118d3565b6115986118ae565b6109e96118db565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061162757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661161b600080516020611ed2833981519152546001600160a01b031690565b6001600160a01b031614155b156109e95760405163703e46dd60e11b815260040160405180910390fd5b61164d611389565b6001600160a01b038116610de25760405162461bcd60e51b815260206004820152603260248201527f496e63696e657261746f723a20496d706c656d656e746174696f6e2063616e6e6044820152716f74206265207a65726f206164647265737360701b60648201526084016106bf565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611718575060408051601f3d908101601f1916820190925261171591810190611e9c565b60015b61174057604051634c9c8ce360e01b81526001600160a01b03831660048201526024016106bf565b600080516020611ed2833981519152811461177157604051632a87526960e21b8152600481018290526024016106bf565b6114d383836118e3565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109e95760405163703e46dd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b61183d6113f3565b600080516020611ef2833981519152805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361152e565b600080516020611ef28339815191525460ff166109e957604051638dfc202b60e01b815260040160405180910390fd5b6118b6611939565b6109e957604051631afcd79f60e31b815260040160405180910390fd5b6113566118ae565b6114d86118ae565b6118ec82611953565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115611931576114d382826119b8565b61087f611a2e565b600061194361154c565b54600160401b900460ff16919050565b806001600160a01b03163b60000361198957604051634c9c8ce360e01b81526001600160a01b03821660048201526024016106bf565b600080516020611ed283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516119d59190611eb5565b600060405180830381855af49150503d8060008114611a10576040519150601f19603f3d011682016040523d82523d6000602084013e611a15565b606091505b5091509150611a25858383611a4d565b95945050505050565b34156109e95760405163b398979f60e01b815260040160405180910390fd5b606082611a6257611a5d82611aac565b611aa5565b8151158015611a7957506001600160a01b0384163b155b15611aa257604051639996b31560e01b81526001600160a01b03851660048201526024016106bf565b50805b9392505050565b805115611abb57805160208201fd5b60405163d6bda27560e01b815260040160405180910390fd5b80356001600160a01b0381168114611aeb57600080fd5b919050565b60008060408385031215611b0357600080fd5b611b0c83611ad4565b946020939093013593505050565b600060208284031215611b2c57600080fd5b611aa582611ad4565b60008060408385031215611b4857600080fd5b611b5183611ad4565b9150611b5f60208401611ad4565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611b9157600080fd5b611b9a83611ad4565b9150602083013567ffffffffffffffff80821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b813581811115611bdd57611bdd611b68565b604051601f8201601f19908116603f01168101908382118183101715611c0557611c05611b68565b81604052828152886020848701011115611c1e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215611c5257600080fd5b5035919050565b60005b83811015611c74578181015183820152602001611c5c565b50506000910152565b6020815260008251806020840152611c9c816040850160208701611c59565b601f01601f19169190910160400192915050565b6020808252602a908201527f496e63696e657261746f723a204275726e65722063616e6e6f74206265207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526022908201527f496e63696e657261746f723a204275726e6572206e6f7420617574686f72697a604082015261195960f21b606082015260800190565b6020808252602d908201527f496e63696e657261746f723a20416d6f756e74206d757374206265206772656160408201526c746572207468616e207a65726f60981b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561157157611571611d89565b6020808252602a908201527f496e63696e657261746f723a20496e73756666696369656e7420636f6e74726160408201526963742062616c616e636560b01b606082015260800190565b8181038181111561157157611571611d89565b60208082526029908201527f496e63696e657261746f723a20546f6b656e2063616e6e6f74206265207a65726040820152686f206164647265737360b81b606082015260800190565b600082611e7557634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611e8c57600080fd5b81518015158114611aa557600080fd5b600060208284031215611eae57600080fd5b5051919050565b60008251611ec7818460208701611c59565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbccd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a264697066735822122024bd8111f39fad20ce32f63f280fcec5ebab94557b6dae26bcc766acb0876c7c64736f6c63430008160033
Deployed Bytecode
0x6080604052600436106101e55760003560e01c80638da5cb5b11610101578063db2e21bc1161009a578063ec0cdf621161006c578063ec0cdf62146105b5578063f2fde38b146105e5578063f53141cd14610605578063fccc281314610632578063fe9fbb801461064857005b8063db2e21bc1461051c578063dfe6b5d614610531578063e55c07c514610568578063e7ee16f81461059557005b8063b55cd04b116100d3578063b55cd04b146104a5578063bd767b01146104ba578063c28cfeaf146104f0578063d89135cd1461050657005b80638da5cb5b146103fc57806390ca449514610411578063ad3cb1cc14610447578063b28555961461048557005b8063485cc9551161017e5780635d6062f7116101505780635d6062f7146103725780635da93d7e14610392578063715018a6146103b25780638456cb59146103c75780638cd4426d146103dc57005b8063485cc955146102f95780634f1ef2861461031957806352d1902d1461032c5780635c975abb1461034157005b80633c4b40b8116101b75780633c4b40b8146102995780633d3d937d146102b95780633f4ba83a146102cf578063482cd6c5146102e457005b8063050f06b5146101ee5780631287701a1461022b57806314d1578d1461024b57806338a55f0e1461027957005b366101ec57005b005b3480156101fa57600080fd5b5060005461020e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561023757600080fd5b506101ec610246366004611af0565b610681565b34801561025757600080fd5b5061026b610266366004611b1a565b610883565b604051908152602001610222565b34801561028557600080fd5b506101ec610294366004611af0565b6108ca565b3480156102a557600080fd5b5060015461020e906001600160a01b031681565b3480156102c557600080fd5b5061026b60075481565b3480156102db57600080fd5b506101ec6109d9565b3480156102f057600080fd5b5061026b6109eb565b34801561030557600080fd5b506101ec610314366004611b35565b610a33565b6101ec610327366004611b7e565b610bcb565b34801561033857600080fd5b5061026b610be6565b34801561034d57600080fd5b50600080516020611ef28339815191525460ff165b6040519015158152602001610222565b34801561037e57600080fd5b506101ec61038d366004611c40565b610c03565b34801561039e57600080fd5b506101ec6103ad366004611b1a565b610de5565b3480156103be57600080fd5b506101ec610ec4565b3480156103d357600080fd5b506101ec610ed6565b3480156103e857600080fd5b506101ec6103f7366004611af0565b610ee6565b34801561040857600080fd5b5061020e611000565b34801561041d57600080fd5b5061026b61042c366004611b1a565b6001600160a01b031660009081526003602052604090205490565b34801561045357600080fd5b50610478604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516102229190611c7d565b34801561049157600080fd5b506101ec6104a0366004611af0565b61102e565b3480156104b157600080fd5b5060055461026b565b3480156104c657600080fd5b5061026b6104d5366004611b1a565b6001600160a01b031660009081526004602052604090205490565b3480156104fc57600080fd5b5061026b60065481565b34801561051257600080fd5b5061026b60055481565b34801561052857600080fd5b506101ec61118d565b34801561053d57600080fd5b506105466111cd565b6040805182518152602080840151908201529181015190820152606001610222565b34801561057457600080fd5b5061026b610583366004611b1a565b60046020526000908152604090205481565b3480156105a157600080fd5b506101ec6105b0366004611af0565b611208565b3480156105c157600080fd5b506103626105d0366004611b1a565b60026020526000908152604090205460ff1681565b3480156105f157600080fd5b506101ec610600366004611b1a565b61134e565b34801561061157600080fd5b5061026b610620366004611b1a565b60036020526000908152604090205481565b34801561063e57600080fd5b5061020e61dead81565b34801561065457600080fd5b50610362610663366004611b1a565b6001600160a01b031660009081526002602052604090205460ff1690565b610689611389565b6106916113bb565b6106996113f3565b6001600160a01b0382166106c85760405162461bcd60e51b81526004016106bf90611cb0565b60405180910390fd5b6001600160a01b03821660009081526002602052604090205460ff166107005760405162461bcd60e51b81526004016106bf90611cfa565b600081116107205760405162461bcd60e51b81526004016106bf90611d3c565b6001600160a01b038216600090815260046020908152604080832054600390925290912054806107508484611d9f565b111561079e5760405162461bcd60e51b815260206004820152601e60248201527f496e63696e657261746f723a204275726e20636170206578636565646564000060448201526064016106bf565b824710156107be5760405162461bcd60e51b81526004016106bf90611db2565b6001600160a01b038416600090815260046020526040812080548592906107e6908490611d9f565b9250508190555082600560008282546107ff9190611d9f565b909155505060065460000361081357426006555b4260075561082361dead84611424565b604080518481524260208201526001600160a01b038616917f104c9626ecbce09f38090d2b57cde0fcd58af7763d0b9fdccc5d9d0987606944910160405180910390a2505061087f6001600080516020611f1283398151915255565b5050565b6001600160a01b03811660009081526003602090815260408083205460049092528220548181106108b8575060009392505050565b6108c28183611dfc565b949350505050565b6108d2611389565b6108da6113bb565b6001600160a01b0382166109005760405162461bcd60e51b81526004016106bf90611e0f565b816001600160a01b03166342842e0e30610918611000565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101849052606401600060405180830381600087803b15801561096757600080fd5b505af115801561097b573d6000803e3d6000fd5b50505050816001600160a01b03167f4f6086fecc1c9fe94cee6ed6d7fd9f146b89286e9c6f8d33681a60724c5b9b48826040516109ba91815260200190565b60405180910390a261087f6001600080516020611f1283398151915255565b6109e1611389565b6109e96114ec565b565b60006006546000036109fd5750600090565b600060065442610a0d9190611dfc565b905080600003610a1f57600091505090565b80600554610a2d9190611e58565b91505090565b6000610a3d61154c565b805490915060ff600160401b820416159067ffffffffffffffff16600081158015610a655750825b905060008267ffffffffffffffff166001148015610a825750303b155b905081158015610a90575080155b15610aae5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610ad857845460ff60401b1916600160401b1785555b6001600160a01b038616610b405760405162461bcd60e51b815260206004820152602960248201527f496e63696e657261746f723a204f776e65722063616e6e6f74206265207a65726044820152686f206164647265737360b81b60648201526084016106bf565b610b48611577565b610b518661157f565b610b59611577565b610b61611590565b600080546001600160a01b0319166001600160a01b0389161790558315610bc257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b610bd36115a0565b610bdc82611645565b61087f82826116be565b6000610bf061177b565b50600080516020611ed283398151915290565b610c0b6113bb565b610c136113f3565b3360009081526002602052604090205460ff16610c7e5760405162461bcd60e51b815260206004820152602360248201527f496e63696e657261746f723a204e6f7420617574686f72697a656420746f20626044820152623ab93760e91b60648201526084016106bf565b60008111610c9e5760405162461bcd60e51b81526004016106bf90611d3c565b3360009081526004602090815260408083205460039092529091205480610cc58484611d9f565b1115610d135760405162461bcd60e51b815260206004820152601e60248201527f496e63696e657261746f723a204275726e20636170206578636565646564000060448201526064016106bf565b82471015610d335760405162461bcd60e51b81526004016106bf90611db2565b3360009081526004602052604081208054859290610d52908490611d9f565b925050819055508260056000828254610d6b9190611d9f565b9091555050600654600003610d7f57426006555b42600755610d8f61dead84611424565b6040805184815242602082015233917f104c9626ecbce09f38090d2b57cde0fcd58af7763d0b9fdccc5d9d0987606944910160405180910390a25050610de26001600080516020611f1283398151915255565b50565b610ded611389565b6001600160a01b038116610e135760405162461bcd60e51b81526004016106bf90611cb0565b6001600160a01b03811660009081526002602052604090205460ff16610e7b5760405162461bcd60e51b815260206004820152601b60248201527f496e63696e657261746f723a204e6f7420617574686f72697a6564000000000060448201526064016106bf565b6001600160a01b038116600081815260026020526040808220805460ff19169055517fdbe7a3286b1096c0287460d58edc1fd5442d153b999918dbf922c06d3cc567ac9190a250565b610ecc611389565b6109e960006117c4565b610ede611389565b6109e9611835565b610eee611389565b610ef66113bb565b6001600160a01b038216610f1c5760405162461bcd60e51b81526004016106bf90611e0f565b60008111610f3c5760405162461bcd60e51b81526004016106bf90611d3c565b816001600160a01b031663a9059cbb610f53611000565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc49190611e7a565b50816001600160a01b03167f31825d4c640aea76c1e0968b29b11967c9a93a99b65072cf8db892b7ab737bbf826040516109ba91815260200190565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b611036611389565b6001600160a01b03821661105c5760405162461bcd60e51b81526004016106bf90611cb0565b600081116110bf5760405162461bcd60e51b815260206004820152602a60248201527f496e63696e657261746f723a20436170206d7573742062652067726561746572604482015269207468616e207a65726f60b01b60648201526084016106bf565b6001600160a01b03821660009081526002602052604090205460ff16156111285760405162461bcd60e51b815260206004820152601f60248201527f496e63696e657261746f723a20416c726561647920617574686f72697a65640060448201526064016106bf565b6001600160a01b0382166000818152600260209081526040808320805460ff19166001179055600382529182902084905590518381527fb39b5f240c7440b58c1c6cfd328b09ff9aa18b3c8ef4b829774e4f5bad039416910160405180910390a25050565b611195611389565b61119d6113bb565b4780156111b5576111b56111af611000565b82611424565b506109e96001600080516020611f1283398151915255565b6111f160405180606001604052806000815260200160008152602001600081525090565b600554815260006020820152600754604082015290565b611210611389565b6001600160a01b0382166112365760405162461bcd60e51b81526004016106bf90611cb0565b6001600160a01b03821660009081526002602052604090205460ff1661126e5760405162461bcd60e51b81526004016106bf90611cfa565b6001600160a01b0382166000908152600460205260409020548110156112ef5760405162461bcd60e51b815260206004820152603060248201527f496e63696e657261746f723a204e6577206361702062656c6f7720637572726560448201526f1b9d08189d5c9b995908185b5bdd5b9d60821b60648201526084016106bf565b6001600160a01b038216600081815260036020908152604091829020805490859055825181815291820185905292917fe93a12dc744a15da2ef715187ad9feafc064038373cc3ac896d80878c258ee39910160405180910390a2505050565b611356611389565b6001600160a01b03811661138057604051631e4fbdf760e01b8152600060048201526024016106bf565b610de2816117c4565b33611392611000565b6001600160a01b0316146109e95760405163118cdaa760e01b81523360048201526024016106bf565b600080516020611f128339815191528054600119016113ed57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b600080516020611ef28339815191525460ff16156109e95760405163d93c066560e01b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611471576040519150601f19603f3d011682016040523d82523d6000602084013e611476565b606091505b50509050806114d35760405162461bcd60e51b815260206004820152602360248201527f496e63696e657261746f723a204e6174697665207472616e73666572206661696044820152621b195960ea1b60648201526084016106bf565b505050565b6001600080516020611f1283398151915255565b6114f461187e565b600080516020611ef2833981519152805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b6000807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005b92915050565b6109e96118ae565b6115876118ae565b610de2816118d3565b6115986118ae565b6109e96118db565b306001600160a01b037f000000000000000000000000fb97b8f103aa910673c58e10fb353aade7d2fce516148061162757507f000000000000000000000000fb97b8f103aa910673c58e10fb353aade7d2fce56001600160a01b031661161b600080516020611ed2833981519152546001600160a01b031690565b6001600160a01b031614155b156109e95760405163703e46dd60e11b815260040160405180910390fd5b61164d611389565b6001600160a01b038116610de25760405162461bcd60e51b815260206004820152603260248201527f496e63696e657261746f723a20496d706c656d656e746174696f6e2063616e6e6044820152716f74206265207a65726f206164647265737360701b60648201526084016106bf565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611718575060408051601f3d908101601f1916820190925261171591810190611e9c565b60015b61174057604051634c9c8ce360e01b81526001600160a01b03831660048201526024016106bf565b600080516020611ed2833981519152811461177157604051632a87526960e21b8152600481018290526024016106bf565b6114d383836118e3565b306001600160a01b037f000000000000000000000000fb97b8f103aa910673c58e10fb353aade7d2fce516146109e95760405163703e46dd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b61183d6113f3565b600080516020611ef2833981519152805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361152e565b600080516020611ef28339815191525460ff166109e957604051638dfc202b60e01b815260040160405180910390fd5b6118b6611939565b6109e957604051631afcd79f60e31b815260040160405180910390fd5b6113566118ae565b6114d86118ae565b6118ec82611953565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115611931576114d382826119b8565b61087f611a2e565b600061194361154c565b54600160401b900460ff16919050565b806001600160a01b03163b60000361198957604051634c9c8ce360e01b81526001600160a01b03821660048201526024016106bf565b600080516020611ed283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516119d59190611eb5565b600060405180830381855af49150503d8060008114611a10576040519150601f19603f3d011682016040523d82523d6000602084013e611a15565b606091505b5091509150611a25858383611a4d565b95945050505050565b34156109e95760405163b398979f60e01b815260040160405180910390fd5b606082611a6257611a5d82611aac565b611aa5565b8151158015611a7957506001600160a01b0384163b155b15611aa257604051639996b31560e01b81526001600160a01b03851660048201526024016106bf565b50805b9392505050565b805115611abb57805160208201fd5b60405163d6bda27560e01b815260040160405180910390fd5b80356001600160a01b0381168114611aeb57600080fd5b919050565b60008060408385031215611b0357600080fd5b611b0c83611ad4565b946020939093013593505050565b600060208284031215611b2c57600080fd5b611aa582611ad4565b60008060408385031215611b4857600080fd5b611b5183611ad4565b9150611b5f60208401611ad4565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611b9157600080fd5b611b9a83611ad4565b9150602083013567ffffffffffffffff80821115611bb757600080fd5b818501915085601f830112611bcb57600080fd5b813581811115611bdd57611bdd611b68565b604051601f8201601f19908116603f01168101908382118183101715611c0557611c05611b68565b81604052828152886020848701011115611c1e57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600060208284031215611c5257600080fd5b5035919050565b60005b83811015611c74578181015183820152602001611c5c565b50506000910152565b6020815260008251806020840152611c9c816040850160208701611c59565b601f01601f19169190910160400192915050565b6020808252602a908201527f496e63696e657261746f723a204275726e65722063616e6e6f74206265207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526022908201527f496e63696e657261746f723a204275726e6572206e6f7420617574686f72697a604082015261195960f21b606082015260800190565b6020808252602d908201527f496e63696e657261746f723a20416d6f756e74206d757374206265206772656160408201526c746572207468616e207a65726f60981b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561157157611571611d89565b6020808252602a908201527f496e63696e657261746f723a20496e73756666696369656e7420636f6e74726160408201526963742062616c616e636560b01b606082015260800190565b8181038181111561157157611571611d89565b60208082526029908201527f496e63696e657261746f723a20546f6b656e2063616e6e6f74206265207a65726040820152686f206164647265737360b81b606082015260800190565b600082611e7557634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611e8c57600080fd5b81518015158114611aa557600080fd5b600060208284031215611eae57600080fd5b5051919050565b60008251611ec7818460208701611c59565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbccd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a264697066735822122024bd8111f39fad20ce32f63f280fcec5ebab94557b6dae26bcc766acb0876c7c64736f6c63430008160033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.