Source Code
Latest 25 from a total of 1,033 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Add Part List | 12950556 | 104 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12792410 | 117 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12744327 | 121 days ago | IN | 0 GLMR | 0.00663375 | ||||
| Add Part List | 12733206 | 122 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12618015 | 131 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12617522 | 131 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12616443 | 131 days ago | IN | 0 GLMR | 0.00663375 | ||||
| Add Part List | 12616287 | 131 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12616073 | 131 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12511948 | 139 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12511761 | 139 days ago | IN | 0 GLMR | 0.00663375 | ||||
| Add Part List | 12511606 | 139 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12511434 | 139 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12511256 | 139 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12511097 | 139 days ago | IN | 0 GLMR | 0.00663375 | ||||
| Add Part List | 12470872 | 142 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12470681 | 142 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12470433 | 142 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12469972 | 142 days ago | IN | 0 GLMR | 0.00663375 | ||||
| Add Part List | 12469825 | 142 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12469655 | 142 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12469333 | 142 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12373717 | 149 days ago | IN | 0 GLMR | 0.00663375 | ||||
| Add Part List | 12373557 | 149 days ago | IN | 0 GLMR | 0.005307 | ||||
| Add Part List | 12373192 | 149 days ago | IN | 0 GLMR | 0.005307 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 10611896 | 275 days ago | 0 GLMR | ||||
| 10001275 | 318 days ago | 0 GLMR | ||||
| 8130625 | 451 days ago | 0 GLMR | ||||
| 8129891 | 451 days ago | 0 GLMR | ||||
| 8116602 | 452 days ago | 0 GLMR | ||||
| 8030579 | 458 days ago | 0 GLMR | ||||
| 8003014 | 460 days ago | 0 GLMR | ||||
| 7424532 | 501 days ago | 0 GLMR | ||||
| 7418344 | 501 days ago | 0 GLMR | ||||
| 7406654 | 502 days ago | 0 GLMR | ||||
| 7406596 | 502 days ago | 0 GLMR | ||||
| 7406479 | 502 days ago | 0 GLMR | ||||
| 7357789 | 505 days ago | 0 GLMR | ||||
| 7346908 | 506 days ago | 0 GLMR | ||||
| 7345721 | 506 days ago | 0 GLMR | ||||
| 7331946 | 507 days ago | 0 GLMR | ||||
| 7330413 | 507 days ago | 0 GLMR | ||||
| 7306114 | 509 days ago | 0 GLMR | ||||
| 7305219 | 509 days ago | 0 GLMR | ||||
| 7303915 | 509 days ago | 0 GLMR | ||||
| 7303793 | 509 days ago | 0 GLMR | ||||
| 7296647 | 510 days ago | 0 GLMR | ||||
| 7296352 | 510 days ago | 0 GLMR | ||||
| 7296204 | 510 days ago | 0 GLMR | ||||
| 7293469 | 510 days ago | 0 GLMR |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
RMRKCatalogImpl
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;
import {OwnableLock} from "../../RMRK/access/OwnableLock.sol";
import {RMRKCatalog, IERC165} from "../../RMRK/catalog/RMRKCatalog.sol";
import {IRMRKCatalogExtended} from "./IRMRKCatalogExtended.sol";
/**
* @title RMRKCatalogImpl
* @author RMRK team
* @notice Implementation of RMRK catalog.
* @dev Contract for storing 'catalog' elements of NFTs to be accessed by instances of RMRKAsset implementing contracts.
* This default implementation includes an OwnableLock dependency, which allows the deployer to freeze the state of the
* catalog contract.
*/
contract RMRKCatalogImpl is OwnableLock, RMRKCatalog, IRMRKCatalogExtended {
/**
* @notice Used to initialize the smart contract.
* @param metadataURI Base metadata URI of the contract
* @param type_ The type of the catalog
*/
constructor(
string memory metadataURI,
string memory type_
) RMRKCatalog(metadataURI, type_) {}
/**
* @notice Used to add a single `Part` to storage.
* @dev The full `IntakeStruct` looks like this:
* [
* partID,
* [
* itemType,
* z,
* [
* permittedCollectionAddress0,
* permittedCollectionAddress1,
* permittedCollectionAddress2
* ],
* metadataURI
* ]
* ]
* @param intakeStruct `IntakeStruct` struct consisting of `partId` and a nested `Part` struct
*/
function addPart(
IntakeStruct memory intakeStruct
) public virtual onlyOwnerOrContributor notLocked {
_addPart(intakeStruct);
}
/**
* @notice Used to add multiple `Part`s to storage.
* @dev The full `IntakeStruct` looks like this:
* [
* partID,
* [
* itemType,
* z,
* [
* permittedCollectionAddress0,
* permittedCollectionAddress1,
* permittedCollectionAddress2
* ],
* metadataURI
* ]
* ]
* @param intakeStructs[] An array of `IntakeStruct` structs consisting of `partId` and a nested `Part` struct
*/
function addPartList(
IntakeStruct[] memory intakeStructs
) public virtual onlyOwnerOrContributor notLocked {
_addPartList(intakeStructs);
}
/**
* @notice Used to add multiple `equippableAddresses` to a single catalog entry.
* @dev Can only be called on `Part`s of `Slot` type.
* @param partId ID of the `Part` that we are adding the equippable addresses to
* @param equippableAddresses An array of addresses that can be equipped into the `Part` associated with the `partId`
*/
function addEquippableAddresses(
uint64 partId,
address[] memory equippableAddresses
) public virtual onlyOwnerOrContributor {
_addEquippableAddresses(partId, equippableAddresses);
}
/**
* @notice Function used to set the new list of `equippableAddresses`.
* @dev Overwrites existing `equippableAddresses`.
* @dev Can only be called on `Part`s of `Slot` type.
* @param partId ID of the `Part`s that we are overwiting the `equippableAddresses` for
* @param equippableAddresses A full array of addresses that can be equipped into this `Part`
*/
function setEquippableAddresses(
uint64 partId,
address[] memory equippableAddresses
) public virtual onlyOwnerOrContributor {
_setEquippableAddresses(partId, equippableAddresses);
}
/**
* @notice Sets the isEquippableToAll flag to true, meaning that any collection may be equipped into the `Part` with
* this `partId`.
* @dev Can only be called on `Part`s of `Slot` type.
* @param partId ID of the `Part` that we are setting as equippable by any address
*/
function setEquippableToAll(
uint64 partId
) public virtual onlyOwnerOrContributor {
_setEquippableToAll(partId);
}
/**
* @notice Used to remove all of the `equippableAddresses` for a `Part` associated with the `partId`.
* @dev Can only be called on `Part`s of `Slot` type.
* @param partId ID of the part that we are clearing the `equippableAddresses` from
*/
function resetEquippableAddresses(
uint64 partId
) public virtual onlyOwnerOrContributor {
_resetEquippableAddresses(partId);
}
/**
* @inheritdoc IRMRKCatalogExtended
*/
function getAllPartIds() public view returns (uint64[] memory partIds) {
partIds = _partIds;
}
/**
* @inheritdoc IRMRKCatalogExtended
*/
function getPaginatedPartIds(
uint256 offset,
uint256 limit
) public view returns (uint64[] memory partIds) {
if (offset >= _partIds.length) limit = 0; // Could revert but UI would have to handle it
if (offset + limit > _partIds.length) limit = _partIds.length - offset;
partIds = new uint64[](limit);
for (uint256 i; i < limit; ) {
partIds[i] = _partIds[offset + i];
unchecked {
++i;
}
}
}
/**
* @inheritdoc IRMRKCatalogExtended
*/
function getTotalParts() public view returns (uint256 totalParts) {
totalParts = _partIds.length;
}
/**
* @inheritdoc IRMRKCatalogExtended
*/
function getPartByIndex(
uint256 index
) public view returns (Part memory part) {
part = getPart(_partIds[index]);
}
/**
* @inheritdoc IRMRKCatalogExtended
*/
function setMetadataURI(
string memory newContractURI
) public virtual onlyOwnerOrContributor {
_setMetadataURI(newContractURI);
emit ContractURIUpdated();
}
/**
* @inheritdoc IRMRKCatalogExtended
*/
function setType(
string memory newType
) public virtual onlyOwnerOrContributor {
_setType(newType);
emit TypeUpdated(newType);
}
/**
* @inheritdoc IERC165
*/
function supportsInterface(
bytes4 interfaceId
) public view virtual override(RMRKCatalog, IERC165) returns (bool) {
return
interfaceId == type(IRMRKCatalogExtended).interfaceId ||
super.supportsInterface(interfaceId);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @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: Apache-2.0
pragma solidity ^0.8.21;
import {IRMRKCatalog} from "../../RMRK/catalog/IRMRKCatalog.sol";
/**
* @title IRMRKCatalogExtended
* @author RMRK team
* @notice An extended interface for Catalog for RMRK equippable module.
*/
interface IRMRKCatalogExtended is IRMRKCatalog {
/**
* @notice From ERC7572 (Draft) Emitted when the contract-level metadata is updated
*/
event ContractURIUpdated();
/**
* @notice Emited when the type of the catalog is updated
* @param newType The new type of the catalog
*/
event TypeUpdated(string newType);
/**
* @notice Used to get all the part IDs in the catalog.
* @dev Can get at least 10k parts. Higher limits were not tested.
* @dev It may fail if there are too many parts, in that case use either `getPaginatedPartIds` or `getTotalParts` and `getPartByIndex`.
* @return partIds An array of all the part IDs in the catalog
*/
function getAllPartIds() external view returns (uint64[] memory partIds);
/**
* @notice Used to get all the part IDs in the catalog.
* @param offset The offset to start from
* @param limit The maximum number of parts to return
* @return partIds An array of all the part IDs in the catalog
*/
function getPaginatedPartIds(
uint256 offset,
uint256 limit
) external view returns (uint64[] memory partIds);
/**
* @notice Used to get the total number of parts in the catalog.
* @return totalParts The total number of parts in the catalog
*/
function getTotalParts() external view returns (uint256 totalParts);
/**
* @notice Used to get a single `Part` by the index of its `partId`.
* @param index The index of the `partId`.
* @return part The `Part` struct associated with the `partId` at the given index
*/
function getPartByIndex(
uint256 index
) external view returns (Part memory part);
/**
* @notice Used to set the metadata URI of the catalog.
* @param newContractURI The new metadata URI
* @dev emits `ContractURIUpdated` event
*/
function setMetadataURI(string memory newContractURI) external;
/**
* @notice Used to set the type of the catalog.
* @param newType The new type of the catalog
* @dev emits `TypeUpdated` event
*/
function setType(string memory newType) external;
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
import "../library/RMRKErrors.sol";
/**
* @title Ownable
* @author RMRK team
* @notice A minimal ownable smart contract or owner and contributors.
* @dev This smart contract is based on "openzeppelin's access/Ownable.sol".
*/
contract Ownable is Context {
address private _owner;
mapping(address => uint256) private _contributors;
/**
* @notice Used to anounce the transfer of ownership.
* @param previousOwner Address of the account that transferred their ownership role
* @param newOwner Address of the account receiving the ownership role
*/
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @notice Event that signifies that an address was granted contributor role or that the permission has been
* revoked.
* @dev This can only be triggered by a current owner, so there is no need to include that information in the event.
* @param contributor Address of the account that had contributor role status updated
* @param isContributor A boolean value signifying whether the role has been granted (`true`) or revoked (`false`)
*/
event ContributorUpdate(address indexed contributor, bool isContributor);
/**
* @dev Reverts if called by any account other than the owner or an approved contributor.
*/
modifier onlyOwnerOrContributor() {
_onlyOwnerOrContributor();
_;
}
/**
* @dev Reverts if called by any account other than the owner.
*/
modifier onlyOwner() {
_onlyOwner();
_;
}
/**
* @dev Initializes the contract by setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @notice Returns the address of the current owner.
* @return owner_ Address of the current owner
*/
function owner() public view virtual returns (address owner_) {
owner_ = _owner;
}
/**
* @notice Leaves the contract without owner. Functions using the `onlyOwner` modifier will be disabled.
* @dev Can only be called by the current owner.
* @dev Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is
* only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @notice Transfers ownership of the contract to a new owner.
* @dev Can only be called by the current owner.
* @param newOwner Address of the new owner's account
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) revert RMRKNewOwnerIsZeroAddress();
_transferOwnership(newOwner);
}
/**
* @notice Transfers ownership of the contract to a new owner.
* @dev Internal function without access restriction.
* @dev Emits ***OwnershipTransferred*** event.
* @param newOwner Address of the new owner's account
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @notice Adds or removes a contributor to the smart contract.
* @dev Can only be called by the owner.
* @dev Emits ***ContributorUpdate*** event.
* @param contributor Address of the contributor's account
* @param grantRole A boolean value signifying whether the contributor role is being granted (`true`) or revoked
* (`false`)
*/
function manageContributor(
address contributor,
bool grantRole
) external onlyOwner {
if (contributor == address(0)) revert RMRKNewContributorIsZeroAddress();
grantRole
? _contributors[contributor] = 1
: _contributors[contributor] = 0;
emit ContributorUpdate(contributor, grantRole);
}
/**
* @notice Used to check if the address is one of the contributors.
* @param contributor Address of the contributor whose status we are checking
* @return isContributor_ Boolean value indicating whether the address is a contributor or not
*/
function isContributor(
address contributor
) public view returns (bool isContributor_) {
isContributor_ = _contributors[contributor] == 1;
}
/**
* @notice Used to verify that the caller is either the owner or a contributor.
* @dev If the caller is not the owner or a contributor, the execution will be reverted.
*/
function _onlyOwnerOrContributor() private view {
if (owner() != _msgSender() && !isContributor(_msgSender()))
revert RMRKNotOwnerOrContributor();
}
/**
* @notice Used to verify that the caller is the owner.
* @dev If the caller is not the owner, the execution will be reverted.
*/
function _onlyOwner() private view {
if (owner() != _msgSender()) revert RMRKNotOwner();
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;
import {Ownable} from "./Ownable.sol";
import "../library/RMRKErrors.sol";
/**
* @title OwnableLock
* @author RMRK team
* @notice A minimal ownable lock smart contract.
*/
contract OwnableLock is Ownable {
uint256 private _lock;
/**
* @notice Emitted when the smart contract is locked.
*/
event LockSet();
/**
* @notice Reverts if the lock flag is set to true.
*/
modifier notLocked() {
_onlyNotLocked();
_;
}
/**
* @notice Locks the operation.
* @dev Once locked, functions using `notLocked` modifier cannot be executed.
* @dev Emits ***LockSet*** event.
*/
function setLock() public virtual onlyOwner {
_lock = 1;
emit LockSet();
}
/**
* @notice Used to retrieve the status of a lockable smart contract.
* @return isLocked A boolean value signifying whether the smart contract has been locked
*/
function getLock() public view returns (bool isLocked) {
isLocked = _lock == 1;
}
/**
* @notice Used to verify that the operation of the smart contract is not locked.
* @dev If the operation of the smart contract is locked, the execution will be reverted.
*/
function _onlyNotLocked() private view {
if (_lock == 1) revert RMRKLocked();
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
/**
* @title IRMRKCatalog
* @author RMRK team
* @notice An interface Catalog for RMRK equippable module.
*/
interface IRMRKCatalog is IERC165 {
/**
* @notice Event to announce addition of a new part.
* @dev It is emitted when a new part is added.
* @param partId ID of the part that was added
* @param itemType Enum value specifying whether the part is `None`, `Slot` and `Fixed`
* @param zIndex An uint specifying the z value of the part. It is used to specify the depth which the part should
* be rendered at
* @param equippableAddresses An array of addresses that can equip this part
* @param metadataURI The metadata URI of the part
*/
event AddedPart(
uint64 indexed partId,
ItemType indexed itemType,
uint8 zIndex,
address[] equippableAddresses,
string metadataURI
);
/**
* @notice Event to announce new equippables to the part.
* @dev It is emitted when new addresses are marked as equippable for `partId`.
* @param partId ID of the part that had new equippable addresses added
* @param equippableAddresses An array of the new addresses that can equip this part
*/
event AddedEquippables(
uint64 indexed partId,
address[] equippableAddresses
);
/**
* @notice Event to announce the overriding of equippable addresses of the part.
* @dev It is emitted when the existing list of addresses marked as equippable for `partId` is overwritten by a new one.
* @param partId ID of the part whose list of equippable addresses was overwritten
* @param equippableAddresses The new, full, list of addresses that can equip this part
*/
event SetEquippables(uint64 indexed partId, address[] equippableAddresses);
/**
* @notice Event to announce that a given part can be equipped by any address.
* @dev It is emitted when a given part is marked as equippable by any.
* @param partId ID of the part marked as equippable by any address
*/
event SetEquippableToAll(uint64 indexed partId);
/**
* @notice Used to define a type of the item. Possible values are `None`, `Slot` or `Fixed`.
* @dev Used for fixed and slot parts.
*/
enum ItemType {
None,
Slot,
Fixed
}
/**
* @notice The integral structure of a standard RMRK catalog item defining it.
* @dev Requires a minimum of 3 storage slots per catalog item, equivalent to roughly 60,000 gas as of Berlin hard
* fork (April 14, 2021), though 5-7 storage slots is more realistic, given the standard length of an IPFS URI.
* This will result in between 25,000,000 and 35,000,000 gas per 250 assets--the maximum block size of Ethereum
* mainnet is 30M at peak usage.
* @return itemType The item type of the part
* @return z The z value of the part defining how it should be rendered when presenting the full NFT
* @return equippable The array of addresses allowed to be equipped in this part
* @return metadataURI The metadata URI of the part
*/
struct Part {
ItemType itemType; //1 byte
uint8 z; //1 byte
address[] equippable; //n Collections that can be equipped into this slot
string metadataURI; //n bytes 32+
}
/**
* @notice The structure used to add a new `Part`.
* @dev The part is added with specified ID, so you have to make sure that you are using an unused `partId`,
* otherwise the addition of the part vill be reverted.
* @dev The full `IntakeStruct` looks like this:
* [
* partID,
* [
* itemType,
* z,
* [
* permittedCollectionAddress0,
* permittedCollectionAddress1,
* permittedCollectionAddress2
* ],
* metadataURI
* ]
* ]
* @return partId ID to be assigned to the `Part`
* @return part A `Part` to be added
*/
struct IntakeStruct {
uint64 partId;
Part part;
}
/**
* @notice Used to return the metadata URI of the associated Catalog.
* @return Catalog metadata URI
*/
function getMetadataURI() external view returns (string memory);
/**
* @notice Used to return the `itemType` of the associated Catalog
* @return `itemType` of the associated Catalog
*/
function getType() external view returns (string memory);
/**
* @notice Used to check whether the given address is allowed to equip the desired `Part`.
* @dev Returns true if a collection may equip asset with `partId`.
* @param partId The ID of the part that we are checking
* @param targetAddress The address that we are checking for whether the part can be equipped into it or not
* @return isEquippable The status indicating whether the `targetAddress` can be equipped into `Part` with `partId` or not
*/
function checkIsEquippable(
uint64 partId,
address targetAddress
) external view returns (bool isEquippable);
/**
* @notice Used to check if the part is equippable by all addresses.
* @dev Returns true if part is equippable to all.
* @param partId ID of the part that we are checking
* @return isEquippableToAll The status indicating whether the part with `partId` can be equipped by any address or not
*/
function checkIsEquippableToAll(
uint64 partId
) external view returns (bool isEquippableToAll);
/**
* @notice Used to retrieve a `Part` with id `partId`
* @param partId ID of the part that we are retrieving
* @return part The `Part` struct associated with given `partId`
*/
function getPart(uint64 partId) external view returns (Part memory part);
/**
* @notice Used to retrieve multiple parts at the same time.
* @param partIds An array of part IDs that we want to retrieve
* @return part An array of `Part` structs associated with given `partIds`
*/
function getParts(
uint64[] memory partIds
) external view returns (Part[] memory part);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;
import {IRMRKCatalog, IERC165} from "./IRMRKCatalog.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import "../library/RMRKErrors.sol";
/**
* @title RMRKCatalog
* @author RMRK team
* @notice Catalog contract for RMRK equippable module.
*/
contract RMRKCatalog is IRMRKCatalog {
using Address for address;
/**
* @notice Mapping of uint64 `partId` to IRMRKCatalog `Part` struct
*/
mapping(uint64 => Part) private _parts;
/**
* @notice Mapping of uint64 `partId` to boolean flag, indicating that a given `Part` can be equippable by any
* address
*/
mapping(uint64 => bool) private _isEquippableToAll;
uint64[] internal _partIds;
string internal _metadataURI;
string internal _type;
/**
* @notice Used to initialize the Catalog.
* @param metadataURI Base metadata URI of the Catalog
* @param type_ Type of Catalog
*/
constructor(string memory metadataURI, string memory type_) {
_setMetadataURI(metadataURI);
_setType(type_);
}
/**
* @notice Used to limit execution of functions intended for the `Slot` parts to only execute when used with such
* parts.
* @dev Reverts execution of a function if the part with associated `partId` is uninitailized or is `Fixed`.
* @param partId ID of the part that we want the function to interact with
*/
modifier onlySlot(uint64 partId) {
_onlySlot(partId);
_;
}
/**
* @notice Used to verify that an operation is only executed on slot Parts.
* @dev If the Part is not Slot type, the execution will be reverted.
* @param partId ID of the part to check
*/
function _onlySlot(uint64 partId) private view {
ItemType itemType = _parts[partId].itemType;
if (itemType == ItemType.None) revert RMRKPartDoesNotExist();
if (itemType == ItemType.Fixed) revert RMRKPartIsNotSlot();
}
/**
* @inheritdoc IERC165
*/
function supportsInterface(
bytes4 interfaceId
) public view virtual returns (bool) {
return
interfaceId == type(IERC165).interfaceId ||
interfaceId == type(IRMRKCatalog).interfaceId;
}
/**
* @inheritdoc IRMRKCatalog
*/
function getMetadataURI() external view returns (string memory) {
return _metadataURI;
}
/**
* @inheritdoc IRMRKCatalog
*/
function getType() external view returns (string memory) {
return _type;
}
/**
* @notice Internal helper function that sets the base metadata URI of the contract.
* @param metadataURI Base metadata URI of the contract
*/
function _setMetadataURI(string memory metadataURI) internal {
_metadataURI = metadataURI;
}
/**
* @notice Internal helper function that sets the type of the contract.
* @param type_ Type of the contract
*/
function _setType(string memory type_) internal {
_type = type_;
}
/**
* @notice Internal helper function that adds `Part` entries to storage.
* @dev Delegates to { _addPart } below.
* @param partIntake An array of `IntakeStruct` structs, consisting of `partId` and a nested `Part` struct
*/
function _addPartList(IntakeStruct[] memory partIntake) internal {
uint256 len = partIntake.length;
for (uint256 i; i < len; ) {
_addPart(partIntake[i]);
unchecked {
++i;
}
}
}
/**
* @notice Internal function that adds a single `Part` to storage.
* @param partIntake `IntakeStruct` struct consisting of `partId` and a nested `Part` struct
*
*/
function _addPart(IntakeStruct memory partIntake) internal {
uint64 partId = partIntake.partId;
Part memory part = partIntake.part;
if (partId == uint64(0)) revert RMRKIdZeroForbidden();
if (_parts[partId].itemType != ItemType.None)
revert RMRKPartAlreadyExists();
if (part.itemType == ItemType.None) revert RMRKBadConfig();
if (part.itemType == ItemType.Fixed && part.equippable.length != 0)
revert RMRKBadConfig();
_parts[partId] = part;
_partIds.push(partId);
emit AddedPart(
partId,
part.itemType,
part.z,
part.equippable,
part.metadataURI
);
}
/**
* @notice Internal function used to add multiple `equippableAddresses` to a single catalog entry.
* @dev Can only be called on `Part`s of `Slot` type.
* @dev Emits ***AddedEquippables*** event.
* @param partId ID of the `Part` that we are adding the equippable addresses to
* @param equippableAddresses An array of addresses that can be equipped into the `Part` associated with the `partId`
*/
function _addEquippableAddresses(
uint64 partId,
address[] memory equippableAddresses
) internal onlySlot(partId) {
if (equippableAddresses.length <= 0) revert RMRKZeroLengthIdsPassed();
uint256 len = equippableAddresses.length;
for (uint256 i; i < len; ) {
_parts[partId].equippable.push(equippableAddresses[i]);
unchecked {
++i;
}
}
delete _isEquippableToAll[partId];
emit AddedEquippables(partId, equippableAddresses);
}
/**
* @notice Internal function used to set the new list of `equippableAddresses`.
* @dev Overwrites existing `equippableAddresses`.
* @dev Can only be called on `Part`s of `Slot` type.
* @dev Emits ***SetEquippable*** event.
* @param partId ID of the `Part`s that we are overwiting the `equippableAddresses` for
* @param equippableAddresses A full array of addresses that can be equipped into this `Part`
*/
function _setEquippableAddresses(
uint64 partId,
address[] memory equippableAddresses
) internal onlySlot(partId) {
if (equippableAddresses.length <= 0) revert RMRKZeroLengthIdsPassed();
_parts[partId].equippable = equippableAddresses;
delete _isEquippableToAll[partId];
emit SetEquippables(partId, equippableAddresses);
}
/**
* @notice Internal function used to remove all of the `equippableAddresses` for a `Part` associated with the `partId`.
* @dev Can only be called on `Part`s of `Slot` type.
* @dev Emits ***SetEquippable*** event.
* @param partId ID of the part that we are clearing the `equippableAddresses` from
*/
function _resetEquippableAddresses(
uint64 partId
) internal onlySlot(partId) {
delete _parts[partId].equippable;
delete _isEquippableToAll[partId];
emit SetEquippables(partId, new address[](0));
}
/**
* @notice Sets the isEquippableToAll flag to true, meaning that any collection may be equipped into the `Part` with this
* `partId`.
* @dev Can only be called on `Part`s of `Slot` type.
* @dev Emits ***SetEquippableToAll*** event.
* @param partId ID of the `Part` that we are setting as equippable by any address
*/
function _setEquippableToAll(uint64 partId) internal onlySlot(partId) {
_isEquippableToAll[partId] = true;
emit SetEquippableToAll(partId);
}
/**
* @inheritdoc IRMRKCatalog
*/
function checkIsEquippableToAll(
uint64 partId
) public view returns (bool isEquippable) {
isEquippable = _isEquippableToAll[partId];
}
/**
* @inheritdoc IRMRKCatalog
*/
function checkIsEquippable(
uint64 partId,
address targetAddress
) public view returns (bool isEquippable) {
// If this is equippable to all, we're good
isEquippable = _isEquippableToAll[partId];
// Otherwise, must check against each of the equippable for the part
if (!isEquippable && _parts[partId].itemType == ItemType.Slot) {
address[] memory equippable = _parts[partId].equippable;
uint256 len = equippable.length;
for (uint256 i; i < len; ) {
if (targetAddress == equippable[i]) {
isEquippable = true;
break;
}
unchecked {
++i;
}
}
}
}
/**
* @inheritdoc IRMRKCatalog
*/
function getPart(uint64 partId) public view returns (Part memory part) {
part = (_parts[partId]);
}
/**
* @inheritdoc IRMRKCatalog
*/
function getParts(
uint64[] memory partIds
) public view returns (Part[] memory parts) {
uint256 numParts = partIds.length;
parts = new Part[](numParts);
for (uint256 i; i < numParts; ) {
uint64 partId = partIds[i];
parts[i] = _parts[partId];
unchecked {
++i;
}
}
}
}// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.21; /// @title RMRKErrors /// @author RMRK team /// @notice A collection of errors used in the RMRK suite /// @dev Errors are kept in a centralised file in order to provide a central point of reference and to avoid error /// naming collisions due to inheritance /// Attempting to grant the token to 0x0 address error ERC721AddressZeroIsNotaValidOwner(); /// Attempting to grant approval to the current owner of the token error ERC721ApprovalToCurrentOwner(); /// Attempting to grant approval when not being owner or approved for all should not be permitted error ERC721ApproveCallerIsNotOwnerNorApprovedForAll(); /// Attempting to grant approval to self error ERC721ApproveToCaller(); /// Attempting to use an invalid token ID error ERC721InvalidTokenId(); /// Attempting to mint to 0x0 address error ERC721MintToTheZeroAddress(); /// Attempting to manage a token without being its owner or approved by the owner error ERC721NotApprovedOrOwner(); /// Attempting to mint an already minted token error ERC721TokenAlreadyMinted(); /// Attempting to transfer the token from an address that is not the owner error ERC721TransferFromIncorrectOwner(); /// Attempting to safe transfer to an address that is unable to receive the token error ERC721TransferToNonReceiverImplementer(); /// Attempting to transfer the token to a 0x0 address error ERC721TransferToTheZeroAddress(); /// Attempting to grant approval of assets to their current owner error RMRKApprovalForAssetsToCurrentOwner(); /// Attempting to grant approval of assets without being the caller or approved for all error RMRKApproveForAssetsCallerIsNotOwnerNorApprovedForAll(); /// Attempting to incorrectly configue a Catalog item error RMRKBadConfig(); /// Attempting to set the priorities with an array of length that doesn't match the length of active assets array error RMRKBadPriorityListLength(); /// Attempting to add an asset entry with `Part`s, without setting the `Catalog` address error RMRKCatalogRequiredForParts(); /// Attempting to transfer a soulbound (non-transferrable) token error RMRKCannotTransferSoulbound(); /// Attempting to accept a child that has already been accepted error RMRKChildAlreadyExists(); /// Attempting to interact with a child, using index that is higher than the number of children error RMRKChildIndexOutOfRange(); /// Attempting to find the index of a child token on a parent which does not own it. error RMRKChildNotFoundInParent(); /// Attempting to equip a `Part` with a child not approved by the Catalog error RMRKEquippableEquipNotAllowedByCatalog(); /// Attempting to use ID 0, which is not supported /// @dev The ID 0 in RMRK suite is reserved for empty values. Guarding against its use ensures the expected operation error RMRKIdZeroForbidden(); /// Attempting to interact with an asset, using index greater than number of assets error RMRKIndexOutOfRange(); /// Attempting to reclaim a child that can't be reclaimed error RMRKInvalidChildReclaim(); /// Attempting to interact with an end-user account when the contract account is expected error RMRKIsNotContract(); /// Attempting to interact with a contract that had its operation locked error RMRKLocked(); /// Attempting to add a pending child after the number of pending children has reached the limit (default limit is 128) error RMRKMaxPendingChildrenReached(); /// Attempting to add a pending asset after the number of pending assets has reached the limit (default limit is /// 128) error RMRKMaxPendingAssetsReached(); /// Attempting to burn a total number of recursive children higher than maximum set /// @param childContract Address of the collection smart contract in which the maximum number of recursive burns was reached /// @param childId ID of the child token at which the maximum number of recursive burns was reached error RMRKMaxRecursiveBurnsReached(address childContract, uint256 childId); /// Attempting to mint a number of tokens that would cause the total supply to be greater than maximum supply error RMRKMintOverMax(); /// Attempting to mint zero tokens error RMRKMintZero(); /// Attempting to pass complementary arrays of different lengths error RMRKMismachedArrayLength(); /// Attempting to transfer a child before it is unequipped error RMRKMustUnequipFirst(); /// Attempting to nest a child over the nestable limit (current limit is 100 levels of nesting) error RMRKNestableTooDeep(); /// Attempting to nest the token to own descendant, which would create a loop and leave the looped tokens in limbo error RMRKNestableTransferToDescendant(); /// Attempting to nest the token to a smart contract that doesn't support nesting error RMRKNestableTransferToNonRMRKNestableImplementer(); /// Attempting to nest the token into itself error RMRKNestableTransferToSelf(); /// Attempting to interact with an asset that can not be found error RMRKNoAssetMatchingId(); /// Attempting to manage an asset without owning it or having been granted permission by the owner to do so error RMRKNotApprovedForAssetsOrOwner(); /// Attempting to interact with a token without being its owner or having been granted permission by the /// owner to do so /// @dev When a token is nested, only the direct owner (NFT parent) can mange it. In that case, approved addresses are /// not allowed to manage it, in order to ensure the expected behaviour error RMRKNotApprovedOrDirectOwner(); /// Attempting to compose an asset wihtout having an associated Catalog error RMRKNotComposableAsset(); /// Attempting to unequip an item that isn't equipped error RMRKNotEquipped(); /// Attempting to interact with a management function without being the smart contract's owner error RMRKNotOwner(); /// Attempting to interact with a function without being the owner or contributor of the collection error RMRKNotOwnerOrContributor(); /// Attempting to transfer the ownership to the 0x0 address error RMRKNewOwnerIsZeroAddress(); /// Attempting to assign a 0x0 address as a contributor error RMRKNewContributorIsZeroAddress(); /// Attempting an operation requiring the token being nested, while it is not error RMRKParentIsNotNFT(); /// Attempting to add a `Part` with an ID that is already used error RMRKPartAlreadyExists(); /// Attempting to use a `Part` that doesn't exist error RMRKPartDoesNotExist(); /// Attempting to use a `Part` that is `Fixed` when `Slot` kind of `Part` should be used error RMRKPartIsNotSlot(); /// Attempting to interact with a pending child using an index greater than the size of pending array error RMRKPendingChildIndexOutOfRange(); /// Attempting to add an asset using an ID that has already been used error RMRKAssetAlreadyExists(); /// Attempting to equip an item into a slot that already has an item equipped error RMRKSlotAlreadyUsed(); /// Attempting to equip an item into a `Slot` that the target asset does not implement error RMRKTargetAssetCannotReceiveSlot(); /// Attempting to equip a child into a `Slot` and parent that the child's collection doesn't support error RMRKTokenCannotBeEquippedWithAssetIntoSlot(); /// Attempting to compose a NFT of a token without active assets error RMRKTokenDoesNotHaveAsset(); /// Attempting to determine the asset with the top priority on a token without assets error RMRKTokenHasNoAssets(); /// Attempting to accept or transfer a child which does not match the one at the specified index error RMRKUnexpectedChildId(); /// Attempting to reject all pending assets but more assets than expected are pending error RMRKUnexpectedNumberOfAssets(); /// Attempting to reject all pending children but children assets than expected are pending error RMRKUnexpectedNumberOfChildren(); /// Attempting to accept or reject an asset which does not match the one at the specified index error RMRKUnexpectedAssetId(); /// Attempting an operation expecting a parent to the token which is not the actual one error RMRKUnexpectedParent(); /// Attempting not to pass an empty array of equippable addresses when adding or setting the equippable addresses error RMRKZeroLengthIdsPassed(); /// Attempting to set the royalties to a value higher than 100% (10000 in basis points) error RMRKRoyaltiesTooHigh(); /// Attempting to do a bulk operation on a token that is not owned by the caller error RMRKCanOnlyDoBulkOperationsOnOwnedTokens(); /// Attempting to do a bulk operation with multiple tokens at a time error RMRKCanOnlyDoBulkOperationsWithOneTokenAtATime(); /// Attempting to pay with native token with a value different than expected error RMRKWrongValueSent(); // Attempting to send native token to a recipient that is unable to receive it error TransferFailed();
{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"metadataURI","type":"string"},{"internalType":"string","name":"type_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"RMRKBadConfig","type":"error"},{"inputs":[],"name":"RMRKIdZeroForbidden","type":"error"},{"inputs":[],"name":"RMRKLocked","type":"error"},{"inputs":[],"name":"RMRKNewContributorIsZeroAddress","type":"error"},{"inputs":[],"name":"RMRKNewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"RMRKNotOwner","type":"error"},{"inputs":[],"name":"RMRKNotOwnerOrContributor","type":"error"},{"inputs":[],"name":"RMRKPartAlreadyExists","type":"error"},{"inputs":[],"name":"RMRKPartDoesNotExist","type":"error"},{"inputs":[],"name":"RMRKPartIsNotSlot","type":"error"},{"inputs":[],"name":"RMRKZeroLengthIdsPassed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"partId","type":"uint64"},{"indexed":false,"internalType":"address[]","name":"equippableAddresses","type":"address[]"}],"name":"AddedEquippables","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"partId","type":"uint64"},{"indexed":true,"internalType":"enum IRMRKCatalog.ItemType","name":"itemType","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"zIndex","type":"uint8"},{"indexed":false,"internalType":"address[]","name":"equippableAddresses","type":"address[]"},{"indexed":false,"internalType":"string","name":"metadataURI","type":"string"}],"name":"AddedPart","type":"event"},{"anonymous":false,"inputs":[],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"bool","name":"isContributor","type":"bool"}],"name":"ContributorUpdate","type":"event"},{"anonymous":false,"inputs":[],"name":"LockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"partId","type":"uint64"}],"name":"SetEquippableToAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"partId","type":"uint64"},{"indexed":false,"internalType":"address[]","name":"equippableAddresses","type":"address[]"}],"name":"SetEquippables","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newType","type":"string"}],"name":"TypeUpdated","type":"event"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"},{"internalType":"address[]","name":"equippableAddresses","type":"address[]"}],"name":"addEquippableAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"partId","type":"uint64"},{"components":[{"internalType":"enum IRMRKCatalog.ItemType","name":"itemType","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"},{"internalType":"address[]","name":"equippable","type":"address[]"},{"internalType":"string","name":"metadataURI","type":"string"}],"internalType":"struct IRMRKCatalog.Part","name":"part","type":"tuple"}],"internalType":"struct IRMRKCatalog.IntakeStruct","name":"intakeStruct","type":"tuple"}],"name":"addPart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"partId","type":"uint64"},{"components":[{"internalType":"enum IRMRKCatalog.ItemType","name":"itemType","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"},{"internalType":"address[]","name":"equippable","type":"address[]"},{"internalType":"string","name":"metadataURI","type":"string"}],"internalType":"struct IRMRKCatalog.Part","name":"part","type":"tuple"}],"internalType":"struct IRMRKCatalog.IntakeStruct[]","name":"intakeStructs","type":"tuple[]"}],"name":"addPartList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"},{"internalType":"address","name":"targetAddress","type":"address"}],"name":"checkIsEquippable","outputs":[{"internalType":"bool","name":"isEquippable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"}],"name":"checkIsEquippableToAll","outputs":[{"internalType":"bool","name":"isEquippable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPartIds","outputs":[{"internalType":"uint64[]","name":"partIds","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLock","outputs":[{"internalType":"bool","name":"isLocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getPaginatedPartIds","outputs":[{"internalType":"uint64[]","name":"partIds","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"}],"name":"getPart","outputs":[{"components":[{"internalType":"enum IRMRKCatalog.ItemType","name":"itemType","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"},{"internalType":"address[]","name":"equippable","type":"address[]"},{"internalType":"string","name":"metadataURI","type":"string"}],"internalType":"struct IRMRKCatalog.Part","name":"part","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getPartByIndex","outputs":[{"components":[{"internalType":"enum IRMRKCatalog.ItemType","name":"itemType","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"},{"internalType":"address[]","name":"equippable","type":"address[]"},{"internalType":"string","name":"metadataURI","type":"string"}],"internalType":"struct IRMRKCatalog.Part","name":"part","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"partIds","type":"uint64[]"}],"name":"getParts","outputs":[{"components":[{"internalType":"enum IRMRKCatalog.ItemType","name":"itemType","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"},{"internalType":"address[]","name":"equippable","type":"address[]"},{"internalType":"string","name":"metadataURI","type":"string"}],"internalType":"struct IRMRKCatalog.Part[]","name":"parts","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalParts","outputs":[{"internalType":"uint256","name":"totalParts","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contributor","type":"address"}],"name":"isContributor","outputs":[{"internalType":"bool","name":"isContributor_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contributor","type":"address"},{"internalType":"bool","name":"grantRole","type":"bool"}],"name":"manageContributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"}],"name":"resetEquippableAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"},{"internalType":"address[]","name":"equippableAddresses","type":"address[]"}],"name":"setEquippableAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"partId","type":"uint64"}],"name":"setEquippableToAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newType","type":"string"}],"name":"setType","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506040516200222f3803806200222f833981016040819052620000349162000196565b8181620000413362000061565b6200004c82620000b1565b6200005781620000c3565b505050506200035b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6006620000bf82826200028f565b5050565b6007620000bf82826200028f565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000f957600080fd5b81516001600160401b0380821115620001165762000116620000d1565b604051601f8301601f19908116603f01168101908282118183101715620001415762000141620000d1565b816040528381526020925086838588010111156200015e57600080fd5b600091505b8382101562000182578582018301518183018401529082019062000163565b600093810190920192909252949350505050565b60008060408385031215620001aa57600080fd5b82516001600160401b0380821115620001c257600080fd5b620001d086838701620000e7565b93506020850151915080821115620001e757600080fd5b50620001f685828601620000e7565b9150509250929050565b600181811c908216806200021557607f821691505b6020821081036200023657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200028a57600081815260208120601f850160051c81016020861015620002655750805b601f850160051c820191505b81811015620002865782815560010162000271565b5050505b505050565b81516001600160401b03811115620002ab57620002ab620000d1565b620002c381620002bc845462000200565b846200023c565b602080601f831160018114620002fb5760008415620002e25750858301515b600019600386901b1c1916600185901b17855562000286565b600085815260208120601f198616915b828110156200032c578886015182559484019460019091019084016200030b565b50858210156200034b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611ec4806200036b6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c8063867cc5c4116100de578063b9cd295911610097578063dc477d2f11610071578063dc477d2f14610361578063dcb79d561461038d578063f005548c146103a0578063f2fde38b146103b357600080fd5b8063b9cd295914610333578063ba146b2814610346578063d297ac431461034e57600080fd5b8063867cc5c4146102aa57806386a92af7146102bd5780638da5cb5b146102c55780638f7e7b49146102e057806396282ba3146103005780639806c6ec1461031357600080fd5b80636c508e661161014b578063750521f511610125578063750521f51461027157806379e8ca9e146102845780637aba6f37146102975780637e5852d91461029f57600080fd5b80636c508e66146102435780637084819a14610256578063715018a61461026957600080fd5b806301ffc9a714610193578063037dc677146101bb57806315dae03e146101db5780631d0d35f5146101f057806327a964841461021d5780636b27270214610232575b600080fd5b6101a66101a136600461150e565b6103c6565b60405190151581526020015b60405180910390f35b6101ce6101c936600461153f565b6103f1565b6040516101b29190611561565b6101e36104f3565b6040516101b291906115f4565b6101a66101fe366004611623565b6001600160a01b03166000908152600160208190526040909120541490565b61023061022b3660046118c6565b610585565b005b6005546040519081526020016101b2565b610230610251366004611902565b6105a1565b610230610264366004611902565b6105b2565b6102306105c3565b61023061027f36600461191d565b6105d7565b610230610292366004611951565b610614565b6102306106d1565b6002546001146101a6565b6102306102b836600461198d565b610709565b6101e3610722565b6000546040516001600160a01b0390911681526020016101b2565b6102f36102ee366004611a3d565b610731565b6040516101b29190611b1e565b61023061030e36600461191d565b61079f565b610326610321366004611b31565b6107ea565b6040516101b29190611bc8565b610230610341366004611c2a565b610a10565b6101ce610a26565b6102f361035c366004611902565b610aaf565b6101a661036f366004611902565b6001600160401b031660009081526004602052604090205460ff1690565b6101a661039b366004611c77565b610c2f565b6102306103ae366004611c2a565b610d59565b6102306103c1366004611623565b610d6b565b60006001600160e01b03198216635f0efda160e11b14806103eb57506103eb82610da3565b92915050565b600554606090831061040257600091505b60055461040f8385611cc0565b111561042657600554610423908490611cd3565b91505b816001600160401b0381111561043e5761043e61163e565b604051908082528060200260200182016040528015610467578160200160208202803683370190505b50905060005b828110156104ec5760056104818286611cc0565b8154811061049157610491611ce6565b90600052602060002090600491828204019190066008029054906101000a90046001600160401b03168282815181106104cc576104cc611ce6565b6001600160401b039092166020928302919091019091015260010161046d565b5092915050565b60606007805461050290611cfc565b80601f016020809104026020016040519081016040528092919081815260200182805461052e90611cfc565b801561057b5780601f106105505761010080835404028352916020019161057b565b820191906000526020600020905b81548152906001019060200180831161055e57829003601f168201915b5050505050905090565b61058d610dd9565b610595610e18565b61059e81610e3b565b50565b6105a9610dd9565b61059e8161107a565b6105ba610dd9565b61059e816110d1565b6105cb61115c565b6105d56000611187565b565b6105df610dd9565b6105e8816111d7565b6040517fa5d4097edda6d87cb9329af83fb3712ef77eeb13738ffe43cc35a4ce305ad96290600090a150565b61061c61115c565b6001600160a01b0382166106435760405163016b812760e71b815260040160405180910390fd5b80610668576001600160a01b0382166000908152600160205260408120819055610687565b6001600160a01b03821660009081526001602081905260409091208190555b50816001600160a01b03167f4b5657e84cf8a17ac5587bbeb3cc2bab9826c4c67b8bad81b4849de49d37aac2826040516106c5911515815260200190565b60405180910390a25050565b6106d961115c565b60016002556040517f3e423347941b5c6e8c727e4071ffeb6869244ce75121d6a56ba8356086851c6c90600090a1565b610711610dd9565b610719610e18565b61059e816111e3565b60606006805461050290611cfc565b61075b60408051608081019091528060008152600060208201526060604082018190529081015290565b6103eb6005838154811061077157610771611ce6565b90600052602060002090600491828204019190066008029054906101000a90046001600160401b0316610aaf565b6107a7610dd9565b6107b08161121f565b7f79cd875c1d0ea2b5f60c11bda8f3208f4b3c384cfe2504893653655cdedc82f9816040516107df91906115f4565b60405180910390a150565b8051606090806001600160401b038111156108075761080761163e565b60405190808252806020026020018201604052801561086257816020015b61084f60408051608081019091528060008152600060208201526060604082018190529081015290565b8152602001906001900390816108255790505b50915060005b81811015610a0957600084828151811061088457610884611ce6565b6020908102919091018101516001600160401b03811660009081526003909252604091829020825160808101909352805491935090829060ff1660028111156108cf576108cf611a56565b60028111156108e0576108e0611a56565b81528154610100900460ff16602080830191909152600183018054604080518285028101850182528281529401939283018282801561094857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161092a575b5050505050815260200160028201805461096190611cfc565b80601f016020809104026020016040519081016040528092919081815260200182805461098d90611cfc565b80156109da5780601f106109af576101008083540402835291602001916109da565b820191906000526020600020905b8154815290600101906020018083116109bd57829003601f168201915b5050505050815250508483815181106109f5576109f5611ce6565b602090810291909101015250600101610868565b5050919050565b610a18610dd9565b610a22828261122b565b5050565b6060600580548060200260200160405190810160405280929190818152602001828054801561057b57602002820191906000526020600020906000905b82829054906101000a90046001600160401b03166001600160401b031681526020019060080190602082600701049283019260010382029150808411610a635790505050505050905090565b610ad960408051608081019091528060008152600060208201526060604082018190529081015290565b6001600160401b038216600090815260036020526040908190208151608081019092528054829060ff166002811115610b1457610b14611a56565b6002811115610b2557610b25611a56565b81528154610100900460ff166020808301919091526001830180546040805182850281018501825282815294019392830182828015610b8d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b6f575b50505050508152602001600282018054610ba690611cfc565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd290611cfc565b8015610c1f5780601f10610bf457610100808354040283529160200191610c1f565b820191906000526020600020905b815481529060010190602001808311610c0257829003601f168201915b5050505050815250509050919050565b6001600160401b03821660009081526004602052604090205460ff1680158015610c85575060016001600160401b03841660009081526003602052604090205460ff166002811115610c8357610c83611a56565b145b156103eb576001600160401b038316600090815260036020908152604080832060010180548251818502810185019093528083529192909190830182828015610cf757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610cd9575b505083519394506000925050505b81811015610d5057828181518110610d1f57610d1f611ce6565b60200260200101516001600160a01b0316856001600160a01b031603610d485760019350610d50565b600101610d05565b50505092915050565b610d61610dd9565b610a2282826112e4565b610d7361115c565b6001600160a01b038116610d9a57604051634ece6ecf60e01b815260040160405180910390fd5b61059e81611187565b60006001600160e01b031982166301ffc9a760e01b14806103eb57506001600160e01b0319821663d912401f60e01b1492915050565b6000546001600160a01b03163314801590610dfa5750610df8336101fe565b155b156105d5576040516301eca16760e41b815260040160405180910390fd5b6002546001036105d55760405163ed1fa96f60e01b815260040160405180910390fd5b805160208201516001600160401b038216610e69576040516312c33ce360e01b815260040160405180910390fd5b6001600160401b03821660009081526003602052604081205460ff166002811115610e9657610e96611a56565b14610eb457604051630fbdf8dd60e01b815260040160405180910390fd5b600081516002811115610ec957610ec9611a56565b03610ee757604051630b65407360e01b815260040160405180910390fd5b600281516002811115610efc57610efc611a56565b148015610f0d575060408101515115155b15610f2b57604051630b65407360e01b815260040160405180910390fd5b6001600160401b03821660009081526003602052604090208151815483929190829060ff19166001836002811115610f6557610f65611a56565b0217905550602082810151825460ff9091166101000261ff001990911617825560408301518051610f9c926001850192019061147a565b5060608201516002820190610fb19082611d84565b5050600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06004820401805460039092166008026101000a6001600160401b038181021990931692861602919091179055508051600281111561102457611024611a56565b826001600160401b03167fc4715b52aed3b9dfb2fbdc63e39e234892ec1dd3811d2c671646dbfd3d32d92e83602001518460400151856060015160405161106d93929190611e43565b60405180910390a3505050565b80611084816113fb565b6001600160401b038216600081815260046020526040808220805460ff19166001179055517f540b0b22993accb6c2b7b0f4a5bd1b7e6419708ef2a68c39f09f01c848ba4fbc9190a25050565b806110db816113fb565b6001600160401b0382166000908152600360205260408120611102916001909101906114df565b6001600160401b0382166000818152600460209081526040808320805460ff191690558051928352908201908190527f507a75726ac34d3eb68ebf61f034616ee2030c6193bd4a9efb7e131de6c6adcc916106c591611e7b565b6000546001600160a01b031633146105d557604051631c62d58f60e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6006610a228282611d84565b805160005b8181101561121a5761121283828151811061120557611205611ce6565b6020026020010151610e3b565b6001016111e8565b505050565b6007610a228282611d84565b81611235816113fb565b600082511161125757604051631763fd3d60e21b815260040160405180910390fd5b6001600160401b038316600090815260036020908152604090912083516112869260019092019185019061147a565b506001600160401b03831660008181526004602052604090819020805460ff19169055517f507a75726ac34d3eb68ebf61f034616ee2030c6193bd4a9efb7e131de6c6adcc906112d7908590611e7b565b60405180910390a2505050565b816112ee816113fb565b600082511161131057604051631763fd3d60e21b815260040160405180910390fd5b815160005b8181101561139c5760036000866001600160401b03166001600160401b0316815260200190815260200160002060010184828151811061135757611357611ce6565b60209081029190910181015182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501611315565b506001600160401b03841660008181526004602052604090819020805460ff19169055517f379edf7304a765a58c7eba1fef9bc8675355bf31e276de44d60da39bb04c76ba906113ed908690611e7b565b60405180910390a250505050565b6001600160401b03811660009081526003602052604081205460ff169081600281111561142a5761142a611a56565b03611448576040516307ae018160e21b815260040160405180910390fd5b600281600281111561145c5761145c611a56565b03610a225760405163ae6a3b7760e01b815260040160405180910390fd5b8280548282559060005260206000209081019282156114cf579160200282015b828111156114cf57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061149a565b506114db9291506114f9565b5090565b508054600082559060005260206000209081019061059e91905b5b808211156114db57600081556001016114fa565b60006020828403121561152057600080fd5b81356001600160e01b03198116811461153857600080fd5b9392505050565b6000806040838503121561155257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156115a25783516001600160401b03168352928401929184019160010161157d565b50909695505050505050565b6000815180845260005b818110156115d4576020818501810151868301820152016115b8565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061153860208301846115ae565b80356001600160a01b038116811461161e57600080fd5b919050565b60006020828403121561163557600080fd5b61153882611607565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156116765761167661163e565b60405290565b604051608081016001600160401b03811182821017156116765761167661163e565b604051601f8201601f191681016001600160401b03811182821017156116c6576116c661163e565b604052919050565b80356001600160401b038116811461161e57600080fd5b60006001600160401b038211156116fe576116fe61163e565b5060051b60200190565b600082601f83011261171957600080fd5b8135602061172e611729836116e5565b61169e565b82815260059290921b8401810191818101908684111561174d57600080fd5b8286015b8481101561176f5761176281611607565b8352918301918301611751565b509695505050505050565b600082601f83011261178b57600080fd5b81356001600160401b038111156117a4576117a461163e565b6117b7601f8201601f191660200161169e565b8181528460208386010111156117cc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000604082840312156117fb57600080fd5b611803611654565b905061180e826116ce565b815260208201356001600160401b038082111561182a57600080fd5b908301906080828603121561183e57600080fd5b61184661167c565b82356003811061185557600080fd5b8152602083013560ff8116811461186b57600080fd5b602082015260408301358281111561188257600080fd5b61188e87828601611708565b6040830152506060830135828111156118a657600080fd5b6118b28782860161177a565b606083015250602084015250909392505050565b6000602082840312156118d857600080fd5b81356001600160401b038111156118ee57600080fd5b6118fa848285016117e9565b949350505050565b60006020828403121561191457600080fd5b611538826116ce565b60006020828403121561192f57600080fd5b81356001600160401b0381111561194557600080fd5b6118fa8482850161177a565b6000806040838503121561196457600080fd5b61196d83611607565b91506020830135801515811461198257600080fd5b809150509250929050565b600060208083850312156119a057600080fd5b82356001600160401b03808211156119b757600080fd5b818501915085601f8301126119cb57600080fd5b81356119d9611729826116e5565b81815260059190911b830184019084810190888311156119f857600080fd5b8585015b83811015611a3057803585811115611a145760008081fd5b611a228b89838a01016117e9565b8452509186019186016119fc565b5098975050505050505050565b600060208284031215611a4f57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600081518084526020808501945080840160005b83811015611aa55781516001600160a01b031687529582019590820190600101611a80565b509495945050505050565b6000815160038110611ad257634e487b7160e01b600052602160045260246000fd5b8084525060ff6020830151166020840152604082015160806040850152611afc6080850182611a6c565b905060608301518482036060860152611b1582826115ae565b95945050505050565b6020815260006115386020830184611ab0565b60006020808385031215611b4457600080fd5b82356001600160401b03811115611b5a57600080fd5b8301601f81018513611b6b57600080fd5b8035611b79611729826116e5565b81815260059190911b82018301908381019087831115611b9857600080fd5b928401925b82841015611bbd57611bae846116ce565b82529284019290840190611b9d565b979650505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1d57603f19888603018452611c0b858351611ab0565b94509285019290850190600101611bef565b5092979650505050505050565b60008060408385031215611c3d57600080fd5b611c46836116ce565b915060208301356001600160401b03811115611c6157600080fd5b611c6d85828601611708565b9150509250929050565b60008060408385031215611c8a57600080fd5b611c93836116ce565b9150611ca160208401611607565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103eb576103eb611caa565b818103818111156103eb576103eb611caa565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680611d1057607f821691505b602082108103611d3057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561121a57600081815260208120601f850160051c81016020861015611d5d5750805b601f850160051c820191505b81811015611d7c57828155600101611d69565b505050505050565b81516001600160401b03811115611d9d57611d9d61163e565b611db181611dab8454611cfc565b84611d36565b602080601f831160018114611de65760008415611dce5750858301515b600019600386901b1c1916600185901b178555611d7c565b600085815260208120601f198616915b82811015611e1557888601518255948401946001909101908401611df6565b5085821015611e335787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60ff84168152606060208201526000611e5f6060830185611a6c565b8281036040840152611e7181856115ae565b9695505050505050565b6020815260006115386020830184611a6c56fea264697066735822122069b506cabbfeedfdba654fa0b265d2c1f55f25e810b094273e353ac68a84c69664736f6c63430008150033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000053697066733a2f2f516d65326e377a73777451424b534a444d78324a565251716e4e31667650556a48385859526369533656724770352f6d6f6f6e65722f6d6f6f6e65722d636f6c6c656374696f6e2e6a736f6e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007696d6167652f2a00000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063867cc5c4116100de578063b9cd295911610097578063dc477d2f11610071578063dc477d2f14610361578063dcb79d561461038d578063f005548c146103a0578063f2fde38b146103b357600080fd5b8063b9cd295914610333578063ba146b2814610346578063d297ac431461034e57600080fd5b8063867cc5c4146102aa57806386a92af7146102bd5780638da5cb5b146102c55780638f7e7b49146102e057806396282ba3146103005780639806c6ec1461031357600080fd5b80636c508e661161014b578063750521f511610125578063750521f51461027157806379e8ca9e146102845780637aba6f37146102975780637e5852d91461029f57600080fd5b80636c508e66146102435780637084819a14610256578063715018a61461026957600080fd5b806301ffc9a714610193578063037dc677146101bb57806315dae03e146101db5780631d0d35f5146101f057806327a964841461021d5780636b27270214610232575b600080fd5b6101a66101a136600461150e565b6103c6565b60405190151581526020015b60405180910390f35b6101ce6101c936600461153f565b6103f1565b6040516101b29190611561565b6101e36104f3565b6040516101b291906115f4565b6101a66101fe366004611623565b6001600160a01b03166000908152600160208190526040909120541490565b61023061022b3660046118c6565b610585565b005b6005546040519081526020016101b2565b610230610251366004611902565b6105a1565b610230610264366004611902565b6105b2565b6102306105c3565b61023061027f36600461191d565b6105d7565b610230610292366004611951565b610614565b6102306106d1565b6002546001146101a6565b6102306102b836600461198d565b610709565b6101e3610722565b6000546040516001600160a01b0390911681526020016101b2565b6102f36102ee366004611a3d565b610731565b6040516101b29190611b1e565b61023061030e36600461191d565b61079f565b610326610321366004611b31565b6107ea565b6040516101b29190611bc8565b610230610341366004611c2a565b610a10565b6101ce610a26565b6102f361035c366004611902565b610aaf565b6101a661036f366004611902565b6001600160401b031660009081526004602052604090205460ff1690565b6101a661039b366004611c77565b610c2f565b6102306103ae366004611c2a565b610d59565b6102306103c1366004611623565b610d6b565b60006001600160e01b03198216635f0efda160e11b14806103eb57506103eb82610da3565b92915050565b600554606090831061040257600091505b60055461040f8385611cc0565b111561042657600554610423908490611cd3565b91505b816001600160401b0381111561043e5761043e61163e565b604051908082528060200260200182016040528015610467578160200160208202803683370190505b50905060005b828110156104ec5760056104818286611cc0565b8154811061049157610491611ce6565b90600052602060002090600491828204019190066008029054906101000a90046001600160401b03168282815181106104cc576104cc611ce6565b6001600160401b039092166020928302919091019091015260010161046d565b5092915050565b60606007805461050290611cfc565b80601f016020809104026020016040519081016040528092919081815260200182805461052e90611cfc565b801561057b5780601f106105505761010080835404028352916020019161057b565b820191906000526020600020905b81548152906001019060200180831161055e57829003601f168201915b5050505050905090565b61058d610dd9565b610595610e18565b61059e81610e3b565b50565b6105a9610dd9565b61059e8161107a565b6105ba610dd9565b61059e816110d1565b6105cb61115c565b6105d56000611187565b565b6105df610dd9565b6105e8816111d7565b6040517fa5d4097edda6d87cb9329af83fb3712ef77eeb13738ffe43cc35a4ce305ad96290600090a150565b61061c61115c565b6001600160a01b0382166106435760405163016b812760e71b815260040160405180910390fd5b80610668576001600160a01b0382166000908152600160205260408120819055610687565b6001600160a01b03821660009081526001602081905260409091208190555b50816001600160a01b03167f4b5657e84cf8a17ac5587bbeb3cc2bab9826c4c67b8bad81b4849de49d37aac2826040516106c5911515815260200190565b60405180910390a25050565b6106d961115c565b60016002556040517f3e423347941b5c6e8c727e4071ffeb6869244ce75121d6a56ba8356086851c6c90600090a1565b610711610dd9565b610719610e18565b61059e816111e3565b60606006805461050290611cfc565b61075b60408051608081019091528060008152600060208201526060604082018190529081015290565b6103eb6005838154811061077157610771611ce6565b90600052602060002090600491828204019190066008029054906101000a90046001600160401b0316610aaf565b6107a7610dd9565b6107b08161121f565b7f79cd875c1d0ea2b5f60c11bda8f3208f4b3c384cfe2504893653655cdedc82f9816040516107df91906115f4565b60405180910390a150565b8051606090806001600160401b038111156108075761080761163e565b60405190808252806020026020018201604052801561086257816020015b61084f60408051608081019091528060008152600060208201526060604082018190529081015290565b8152602001906001900390816108255790505b50915060005b81811015610a0957600084828151811061088457610884611ce6565b6020908102919091018101516001600160401b03811660009081526003909252604091829020825160808101909352805491935090829060ff1660028111156108cf576108cf611a56565b60028111156108e0576108e0611a56565b81528154610100900460ff16602080830191909152600183018054604080518285028101850182528281529401939283018282801561094857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161092a575b5050505050815260200160028201805461096190611cfc565b80601f016020809104026020016040519081016040528092919081815260200182805461098d90611cfc565b80156109da5780601f106109af576101008083540402835291602001916109da565b820191906000526020600020905b8154815290600101906020018083116109bd57829003601f168201915b5050505050815250508483815181106109f5576109f5611ce6565b602090810291909101015250600101610868565b5050919050565b610a18610dd9565b610a22828261122b565b5050565b6060600580548060200260200160405190810160405280929190818152602001828054801561057b57602002820191906000526020600020906000905b82829054906101000a90046001600160401b03166001600160401b031681526020019060080190602082600701049283019260010382029150808411610a635790505050505050905090565b610ad960408051608081019091528060008152600060208201526060604082018190529081015290565b6001600160401b038216600090815260036020526040908190208151608081019092528054829060ff166002811115610b1457610b14611a56565b6002811115610b2557610b25611a56565b81528154610100900460ff166020808301919091526001830180546040805182850281018501825282815294019392830182828015610b8d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b6f575b50505050508152602001600282018054610ba690611cfc565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd290611cfc565b8015610c1f5780601f10610bf457610100808354040283529160200191610c1f565b820191906000526020600020905b815481529060010190602001808311610c0257829003601f168201915b5050505050815250509050919050565b6001600160401b03821660009081526004602052604090205460ff1680158015610c85575060016001600160401b03841660009081526003602052604090205460ff166002811115610c8357610c83611a56565b145b156103eb576001600160401b038316600090815260036020908152604080832060010180548251818502810185019093528083529192909190830182828015610cf757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610cd9575b505083519394506000925050505b81811015610d5057828181518110610d1f57610d1f611ce6565b60200260200101516001600160a01b0316856001600160a01b031603610d485760019350610d50565b600101610d05565b50505092915050565b610d61610dd9565b610a2282826112e4565b610d7361115c565b6001600160a01b038116610d9a57604051634ece6ecf60e01b815260040160405180910390fd5b61059e81611187565b60006001600160e01b031982166301ffc9a760e01b14806103eb57506001600160e01b0319821663d912401f60e01b1492915050565b6000546001600160a01b03163314801590610dfa5750610df8336101fe565b155b156105d5576040516301eca16760e41b815260040160405180910390fd5b6002546001036105d55760405163ed1fa96f60e01b815260040160405180910390fd5b805160208201516001600160401b038216610e69576040516312c33ce360e01b815260040160405180910390fd5b6001600160401b03821660009081526003602052604081205460ff166002811115610e9657610e96611a56565b14610eb457604051630fbdf8dd60e01b815260040160405180910390fd5b600081516002811115610ec957610ec9611a56565b03610ee757604051630b65407360e01b815260040160405180910390fd5b600281516002811115610efc57610efc611a56565b148015610f0d575060408101515115155b15610f2b57604051630b65407360e01b815260040160405180910390fd5b6001600160401b03821660009081526003602052604090208151815483929190829060ff19166001836002811115610f6557610f65611a56565b0217905550602082810151825460ff9091166101000261ff001990911617825560408301518051610f9c926001850192019061147a565b5060608201516002820190610fb19082611d84565b5050600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06004820401805460039092166008026101000a6001600160401b038181021990931692861602919091179055508051600281111561102457611024611a56565b826001600160401b03167fc4715b52aed3b9dfb2fbdc63e39e234892ec1dd3811d2c671646dbfd3d32d92e83602001518460400151856060015160405161106d93929190611e43565b60405180910390a3505050565b80611084816113fb565b6001600160401b038216600081815260046020526040808220805460ff19166001179055517f540b0b22993accb6c2b7b0f4a5bd1b7e6419708ef2a68c39f09f01c848ba4fbc9190a25050565b806110db816113fb565b6001600160401b0382166000908152600360205260408120611102916001909101906114df565b6001600160401b0382166000818152600460209081526040808320805460ff191690558051928352908201908190527f507a75726ac34d3eb68ebf61f034616ee2030c6193bd4a9efb7e131de6c6adcc916106c591611e7b565b6000546001600160a01b031633146105d557604051631c62d58f60e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6006610a228282611d84565b805160005b8181101561121a5761121283828151811061120557611205611ce6565b6020026020010151610e3b565b6001016111e8565b505050565b6007610a228282611d84565b81611235816113fb565b600082511161125757604051631763fd3d60e21b815260040160405180910390fd5b6001600160401b038316600090815260036020908152604090912083516112869260019092019185019061147a565b506001600160401b03831660008181526004602052604090819020805460ff19169055517f507a75726ac34d3eb68ebf61f034616ee2030c6193bd4a9efb7e131de6c6adcc906112d7908590611e7b565b60405180910390a2505050565b816112ee816113fb565b600082511161131057604051631763fd3d60e21b815260040160405180910390fd5b815160005b8181101561139c5760036000866001600160401b03166001600160401b0316815260200190815260200160002060010184828151811061135757611357611ce6565b60209081029190910181015182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501611315565b506001600160401b03841660008181526004602052604090819020805460ff19169055517f379edf7304a765a58c7eba1fef9bc8675355bf31e276de44d60da39bb04c76ba906113ed908690611e7b565b60405180910390a250505050565b6001600160401b03811660009081526003602052604081205460ff169081600281111561142a5761142a611a56565b03611448576040516307ae018160e21b815260040160405180910390fd5b600281600281111561145c5761145c611a56565b03610a225760405163ae6a3b7760e01b815260040160405180910390fd5b8280548282559060005260206000209081019282156114cf579160200282015b828111156114cf57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061149a565b506114db9291506114f9565b5090565b508054600082559060005260206000209081019061059e91905b5b808211156114db57600081556001016114fa565b60006020828403121561152057600080fd5b81356001600160e01b03198116811461153857600080fd5b9392505050565b6000806040838503121561155257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156115a25783516001600160401b03168352928401929184019160010161157d565b50909695505050505050565b6000815180845260005b818110156115d4576020818501810151868301820152016115b8565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061153860208301846115ae565b80356001600160a01b038116811461161e57600080fd5b919050565b60006020828403121561163557600080fd5b61153882611607565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156116765761167661163e565b60405290565b604051608081016001600160401b03811182821017156116765761167661163e565b604051601f8201601f191681016001600160401b03811182821017156116c6576116c661163e565b604052919050565b80356001600160401b038116811461161e57600080fd5b60006001600160401b038211156116fe576116fe61163e565b5060051b60200190565b600082601f83011261171957600080fd5b8135602061172e611729836116e5565b61169e565b82815260059290921b8401810191818101908684111561174d57600080fd5b8286015b8481101561176f5761176281611607565b8352918301918301611751565b509695505050505050565b600082601f83011261178b57600080fd5b81356001600160401b038111156117a4576117a461163e565b6117b7601f8201601f191660200161169e565b8181528460208386010111156117cc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000604082840312156117fb57600080fd5b611803611654565b905061180e826116ce565b815260208201356001600160401b038082111561182a57600080fd5b908301906080828603121561183e57600080fd5b61184661167c565b82356003811061185557600080fd5b8152602083013560ff8116811461186b57600080fd5b602082015260408301358281111561188257600080fd5b61188e87828601611708565b6040830152506060830135828111156118a657600080fd5b6118b28782860161177a565b606083015250602084015250909392505050565b6000602082840312156118d857600080fd5b81356001600160401b038111156118ee57600080fd5b6118fa848285016117e9565b949350505050565b60006020828403121561191457600080fd5b611538826116ce565b60006020828403121561192f57600080fd5b81356001600160401b0381111561194557600080fd5b6118fa8482850161177a565b6000806040838503121561196457600080fd5b61196d83611607565b91506020830135801515811461198257600080fd5b809150509250929050565b600060208083850312156119a057600080fd5b82356001600160401b03808211156119b757600080fd5b818501915085601f8301126119cb57600080fd5b81356119d9611729826116e5565b81815260059190911b830184019084810190888311156119f857600080fd5b8585015b83811015611a3057803585811115611a145760008081fd5b611a228b89838a01016117e9565b8452509186019186016119fc565b5098975050505050505050565b600060208284031215611a4f57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600081518084526020808501945080840160005b83811015611aa55781516001600160a01b031687529582019590820190600101611a80565b509495945050505050565b6000815160038110611ad257634e487b7160e01b600052602160045260246000fd5b8084525060ff6020830151166020840152604082015160806040850152611afc6080850182611a6c565b905060608301518482036060860152611b1582826115ae565b95945050505050565b6020815260006115386020830184611ab0565b60006020808385031215611b4457600080fd5b82356001600160401b03811115611b5a57600080fd5b8301601f81018513611b6b57600080fd5b8035611b79611729826116e5565b81815260059190911b82018301908381019087831115611b9857600080fd5b928401925b82841015611bbd57611bae846116ce565b82529284019290840190611b9d565b979650505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1d57603f19888603018452611c0b858351611ab0565b94509285019290850190600101611bef565b5092979650505050505050565b60008060408385031215611c3d57600080fd5b611c46836116ce565b915060208301356001600160401b03811115611c6157600080fd5b611c6d85828601611708565b9150509250929050565b60008060408385031215611c8a57600080fd5b611c93836116ce565b9150611ca160208401611607565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103eb576103eb611caa565b818103818111156103eb576103eb611caa565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680611d1057607f821691505b602082108103611d3057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561121a57600081815260208120601f850160051c81016020861015611d5d5750805b601f850160051c820191505b81811015611d7c57828155600101611d69565b505050505050565b81516001600160401b03811115611d9d57611d9d61163e565b611db181611dab8454611cfc565b84611d36565b602080601f831160018114611de65760008415611dce5750858301515b600019600386901b1c1916600185901b178555611d7c565b600085815260208120601f198616915b82811015611e1557888601518255948401946001909101908401611df6565b5085821015611e335787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60ff84168152606060208201526000611e5f6060830185611a6c565b8281036040840152611e7181856115ae565b9695505050505050565b6020815260006115386020830184611a6c56fea264697066735822122069b506cabbfeedfdba654fa0b265d2c1f55f25e810b094273e353ac68a84c69664736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000053697066733a2f2f516d65326e377a73777451424b534a444d78324a565251716e4e31667650556a48385859526369533656724770352f6d6f6f6e65722f6d6f6f6e65722d636f6c6c656374696f6e2e6a736f6e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007696d6167652f2a00000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : metadataURI (string): ipfs://Qme2n7zswtQBKSJDMx2JVRQqnN1fvPUjH8XYRciS6VrGp5/mooner/mooner-collection.json
Arg [1] : type_ (string): image/*
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000053
Arg [3] : 697066733a2f2f516d65326e377a73777451424b534a444d78324a565251716e
Arg [4] : 4e31667650556a48385859526369533656724770352f6d6f6f6e65722f6d6f6f
Arg [5] : 6e65722d636f6c6c656374696f6e2e6a736f6e00000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [7] : 696d6167652f2a00000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in GLMR
Multichain Portfolio | 35 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.