0.0.1-rc7 • Published 4 years ago

wearable-contracts v0.0.1-rc7

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Set Up a Factory

A factory contract is used to sell wearables at OpenSea. The interface is defined here.

Every optionId is the index of a wearableId in the wearables array of an ERC721Collection

ERC721CollectionFactory.sol

function _wearableByOptionId(uint256 _optionId) internal view returns (string memory){
    /* solium-disable-next-line */
    (bool success, bytes memory data) = address(erc721Collection).staticcall(
        abi.encodeWithSelector(
            erc721Collection.wearables.selector,
            _optionId
        )
    );

    require(success, "Invalid wearable");
    return abi.decode(data, (string));
}

OpenSea uses the Wyvern Protocol https://docs.opensea.io/docs/opensea-partners-program. Only one address will be allowed to create option orders. A proxy to this address will be created once the address first interacts with OpenSea.

The contracts for the ProxyRegistry can be seen here. Calling proxies on the Mainnet contract, the user can check if a proxy address was created for her address.

0.0.1-rc7

4 years ago

0.0.1-rc6

4 years ago

0.0.1-rc3

4 years ago

0.0.1-rc4

4 years ago

0.0.1-rc5

4 years ago

0.0.1-rc2

4 years ago

0.0.1-rc1

4 years ago