{"id":13603424,"url":"https://github.com/moleculeprotocol/IPNFT","last_synced_at":"2025-04-11T19:32:03.240Z","repository":{"id":121170831,"uuid":"382020181","full_name":"moleculeprotocol/IPNFT","owner":"moleculeprotocol","description":"IP-NFTs are building blocks for the DeSci economy.","archived":false,"fork":false,"pushed_at":"2024-10-17T12:19:33.000Z","size":5095,"stargazers_count":27,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T12:59:24.510Z","etag":null,"topics":["desci","nft","web3"],"latest_commit_sha":null,"homepage":"https://docs.molecule.to/documentation/ip-nft-protocol/intro-to-ip-nft","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moleculeprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/ARCHITECTURE.md","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-01T12:07:52.000Z","updated_at":"2024-10-17T12:19:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac5ae6b0-21d8-42cf-ba44-5ad7a59d653b","html_url":"https://github.com/moleculeprotocol/IPNFT","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculeprotocol%2FIPNFT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculeprotocol%2FIPNFT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculeprotocol%2FIPNFT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleculeprotocol%2FIPNFT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moleculeprotocol","download_url":"https://codeload.github.com/moleculeprotocol/IPNFT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248466981,"owners_count":21108573,"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","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":["desci","nft","web3"],"created_at":"2024-08-01T19:00:21.708Z","updated_at":"2025-04-11T19:32:03.229Z","avatar_url":"https://github.com/moleculeprotocol.png","language":"HTML","funding_links":[],"categories":["Software"],"sub_categories":[],"readme":"# IPNFT\n\nIP-NFTs allow their users to tokenize intellectual property. This repo contains code for IP-NFT smart contracts and compatible subgraphs. Details on how IP-NFTs are minted, their purpose and applications [can be found here](https://docs.molecule.to)\n\n## Deployments\n\n### Mainnet\n\n| Contract               | Address                                                                                                                    | Actions                                                                                                                                                                                                                                                                                                 |\n| ---------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| IP-NFT                 | [0xcaD88677CA87a7815728C72D74B4ff4982d54Fc1](https://etherscan.io/address/0xcaD88677CA87a7815728C72D74B4ff4982d54Fc1#code) | \u003ca href=\"https://thirdweb.com/ethereum/0xcaD88677CA87a7815728C72D74B4ff4982d54Fc1?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xcaD88677CA87a7815728C72D74B4ff4982d54Fc1\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| SignedMintAuthorizer   | [0xBc5FbB45A2bbB64d9B2EeBFa327284a35d5C5865](https://etherscan.io/address/0xBc5FbB45A2bbB64d9B2EeBFa327284a35d5C5865#code) | \u003ca href=\"https://thirdweb.com/ethereum/0xBc5FbB45A2bbB64d9B2EeBFa327284a35d5C5865?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xBc5FbB45A2bbB64d9B2EeBFa327284a35d5C5865\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| SchmackoSwap           | [0xc09b8577c762b5e97a7d640f242e1d9bfaa7eb9d](https://etherscan.io/address/0xc09b8577c762b5e97a7d640f242e1d9bfaa7eb9d#code) | \u003ca href=\"https://thirdweb.com/ethereum/0xc09b8577c762b5E97a7D640F242E1D9bfAa7EB9d?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xc09b8577c762b5E97a7D640F242E1D9bfAa7EB9d\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Tokenizer              | [0x58EB89C69CB389DBef0c130C6296ee271b82f436](https://etherscan.io/address/0x58EB89C69CB389DBef0c130C6296ee271b82f436#code) | \u003ca href=\"https://thirdweb.com/ethereum/0x58EB89C69CB389DBef0c130C6296ee271b82f436?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x58EB89C69CB389DBef0c130C6296ee271b82f436\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Permissioner           | [0xC837E02982992B701A1B5e4E21fA01cEB0a628fA](https://etherscan.io/address/0xC837E02982992B701A1B5e4E21fA01cEB0a628fA#code) | \u003ca href=\"https://thirdweb.com/ethereum/0xC837E02982992B701A1B5e4E21fA01cEB0a628fA?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xC837E02982992B701A1B5e4E21fA01cEB0a628fA\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Crowdsale              | [0xf0a8d23f38e9cbbe01c4ed37f23bd519b65bc6c2](https://etherscan.io/address/0xf0a8d23f38e9cbbe01c4ed37f23bd519b65bc6c2#code) | \u003ca href=\"https://thirdweb.com/ethereum/0xf0a8d23f38e9cbbe01c4ed37f23bd519b65bc6c2?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xf0a8d23f38e9cbbe01c4ed37f23bd519b65bc6c2\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Locking Crowdsale      | [0xfbfd266bf3b49Db8746155AA318D4533Cc66DB26](https://etherscan.io/address/0xfbfd266bf3b49Db8746155AA318D4533Cc66DB26#code) | \u003ca href=\"https://thirdweb.com/ethereum/0xfbfd266bf3b49Db8746155AA318D4533Cc66DB26?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xfbfd266bf3b49Db8746155AA318D4533Cc66DB26\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| StakedLockingCrowdSale | [0x35Bce29F52f51f547998717CD598068Afa2B29B7](https://etherscan.io/address/0x35Bce29F52f51f547998717CD598068Afa2B29B7#code) | \u003ca href=\"https://thirdweb.com/ethereum/0x35Bce29F52f51f547998717CD598068Afa2B29B7?utm_source=contract_badge\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x35Bce29F52f51f547998717CD598068Afa2B29B7\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n\ntimelocked token implementation=0x625ed621d814645AA81C50c4f333D4a407576e8F  \n\n\n#### Subgraph\n\nAPI: https://subgraph.satsuma-prod.com/742d8952ab24/molecule--4039244/ip-nft-mainnet/api\nPlayground: https://subgraph.satsuma-prod.com/molecule--4039244/ip-nft-mainnet/playground\n\ntokenizer implementation 1.3: 0x6517DD48908F4C1FF4eD74FfD780908241a3654C  \ntokenizer implementation 1.2: 0xE8701330F196FeFe415b28dAA767AB076F42557A\ntokenizer implementation 1.1: 0x9C70FA8c87D7e94Fd63eeCCcA657D5c4224a36f3\n\niptoken implementation 1.3: 0x89a14Be8f7824d4775053Edad0f2fA2d6767b72B\niptoken implementation: 0x9E4fc6E6d1A64e3429aB852d3CB31AD7aa06997A\n\nipnft implementation 2.4: 0x6B179Dffac5E190c670176606f552cB792847f80\n\n#### Defender Relayer\n\nDeprecated after migrating to Defender 2 (was 0x3D30452c48F2448764d5819a9A2b684Ae2CC5AcF). We're using a key signoff with 0x8626c6293B5101E5E534B5B60F411a37294D8cBE.\n\n---\n\n### Sepolia\n\n| Contract           | Address                                    | Explorer                                                                                                                                                                                                                                                                                  |\n| ------------------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| IPNFT              | 0x152B444e60C526fe4434C721561a077269FcF61a | \u003ca href=\"https://sepolia.etherscan.io/address/0x152B444e60C526fe4434C721561a077269FcF61a#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x152B444e60C526fe4434C721561a077269FcF61a\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Swap               | 0x9e4c638e703d0Af3a3B9eb488dE79A16d402698f | \u003ca href=\"https://sepolia.etherscan.io/address/0x9e4c638e703d0Af3a3B9eb488dE79A16d402698f#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x9e4c638e703d0Af3a3B9eb488dE79A16d402698f\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Authorizer         | 0x7a9F3773352e4ee0Da6307Cd32C45fE89602129A | \u003ca href=\"https://sepolia.etherscan.io/address/0x7a9F3773352e4ee0Da6307Cd32C45fE89602129A#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x7a9F3773352e4ee0Da6307Cd32C45fE89602129A\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Terms Permissioner | 0xC05D649368d8A5e2E98CAa205d47795de5fCB599 | \u003ca href=\"https://sepolia.etherscan.io/address/0xC05D649368d8A5e2E98CAa205d47795de5fCB599#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xC05D649368d8A5e2E98CAa205d47795de5fCB599\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Tokenizer          | 0xca63411FF5187431028d003eD74B57531408d2F9 | \u003ca href=\"https://sepolia.etherscan.io/address/0xca63411FF5187431028d003eD74B57531408d2F9#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xca63411FF5187431028d003eD74B57531408d2F9\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Crowdsale          | 0x8cA737E2cdaE1Ceb332bEf7ba9eA711a3a2f8037 | \u003ca href=\"https://sepolia.etherscan.io/address/0x8cA737E2cdaE1Ceb332bEf7ba9eA711a3a2f8037#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x8cA737E2cdaE1Ceb332bEf7ba9eA711a3a2f8037\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Locking Crowdsale          | 0x0Da77f361bB56f065Aa21647d885685eb7cAE10F | \u003ca href=\"https://sepolia.etherscan.io/address/0x0Da77f361bB56f065Aa21647d885685eb7cAE10F#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x0Da77f361bB56f065Aa21647d885685eb7cAE10F\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| Staked Crowdsale   | 0xd1cE2EA7d3b0C9cAB025A4aD762FC00315141ad7 | \u003ca href=\"https://sepolia.etherscan.io/address/0xd1cE2EA7d3b0C9cAB025A4aD762FC00315141ad7#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xd1cE2EA7d3b0C9cAB025A4aD762FC00315141ad7\u0026theme=dark\u0026chainId=11155111\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n\ntimelocked token implementation=0xF8F79c1E02387b0Fc9DE0945cD9A2c06F127D851  \n\nnew SLCS with support for verifiable timelocks \u0026 distinctly configurable staking / locking periods: https://sepolia.etherscan.io/address/0x2d309CF13dC3872f9c9B1B06Ebf6F60caDe08d55#code\n\n#### Subgraphs\n\non Satsuma, Techprod Account\n\nAPI: https://subgraph.satsuma-prod.com/742d8952ab24/molecule--4039244/ip-nft-sepolia/api\nPlayground: https://subgraph.satsuma-prod.com/molecule--4039244/ip-nft-sepolia/playground\n\n#### Defender Relayer\n\nDeprecated after migrating to Defender 2 (was 0xd7B298c9fB0377124d01D4E826d9D5beFB7CD6FE). We're using a key signoff with 0x8626c6293B5101E5E534B5B60F411a37294D8cBE.\n\n#### Tokens\n\n| Contract          | Address                                    |                                                                                                                                                                                                                                                                                           |\n| ----------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| USDC (6 decimals) | 0xC7B1b8BEA20d559040928FA1e6a23a3c221286B1 | \u003ca href=\"https://sepolia.etherscan.io/address/0xC7B1b8BEA20d559040928FA1e6a23a3c221286B1#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xC7B1b8BEA20d559040928FA1e6a23a3c221286B1\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| MOL Dao           | 0xe0D404C22228b03D5b8a715Cb569C4944BC5A27A | \u003ca href=\"https://sepolia.etherscan.io/address/0xe0D404C22228b03D5b8a715Cb569C4944BC5A27A#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0xe0D404C22228b03D5b8a715Cb569C4944BC5A27A\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n| vested MOL Dao    | 0x8f80d1183CD983B01B0C9AC6777cC732Ec9800de | \u003ca href=\"https://sepolia.etherscan.io/address/0x8f80d1183CD983B01B0C9AC6777cC732Ec9800de#code\" target=\"_blank\"\u003e\u003cimg width=\"200\" height=\"45\" src=\"https://badges.thirdweb.com/contract?address=0x8f80d1183CD983B01B0C9AC6777cC732Ec9800de\u0026theme=dark\u0026chainId=1\" alt=\"View contract\" /\u003e\u003c/a\u003e |\n\nold\nPlain Crowdsale 0xc272b3e980ee3c1e52a9814b1a1d6c48295e8d91 https://sepolia.etherscan.io/address/0xc272b3e980ee3c1e52a9814b1a1d6c48295e8d91\n\n```\nIPNFT_ADDRESS=0x152B444e60C526fe4434C721561a077269FcF61a\nipnft impl 0x67881bbE2d58f5eeb2f2cad3a1FB7Bb6CB834A5A\nSOS_ADDRESS=0x9e4c638e703d0Af3a3B9eb488dE79A16d402698f\nAUTHORIZER_ADDRESS=0x7a9F3773352e4ee0Da6307Cd32C45fE89602129A\n\nTERMS_ACCEPTED_PERMISSIONER_ADDRESS=0xC05D649368d8A5e2E98CAa205d47795de5fCB599\nTOKENIZER_ADDRESS=0xca63411FF5187431028d003eD74B57531408d2F9\nCROWDSALE_ADDRESS=0x8cA737E2cdaE1Ceb332bEf7ba9eA711a3a2f8037\nSTAKED_LOCKING_CROWDSALE_ADDRESS=0xd1cE2EA7d3b0C9cAB025A4aD762FC00315141ad7\n\ninitial IP Token implementation=0xB16e92029De283800df9030De2F255DcB99F19e9\ntokenizer imple 0x672d3389b5c5a050ad93100d548817d87edc8597\n\nUSDC_ADDRESS=0x309EFD49752803D0B3Ddba2B66A7A900F99B4E70\nDAO_TOKEN_ADDRESS=0x62f3cBab2C84fbA31DEc50CD21dbb5577333C69a\nVDAO_TOKEN_ADDRESS=0x19A3036b828bffB5E14da2659E950E76f8e6BAA2\n```\n\n---\n\n### upgrading to Tokenizer 1.3\n\nforge script --private-key=$PRIVATE_KEY --rpc-url=$RPC_URL script/prod/RolloutTokenizerV13.s.sol --broadcast\n\n// 0xTokenizer 0xNewImpl 0xNewTokenImpl\ncast send --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY 0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e \"upgradeToAndCall(address,bytes)\" 0x70e0bA845a1A0F2DA3359C97E0285013525FFC49 0x84646c1f000000000000000000000000998abeb3e57409262ae5b751f60747921b33613e\n\n### Timelocked Tokens\n\noriginally the \"timelocked token\" was an inline concept of the slcs. Timelock contracts weren't reusable among cs impls. This changes as of beginning of 2025. As a rather simple but not very elegant (and certainly not correct) solution we decided to \"trust\" external locking contracts so you can reuse them among crowdsale instances. This was needed for the VitaRNA crowdsale that's supposed to just support locks, no stakes - and hence required another crowdsale instance. During this upgrade we decided to externalize the timelock token template so upcoming instances can be verified on chain.\n\n--- \n\n## Prerequisites\n\nTo work with this repository you have to install Foundry (\u003chttps://getfoundry.sh\u003e). Run the following command in your terminal, then follow the onscreen instructions (macOS and Linux):\n\n`curl -L https://foundry.paradigm.xyz | bash`\n\nThe above command will install `foundryup`. Then install Foundry by running `foundryup` in your terminal.\n\n(Check out the Foundry book for a Windows installation guide: \u003chttps://book.getfoundry.sh\u003e)\n\n## Usage\n\n### install dependencies and build\n\nRun `forge install`. This will clone dependency repos as submodules into the `lib` folder.\n\nRun `forge build`\n\n### Testing\n\nRun `forge test`\n\nRun `forge test --gas-report` for gas usage reports\n\nRun `forge test --match-contract IPNFTV2 -vvv -w` to watch only relevant tests an include meaningful output\n\n### Hardhat tests\n\nWe also added a basic hardhat environment to this project. While foundry stays our primary tool for contract development, hardhat allows us to test e.g. JSON / metadata related features of the contracts. After installing all js dependencies (`yarn`), you can execute the hardhat tests like:\n\n`yarn hardhat test --network hardhat`\n\n## Deployment\n\n### General config\n\n- The deploy scripts are located in `script`\n- Copy `.env.example` to `.env`\n- Set the `ETHERSCAN_KEY` if you want to verify deployed contracts on Etherscan.\n- Set a moderator address that's going to be enabled to issue and revoke mintpasses (only needed for \"real\" deployments)\n\nYou can place required env vars in your `.env` file and run `source .env` to get them into your current terminal session or provide them when invoking the command.\n\n### Deployment scripts\n\n- a fresh, proxied IPNFT deployment can be created by `forge script script/IPNFT.sol`\n- to rollout a new upgrade on a live network without calling the proxy's upgrade function, you can use `forge script script/UpgradeImplementation.s.sol:DeployImplementation` and invoke the upgrade function manually (e.g. from your multisig)\n- for the \"real\" thing you'll need to add `-f` and `--private-key` and finally `--broadcast` params .\n\n### Deploying everything locally\n\nYou need Docker.\n\n#### Automatically\n\n- `yarn localenv` sets up *everything* \n- use `./setupLocal.sh` to deploy all contracts. Add the optional `-f` or `--fixture` flag to also run the fixture scripts to tokenize one IPNFT or `-fx` to create two crowdsale instances. \n\n#### Manual\n\n- the dev scripts are supposed to run on your _local_ environment and depend on contract addresses on your local environment. Use `source .env` to pull deterministic local contract addresses to your local session.\n\n- Anvil is a local testnet node shipped with Foundry. You can use it for testing your contracts from frontends or for interacting over RPC. You can also use the anvil node from docker, see the [accompanying README in the `subgraph` folder](./subgraph/README.md).\n- Run `anvil -h 0.0.0.0` in a terminal window and keep it running\n\nTo just deploy all contracts using the default mnemonic's first account, run `forge script script/dev/Ipnft.s.sol:DeployIpnft -f $RPC_URL --broadcast`\n\nTo issue a mintpass, reserve and mint a test IPNFT for the 1st user, run `forge script script/dev/Ipnft.s.sol:FixtureIpnft -f $RPC_URL --broadcast`. This requires you to have executed Dev.s.sol before. This also creates a listing on Schmackoswap but doesn't accept it.\n\nTo deploy the Synthesizer, run `forge script script/dev/Synthesizer.s.sol:DeploySynthesizer -f $RPC_URL --broadcast`\nTo synthesize the test IPNFT, run `forge script script/dev/Synthesizer.s.sol:FixtureSynthesizer -f $RPC_URL --broadcast`\n\nTo deploy the StakedLockingCrowdSale contract, run `forge script script/dev/CrowdSale.s.sol:DeployCrowdSale -f $RPC_URL --broadcast`\nTo test a simple StakedLockingCrowdSale with Molecules, run `forge script script/dev/CrowdSale.s.sol:FixtureCrowdSale -f $RPC_URL --broadcast`\n\nTo approve and finalize the sales listing, run `forge script script/dev/ApproveAndBuy.s.sol -f $RPC_URL --broadcast`. See the inline comment on why this is a separate script.\n\n### Deploy to a live network\n\n\u003e The easiest way to deploy contracts without exposing a local private key is the thirdweb. Here's how you initialize the process from the root folder: `npx thirdweb@latest deploy`\n\nTo manually broadcast a bundle of deploy transactions, you can use `Deploy.s.sol`. It deploys all three relevant contracts (IPNFT, Schmackoswap and Mintpass) and sets up a first moderator (defined by the `MODERATOR_ADDRESS` env var). Make sure that you're using the correct moderator address for the network you're deploying to.\n\n1. Make sure you have the private key for your deployer account at hand and that it has ETH on the target network on it.\n2. Run `forge script script/Deploy.s.sol:DeployScript -f $RPC_URL --interactives 1 --sender \u003cdeployer address\u003e --broadcast -vvvv`\n3. Paste the private key for the deployer account\n4. to verify the contract during deployment, get an Etherscan API key and add `--verify --etherscan-api-key $ETHERSCAN_API_KEY` to the command.\n\n### Deploying the Synthesizer suite\n\nYou can deploy the Synthesizer individually, but we created a deployment script that deploys all relevant contracts in the recommended order. These are\n\n- BioPriceFeed\n- TermsAcceptedPermissioner\n- Synthesizer\n- StakedLockingCrowdSale\n\nYou can deploy them all in one go (requires the current network's IPNFT address):\n\n`IPNFT_ADDRESS=... forge script script/DeploySynthesizer.s.sol:DeploySynthesizerInfrastructure --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast`\n\nThe crowdsale computation model can be tried out here: \u003chttps://docs.google.com/spreadsheets/d/1vvGzs6n0nGqSBewJFKPsX4umMDCwNhKVqqhGELY543g/edit?usp=sharing\u003e\n\nDeploying and verifying a single contract without the help of any script\n`forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --chain 5 --etherscan-api-key $ETHERSCAN_API_KEY --verify src/crowdsale/StakedLockingCrowdSale.sol:StakedLockingCrowdSale`\n\nVerifying the staked crowdsale\n`forge verify-contract --chain-id=11155111 --etherscan-api-key=$ETHERSCAN_API_KEY --constructor-args $(cast abi-encode \"constructor(address)\" 0xF8F79c1E02387b0Fc9DE0945cD9A2c06F127D851) 0x7eeb7113f90893fb95c6666e3930235850f2bc6A src/crowdsale/StakedLockingCrowdSale.sol:StakedLockingCrowdSale`\n\n### Deploying (vested) test tokens\n\nTo test staked / vested token interactions, you need some test tokens. Here are 2 convenient script to get them running:\n\n`NAME=Vita SYMBOL=VITA SUPPLY_ETH=10000000 forge script script/Tokens.s.sol:DeployTestTokensManually --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast`\n\nand to create the vested tokens counterpart:\n\n`TOKEN=0xaddress forge script script/Tokens.s.sol:DeployTokenVesting --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast`\n\n### Testing a manual upgrade\n\ndeploy the old version\n\n```\nforge script script/IPNFT.s.sol -f $RPC_URL -vvvv --broadcast --private-key ...\n```\n\nswitch your branch or get the new contract impl at hand\n\n```\nPROXY_ADDRESS=\u003cthe proxy address\u003e forge script script/UpgradeImplementation.s.sol -f $RPC_URL --sender \u003cproxy-owner-address\u003e\n```\n\n(or use your pk and --broadcast to submit it)\n\n### Manually verify contracts on Etherscan\n\nfull docs: \u003chttps://book.getfoundry.sh/reference/forge/forge-verify-contract\u003e\n\n`forge verify-contract --chain-id 5 \u003caddress\u003e IPNFT`\n\nor, if you need to verify with constructor arguments:\n\n`forge verify-contract --chain-id 5 \u003caddress\u003e Mintpass --constructor-args $(cast abi-encode \"constructor(address)\" \"0xabcdef\")`\n\nERC1967 Proxies are verified using their implementation contstructor call\n\n`forge verify-contract --chain-id 5 \u003cproxyaddress\u003e ERC1967Proxy --constructor-args $(cast abi-encode \"constructor(address,bytes)\" \"\u003cimpladdress\u003e\" \"\")`\n\n## checking with mythril on docker\n\n`docker run -m 6G --cpus=8 -w /tmp -v $(pwd):/tmp mythril/myth analyze /tmp/src/IPNFT.sol --solc-json /tmp/mythril.config.json`\n\n## Creating coverage reports\n\nrequires the lcov suite installed on your machine\n\n```\nforge coverage --report lcov \u0026\u0026 genhtml lcov.info -o report --branch-coverage\n```\n\n## Interacting with cast\n\n`cast` is another CLI command installed by Foundry and allows you to query/manipulate your deployed contracts easily. Find out more here: \u003chttps://book.getfoundry.sh/cast/\u003e\n\nWhen having an RPC_URL in your local env, you e.g. can simply call view functions like this:  \n`cast call $IPNFT_ADDRESS \"tokenURI(uint256)\" 1 | cast --to-ascii`\n\n### manual interaction playbook\n\nHere are some helpful interaction examples with the contracts that you can execute from your command line. Ensure your local environment contains all contract addresses and is sourced to your terminal. We're using your local PRIVATE_KEY here\n\nManually issue 2 mintpasses to anvil address #0\n\n`cast send -i $MINTPASS_ADDRESS --private-key $PRIVATE_KEY \"batchMint(address,uint256)\" 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 2`\n\nCreate a reservation\n\n`cast send -i $IPNFT_ADDRESS --private-key $PRIVATE_KEY \"reserve()(uint256)\"`\n\nmint an IP-NFT to the first account\n\n`cast send --private-key $PRIVATE_KEY  -i $IPNFT_ADDRESS --value 0.001ether --broadcast  \"mintReservation(address,uint256,uint256,string)(uint256)\" 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 1 1 \"ipfs://test\"`\n\napprove SchmackoSwap to spend token 0\n\n`cast send -i $IPNFT_ADDRESS --private-key $PRIVATE_KEY \"approve(address, uint256)()\" $SOS_ADDRESS 0`\n\nCreate a Listing for 10 sample tokens\n\n`cast send -i $SOS_ADDRESS --private-key $PRIVATE_KEY \"list(address, uint256, address, uint256)(uint256)\" $IPNFT_ADDRESS 0 $ERC20_ADDRESS 10`\n\ntake note of the resulting listing id\n\nCancel a listing\n\n`cast send -i $SOS_ADDRESS --private-key $PRIVATE_KEY \"cancel(uint256)()\" \u003clistingid\u003e`\n\nCreate a new Listing (take down id)\n\n`cast send -i $SOS_ADDRESS --private-key $PRIVATE_KEY \"list(address, uint256, address, uint256)(uint256)\" $IPNFT_ADDRESS 0 $ERC20_ADDRESS 10`\n\nallow Account(1)\n\n`cast send -i $SOS_ADDRESS \"changeBuyerAllowance(uint256, address, bool)()\" \u003clistingid\u003e 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 true`\n\nsupply Account(1) with ERC20\n\n`cast send -i $ERC20_ADDRESS --private-key $PRIVATE_KEY \"mint(address, uint256)()\" 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 10`\n\nallow SOS to spend ERC20\n\n`cast send --i $ERC20_ADDRESS --private-key \u003caccount1 private key\u003e \"increaseAllowance(address, uint256)()\" $SOS_ADDRESS 10`\n\nlet account(1) fulfill the listing\n\n`cast send -i \\$SOS_ADDRESS --private-key \u003caccount1 private key\u003e \"fulfill(uint256)()\" \u003clistingid\u003e`\n\ngrant read access to another party\n\n`cast send --private-key $PRIVATE_KEY  -i $IPNFT_ADDRESS \"grantReadAccess(address,uint256,uint256)\" 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 1 1680265071`\n\n## Actions\n\nWe are using Tenderly Web3Actions to trigger actions based on emitted Events from our deployed Contracts.\n\nThese are setup under the moleculeprotocol organization on Tenderly.\nThe QueryIds and API-KEY are stored in the Tenderly context and can be accessed via the Tenderly Frontend.\nTo update these actions you need the Tenderly login credentials.\n\n- StakedLockingCrowdSale (Mainnet \u0026 Goerli): BidEvent =\u003e Triggers a POST request that executes Dune Queries to update the Dune Visualizations.\n\nYou can find out more about Web3Actions on Tenderly here: \u003chttps://docs.tenderly.co/web3-actions/intro-to-web3-actions\u003e\nHow to init \u0026 deploy new Web3Actions: \u003chttps://docs.tenderly.co/web3-actions/tutorials-and-quickstarts/deploy-web3-action-via-cli\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoleculeprotocol%2FIPNFT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoleculeprotocol%2FIPNFT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoleculeprotocol%2FIPNFT/lists"}