Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 107558375 | 839 days ago | 0 ETH | ||||
| 107558356 | 839 days ago | 0 ETH | ||||
| 107558350 | 839 days ago | 0 ETH | ||||
| 107558275 | 839 days ago | 0 ETH | ||||
| 107558213 | 839 days ago | 0 ETH | ||||
| 107558190 | 839 days ago | 0 ETH | ||||
| 107558173 | 839 days ago | 0 ETH | ||||
| 107558115 | 839 days ago | 0 ETH | ||||
| 107558102 | 839 days ago | 0 ETH | ||||
| 107558091 | 839 days ago | 0 ETH | ||||
| 107558071 | 839 days ago | 0 ETH | ||||
| 107558026 | 839 days ago | 0 ETH | ||||
| 107557940 | 839 days ago | 0 ETH | ||||
| 107557889 | 839 days ago | 0 ETH | ||||
| 107557733 | 839 days ago | 0 ETH | ||||
| 107557598 | 839 days ago | 0 ETH | ||||
| 107557591 | 839 days ago | 0 ETH | ||||
| 107557517 | 839 days ago | 0 ETH | ||||
| 107557503 | 839 days ago | 0 ETH | ||||
| 107557480 | 839 days ago | 0 ETH | ||||
| 107557466 | 839 days ago | 0 ETH | ||||
| 107557456 | 839 days ago | 0 ETH | ||||
| 107557441 | 839 days ago | 0 ETH | ||||
| 107557432 | 839 days ago | 0 ETH | ||||
| 107557370 | 839 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Optimist
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol";
import {
ERC721BurnableUpgradeable
} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import { AttestationStation } from "./AttestationStation.sol";
import { OptimistAllowlist } from "./OptimistAllowlist.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
/**
* @author Optimism Collective
* @author Gitcoin
* @title Optimist
* @notice A Soul Bound Token for real humans only(tm).
*/
contract Optimist is ERC721BurnableUpgradeable, Semver {
/**
* @notice Attestation key used by the attestor to attest the baseURI.
*/
bytes32 public constant BASE_URI_ATTESTATION_KEY = bytes32("optimist.base-uri");
/**
* @notice Attestor who attests to baseURI.
*/
address public immutable BASE_URI_ATTESTOR;
/**
* @notice Address of the AttestationStation contract.
*/
AttestationStation public immutable ATTESTATION_STATION;
/**
* @notice Address of the OptimistAllowlist contract.
*/
OptimistAllowlist public immutable OPTIMIST_ALLOWLIST;
/**
* @custom:semver 2.0.0
* @param _name Token name.
* @param _symbol Token symbol.
* @param _baseURIAttestor Address of the baseURI attestor.
* @param _attestationStation Address of the AttestationStation contract.
* @param _optimistAllowlist Address of the OptimistAllowlist contract
*/
constructor(
string memory _name,
string memory _symbol,
address _baseURIAttestor,
AttestationStation _attestationStation,
OptimistAllowlist _optimistAllowlist
) Semver(2, 0, 0) {
BASE_URI_ATTESTOR = _baseURIAttestor;
ATTESTATION_STATION = _attestationStation;
OPTIMIST_ALLOWLIST = _optimistAllowlist;
initialize(_name, _symbol);
}
/**
* @notice Initializes the Optimist contract.
*
* @param _name Token name.
* @param _symbol Token symbol.
*/
function initialize(string memory _name, string memory _symbol) public initializer {
__ERC721_init(_name, _symbol);
__ERC721Burnable_init();
}
/**
* @notice Allows an address to mint an Optimist NFT. Token ID is the uint256 representation
* of the recipient's address. Recipients must be permitted to mint, eventually anyone
* will be able to mint. One token per address.
*
* @param _recipient Address of the token recipient.
*/
function mint(address _recipient) public {
require(isOnAllowList(_recipient), "Optimist: address is not on allowList");
_safeMint(_recipient, tokenIdOfAddress(_recipient));
}
/**
* @notice Returns the baseURI for all tokens.
*
* @return BaseURI for all tokens.
*/
function baseURI() public view returns (string memory) {
return
string(
abi.encodePacked(
ATTESTATION_STATION.attestations(
BASE_URI_ATTESTOR,
address(this),
bytes32("optimist.base-uri")
)
)
);
}
/**
* @notice Returns the token URI for a given token by ID
*
* @param _tokenId Token ID to query.
* @return Token URI for the given token by ID.
*/
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
return
string(
abi.encodePacked(
baseURI(),
"/",
// Properly format the token ID as a 20 byte hex string (address).
Strings.toHexString(_tokenId, 20),
".json"
)
);
}
/**
* @notice Checks OptimistAllowlist to determine whether a given address is allowed to mint
* the Optimist NFT. Since the Optimist NFT will also be used as part of the
* Citizens House, mints are currently restricted. Eventually anyone will be able
* to mint.
*
* @return Whether or not the address is allowed to mint yet.
*/
function isOnAllowList(address _recipient) public view returns (bool) {
return OPTIMIST_ALLOWLIST.isAllowedToMint(_recipient);
}
/**
* @notice Returns the token ID for the token owned by a given address. This is the uint256
* representation of the given address.
*
* @return Token ID for the token owned by the given address.
*/
function tokenIdOfAddress(address _owner) public pure returns (uint256) {
return uint256(uint160(_owner));
}
/**
* @notice Disabled for the Optimist NFT (Soul Bound Token).
*/
function approve(address, uint256) public pure override {
revert("Optimist: soul bound token");
}
/**
* @notice Disabled for the Optimist NFT (Soul Bound Token).
*/
function setApprovalForAll(address, bool) public virtual override {
revert("Optimist: soul bound token");
}
/**
* @notice Prevents transfers of the Optimist NFT (Soul Bound Token).
*
* @param _from Address of the token sender.
* @param _to Address of the token recipient.
*/
function _beforeTokenTransfer(
address _from,
address _to,
uint256
) internal virtual override {
require(_from == address(0) || _to == address(0), "Optimist: soul bound token");
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
/**
* @title Semver
* @notice Semver is a simple contract for managing contract versions.
*/
contract Semver {
/**
* @notice Contract version number (major).
*/
uint256 private immutable MAJOR_VERSION;
/**
* @notice Contract version number (minor).
*/
uint256 private immutable MINOR_VERSION;
/**
* @notice Contract version number (patch).
*/
uint256 private immutable PATCH_VERSION;
/**
* @param _major Version number (major).
* @param _minor Version number (minor).
* @param _patch Version number (patch).
*/
constructor(
uint256 _major,
uint256 _minor,
uint256 _patch
) {
MAJOR_VERSION = _major;
MINOR_VERSION = _minor;
PATCH_VERSION = _patch;
}
/**
* @notice Returns the full semver contract version.
*
* @return Semver contract version as a string.
*/
function version() public view returns (string memory) {
return
string(
abi.encodePacked(
Strings.toString(MAJOR_VERSION),
".",
Strings.toString(MINOR_VERSION),
".",
Strings.toString(PATCH_VERSION)
)
);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @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]
* ```
* 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 Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 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. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_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.
*
* `initializer` is equivalent to `reinitializer(1)`, so 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.
*
* 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.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_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() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @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.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
using AddressUpgradeable for address;
using StringsUpgradeable for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {
__ERC721_init_unchained(name_, symbol_);
}
function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
return
interfaceId == type(IERC721Upgradeable).interfaceId ||
interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: invalid token ID");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721Upgradeable.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not token owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
_safeTransfer(from, to, tokenId, data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
address owner = ERC721Upgradeable.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721Upgradeable.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory data
) private returns (bool) {
if (to.isContract()) {
try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[44] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721ReceiverUpgradeable {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165Upgradeable.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721Upgradeable is IERC165Upgradeable {
/**
* @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 ERC721 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* 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 caller.
*
* 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 v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC721Upgradeable.sol";
import "../../../utils/ContextUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be burned (destroyed).
*/
abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {
function __ERC721Burnable_init() internal onlyInitializing {
}
function __ERC721Burnable_init_unchained() internal onlyInitializing {
}
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burn(uint256 tokenId) public virtual {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
_burn(tokenId);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721Upgradeable.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../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;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
function __ERC165_init() internal onlyInitializing {
}
function __ERC165_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165Upgradeable).interfaceId;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165Upgradeable {
/**
* @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[EIP 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 v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol";
/**
* @title AttestationStation
* @author Optimism Collective
* @author Gitcoin
* @notice Where attestations live.
*/
contract AttestationStation is Semver {
/**
* @notice Struct representing data that is being attested.
*
* @custom:field about Address for which the attestation is about.
* @custom:field key A bytes32 key for the attestation.
* @custom:field val The attestation as arbitrary bytes.
*/
struct AttestationData {
address about;
bytes32 key;
bytes val;
}
/**
* @notice Maps addresses to attestations. Creator => About => Key => Value.
*/
mapping(address => mapping(address => mapping(bytes32 => bytes))) public attestations;
/**
* @notice Emitted when Attestation is created.
*
* @param creator Address that made the attestation.
* @param about Address attestation is about.
* @param key Key of the attestation.
* @param val Value of the attestation.
*/
event AttestationCreated(
address indexed creator,
address indexed about,
bytes32 indexed key,
bytes val
);
/**
* @custom:semver 1.1.0
*/
constructor() Semver(1, 1, 0) {}
/**
* @notice Allows anyone to create an attestation.
*
* @param _about Address that the attestation is about.
* @param _key A key used to namespace the attestation.
* @param _val An arbitrary value stored as part of the attestation.
*/
function attest(
address _about,
bytes32 _key,
bytes memory _val
) public {
attestations[msg.sender][_about][_key] = _val;
emit AttestationCreated(msg.sender, _about, _key, _val);
}
/**
* @notice Allows anyone to create attestations.
*
* @param _attestations An array of AttestationData structs.
*/
function attest(AttestationData[] calldata _attestations) external {
uint256 length = _attestations.length;
for (uint256 i = 0; i < length; ) {
AttestationData memory attestation = _attestations[i];
attest(attestation.about, attestation.key, attestation.val);
unchecked {
++i;
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol";
import { AttestationStation } from "./AttestationStation.sol";
import { OptimistConstants } from "./libraries/OptimistConstants.sol";
/**
* @title OptimistAllowlist
* @notice Source of truth for whether an address is able to mint an Optimist NFT.
isAllowedToMint function checks various signals to return boolean value for whether an
address is eligible or not.
*/
contract OptimistAllowlist is Semver {
/**
* @notice Attestation key used by the AllowlistAttestor to manually add addresses to the
* allowlist.
*/
bytes32 public constant OPTIMIST_CAN_MINT_ATTESTATION_KEY = bytes32("optimist.can-mint");
/**
* @notice Attestation key used by Coinbase to issue attestations for Quest participants.
*/
bytes32 public constant COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY =
bytes32("coinbase.quest-eligible");
/**
* @notice Address of the AttestationStation contract.
*/
AttestationStation public immutable ATTESTATION_STATION;
/**
* @notice Attestor that issues 'optimist.can-mint' attestations.
*/
address public immutable ALLOWLIST_ATTESTOR;
/**
* @notice Attestor that issues 'coinbase.quest-eligible' attestations.
*/
address public immutable COINBASE_QUEST_ATTESTOR;
/**
* @notice Address of OptimistInviter contract that issues 'optimist.can-mint-from-invite'
* attestations.
*/
address public immutable OPTIMIST_INVITER;
/**
* @custom:semver 1.0.0
*
* @param _attestationStation Address of the AttestationStation contract.
* @param _allowlistAttestor Address of the allowlist attestor.
* @param _coinbaseQuestAttestor Address of the Coinbase Quest attestor.
* @param _optimistInviter Address of the OptimistInviter contract.
*/
constructor(
AttestationStation _attestationStation,
address _allowlistAttestor,
address _coinbaseQuestAttestor,
address _optimistInviter
) Semver(1, 0, 0) {
ATTESTATION_STATION = _attestationStation;
ALLOWLIST_ATTESTOR = _allowlistAttestor;
COINBASE_QUEST_ATTESTOR = _coinbaseQuestAttestor;
OPTIMIST_INVITER = _optimistInviter;
}
/**
* @notice Checks whether a given address is allowed to mint the Optimist NFT yet. Since the
* Optimist NFT will also be used as part of the Citizens House, mints are currently
* restricted. Eventually anyone will be able to mint.
*
* Currently, address is allowed to mint if it satisfies any of the following:
* 1) Has a valid 'optimist.can-mint' attestation from the allowlist attestor.
* 2) Has a valid 'coinbase.quest-eligible' attestation from Coinbase Quest attestor
* 3) Has a valid 'optimist.can-mint-from-invite' attestation from the OptimistInviter
* contract.
*
* @param _claimer Address to check.
*
* @return Whether or not the address is allowed to mint yet.
*/
function isAllowedToMint(address _claimer) public view returns (bool) {
return
_hasAttestationFromAllowlistAttestor(_claimer) ||
_hasAttestationFromCoinbaseQuestAttestor(_claimer) ||
_hasAttestationFromOptimistInviter(_claimer);
}
/**
* @notice Checks whether an address has a valid 'optimist.can-mint' attestation from the
* allowlist attestor.
*
* @param _claimer Address to check.
*
* @return Whether or not the address has a valid attestation.
*/
function _hasAttestationFromAllowlistAttestor(address _claimer) internal view returns (bool) {
// Expected attestation value is bytes32("true")
return
_hasValidAttestation(ALLOWLIST_ATTESTOR, _claimer, OPTIMIST_CAN_MINT_ATTESTATION_KEY);
}
/**
* @notice Checks whether an address has a valid attestation from the Coinbase attestor.
*
* @param _claimer Address to check.
*
* @return Whether or not the address has a valid attestation.
*/
function _hasAttestationFromCoinbaseQuestAttestor(address _claimer)
internal
view
returns (bool)
{
// Expected attestation value is bytes32("true")
return
_hasValidAttestation(
COINBASE_QUEST_ATTESTOR,
_claimer,
COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY
);
}
/**
* @notice Checks whether an address has a valid attestation from the OptimistInviter contract.
*
* @param _claimer Address to check.
*
* @return Whether or not the address has a valid attestation.
*/
function _hasAttestationFromOptimistInviter(address _claimer) internal view returns (bool) {
// Expected attestation value is the inviter's address
return
_hasValidAttestation(
OPTIMIST_INVITER,
_claimer,
OptimistConstants.OPTIMIST_CAN_MINT_FROM_INVITE_ATTESTATION_KEY
);
}
/**
* @notice Checks whether an address has a valid truthy attestation.
* Any attestation val other than bytes32("") is considered truthy.
*
* @param _creator Address that made the attestation.
* @param _about Address attestation is about.
* @param _key Key of the attestation.
*
* @return Whether or not the address has a valid truthy attestation.
*/
function _hasValidAttestation(
address _creator,
address _about,
bytes32 _key
) internal view returns (bool) {
return ATTESTATION_STATION.attestations(_creator, _about, _key).length > 0;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
/**
* @title OptimistConstants
* @notice Library for storing Optimist related constants that are shared in multiple contracts.
*/
library OptimistConstants {
/**
* @notice Attestation key issued by OptimistInviter allowing the attested account to mint.
*/
bytes32 internal constant OPTIMIST_CAN_MINT_FROM_INVITE_ATTESTATION_KEY =
bytes32("optimist.can-mint-from-invite");
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 10000
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_baseURIAttestor","type":"address"},{"internalType":"contract AttestationStation","name":"_attestationStation","type":"address"},{"internalType":"contract OptimistAllowlist","name":"_optimistAllowlist","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ATTESTATION_STATION","outputs":[{"internalType":"contract AttestationStation","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_URI_ATTESTATION_KEY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_URI_ATTESTOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPTIMIST_ALLOWLIST","outputs":[{"internalType":"contract OptimistAllowlist","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"isOnAllowList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokenIdOfAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6101406040523480156200001257600080fd5b5060405162002c7f38038062002c7f8339810160408190526200003591620003ee565b6002608052600060a081905260c0526001600160a01b0380841660e052828116610100528116610120526200006b858562000076565b5050505050620005f4565b600054610100900460ff1615808015620000975750600054600160ff909116105b80620000c75750620000b430620001b660201b62000dd61760201c565b158015620000c7575060005460ff166001145b620001305760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000154576000805461ff0019166101001790555b620001608383620001c5565b6200016a62000231565b8015620001b1576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6001600160a01b03163b151590565b600054610100900460ff16620002215760405162461bcd60e51b815260206004820152602b602482015260008051602062002c5f83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000127565b6200022d82826200028f565b5050565b600054610100900460ff166200028d5760405162461bcd60e51b815260206004820152602b602482015260008051602062002c5f83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000127565b565b600054610100900460ff16620002eb5760405162461bcd60e51b815260206004820152602b602482015260008051602062002c5f83398151915260448201526a6e697469616c697a696e6760a81b606482015260840162000127565b6065620002f9838262000528565b506066620001b1828262000528565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200033057600080fd5b81516001600160401b03808211156200034d576200034d62000308565b604051601f8301601f19908116603f0116810190828211818310171562000378576200037862000308565b816040528381526020925086838588010111156200039557600080fd5b600091505b83821015620003b957858201830151818301840152908201906200039a565b83821115620003cb5760008385830101525b9695505050505050565b6001600160a01b0381168114620003eb57600080fd5b50565b600080600080600060a086880312156200040757600080fd5b85516001600160401b03808211156200041f57600080fd5b6200042d89838a016200031e565b965060208801519150808211156200044457600080fd5b5062000453888289016200031e565b94505060408601516200046681620003d5565b60608701519093506200047981620003d5565b60808701519092506200048c81620003d5565b809150509295509295909350565b600181811c90821680620004af57607f821691505b602082108103620004d057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001b157600081815260208120601f850160051c81016020861015620004ff5750805b601f850160051c820191505b8181101562000520578281556001016200050b565b505050505050565b81516001600160401b0381111562000544576200054462000308565b6200055c816200055584546200049a565b84620004d6565b602080601f8311600181146200059457600084156200057b5750858301515b600019600386901b1c1916600185901b17855562000520565b600085815260208120601f198616915b82811015620005c557888601518255948401946001909101908401620005a4565b5085821015620005e45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051610100516101205161260662000659600039600081816103930152610c900152600081816103ba0152610b1301526000818161022c0152610abc01526000610928015260006108ff015260006108d601526126066000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80636a627842116100e3578063a22cb4651161008c578063ce5dd1b511610066578063ce5dd1b51461038e578063db083d71146103b5578063e985e9c5146103dc57600080fd5b8063a22cb4651461035a578063b88d4fde14610368578063c87b56dd1461037b57600080fd5b80637c08652f116100bd5780637c08652f146103185780638f328a1f1461033f57806395d89b411461035257600080fd5b80636a627842146102ea5780636c0360eb146102fd57806370a082311461030557600080fd5b806323b872dd116101455780634cd88b761161011f5780634cd88b76146102bc57806354fd4d50146102cf5780636352211e146102d757600080fd5b806323b872dd1461028357806342842e0e1461029657806342966c68146102a957600080fd5b8063095ea7b311610176578063095ea7b31461021257806319f463f21461022757806321d3d5cf1461024e57600080fd5b806301ffc9a71461019d57806306fdde03146101c5578063081812fc146101da575b600080fd5b6101b06101ab366004611d0e565b610425565b60405190151581526020015b60405180910390f35b6101cd61050a565b6040516101bc9190611d83565b6101ed6101e8366004611d96565b61059c565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bc565b610225610220366004611dd8565b6105d0565b005b6101ed7f000000000000000000000000000000000000000000000000000000000000000081565b6102757f6f7074696d6973742e626173652d75726900000000000000000000000000000081565b6040519081526020016101bc565b610225610291366004611e02565b61061d565b6102256102a4366004611e02565b6106aa565b6102256102b7366004611d96565b6106c5565b6102256102ca366004611f24565b61074c565b6101cd6108cf565b6101ed6102e5366004611d96565b610972565b6102256102f8366004611f88565b6109e4565b6101cd610a7f565b610275610313366004611f88565b610b94565b610275610326366004611f88565b73ffffffffffffffffffffffffffffffffffffffff1690565b6101b061034d366004611f88565b610c48565b6101cd610cfd565b610225610220366004611fb1565b610225610376366004611fe8565b610d0c565b6101cd610389366004611d96565b610d9a565b6101ed7f000000000000000000000000000000000000000000000000000000000000000081565b6101ed7f000000000000000000000000000000000000000000000000000000000000000081565b6101b06103ea366004612064565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806104b857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061050457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60606065805461051990612097565b80601f016020809104026020016040519081016040528092919081815260200182805461054590612097565b80156105925780601f1061056757610100808354040283529160200191610592565b820191906000526020600020905b81548152906001019060200180831161057557829003601f168201915b5050505050905090565b60006105a782610df2565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405162461bcd60e51b815260206004820152601a60248201527f4f7074696d6973743a20736f756c20626f756e6420746f6b656e00000000000060448201526064015b60405180910390fd5b610628335b82610e63565b61069a5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610614565b6106a5838383610f23565b505050565b6106a583838360405180602001604052806000815250610d0c565b6106ce33610622565b6107405760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610614565b61074981611161565b50565b600054610100900460ff161580801561076c5750600054600160ff909116105b806107865750303b158015610786575060005460ff166001145b6107f85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610614565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561085657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610860838361123b565b6108686112c2565b80156106a557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60606108fa7f0000000000000000000000000000000000000000000000000000000000000000611341565b6109237f0000000000000000000000000000000000000000000000000000000000000000611341565b61094c7f0000000000000000000000000000000000000000000000000000000000000000611341565b60405160200161095e939291906120ea565b604051602081830303815290604052905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16806105045760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610614565b6109ed81610c48565b610a5f5760405162461bcd60e51b815260206004820152602560248201527f4f7074696d6973743a2061646472657373206973206e6f74206f6e20616c6c6f60448201527f774c6973740000000000000000000000000000000000000000000000000000006064820152608401610614565b6107498173ffffffffffffffffffffffffffffffffffffffff8116611476565b6040517f29b42cb500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301523060248301527f6f7074696d6973742e626173652d75726900000000000000000000000000000060448301526060917f0000000000000000000000000000000000000000000000000000000000000000909116906329b42cb590606401600060405180830381865afa158015610b5c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b849190810190612160565b60405160200161095e91906121d7565b600073ffffffffffffffffffffffffffffffffffffffff8216610c1f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610614565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b6040517f4813d8a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690634813d8a690602401602060405180830381865afa158015610cd9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050491906121f3565b60606066805461051990612097565b610d163383610e63565b610d885760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610614565b610d9484848484611490565b50505050565b6060610da4610a7f565b610daf836014611519565b604051602001610dc0929190612210565b6040516020818303038152906040529050919050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff166107495760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610614565b600080610e6f83610972565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610edd575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b80610f1b57508373ffffffffffffffffffffffffffffffffffffffff16610f038461059c565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16610f4382610972565b73ffffffffffffffffffffffffffffffffffffffff1614610fcc5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610614565b73ffffffffffffffffffffffffffffffffffffffff82166110545760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610614565b61105f838383611749565b61106a6000826117cc565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906110a09084906122c1565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906110db9084906122d8565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061116c82610972565b905061117a81600084611749565b6111856000836117cc565b73ffffffffffffffffffffffffffffffffffffffff811660009081526068602052604081208054600192906111bb9084906122c1565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45b5050565b600054610100900460ff166112b85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610614565b611237828261186c565b600054610100900460ff1661133f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610614565b565b60608160000361138457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113ae5780611398816122f0565b91506113a79050600a83612357565b9150611388565b60008167ffffffffffffffff8111156113c9576113c9611e3e565b6040519080825280601f01601f1916602001820160405280156113f3576020820181803683370190505b5090505b8415610f1b576114086001836122c1565b9150611415600a8661236b565b6114209060306122d8565b60f81b8183815181106114355761143561237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061146f600a86612357565b94506113f7565b611237828260405180602001604052806000815250611902565b61149b848484610f23565b6114a78484848461198b565b610d945760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610614565b606060006115288360026123ae565b6115339060026122d8565b67ffffffffffffffff81111561154b5761154b611e3e565b6040519080825280601f01601f191660200182016040528015611575576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106115ac576115ac61237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061160f5761160f61237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061164b8460026123ae565b6116569060016122d8565b90505b60018111156116f3577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106116975761169761237f565b1a60f81b8282815181106116ad576116ad61237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936116ec816123eb565b9050611659565b5083156117425760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610614565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff83161580611780575073ffffffffffffffffffffffffffffffffffffffff8216155b6106a55760405162461bcd60e51b815260206004820152601a60248201527f4f7074696d6973743a20736f756c20626f756e6420746f6b656e0000000000006044820152606401610614565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416908117909155819061182682610972565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600054610100900460ff166118e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610614565b60656118f5838261246e565b5060666106a5828261246e565b61190c8383611b46565b611919600084848461198b565b6106a55760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610614565b600073ffffffffffffffffffffffffffffffffffffffff84163b15611b3b576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290611a0290339089908890889060040161256a565b6020604051808303816000875af1925050508015611a3d575060408051601f3d908101601f19168201909252611a3a918101906125b3565b60015b611af0573d808015611a6b576040519150601f19603f3d011682016040523d82523d6000602084013e611a70565b606091505b508051600003611ae85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610614565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050610f1b565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff8216611ba95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610614565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615611c1b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610614565b611c2760008383611749565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290611c5d9084906122d8565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461074957600080fd5b600060208284031215611d2057600080fd5b813561174281611ce0565b60005b83811015611d46578181015183820152602001611d2e565b83811115610d945750506000910152565b60008151808452611d6f816020860160208601611d2b565b601f01601f19169290920160200192915050565b6020815260006117426020830184611d57565b600060208284031215611da857600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611dd357600080fd5b919050565b60008060408385031215611deb57600080fd5b611df483611daf565b946020939093013593505050565b600080600060608486031215611e1757600080fd5b611e2084611daf565b9250611e2e60208501611daf565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e9657611e96611e3e565b604052919050565b600067ffffffffffffffff821115611eb857611eb8611e3e565b50601f01601f191660200190565b6000611ed9611ed484611e9e565b611e6d565b9050828152838383011115611eed57600080fd5b828260208301376000602084830101529392505050565b600082601f830112611f1557600080fd5b61174283833560208501611ec6565b60008060408385031215611f3757600080fd5b823567ffffffffffffffff80821115611f4f57600080fd5b611f5b86838701611f04565b93506020850135915080821115611f7157600080fd5b50611f7e85828601611f04565b9150509250929050565b600060208284031215611f9a57600080fd5b61174282611daf565b801515811461074957600080fd5b60008060408385031215611fc457600080fd5b611fcd83611daf565b91506020830135611fdd81611fa3565b809150509250929050565b60008060008060808587031215611ffe57600080fd5b61200785611daf565b935061201560208601611daf565b925060408501359150606085013567ffffffffffffffff81111561203857600080fd5b8501601f8101871361204957600080fd5b61205887823560208401611ec6565b91505092959194509250565b6000806040838503121561207757600080fd5b61208083611daf565b915061208e60208401611daf565b90509250929050565b600181811c908216806120ab57607f821691505b6020821081036120e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600084516120fc818460208901611d2b565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612138816001850160208a01611d2b565b60019201918201528351612153816002840160208801611d2b565b0160020195945050505050565b60006020828403121561217257600080fd5b815167ffffffffffffffff81111561218957600080fd5b8201601f8101841361219a57600080fd5b80516121a8611ed482611e9e565b8181528560208385010111156121bd57600080fd5b6121ce826020830160208601611d2b565b95945050505050565b600082516121e9818460208701611d2b565b9190910192915050565b60006020828403121561220557600080fd5b815161174281611fa3565b60008351612222818460208801611d2b565b7f2f00000000000000000000000000000000000000000000000000000000000000908301908152835161225c816001840160208801611d2b565b7f2e6a736f6e00000000000000000000000000000000000000000000000000000060019290910191820152600601949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156122d3576122d3612292565b500390565b600082198211156122eb576122eb612292565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361232157612321612292565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261236657612366612328565b500490565b60008261237a5761237a612328565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156123e6576123e6612292565b500290565b6000816123fa576123fa612292565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b601f8211156106a557600081815260208120601f850160051c810160208610156124475750805b601f850160051c820191505b8181101561246657828155600101612453565b505050505050565b815167ffffffffffffffff81111561248857612488611e3e565b61249c816124968454612097565b84612420565b602080601f8311600181146124ef57600084156124b95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612466565b600085815260208120601f198616915b8281101561251e578886015182559484019460019091019084016124ff565b508582101561255a57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526125a96080830184611d57565b9695505050505050565b6000602082840312156125c557600080fd5b815161174281611ce056fea264697066735822122068519f9cbd8d80e9e293c6c977994da4f38aba3722422b6bfce53b68916efab964736f6c634300080f0033496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000060c5c9c98bcbd0b0f2fd89b24c16e533baa8cda3000000000000000000000000ee36eaad94d1cc1d0eccadb55c38bffb6be06c77000000000000000000000000482b1945d58f2e9db0cebe13c7fcfc6876b4118000000000000000000000000000000000000000000000000000000000000000084f7074696d69737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084f5054494d495354000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101985760003560e01c80636a627842116100e3578063a22cb4651161008c578063ce5dd1b511610066578063ce5dd1b51461038e578063db083d71146103b5578063e985e9c5146103dc57600080fd5b8063a22cb4651461035a578063b88d4fde14610368578063c87b56dd1461037b57600080fd5b80637c08652f116100bd5780637c08652f146103185780638f328a1f1461033f57806395d89b411461035257600080fd5b80636a627842146102ea5780636c0360eb146102fd57806370a082311461030557600080fd5b806323b872dd116101455780634cd88b761161011f5780634cd88b76146102bc57806354fd4d50146102cf5780636352211e146102d757600080fd5b806323b872dd1461028357806342842e0e1461029657806342966c68146102a957600080fd5b8063095ea7b311610176578063095ea7b31461021257806319f463f21461022757806321d3d5cf1461024e57600080fd5b806301ffc9a71461019d57806306fdde03146101c5578063081812fc146101da575b600080fd5b6101b06101ab366004611d0e565b610425565b60405190151581526020015b60405180910390f35b6101cd61050a565b6040516101bc9190611d83565b6101ed6101e8366004611d96565b61059c565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bc565b610225610220366004611dd8565b6105d0565b005b6101ed7f00000000000000000000000060c5c9c98bcbd0b0f2fd89b24c16e533baa8cda381565b6102757f6f7074696d6973742e626173652d75726900000000000000000000000000000081565b6040519081526020016101bc565b610225610291366004611e02565b61061d565b6102256102a4366004611e02565b6106aa565b6102256102b7366004611d96565b6106c5565b6102256102ca366004611f24565b61074c565b6101cd6108cf565b6101ed6102e5366004611d96565b610972565b6102256102f8366004611f88565b6109e4565b6101cd610a7f565b610275610313366004611f88565b610b94565b610275610326366004611f88565b73ffffffffffffffffffffffffffffffffffffffff1690565b6101b061034d366004611f88565b610c48565b6101cd610cfd565b610225610220366004611fb1565b610225610376366004611fe8565b610d0c565b6101cd610389366004611d96565b610d9a565b6101ed7f000000000000000000000000482b1945d58f2e9db0cebe13c7fcfc6876b4118081565b6101ed7f000000000000000000000000ee36eaad94d1cc1d0eccadb55c38bffb6be06c7781565b6101b06103ea366004612064565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806104b857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061050457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60606065805461051990612097565b80601f016020809104026020016040519081016040528092919081815260200182805461054590612097565b80156105925780601f1061056757610100808354040283529160200191610592565b820191906000526020600020905b81548152906001019060200180831161057557829003601f168201915b5050505050905090565b60006105a782610df2565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60405162461bcd60e51b815260206004820152601a60248201527f4f7074696d6973743a20736f756c20626f756e6420746f6b656e00000000000060448201526064015b60405180910390fd5b610628335b82610e63565b61069a5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610614565b6106a5838383610f23565b505050565b6106a583838360405180602001604052806000815250610d0c565b6106ce33610622565b6107405760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610614565b61074981611161565b50565b600054610100900460ff161580801561076c5750600054600160ff909116105b806107865750303b158015610786575060005460ff166001145b6107f85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610614565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561085657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610860838361123b565b6108686112c2565b80156106a557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60606108fa7f0000000000000000000000000000000000000000000000000000000000000002611341565b6109237f0000000000000000000000000000000000000000000000000000000000000000611341565b61094c7f0000000000000000000000000000000000000000000000000000000000000000611341565b60405160200161095e939291906120ea565b604051602081830303815290604052905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16806105045760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610614565b6109ed81610c48565b610a5f5760405162461bcd60e51b815260206004820152602560248201527f4f7074696d6973743a2061646472657373206973206e6f74206f6e20616c6c6f60448201527f774c6973740000000000000000000000000000000000000000000000000000006064820152608401610614565b6107498173ffffffffffffffffffffffffffffffffffffffff8116611476565b6040517f29b42cb500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000060c5c9c98bcbd0b0f2fd89b24c16e533baa8cda3811660048301523060248301527f6f7074696d6973742e626173652d75726900000000000000000000000000000060448301526060917f000000000000000000000000ee36eaad94d1cc1d0eccadb55c38bffb6be06c77909116906329b42cb590606401600060405180830381865afa158015610b5c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b849190810190612160565b60405160200161095e91906121d7565b600073ffffffffffffffffffffffffffffffffffffffff8216610c1f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610614565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b6040517f4813d8a600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301526000917f000000000000000000000000482b1945d58f2e9db0cebe13c7fcfc6876b4118090911690634813d8a690602401602060405180830381865afa158015610cd9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050491906121f3565b60606066805461051990612097565b610d163383610e63565b610d885760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610614565b610d9484848484611490565b50505050565b6060610da4610a7f565b610daf836014611519565b604051602001610dc0929190612210565b6040516020818303038152906040529050919050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff166107495760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610614565b600080610e6f83610972565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610edd575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b80610f1b57508373ffffffffffffffffffffffffffffffffffffffff16610f038461059c565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16610f4382610972565b73ffffffffffffffffffffffffffffffffffffffff1614610fcc5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610614565b73ffffffffffffffffffffffffffffffffffffffff82166110545760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610614565b61105f838383611749565b61106a6000826117cc565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906110a09084906122c1565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906110db9084906122d8565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061116c82610972565b905061117a81600084611749565b6111856000836117cc565b73ffffffffffffffffffffffffffffffffffffffff811660009081526068602052604081208054600192906111bb9084906122c1565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45b5050565b600054610100900460ff166112b85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610614565b611237828261186c565b600054610100900460ff1661133f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610614565b565b60608160000361138457505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156113ae5780611398816122f0565b91506113a79050600a83612357565b9150611388565b60008167ffffffffffffffff8111156113c9576113c9611e3e565b6040519080825280601f01601f1916602001820160405280156113f3576020820181803683370190505b5090505b8415610f1b576114086001836122c1565b9150611415600a8661236b565b6114209060306122d8565b60f81b8183815181106114355761143561237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061146f600a86612357565b94506113f7565b611237828260405180602001604052806000815250611902565b61149b848484610f23565b6114a78484848461198b565b610d945760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610614565b606060006115288360026123ae565b6115339060026122d8565b67ffffffffffffffff81111561154b5761154b611e3e565b6040519080825280601f01601f191660200182016040528015611575576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106115ac576115ac61237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061160f5761160f61237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061164b8460026123ae565b6116569060016122d8565b90505b60018111156116f3577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106116975761169761237f565b1a60f81b8282815181106116ad576116ad61237f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936116ec816123eb565b9050611659565b5083156117425760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610614565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff83161580611780575073ffffffffffffffffffffffffffffffffffffffff8216155b6106a55760405162461bcd60e51b815260206004820152601a60248201527f4f7074696d6973743a20736f756c20626f756e6420746f6b656e0000000000006044820152606401610614565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416908117909155819061182682610972565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600054610100900460ff166118e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610614565b60656118f5838261246e565b5060666106a5828261246e565b61190c8383611b46565b611919600084848461198b565b6106a55760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610614565b600073ffffffffffffffffffffffffffffffffffffffff84163b15611b3b576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290611a0290339089908890889060040161256a565b6020604051808303816000875af1925050508015611a3d575060408051601f3d908101601f19168201909252611a3a918101906125b3565b60015b611af0573d808015611a6b576040519150601f19603f3d011682016040523d82523d6000602084013e611a70565b606091505b508051600003611ae85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610614565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050610f1b565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff8216611ba95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610614565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615611c1b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610614565b611c2760008383611749565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290611c5d9084906122d8565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461074957600080fd5b600060208284031215611d2057600080fd5b813561174281611ce0565b60005b83811015611d46578181015183820152602001611d2e565b83811115610d945750506000910152565b60008151808452611d6f816020860160208601611d2b565b601f01601f19169290920160200192915050565b6020815260006117426020830184611d57565b600060208284031215611da857600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611dd357600080fd5b919050565b60008060408385031215611deb57600080fd5b611df483611daf565b946020939093013593505050565b600080600060608486031215611e1757600080fd5b611e2084611daf565b9250611e2e60208501611daf565b9150604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e9657611e96611e3e565b604052919050565b600067ffffffffffffffff821115611eb857611eb8611e3e565b50601f01601f191660200190565b6000611ed9611ed484611e9e565b611e6d565b9050828152838383011115611eed57600080fd5b828260208301376000602084830101529392505050565b600082601f830112611f1557600080fd5b61174283833560208501611ec6565b60008060408385031215611f3757600080fd5b823567ffffffffffffffff80821115611f4f57600080fd5b611f5b86838701611f04565b93506020850135915080821115611f7157600080fd5b50611f7e85828601611f04565b9150509250929050565b600060208284031215611f9a57600080fd5b61174282611daf565b801515811461074957600080fd5b60008060408385031215611fc457600080fd5b611fcd83611daf565b91506020830135611fdd81611fa3565b809150509250929050565b60008060008060808587031215611ffe57600080fd5b61200785611daf565b935061201560208601611daf565b925060408501359150606085013567ffffffffffffffff81111561203857600080fd5b8501601f8101871361204957600080fd5b61205887823560208401611ec6565b91505092959194509250565b6000806040838503121561207757600080fd5b61208083611daf565b915061208e60208401611daf565b90509250929050565b600181811c908216806120ab57607f821691505b6020821081036120e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600084516120fc818460208901611d2b565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551612138816001850160208a01611d2b565b60019201918201528351612153816002840160208801611d2b565b0160020195945050505050565b60006020828403121561217257600080fd5b815167ffffffffffffffff81111561218957600080fd5b8201601f8101841361219a57600080fd5b80516121a8611ed482611e9e565b8181528560208385010111156121bd57600080fd5b6121ce826020830160208601611d2b565b95945050505050565b600082516121e9818460208701611d2b565b9190910192915050565b60006020828403121561220557600080fd5b815161174281611fa3565b60008351612222818460208801611d2b565b7f2f00000000000000000000000000000000000000000000000000000000000000908301908152835161225c816001840160208801611d2b565b7f2e6a736f6e00000000000000000000000000000000000000000000000000000060019290910191820152600601949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156122d3576122d3612292565b500390565b600082198211156122eb576122eb612292565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361232157612321612292565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261236657612366612328565b500490565b60008261237a5761237a612328565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156123e6576123e6612292565b500290565b6000816123fa576123fa612292565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b601f8211156106a557600081815260208120601f850160051c810160208610156124475750805b601f850160051c820191505b8181101561246657828155600101612453565b505050505050565b815167ffffffffffffffff81111561248857612488611e3e565b61249c816124968454612097565b84612420565b602080601f8311600181146124ef57600084156124b95750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612466565b600085815260208120601f198616915b8281101561251e578886015182559484019460019091019084016124ff565b508582101561255a57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526125a96080830184611d57565b9695505050505050565b6000602082840312156125c557600080fd5b815161174281611ce056fea264697066735822122068519f9cbd8d80e9e293c6c977994da4f38aba3722422b6bfce53b68916efab964736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000060c5c9c98bcbd0b0f2fd89b24c16e533baa8cda3000000000000000000000000ee36eaad94d1cc1d0eccadb55c38bffb6be06c77000000000000000000000000482b1945d58f2e9db0cebe13c7fcfc6876b4118000000000000000000000000000000000000000000000000000000000000000084f7074696d69737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084f5054494d495354000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Optimist
Arg [1] : _symbol (string): OPTIMIST
Arg [2] : _baseURIAttestor (address): 0x60c5C9c98bcBd0b0F2fD89B24c16e533BaA8CdA3
Arg [3] : _attestationStation (address): 0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77
Arg [4] : _optimistAllowlist (address): 0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000060c5c9c98bcbd0b0f2fd89b24c16e533baa8cda3
Arg [3] : 000000000000000000000000ee36eaad94d1cc1d0eccadb55c38bffb6be06c77
Arg [4] : 000000000000000000000000482b1945d58f2e9db0cebe13c7fcfc6876b41180
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [6] : 4f7074696d697374000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [8] : 4f5054494d495354000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.