Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 25 from a total of 85 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Collectio... | 19218093 | 283 days ago | IN | 0 ETH | 0.00683582 | ||||
Create Collectio... | 19177858 | 289 days ago | IN | 0 ETH | 0.0356846 | ||||
Create Collectio... | 19105933 | 299 days ago | IN | 0 ETH | 0.00671128 | ||||
Create Collectio... | 19098505 | 300 days ago | IN | 0 ETH | 0.00871946 | ||||
Create Collectio... | 19080487 | 302 days ago | IN | 0 ETH | 0.00532553 | ||||
Create Collectio... | 19027323 | 310 days ago | IN | 0 ETH | 0.01152029 | ||||
Create Collectio... | 19020289 | 311 days ago | IN | 0 ETH | 0.01648733 | ||||
Create Collectio... | 18990395 | 315 days ago | IN | 0 ETH | 0.00837174 | ||||
Create Collectio... | 18969477 | 318 days ago | IN | 0 ETH | 0.00700834 | ||||
Create Collectio... | 18965002 | 319 days ago | IN | 0 ETH | 0.00886985 | ||||
Create Collectio... | 18948250 | 321 days ago | IN | 0 ETH | 0.00550194 | ||||
Create Collectio... | 18908120 | 327 days ago | IN | 0 ETH | 0.00514481 | ||||
Create Collectio... | 18771755 | 346 days ago | IN | 0 ETH | 0.01922509 | ||||
Create Collectio... | 18766538 | 346 days ago | IN | 0 ETH | 0.01763461 | ||||
Create Collectio... | 18756368 | 348 days ago | IN | 0 ETH | 0.00952963 | ||||
Create Collectio... | 18739414 | 350 days ago | IN | 0 ETH | 0.01302129 | ||||
Create Collectio... | 18722760 | 353 days ago | IN | 0 ETH | 0.02410311 | ||||
Create Collectio... | 18721982 | 353 days ago | IN | 0 ETH | 0.02697643 | ||||
Create Collectio... | 18697694 | 356 days ago | IN | 0 ETH | 0.02294948 | ||||
Create Collectio... | 18691264 | 357 days ago | IN | 0 ETH | 0.0130389 | ||||
Create Collectio... | 18690539 | 357 days ago | IN | 0 ETH | 0.0112899 | ||||
Create Collectio... | 18690532 | 357 days ago | IN | 0 ETH | 0.01211732 | ||||
Create Collectio... | 18685237 | 358 days ago | IN | 0 ETH | 0.0178648 | ||||
Create Collectio... | 18680181 | 359 days ago | IN | 0 ETH | 0.01946251 | ||||
Create Collectio... | 18680157 | 359 days ago | IN | 0 ETH | 0.02235494 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
LondonTokenFactory
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "./Clones.sol"; import "./LondonTokenBase.sol"; contract LondonTokenFactory { event NewCollection(address); address immutable tokenImplementation; constructor() { tokenImplementation = address(new LondonTokenBase()); } function createCollection( string memory uri_, address minter_, address gatewayManager_, string memory contractName_, uint256 royaltyValue_, address owner_ ) external { address clone = Clones.clone(tokenImplementation); LondonTokenBase(clone).initialize(uri_, minter_, gatewayManager_, contractName_, royaltyValue_, owner_); emit NewCollection(clone); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @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 (last updated v4.9.0) (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create(0, 0x09, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create2(0, 0x09, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(add(ptr, 0x38), deployer) mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) mstore(add(ptr, 0x14), implementation) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) mstore(add(ptr, 0x58), salt) mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) predicted := keccak256(add(ptr, 0x43), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt ) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} function initDefaultOperatorFilterer() public { initOperatorFilterer(DEFAULT_SUBSCRIPTION, true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.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 ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "./ERC165.sol"; import "./IERC2981Royalties.sol"; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 abstract contract ERC2981Base is ERC165, IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC2981Royalties).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "./ERC165.sol"; import "./ERC2981Base.sol"; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 abstract contract ERC2981PerTokenRoyalties is ERC2981Base { RoyaltyInfo _royalties; /// @dev Sets token royalties /// @param recipient recipient of the royalties /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0) function _setTokenRoyalty(address recipient, uint256 value) internal { require(value <= 10000, "ERC2981Royalties: Too high"); _royalties = RoyaltyInfo(recipient, uint24(value)); } /// @inheritdoc IERC2981Royalties function royaltyInfo( uint256 /* tokenId */, uint256 value ) external view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) pragma solidity 0.8.13; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./IERC721Metadata.sol"; import "./Address.sol"; import "./Context.sol"; import "./Strings.sol"; import "./ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string public _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) public _owners; // Mapping owner address to token count mapping(address => uint256) public _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; // Used as the URI for all token types by relying on ID substitution, e.g. string public _baseUri; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor( string memory name_, string memory symbol_, string memory uri_ ) { _name = name_; _symbol = symbol_; _baseUri = uri_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).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 = _ownerOf(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.concat(baseURI, "/", Strings.toString(tokenId)) : ""; } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism */ function _setURI(string memory newuri_) internal virtual { _baseUri = newuri_; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or 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 or 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 or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(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 = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @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, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @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( ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner" ); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require( ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner" ); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.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 IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, data ) returns (bytes4 retval) { return retval == IERC721Receiver.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. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 /* firstTokenId */, uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// 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 IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[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 pragma solidity 0.8.13; /// @title IERC2981Royalties /// @dev Interface for the ERC2981 - Token Royalty standard interface IERC2981Royalties { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _value - the sale price of the NFT asset specified by _tokenId /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for value sale price function royaltyInfo( uint256 _tokenId, uint256 _value ) external view returns (address _receiver, uint256 _royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the 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 v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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.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 IERC721Receiver { /** * @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 pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "./Ownable.sol"; import "./ERC721.sol"; import "./ERC2981PerTokenRoyalties.sol"; import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol"; /// @custom:security-contact [email protected] contract LondonTokenBase is ERC721, Ownable, ERC2981PerTokenRoyalties, DefaultOperatorFilterer { constructor() ERC721("", "VERSE", "") {} function initialize( string memory uri_, address minter_, address gatewayManager_, string memory contractName_, uint256 royaltyValue_, address owner_ ) public { require(bytes(_name).length == 0, "Already initialized"); _name = contractName_; _baseUri = uri_; mintingManager = minter_; gatewayManager = gatewayManager_; _setTokenRoyalty(owner_, royaltyValue_); creator = owner_; _transferOwnership(owner_); initDefaultOperatorFilterer(); } uint256 public totalSupply; address public creator; /** * @dev OS Operator filtering */ function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } /** * @dev OS Operator filtering */ function approve( address operator, uint256 tokenId ) public override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } /** * @dev OS Operator filtering */ function transferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } /** * @dev OS Operator filtering */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } /** * @dev OS Operator filtering */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } address public mintingManager; address public gatewayManager; /** * @dev Creates a token with `id`, and assigns them to `to`. * In addition it sets the royalties for `royaltyRecipient` of the value `royaltyValue`. * Method emits two transfer events. * * Emits a {Transfer} event. * * Requirements: * * - `to` cannot be the zero address. */ function mintWithCreator(address to, uint256 tokenId) public onlyMinter { require(to != address(0), "mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _balances[to] += 1; totalSupply += 1; _owners[tokenId] = to; emit Transfer(address(0), creator, tokenId); emit Transfer(creator, to, tokenId); } /** * @dev Creates a token with `id`, and assigns them to `to`. * Method emits two transfer events. * * Emits a {Transfer} events for intermediate artist. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function batchMintWithCreator( address[] memory to, uint256[] memory tokenIds ) public onlyMinter { require(tokenIds.length == to.length, "Arrays length mismatch"); for (uint256 i = 0; i < tokenIds.length; i++) { mintWithCreator(to[i], tokenIds[i]); } } modifier onlyMinter() { require(msg.sender == mintingManager, "Permission denied"); _; } modifier onlyGatewayManager() { require(msg.sender == gatewayManager, "Permission denied"); _; } function tokenURI( uint256 tokenId ) public view override(ERC721) returns (string memory) { return super.tokenURI(tokenId); } /** * @dev Checks for supported interface. * */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721, ERC2981Base) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev Sets royalties for `tokenId` and `tokenRecipient` with royalty value `royaltyValue`. * */ function setRoyalties( address royaltyRecipient, uint256 royaltyValue ) public onlyOwner { _setTokenRoyalty(royaltyRecipient, royaltyValue); } /** * @dev Sets new minter for the contract. * */ function setMintingManager(address minter_) public onlyOwner { mintingManager = minter_; } /** * @dev Sets new gateway manager for the contract. * */ function setGatewayManager(address gatewayManager_) public onlyOwner { gatewayManager = gatewayManager_; } /** * @dev Sets base URI for metadata. * */ function setURI(string memory newuri) public onlyGatewayManager { _setURI(newuri); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { initOperatorFilterer(subscriptionOrRegistrantToCopy, subscribe); } function initOperatorFilterer(address subscriptionOrRegistrantToCopy, bool subscribe) public { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./Math.sol"; import "./SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _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) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"NewCollection","type":"event"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"},{"internalType":"address","name":"minter_","type":"address"},{"internalType":"address","name":"gatewayManager_","type":"address"},{"internalType":"string","name":"contractName_","type":"string"},{"internalType":"uint256","name":"royaltyValue_","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"}],"name":"createCollection","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161001d9061004b565b604051809103906000f080158015610039573d6000803e3d6000fd5b506001600160a01b0316608052610058565b6126278061046683390190565b6080516103f46100726000396000604c01526103f46000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806366f8f34714610030575b600080fd5b61004361003e366004610279565b610045565b005b60006100707f0000000000000000000000000000000000000000000000000000000000000000610121565b604051630de37ee960e21b81529091506001600160a01b0382169063378dfba4906100a9908a908a908a908a908a908a90600401610364565b600060405180830381600087803b1580156100c357600080fd5b505af11580156100d7573d6000803e3d6000fd5b50506040516001600160a01b03841681527f703fdf4fec8b6ba710f9f4fa396f0ea0045ee5f6bf7be6e4d49f4f5ea0d927469250602001905060405180910390a150505050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166101ba5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b604482015260640160405180910390fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126101e657600080fd5b813567ffffffffffffffff80821115610201576102016101bf565b604051601f8301601f19908116603f01168101908282118183101715610229576102296101bf565b8160405283815286602085880101111561024257600080fd5b836020870160208301376000602085830101528094505050505092915050565b80356001600160a01b03811681146101ba57600080fd5b60008060008060008060c0878903121561029257600080fd5b863567ffffffffffffffff808211156102aa57600080fd5b6102b68a838b016101d5565b97506102c460208a01610262565b96506102d260408a01610262565b955060608901359150808211156102e857600080fd5b506102f589828a016101d5565b9350506080870135915061030b60a08801610262565b90509295509295509295565b6000815180845260005b8181101561033d57602081850181015186830182015201610321565b8181111561034f576000602083870101525b50601f01601f19169290920160200192915050565b60c08152600061037760c0830189610317565b6001600160a01b038881166020850152878116604085015283820360608501526103a18288610317565b925085608085015280851660a0850152505097965050505050505056fea264697066735822122015db85478112a9c77db0f74af8bbdfbc75ed1079d8b86578d34fc5fe86dba3ae64736f6c634300080d003360806040523480156200001157600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060200160405280600081525060405180604001604052806005815260200164564552534560d81b8152506040518060200160405280600081525082600090805190602001906200007f92919062000260565b5081516200009590600190602085019062000260565b508051620000ab90600690602084019062000260565b50505050620000c9620000c3620000dd60201b60201c565b620000e1565b620000d5828262000133565b505062000342565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6daaeb6d7670e522a718067333cd4e3b156200025c578015620001c457604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620001a757600080fd5b505af1158015620001bc573d6000803e3d6000fd5b505050505050565b6001600160a01b03821615620002155760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200018c565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001a757600080fd5b5050565b8280546200026e9062000306565b90600052602060002090601f016020900481019282620002925760008555620002dd565b82601f10620002ad57805160ff1916838001178555620002dd565b82800160010185558215620002dd579182015b82811115620002dd578251825591602001919060010190620002c0565b50620002eb929150620002ef565b5090565b5b80821115620002eb5760008155600101620002f0565b600181811c908216806200031b57607f821691505b6020821081036200033c57634e487b7160e01b600052602260045260246000fd5b50919050565b6122d580620003526000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80636ebcf60711610125578063b50e4664116100ad578063c87b56dd1161007c578063c87b56dd1461049b578063d0414c9d146104ae578063d28d8852146104c1578063e985e9c5146104c9578063f2fde38b1461050557600080fd5b8063b50e46641461044f578063b88d4fde14610462578063c0928eae14610475578063c30000341461048857600080fd5b80638c7ea24b116100f45780638c7ea24b146103e75780638da5cb5b146103fa57806395d89b411461040b578063992924a614610413578063a22cb4651461043c57600080fd5b80636ebcf607146103a457806370a08231146103c4578063715018a6146103d757806386b8a100146103df57600080fd5b80632a55205a116101a857806341f434341161017757806341f434341461034357806342842e0e14610358578063588844321461036b5780636352211e1461037e5780636c52c3fb1461039157600080fd5b80632a55205a146102e3578063378dfba4146103155780633a330022146103285780633e63eb2a1461033b57600080fd5b8063081812fc116101e4578063081812fc14610293578063095ea7b3146102a657806318160ddd146102b957806323b872dd146102d057600080fd5b806301ffc9a71461021657806302d05d3f1461023e57806302fe53051461026957806306fdde031461027e575b600080fd5b610229610224366004611ac3565b610518565b60405190151581526020015b60405180910390f35b600a54610251906001600160a01b031681565b6040516001600160a01b039091168152602001610235565b61027c610277366004611b9f565b610529565b005b610286610568565b6040516102359190611c2c565b6102516102a1366004611c3f565b6105fa565b61027c6102b4366004611c74565b610621565b6102c260095481565b604051908152602001610235565b61027c6102de366004611c9e565b61063a565b6102f66102f1366004611cda565b610665565b604080516001600160a01b039093168352602083019190915201610235565b61027c610323366004611cfc565b6106ba565b61027c610336366004611d9a565b6107a2565b6102866107cc565b6102516daaeb6d7670e522a718067333cd4e81565b61027c610366366004611c9e565b61085a565b600b54610251906001600160a01b031681565b61025161038c366004611c3f565b61087f565b61027c61039f366004611d9a565b6108df565b6102c26103b2366004611d9a565b60036020526000908152604090205481565b6102c26103d2366004611d9a565b610909565b61027c61098f565b61027c6109a3565b61027c6103f5366004611c74565b6109c2565b6007546001600160a01b0316610251565b6102866109d8565b610251610421366004611c3f565b6002602052600090815260409020546001600160a01b031681565b61027c61044a366004611dc3565b6109e7565b61027c61045d366004611e89565b6109fb565b61027c610470366004611f3f565b610ac9565b61027c610483366004611c74565b610af6565b61027c610496366004611dc3565b610cc3565b6102866104a9366004611c3f565b610dc8565b600c54610251906001600160a01b031681565b610286610dd3565b6102296104d7366004611fbb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61027c610513366004611d9a565b610de0565b600061052382610e56565b92915050565b600c546001600160a01b0316331461055c5760405162461bcd60e51b815260040161055390611fee565b60405180910390fd5b61056581610e7b565b50565b60606000805461057790612019565b80601f01602080910402602001604051908101604052809291908181526020018280546105a390612019565b80156105f05780601f106105c5576101008083540402835291602001916105f0565b820191906000526020600020905b8154815290600101906020018083116105d357829003601f168201915b5050505050905090565b600061060582610e8e565b506000908152600460205260409020546001600160a01b031690565b8161062b81610eed565b6106358383610fa6565b505050565b826001600160a01b03811633146106545761065433610eed565b61065f8484846110b6565b50505050565b604080518082019091526008546001600160a01b038116808352600160a01b90910462ffffff16602083018190529091600091612710906106a69086612069565b6106b09190612088565b9150509250929050565b600080546106c790612019565b15905061070c5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610553565b825161071f906000906020860190611a14565b508551610733906006906020890190611a14565b50600b80546001600160a01b038088166001600160a01b031992831617909255600c80549287169290911691909117905561076e81836110e7565b600a80546001600160a01b0319166001600160a01b03831617905561079281611183565b61079a6109a3565b505050505050565b6107aa6111d5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600680546107d990612019565b80601f016020809104026020016040519081016040528092919081815260200182805461080590612019565b80156108525780601f1061082757610100808354040283529160200191610852565b820191906000526020600020905b81548152906001019060200180831161083557829003601f168201915b505050505081565b826001600160a01b03811633146108745761087433610eed565b61065f84848461122f565b6000818152600260205260408120546001600160a01b0316806105235760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610553565b6108e76111d5565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166109735760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610553565b506001600160a01b031660009081526003602052604090205490565b6109976111d5565b6109a16000611183565b565b6109a1733cc6cdda760b79bafa08df41ecfa224f810dceb66001610cc3565b6109ca6111d5565b6109d482826110e7565b5050565b60606001805461057790612019565b816109f181610eed565b610635838361124a565b600b546001600160a01b03163314610a255760405162461bcd60e51b815260040161055390611fee565b8151815114610a6f5760405162461bcd60e51b8152602060048201526016602482015275082e4e4c2f2e640d8cadccee8d040dad2e6dac2e8c6d60531b6044820152606401610553565b60005b815181101561063557610ab7838281518110610a9057610a906120aa565b6020026020010151838381518110610aaa57610aaa6120aa565b6020026020010151610af6565b80610ac1816120c0565b915050610a72565b836001600160a01b0381163314610ae357610ae333610eed565b610aef85858585611255565b5050505050565b600b546001600160a01b03163314610b205760405162461bcd60e51b815260040161055390611fee565b6001600160a01b038216610b765760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f206164647265737300000000000000006044820152606401610553565b6000818152600260205260409020546001600160a01b031615610bdb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610553565b6001600160a01b0382166000908152600360205260408120805460019290610c049084906120d9565b92505081905550600160096000828254610c1e91906120d9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691909117909155600a54915184939290911691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4600a5460405182916001600160a01b03808616929116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90600090a45050565b6daaeb6d7670e522a718067333cd4e3b156109d4578015610d4857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015610d3457600080fd5b505af115801561079a573d6000803e3d6000fd5b6001600160a01b03821615610d975760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401610d1a565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401610d1a565b606061052382611287565b600080546107d990612019565b610de86111d5565b6001600160a01b038116610e4d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610553565b61056581611183565b60006001600160e01b0319821663152a902d60e11b1480610523575061052382611371565b80516109d4906006906020840190611a14565b6000818152600260205260409020546001600160a01b03166105655760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610553565b6daaeb6d7670e522a718067333cd4e3b1561056557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7e91906120f1565b61056557604051633b79c77360e21b81526001600160a01b0382166004820152602401610553565b6000610fb18261087f565b9050806001600160a01b0316836001600160a01b03160361101e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610553565b336001600160a01b038216148061103a575061103a81336104d7565b6110ac5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610553565b61063583836113c1565b6110c0338261142f565b6110dc5760405162461bcd60e51b81526004016105539061210e565b6106358383836114ae565b6127108111156111395760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610553565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260088054600160a01b9093026001600160b81b0319909316909117919091179055565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6007546001600160a01b031633146109a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610553565b61063583838360405180602001604052806000815250610ac9565b6109d433838361161f565b61125f338361142f565b61127b5760405162461bcd60e51b81526004016105539061210e565b61065f848484846116ed565b606061129282610e8e565b6000600680546112a190612019565b80601f01602080910402602001604051908101604052809291908181526020018280546112cd90612019565b801561131a5780601f106112ef5761010080835404028352916020019161131a565b820191906000526020600020905b8154815290600101906020018083116112fd57829003601f168201915b50505050509050600081511161133f576040518060200160405280600081525061136a565b8061134984611720565b60405160200161135a92919061215b565b6040516020818303038152906040525b9392505050565b60006001600160e01b031982166380ac58cd60e01b14806113a257506001600160e01b03198216635b5e139f60e01b145b8061052357506301ffc9a760e01b6001600160e01b0319831614610523565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906113f68261087f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061143b8361087f565b9050806001600160a01b0316846001600160a01b0316148061148257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806114a65750836001600160a01b031661149b846105fa565b6001600160a01b0316145b949350505050565b826001600160a01b03166114c18261087f565b6001600160a01b0316146114e75760405162461bcd60e51b815260040161055390612197565b6001600160a01b0382166115495760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610553565b61155683838360016117b3565b826001600160a01b03166115698261087f565b6001600160a01b03161461158f5760405162461bcd60e51b815260040161055390612197565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b0316036116805760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610553565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6116f88484846114ae565b6117048484848461183b565b61065f5760405162461bcd60e51b8152600401610553906121dc565b6060600061172d8361193c565b600101905060008167ffffffffffffffff81111561174d5761174d611ae0565b6040519080825280601f01601f191660200182016040528015611777576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461178157509392505050565b600181111561065f576001600160a01b038416156117f9576001600160a01b038416600090815260036020526040812080548392906117f390849061222e565b90915550505b6001600160a01b0383161561065f576001600160a01b038316600090815260036020526040812080548392906118309084906120d9565b909155505050505050565b60006001600160a01b0384163b1561193157604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061187f903390899088908890600401612245565b6020604051808303816000875af19250505080156118ba575060408051601f3d908101601f191682019092526118b791810190612282565b60015b611917573d8080156118e8576040519150601f19603f3d011682016040523d82523d6000602084013e6118ed565b606091505b50805160000361190f5760405162461bcd60e51b8152600401610553906121dc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506114a6565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061197b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106119a7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106119c557662386f26fc10000830492506010015b6305f5e10083106119dd576305f5e100830492506008015b61271083106119f157612710830492506004015b60648310611a03576064830492506002015b600a83106105235760010192915050565b828054611a2090612019565b90600052602060002090601f016020900481019282611a425760008555611a88565b82601f10611a5b57805160ff1916838001178555611a88565b82800160010185558215611a88579182015b82811115611a88578251825591602001919060010190611a6d565b50611a94929150611a98565b5090565b5b80821115611a945760008155600101611a99565b6001600160e01b03198116811461056557600080fd5b600060208284031215611ad557600080fd5b813561136a81611aad565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b1f57611b1f611ae0565b604052919050565b600067ffffffffffffffff831115611b4157611b41611ae0565b611b54601f8401601f1916602001611af6565b9050828152838383011115611b6857600080fd5b828260208301376000602084830101529392505050565b600082601f830112611b9057600080fd5b61136a83833560208501611b27565b600060208284031215611bb157600080fd5b813567ffffffffffffffff811115611bc857600080fd5b6114a684828501611b7f565b60005b83811015611bef578181015183820152602001611bd7565b8381111561065f5750506000910152565b60008151808452611c18816020860160208601611bd4565b601f01601f19169290920160200192915050565b60208152600061136a6020830184611c00565b600060208284031215611c5157600080fd5b5035919050565b80356001600160a01b0381168114611c6f57600080fd5b919050565b60008060408385031215611c8757600080fd5b611c9083611c58565b946020939093013593505050565b600080600060608486031215611cb357600080fd5b611cbc84611c58565b9250611cca60208501611c58565b9150604084013590509250925092565b60008060408385031215611ced57600080fd5b50508035926020909101359150565b60008060008060008060c08789031215611d1557600080fd5b863567ffffffffffffffff80821115611d2d57600080fd5b611d398a838b01611b7f565b9750611d4760208a01611c58565b9650611d5560408a01611c58565b95506060890135915080821115611d6b57600080fd5b50611d7889828a01611b7f565b93505060808701359150611d8e60a08801611c58565b90509295509295509295565b600060208284031215611dac57600080fd5b61136a82611c58565b801515811461056557600080fd5b60008060408385031215611dd657600080fd5b611ddf83611c58565b91506020830135611def81611db5565b809150509250929050565b600067ffffffffffffffff821115611e1457611e14611ae0565b5060051b60200190565b600082601f830112611e2f57600080fd5b81356020611e44611e3f83611dfa565b611af6565b82815260059290921b84018101918181019086841115611e6357600080fd5b8286015b84811015611e7e5780358352918301918301611e67565b509695505050505050565b60008060408385031215611e9c57600080fd5b823567ffffffffffffffff80821115611eb457600080fd5b818501915085601f830112611ec857600080fd5b81356020611ed8611e3f83611dfa565b82815260059290921b84018101918181019089841115611ef757600080fd5b948201945b83861015611f1c57611f0d86611c58565b82529482019490820190611efc565b96505086013592505080821115611f3257600080fd5b506106b085828601611e1e565b60008060008060808587031215611f5557600080fd5b611f5e85611c58565b9350611f6c60208601611c58565b925060408501359150606085013567ffffffffffffffff811115611f8f57600080fd5b8501601f81018713611fa057600080fd5b611faf87823560208401611b27565b91505092959194509250565b60008060408385031215611fce57600080fd5b611fd783611c58565b9150611fe560208401611c58565b90509250929050565b60208082526011908201527014195c9b5a5cdcda5bdb8819195b9a5959607a1b604082015260600190565b600181811c9082168061202d57607f821691505b60208210810361204d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561208357612083612053565b500290565b6000826120a557634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016120d2576120d2612053565b5060010190565b600082198211156120ec576120ec612053565b500190565b60006020828403121561210357600080fd5b815161136a81611db5565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6000835161216d818460208801611bd4565b602f60f81b908301908152835161218b816001840160208801611bd4565b01600101949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008282101561224057612240612053565b500390565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061227890830184611c00565b9695505050505050565b60006020828403121561229457600080fd5b815161136a81611aad56fea26469706673582212202bfe3a41eab22e0dd15bd34cf2742e9f38fbbfe8c6630bcd3f0d1ded7181b81064736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806366f8f34714610030575b600080fd5b61004361003e366004610279565b610045565b005b60006100707f000000000000000000000000d4076cdc1a117647c6cf8f2867d698e5307910c5610121565b604051630de37ee960e21b81529091506001600160a01b0382169063378dfba4906100a9908a908a908a908a908a908a90600401610364565b600060405180830381600087803b1580156100c357600080fd5b505af11580156100d7573d6000803e3d6000fd5b50506040516001600160a01b03841681527f703fdf4fec8b6ba710f9f4fa396f0ea0045ee5f6bf7be6e4d49f4f5ea0d927469250602001905060405180910390a150505050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166101ba5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b604482015260640160405180910390fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126101e657600080fd5b813567ffffffffffffffff80821115610201576102016101bf565b604051601f8301601f19908116603f01168101908282118183101715610229576102296101bf565b8160405283815286602085880101111561024257600080fd5b836020870160208301376000602085830101528094505050505092915050565b80356001600160a01b03811681146101ba57600080fd5b60008060008060008060c0878903121561029257600080fd5b863567ffffffffffffffff808211156102aa57600080fd5b6102b68a838b016101d5565b97506102c460208a01610262565b96506102d260408a01610262565b955060608901359150808211156102e857600080fd5b506102f589828a016101d5565b9350506080870135915061030b60a08801610262565b90509295509295509295565b6000815180845260005b8181101561033d57602081850181015186830182015201610321565b8181111561034f576000602083870101525b50601f01601f19169290920160200192915050565b60c08152600061037760c0830189610317565b6001600160a01b038881166020850152878116604085015283820360608501526103a18288610317565b925085608085015280851660a0850152505097965050505050505056fea264697066735822122015db85478112a9c77db0f74af8bbdfbc75ed1079d8b86578d34fc5fe86dba3ae64736f6c634300080d0033
Deployed Bytecode Sourcemap
113:637:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;315:433;;;;;;:::i;:::-;;:::i;:::-;;;544:13;560:33;573:19;560:12;:33::i;:::-;603:103;;-1:-1:-1;;;603:103:15;;544:49;;-1:-1:-1;;;;;;603:33:15;;;;;:103;;637:4;;643:7;;652:15;;669:13;;684;;699:6;;603:103;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;721:20:15;;-1:-1:-1;;;;;3271:32:21;;3253:51;;721:20:15;;-1:-1:-1;3241:2:21;3226:18;;-1:-1:-1;721:20:15;;;;;;;534:214;315:433;;;;;;:::o;973:759:1:-;1030:16;1362:48;1344:14;1338:4;1334:25;1328:4;1324:36;1321:90;1315:4;1308:104;1569:32;1552:14;1546:4;1542:25;1539:63;1533:4;1526:77;1644:4;1638;1635:1;1628:21;1616:33;-1:-1:-1;;;;;;1676:22:1;;1668:57;;;;-1:-1:-1;;;1668:57:1;;3517:2:21;1668:57:1;;;3499:21:21;3556:2;3536:18;;;3529:30;-1:-1:-1;;;3575:18:21;;;3568:52;3637:18;;1668:57:1;;;;;;;;973:759;;;:::o;14:127:21:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:719;189:5;242:3;235:4;227:6;223:17;219:27;209:55;;260:1;257;250:12;209:55;296:6;283:20;322:18;359:2;355;352:10;349:36;;;365:18;;:::i;:::-;440:2;434:9;408:2;494:13;;-1:-1:-1;;490:22:21;;;514:2;486:31;482:40;470:53;;;538:18;;;558:22;;;535:46;532:72;;;584:18;;:::i;:::-;624:10;620:2;613:22;659:2;651:6;644:18;705:3;698:4;693:2;685:6;681:15;677:26;674:35;671:55;;;722:1;719;712:12;671:55;786:2;779:4;771:6;767:17;760:4;752:6;748:17;735:54;833:1;826:4;821:2;813:6;809:15;805:26;798:37;853:6;844:15;;;;;;146:719;;;;:::o;870:173::-;938:20;;-1:-1:-1;;;;;987:31:21;;977:42;;967:70;;1033:1;1030;1023:12;1048:836;1172:6;1180;1188;1196;1204;1212;1265:3;1253:9;1244:7;1240:23;1236:33;1233:53;;;1282:1;1279;1272:12;1233:53;1322:9;1309:23;1351:18;1392:2;1384:6;1381:14;1378:34;;;1408:1;1405;1398:12;1378:34;1431:50;1473:7;1464:6;1453:9;1449:22;1431:50;:::i;:::-;1421:60;;1500:38;1534:2;1523:9;1519:18;1500:38;:::i;:::-;1490:48;;1557:38;1591:2;1580:9;1576:18;1557:38;:::i;:::-;1547:48;;1648:2;1637:9;1633:18;1620:32;1604:48;;1677:2;1667:8;1664:16;1661:36;;;1693:1;1690;1683:12;1661:36;;1716:52;1760:7;1749:8;1738:9;1734:24;1716:52;:::i;:::-;1706:62;;;1815:3;1804:9;1800:19;1787:33;1777:43;;1839:39;1873:3;1862:9;1858:19;1839:39;:::i;:::-;1829:49;;1048:836;;;;;;;;:::o;1889:472::-;1931:3;1969:5;1963:12;1996:6;1991:3;1984:19;2021:1;2031:162;2045:6;2042:1;2039:13;2031:162;;;2107:4;2163:13;;;2159:22;;2153:29;2135:11;;;2131:20;;2124:59;2060:12;2031:162;;;2211:6;2208:1;2205:13;2202:87;;;2277:1;2270:4;2261:6;2256:3;2252:16;2248:27;2241:38;2202:87;-1:-1:-1;2343:2:21;2322:15;-1:-1:-1;;2318:29:21;2309:39;;;;2350:4;2305:50;;1889:472;-1:-1:-1;;1889:472:21:o;2366:736::-;2675:3;2664:9;2657:22;2638:4;2702:46;2743:3;2732:9;2728:19;2720:6;2702:46;:::i;:::-;-1:-1:-1;;;;;2822:15:21;;;2817:2;2802:18;;2795:43;2874:15;;;2869:2;2854:18;;2847:43;2926:22;;;2921:2;2906:18;;2899:50;2966:33;2930:6;2984;2966:33;:::i;:::-;2958:41;;3036:6;3030:3;3019:9;3015:19;3008:35;3092:2;3084:6;3080:15;3074:3;3063:9;3059:19;3052:44;;;2366:736;;;;;;;;;:::o
Swarm Source
ipfs://2bfe3a41eab22e0dd15bd34cf2742e9f38fbbfe8c6630bcd3f0d1ded7181b810
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.