Skip to content

UniverseWizardV1

UniverseWizardV1

constructor

constructor(address metahub) public

Universe Wizard constructor

setupUniverse

function setupUniverse(struct IUniverseRegistry.UniverseParams universeParams) external returns (uint256 universeId)

Does a setup of universe.

Name Type Description
universeParams struct IUniverseRegistry.UniverseParams Universe registration params.
Name Type Description
universeId uint256 Universe ID.

setupUniverseAndWarper

function setupUniverseAndWarper(struct IUniverseRegistry.UniverseParams universeParams, struct ITaxTermsRegistry.TaxTerms universeWarperTaxTerms, address existingWarperAddress, struct IWarperManager.WarperRegistrationParams warperRegistrationParams, bytes32 warperPresetId, bytes warperInitData) external returns (uint256 universeId, address deployedWarperAddress)

Does a setup of universe. Step 1. create universe; Step 2. deploy warper from a preset (if no `existingWarperAddress` is provided); Step 3. register deployed warper; Step 4. define Warper Tax Terms;

Name Type Description
universeParams struct IUniverseRegistry.UniverseParams Universe registration params.
universeWarperTaxTerms struct ITaxTermsRegistry.TaxTerms Tax terms for Warper in Universe.
existingWarperAddress address Already deployed Warper address.
warperRegistrationParams struct IWarperManager.WarperRegistrationParams Not fully filled (without universeId) Warper registration params.
warperPresetId bytes32 Warper Preset ID.
warperInitData bytes Bytes with Warper constructor params.
Name Type Description
universeId uint256 Universe ID.
deployedWarperAddress address Deployed Warper address (new or existing one).

onERC721Received

function onERC721Received(address operator, address from, uint256 tokenId, bytes data) external returns (bytes4)

_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`._

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

supportsInterface

function supportsInterface(bytes4 interfaceId) public view returns (bool)

_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._