{"id":20508812,"url":"https://github.com/smkplus/opensea","last_synced_at":"2026-04-16T23:32:21.402Z","repository":{"id":101453448,"uuid":"449285645","full_name":"smkplus/OpenSea","owner":"smkplus","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-18T13:00:12.000Z","size":3161,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T22:46:40.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smkplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-18T13:00:10.000Z","updated_at":"2024-06-02T14:48:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"0de548f9-2fa0-4cd9-8164-ecc8d0d2600c","html_url":"https://github.com/smkplus/OpenSea","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"ProjectOpenSea/opensea-creatures","purl":"pkg:github/smkplus/OpenSea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FOpenSea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FOpenSea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FOpenSea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FOpenSea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smkplus","download_url":"https://codeload.github.com/smkplus/OpenSea/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smkplus%2FOpenSea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27530768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-05T02:00:07.920Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:20:31.207Z","updated_at":"2025-12-05T23:03:07.639Z","avatar_url":"https://github.com/smkplus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OpenSea Creatures - Starter ERC721, ERC1155, and factory contracts\n\nWhat's included:\n\n### Sample ERC721/ERC1155 Contracts\n\nThis includes a very simple sample ERC721 / ERC1155 for the purposes of demonstrating integration with the [OpenSea](https://opensea.io) marketplace. We include a script for minting the items.\n\nAdditionally, this contract whitelists the proxy accounts of OpenSea users so that they are automatically able to trade the ERC721 item on OpenSea (without having to pay gas for an additional approval). On OpenSea, each user has a \"proxy\" account that they control, and is ultimately called by the exchange contracts to trade their items. (Note that this addition does not mean that OpenSea itself has access to the items, simply that the users can list them more easily if they wish to do so)\n\n### Factory Contracts\n\nIn addition to these template 721/1155 contracts, we provide sample factory contracts for running gas-free presales of items that haven't been minted yet. See https://docs.opensea.io/docs/opensea-initial-item-sale-tutorial for more info.\n\n## Requirements\n\n### Node version\n\nEither make sure you're running a version of node compliant with the `engines` requirement in `package.json`, or install Node Version Manager [`nvm`](https://github.com/creationix/nvm) and run `nvm use` to use the correct version of node.\n\n## Installation\n\nRun\n\n```bash\nyarn\n```\n\nIf you run into an error while building the dependencies and you're on a Mac, run the code below, remove your `node_modules` folder, and do a fresh `yarn install`:\n\n```bash\nxcode-select --install # Install Command Line Tools if you haven't already.\nsudo xcode-select --switch /Library/Developer/CommandLineTools # Enable command line tools\nsudo npm explore npm -g -- npm install node-gyp@latest # Update node-gyp\n```\n\n## Deploying\n\n### Deploying to the Rinkeby network.\n\n0. Add test fundings to your Rinkeby testnet node on https://faucet.rinkeby.io\n1. To access a Rinkeby testnet node, you'll need to sign up for [Alchemy](https://dashboard.alchemyapi.io/signup?referral=affiliate:e535c3c3-9bc4-428f-8e27-4b70aa2e8ca5) and get a free API key. Click \"View Key\" and then copy the part of the URL after `v2/`.\n   a. You can use [Infura](https://infura.io) if you want as well. Just change `ALCHEMY_KEY` below to `INFURA_KEY`.\n2. Using your API key and the mnemonic for your Metamask wallet (make sure you're using a Metamask seed phrase that you're comfortable using for testing purposes), run:\n\n```\nexport ALCHEMY_KEY=\"\u003cyour_alchemy_project_id\u003e\"\nexport MNEMONIC=\"\u003cmetmask_mnemonic\u003e\"\nexport DEPLOY_CREATURES_SALE=0 \nyarn truffle deploy --network rinkeby\n```\n\n### Minting tokens.\n\nAfter deploying to the Rinkeby network, there will be a contract on Rinkeby that will be viewable on [Rinkeby Etherscan](https://rinkeby.etherscan.io). For example, here is a [recently deployed contract](https://rinkeby.etherscan.io/address/0xeba05c5521a3b81e23d15ae9b2d07524bc453561). You should set this contract address and the address of your Metamask account as environment variables when running the minting script. If a [CreatureFactory was deployed](https://github.com/ProjectOpenSea/opensea-creatures/blob/master/migrations/2_deploy_contracts.js#L38), which the sample deploy steps above do, you'll need to specify its address below as it will be the owner on the NFT contract, and only it will have mint permissions. In that case, you won't need NFT_CONTRACT_ADDRESS, as all we need is the contract with mint permissions here.\n\n```\nexport OWNER_ADDRESS=\"\u003cmy_address\u003e\"\nexport NFT_CONTRACT_ADDRESS=\"\u003cdeployed_contract_address\u003e\"\nexport FACTORY_CONTRACT_ADDRESS=\"\u003cdeployed_factory_contract_address\u003e\"\nexport NETWORK=\"rinkeby\"\nnode scripts/mint.js\n```\n\n### Diagnosing Common Issues\n\nIf you're running a modified version of `sell.js` and not getting expected behavior, check the following:\n\n- Is the `expirationTime` in future? If no, change it to a time in the future.\n\n- Is the `expirationTime` a fractional second? If yes, round the listing time to the nearest second.\n\n- Are the input addresses all strings? If no, convert them to strings.\n\n- Are the input addresses checksummed? You might need to use the checksummed version of the address.\n\n- Is your computer's internal clock accurate? If no, try enabling automatic clock adjustment locally or following [this tutorial](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html) to update an Amazon EC2 instance.\n\n- Do you have any conflicts that result from globally installed node packages? If yes, try `yarn remove -g truffle; yarn`\n\n- Are you running a version of node compliant with the `engines` requirement in `package.json`? If no, try `nvm use; rm -rf node_modules; yarn`\n\n# About OpenSea Creature Accessories\n\nThis is a sample ERC-1155 contract for the purposes of demonstrating integration with the [OpenSea](https://opensea.io) marketplace for crypto collectibles. We also include:\n\n- A factory contract for making sell orders for unminted items (allowing for **gas-free and mint-free presales**).\n- A configurable lootbox contract for selling randomized collections of ERC-1155 items.\n\nOn top of the features from the OpenSea ERC721 sample contracts above, ERC1155\n\n- supports multiple creators per contract, where only the creator is able to mint more copies\n- supports pre-minted items for the lootbox to choose from\n\n## Configuring the Lootbox\n\nOpen CreatureAccessoryLootbox.sol\n\n1. Change `Class` to reflect your rarity levels.\n2. Change `NUM_CLASSES` to reflect how many classes you have (this gets used for sizing fixed-length arrays in Solidity)\n3. In `constructor`, set the `OptionSettings` for each of your classes. To do this, as in the example, call `setOptionSettings` with\n   1. Your option id,\n   2. The number of items to issue when the box is opened,\n   3. An array of probabilities (basis points, so integers out of 10,000) of receiving each class. Should add up to 10k and be descending in value.\n4. Then follow the instructions below to deploy it! Purchases will auto-open the box. If you'd like to make lootboxes tradable by users (without a purchase auto-opening it), contact us at contact@opensea.io (or better yet, in [Discord](https://discord.gg/ga8EJbv)).\n\n## Why are some standard methods overridden?\n\nThis contract overrides the `isApprovedForAll` method in order to whitelist the proxy accounts of OpenSea users. This means that they are automatically able to trade your ERC-1155 items on OpenSea (without having to pay gas for an additional approval). On OpenSea, each user has a \"proxy\" account that they control, and is ultimately called by the exchange contracts to trade their items.\n\nNote that this addition does not mean that OpenSea itself has access to the items, simply that the users can list them more easily if they wish to do so!\n\n# Requirements\n\n### Node version\n\nEither make sure you're running a version of node compliant with the `engines` requirement in `package.json`, or install Node Version Manager [`nvm`](https://github.com/creationix/nvm) and run `nvm use` to use the correct version of node.\n\n## Installation\n\nRun\n\n```bash\nyarn\n```\n\n## Deploying\n\n### Deploying to the Rinkeby network.\n\n1. Follow the steps above to get a Rinkeby node API key\n2. Using your API key and the mnemonic for your MetaMask wallet (make sure you're using a MetaMask seed phrase that you're comfortable using for testing purposes), run:\n\n```\nexport ALCHEMY_KEY=\"\u003calchemy_project_id\u003e\" # or you can use INFURA_KEY\nexport MNEMONIC=\"\u003cmetmask_mnemonic\u003e\"\nDEPLOY_ACCESSORIES_SALE=1 yarn truffle migrate --network rinkeby\n```\n\n### Deploying to the mainnet Ethereum network.\n\nMake sure your wallet has at least a few dollars worth of ETH in it. Then run:\n\n```\nyarn truffle migrate --network live\n```\n\nLook for your newly deployed contract address in the logs! 🥳\n\n### Viewing your items on OpenSea\n\nOpenSea will automatically pick up transfers on your contract. You can visit an asset by going to `https://opensea.io/assets/CONTRACT_ADDRESS/TOKEN_ID`.\n\nTo load all your metadata on your items at once, visit [https://opensea.io/get-listed](https://opensea.io/get-listed) and enter your address to load the metadata into OpenSea! You can even do this for the Rinkeby test network if you deployed there, by going to [https://rinkeby.opensea.io/get-listed](https://rinkeby.opensea.io/get-listed).\n\n### Troubleshooting\n\n#### It doesn't compile!\n\nInstall truffle locally: `yarn add truffle`. Then run `yarn truffle migrate ...`.\n\nYou can also debug just the compile step by running `yarn truffle compile`.\n\n#### It doesn't deploy anything!\n\nThis is often due to the truffle-hdwallet provider not being able to connect. Go to your [Alchemy Dashboard](https://dashboard.alchemyapi.io/signup?referral=affiliate:e535c3c3-9bc4-428f-8e27-4b70aa2e8ca5) (or infura.io) and create a new project. Use your \"project ID\" as your new `ALCHEMY_KEY` and make sure you export that command-line variable above.\n\n### ERC1155 Implementation\n\nTo implement the ERC1155 standard, these contracts use the Multi Token Standard by [Horizon Games](https://horizongames.net/), available on [npm](https://www.npmjs.com/package/multi-token-standard) and [GitHub](https://github.com/arcadeum/multi-token-standard) and also under the MIT License.\n\n# Running Local Tests\n\nIn one terminal window, run:\n\n    yarn run ganache-cli\n\nOnce Ganache has started, run the following in another terminal window:\n\n    yarn run test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmkplus%2Fopensea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmkplus%2Fopensea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmkplus%2Fopensea/lists"}