ProjectOpenSea / opensea-creatures

Example non-fungible collectible, to demonstrate OpenSea integration
https://docs.opensea.io
MIT License
1.17k stars 790 forks source link

NFT crowd sale using custom contract on Polygon? #213

Open stpoa opened 2 years ago

stpoa commented 2 years ago

Hi Is it possible to do NFT crowdsale using Polygon? Like on Rinkeby with this manual: https://docs.opensea.io/docs/2-custom-item-sale-contract

I did a crowd sale using Rinkeby and testnets.opensea.com. After deploying the NFT contract and NFT contract factory I used the NFT contract factory address for the URL and it worked fine as described in docs:

testnets.opensea.io/address/rinkeby/{factoryAddress}/0

After deploying on polygon I tried to use and it doesn't work for some reason. I get 404.

opensea.io/address/matic/{factoryAddress}/0

For deployment on Polygon I used:

PROXY_REGISTRY_OPENSEA: "0x58807baD0B376efc12F5AD86aAc70E78ed67deaE"

Example https://opensea.io/assets/matic/0xceA562B88299188Ab31aCAedf5a9B255C5921627/0

wg-d commented 2 years ago

You can sell NFT on polygon.https://support.opensea.io/hc/en-us/articles/4404029357587-How-do-I-create-and-sell-NFTs-on-Polygon-

stpoa commented 2 years ago

I know that, but I asked about a crowd sale using custom Solidity contract. @wg-d

I followed this https://docs.opensea.io/docs/2-custom-item-sale-contract and It worked on Rinkeby, but It didn't work on Matic.

stpoa commented 2 years ago

Similar to: https://github.com/ProjectOpenSea/opensea-creatures/issues/106 https://github.com/ProjectOpenSea/opensea-creatures/issues/149

Please help with this, this problem is reported by multiple users.

zhenmu commented 2 years ago

Hi Is it possible to do NFT crowdsale using Polygon? Like on Rinkeby with this manual: https://docs.opensea.io/docs/2-custom-item-sale-contract

I did a crowd sale using Rinkeby and testnets.opensea.com. After deploying the NFT contract and NFT contract factory I used the NFT contract factory address for the URL and it worked fine as described in docs:

testnets.opensea.io/address/rinkeby/{factoryAddress}/0

After deploying on polygon I tried to use and it doesn't work for some reason. I get 404.

opensea.io/address/matic/{factoryAddress}/0

For deployment on Polygon I used:

PROXY_REGISTRY_OPENSEA: "0x58807baD0B376efc12F5AD86aAc70E78ed67deaE"

Example https://opensea.io/assets/matic/0xceA562B88299188Ab31aCAedf5a9B255C5921627/0

same problems.

Finally, I added the function:

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

such as:

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

or


    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        bytes4 _ERC165_ = 0x01ffc9a7;
        bytes4 _ERC721_ = 0x80ac58cd;
        bytes4 _ERC2981_ = 0x2a55205a;
        bytes4 _ERC721Metadata_ = 0x5b5e139f;
        return interfaceId == _ERC165_ 
            || interfaceId == _ERC721_
            || interfaceId == _ERC2981_
            || interfaceId == _ERC721Metadata_;
    }