From 4792056c9df5d00f35ee4305222e54c3c3a28c02 Mon Sep 17 00:00:00 2001 From: Damian I Date: Wed, 10 Apr 2024 05:09:58 -0400 Subject: [PATCH 1/4] Added Polygon Amoy to networks --- deployed/80002.json | 69 +++++++++++++++++++++++++++++++++++++++++++++ foundry.toml | 2 +- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 deployed/80002.json diff --git a/deployed/80002.json b/deployed/80002.json new file mode 100644 index 0000000..7d10e81 --- /dev/null +++ b/deployed/80002.json @@ -0,0 +1,69 @@ +{ + "ERC721LazyDropFacet": { + "address": "0x1C9C687eCf25f59e9Ec0d51d953E0773d28203a5", + "startBlock": 5686598 + }, + "ERC721Base": { + "address": "0xF2469CB8AFC27bC54e92071EC313952F79887b45", + "startBlock": 5686498 + }, + "ERC20Base": { + "address": "0xA6eabc98e1D7a29aB0f940E2fFC522EbFaA66b60", + "startBlock": 5686469 + }, + "Proxy": { + "address": "0x8fA6E880E7d884B9D9907F0758C917f77E26eca4", + "startBlock": 5686445 + }, + "ERC20FactoryFacet": { + "startBlock": 5686582, + "address": "0x04a29E65720C92D9e1D780Db677b41a70707ED94" + }, + "ERC721LazyMint": { + "address": "0xf1d04f0Da6BA4F2AFfcd752747Eca8b5d09290B9", + "startBlock": 5686513 + }, + "ConstellationFactory": { + "startBlock": 5686486, + "address": "0x4cE72ceB49223A259FA1265Ba3a78484BbE8B889" + }, + "RewardFacet": { + "startBlock": 5686530, + "address": "0x1aF88A583a57637ED3F3294167032F50eB6cf272" + }, + "SettingsFacet": { + "address": "0xEBc6740739F546Af092C21d5855C2b18E164118D", + "startBlock": 5686548 + }, + "doNotRemoveUsedToParseFile": [ + "Globals", + "Registry", + "Proxy", + "StarFactory", + "ERC20Base", + "ConstellationFactory", + "ERC721Base", + "ERC721LazyMint", + "RewardFacet", + "SettingsFacet", + "ERC721FactoryFacet", + "ERC20FactoryFacet", + "ERC721LazyDropFacet" + ], + "StarFactory": { + "startBlock": 5686457, + "address": "0x542D145f2c66CB9ac58447Fe141BFB12fea7C8bE" + }, + "Registry": { + "address": "0xD84d6bAADE762d91e075B31B40fd1dDE0Dd8f66a", + "startBlock": 5686433 + }, + "Globals": { + "address": "0xb6b344BE42aa49CbC1aCD403f0e045590E09B815", + "startBlock": 5686420 + }, + "ERC721FactoryFacet": { + "startBlock": 5686565, + "address": "0x7Eff960593aBF3DFd90e5299D067E1953304b1d0" + } +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index 8fa3ed7..be4d7e9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -18,4 +18,4 @@ mumbai = "https://matic-mumbai.chainstacklabs.com" polygon = "${POLYGON_RPC_URL}" aurora = "https://mainnet.aurora.dev" aurora-testnet = "https://testnet.aurora.dev" - +amoy = "https://rpc-amoy.polygon.technology/" From 684d9d727f552f77f692eec6240ea9e3d887a060 Mon Sep 17 00:00:00 2001 From: Damian I Date: Thu, 11 Apr 2024 11:40:43 -0400 Subject: [PATCH 2/4] Updating Makefile and deployed contracts --- Makefile | 46 ++++++++++--------------- deployed/80002.json | 81 ++++++++++++++++++++++++--------------------- 2 files changed, 60 insertions(+), 67 deletions(-) diff --git a/Makefile b/Makefile index 9c12b34..5997e8c 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ verbose ?= -vvvv args ?= "" legacy ?= --legacy slow ?= --slow +gasPrice ?= "" # Clean the repo clean :; forge clean @@ -17,14 +18,14 @@ remappings :; forge remappings > remappings.txt # deploy # to run: `make deploy rpc=""` e.g `make deploy rpc="anvil"` +# to specify a gas price: make deploy rpc="anvil" gasPrice="--with-gas-price 45000000000 --skip-simulation # TODO: compile all contracts at start then run scripts deploy:; make \ deploy-Globals \ deploy-Registry \ deploy-Proxy \ - deploy-StarFactory \ + deploy-AppFactory \ deploy-ERC20Base \ - deploy-ConstellationFactory \ deploy-ERC721Base \ deploy-ERC721LazyMint \ deploy-RewardsFacet \ @@ -34,23 +35,21 @@ deploy:; make \ deploy-ERC721LazyDropFacet \ # core -deploy-Globals:; forge script scripts/core/Globals.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-Registry:; forge script scripts/core/Registry.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-Proxy:; forge script scripts/core/Proxy.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-StarFactory:; forge script scripts/core/StarFactory.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-ConstellationFactory:; forge script scripts/core/ConstellationFactory.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) - +deploy-Globals:; forge script scripts/core/Globals.s.sol:Deploy --rpc-url $(rpc) --broadcast $(gasPrice) $(verbose) $(legacy) $(slow) +deploy-Registry:; forge script scripts/core/Registry.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-Proxy:; forge script scripts/core/Proxy.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-AppFactory:; forge script scripts/core/AppFactory.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) # token implementations -deploy-ERC721Base:; forge script scripts/tokens/ERC721Base.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-ERC721LazyMint:; forge script scripts/tokens/ERC721LazyMint.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-ERC20Base:; forge script scripts/tokens/ERC20Base.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) +deploy-ERC721Base:; forge script scripts/tokens/ERC721Base.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-ERC721LazyMint:; forge script scripts/tokens/ERC721LazyMint.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-ERC20Base:; forge script scripts/tokens/ERC20Base.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) # facets -deploy-RewardsFacet:; forge script scripts/facet/RewardsFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-SettingsFacet:; forge script scripts/facet/SettingsFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-ERC721FactoryFacet:; forge script scripts/facet/ERC721FactoryFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-ERC20FactoryFacet:; forge script scripts/facet/ERC20FactoryFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) -deploy-ERC721LazyDropFacet:; forge script scripts/facet/ERC721LazyDropFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) +deploy-RewardsFacet:; forge script scripts/facet/RewardsFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-SettingsFacet:; forge script scripts/facet/SettingsFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-ERC721FactoryFacet:; forge script scripts/facet/ERC721FactoryFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-ERC20FactoryFacet:; forge script scripts/facet/ERC20FactoryFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) +deploy-ERC721LazyDropFacet:; forge script scripts/facet/ERC721LazyDropFacet.s.sol:Deploy --rpc-url $(rpc) --broadcast $(verbose) $(gasPrice) $(legacy) $(slow) # patch patch-SettingsFacet:; forge script scripts/facet/SettingsFacet.s.sol:Patch --rpc-url $(rpc) --broadcast $(verbose) $(legacy) $(slow) @@ -60,25 +59,14 @@ patch-SettingsFacet:; forge script scripts/facet/SettingsFacet.s.sol:Patch --rpc # example: `make CreateApp args="app name" rpc=anvil` # Note: Uses a cast command to format the app name args to bytes32 CreateApp:; forge script \ - scripts/core/StarFactory.s.sol:CreateApp \ - --sig "run(string)" \ - --rpc-url $(rpc) \ - --broadcast \ - $(legacy) \ - $(slow) \ - $(verbose) \ - `cast --format-bytes32-string $(args)` - -# example: `make CreateConstellation args="constellation name" rpc=anvil` -# Note: Uses a cast command to format the app name args to bytes32 -CreateConstellation:; forge script \ - scripts/core/ConstellationFactory.s.sol:CreateConstellation \ + scripts/core/AppFactory.s.sol:CreateApp \ --sig "run(string)" \ --rpc-url $(rpc) \ --broadcast \ $(legacy) \ $(slow) \ $(verbose) \ + $(gasPrice) \ `cast --format-bytes32-string $(args)` # example: `make SetPlatformFee args="0.01 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" rpc=anvil` diff --git a/deployed/80002.json b/deployed/80002.json index 7d10e81..1a7ea6b 100644 --- a/deployed/80002.json +++ b/deployed/80002.json @@ -1,39 +1,27 @@ { - "ERC721LazyDropFacet": { - "address": "0x1C9C687eCf25f59e9Ec0d51d953E0773d28203a5", - "startBlock": 5686598 - }, "ERC721Base": { - "address": "0xF2469CB8AFC27bC54e92071EC313952F79887b45", - "startBlock": 5686498 + "address": "0x9bB0a6c893bfD4EDBe1B4C45f9cb333E423BB47f", + "startBlock": 5743167 }, - "ERC20Base": { - "address": "0xA6eabc98e1D7a29aB0f940E2fFC522EbFaA66b60", - "startBlock": 5686469 + "ERC721LazyMint": { + "address": "0x5608D4EB3DBfB5Ff85123b497d3a25997379FBbd", + "startBlock": 5743183 }, - "Proxy": { - "address": "0x8fA6E880E7d884B9D9907F0758C917f77E26eca4", - "startBlock": 5686445 + "Registry": { + "startBlock": 5743120, + "address": "0xa59aFAceA2209014C907219d5dDE64EdD109c002" }, - "ERC20FactoryFacet": { - "startBlock": 5686582, - "address": "0x04a29E65720C92D9e1D780Db677b41a70707ED94" + "Proxy": { + "startBlock": 5743130, + "address": "0x2AE0B6984e628374426cA65C9E62c16BB3C51228" }, - "ERC721LazyMint": { - "address": "0xf1d04f0Da6BA4F2AFfcd752747Eca8b5d09290B9", - "startBlock": 5686513 + "ERC20Base": { + "startBlock": 5743151, + "address": "0x4a23127cA1EA1f3d4BAF239173e60d5DFFE1d456" }, "ConstellationFactory": { - "startBlock": 5686486, - "address": "0x4cE72ceB49223A259FA1265Ba3a78484BbE8B889" - }, - "RewardFacet": { - "startBlock": 5686530, - "address": "0x1aF88A583a57637ED3F3294167032F50eB6cf272" - }, - "SettingsFacet": { - "address": "0xEBc6740739F546Af092C21d5855C2b18E164118D", - "startBlock": 5686548 + "address": "0x4cE72ceB49223A259FA1265Ba3a78484BbE8B889", + "startBlock": 5686486 }, "doNotRemoveUsedToParseFile": [ "Globals", @@ -48,22 +36,39 @@ "SettingsFacet", "ERC721FactoryFacet", "ERC20FactoryFacet", - "ERC721LazyDropFacet" + "ERC721LazyDropFacet", + "AppFactory" ], + "ERC20FactoryFacet": { + "address": "0x289fc3491d05F1D50A32dFC71079D1987368c247", + "startBlock": 5743249 + }, + "ERC721LazyDropFacet": { + "address": "0xe71904017f6C74dC8c1042C165da0badf50F932F", + "startBlock": 5743266 + }, + "SettingsFacet": { + "startBlock": 5743216, + "address": "0xE5d9807Cc43f27FfC066092Ed6749Dd1ad4DAD4D" + }, + "AppFactory": { + "startBlock": 5743141, + "address": "0xeBe3AE63007C262c9705fD2aE52E8f7e6A479443" + }, "StarFactory": { "startBlock": 5686457, "address": "0x542D145f2c66CB9ac58447Fe141BFB12fea7C8bE" }, - "Registry": { - "address": "0xD84d6bAADE762d91e075B31B40fd1dDE0Dd8f66a", - "startBlock": 5686433 - }, - "Globals": { - "address": "0xb6b344BE42aa49CbC1aCD403f0e045590E09B815", - "startBlock": 5686420 + "RewardFacet": { + "startBlock": 5743199, + "address": "0x63E7cEb3D7602f64f990beaa50cD776Cd5Fe699D" }, "ERC721FactoryFacet": { - "startBlock": 5686565, - "address": "0x7Eff960593aBF3DFd90e5299D067E1953304b1d0" + "address": "0xf08fcfbBd588843b7e96Ce454e9Ef831a82b37B8", + "startBlock": 5743233 + }, + "Globals": { + "address": "0xA18820E3F25F0C77439166Ec8502aBEAcd459AbA", + "startBlock": 5743109 } } \ No newline at end of file From 4b5ce8d2f1fa1b7ff2d2c305ed19b73921d451f0 Mon Sep 17 00:00:00 2001 From: Damian I Date: Fri, 12 Apr 2024 12:25:20 -0400 Subject: [PATCH 3/4] Contract deployed with main account --- deployed/80002.json | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/deployed/80002.json b/deployed/80002.json index 1a7ea6b..0b06bb6 100644 --- a/deployed/80002.json +++ b/deployed/80002.json @@ -1,23 +1,23 @@ { "ERC721Base": { - "address": "0x9bB0a6c893bfD4EDBe1B4C45f9cb333E423BB47f", - "startBlock": 5743167 + "address": "0x0Ac51EDA5fC88f5E9955f0F89A65b391C51CA141", + "startBlock": 5784040 }, "ERC721LazyMint": { - "address": "0x5608D4EB3DBfB5Ff85123b497d3a25997379FBbd", - "startBlock": 5743183 + "address": "0x9E82e59058c4937cb523736255C15411cE707BcF", + "startBlock": 5784057 }, "Registry": { - "startBlock": 5743120, - "address": "0xa59aFAceA2209014C907219d5dDE64EdD109c002" + "startBlock": 5783989, + "address": "0x7aFE68988db5158B68ce64cEFBe750E5D3539e71" }, "Proxy": { - "startBlock": 5743130, - "address": "0x2AE0B6984e628374426cA65C9E62c16BB3C51228" + "startBlock": 5783999, + "address": "0x19781Af95cA4E113D5D1412452225D11A84ce992" }, "ERC20Base": { - "startBlock": 5743151, - "address": "0x4a23127cA1EA1f3d4BAF239173e60d5DFFE1d456" + "address": "0x1F2CD226AD558a362026FF7f64F8BE92Ee5Ed8Fd", + "startBlock": 5784022 }, "ConstellationFactory": { "address": "0x4cE72ceB49223A259FA1265Ba3a78484BbE8B889", @@ -40,35 +40,35 @@ "AppFactory" ], "ERC20FactoryFacet": { - "address": "0x289fc3491d05F1D50A32dFC71079D1987368c247", - "startBlock": 5743249 + "address": "0xc21125b654a1071D9Bc8162C71A71Cd88fD99E85", + "startBlock": 5784127 }, "ERC721LazyDropFacet": { - "address": "0xe71904017f6C74dC8c1042C165da0badf50F932F", - "startBlock": 5743266 + "address": "0x47b5760dDba0D3D80d83fc689D3c5Cb45efe93B4", + "startBlock": 5784146 }, "SettingsFacet": { - "startBlock": 5743216, - "address": "0xE5d9807Cc43f27FfC066092Ed6749Dd1ad4DAD4D" + "startBlock": 5784091, + "address": "0x3Fbe54Cc6B5f377830f6DE55a3A9B0f811AAfea9" }, "AppFactory": { - "startBlock": 5743141, - "address": "0xeBe3AE63007C262c9705fD2aE52E8f7e6A479443" + "address": "0x3713395bd3c11E4D5A688b21cFa3f86D04288861", + "startBlock": 5784012 }, "StarFactory": { "startBlock": 5686457, "address": "0x542D145f2c66CB9ac58447Fe141BFB12fea7C8bE" }, "RewardFacet": { - "startBlock": 5743199, - "address": "0x63E7cEb3D7602f64f990beaa50cD776Cd5Fe699D" + "address": "0xaCde8917a4427DcE86aaDF7Bf853e730aa72A398", + "startBlock": 5784074 }, "ERC721FactoryFacet": { - "address": "0xf08fcfbBd588843b7e96Ce454e9Ef831a82b37B8", - "startBlock": 5743233 + "startBlock": 5784110, + "address": "0x19145dc9b36DDdd9a874195c6e51f4067aeb796a" }, "Globals": { - "address": "0xA18820E3F25F0C77439166Ec8502aBEAcd459AbA", - "startBlock": 5743109 + "startBlock": 5783977, + "address": "0xcD288D67b371AB590962B2bd8FEd9866d8d6C69d" } } \ No newline at end of file From 5b9f4f4cf6698f203538923ab860e0fcf5b9665b Mon Sep 17 00:00:00 2001 From: Damian I Date: Fri, 12 Apr 2024 13:08:08 -0400 Subject: [PATCH 4/4] Polygon mainnet contracts deployed with main account --- deployed/137.json | 93 +++++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/deployed/137.json b/deployed/137.json index ccc5b35..7ab9579 100644 --- a/deployed/137.json +++ b/deployed/137.json @@ -1,36 +1,4 @@ { - "ERC721Base": { - "startBlock": 46050287, - "address": "0xF492f60aa5D7c49A43E41f9f8F3730d310974a97" - }, - "Proxy": { - "address": "0x2eBF7f4572c218217ca01CE2883E3EfF93626a8E", - "startBlock": 46050247 - }, - "ERC721LazyMint": { - "address": "0x9e9248e65A7FCEA1b12b08af923F231d7b1f66B6", - "startBlock": 46050299 - }, - "ERC721FactoryFacet": { - "startBlock": 46050423, - "address": "0x8eF67328a42e658AeaF35f8e127Ae02c762bbEf9" - }, - "ERC20FactoryFacet": { - "address": "0xCe9DB0366568b7ec515B6E13DBb9aE2B02bC3E43", - "startBlock": 46050468 - }, - "Registry": { - "startBlock": 46050238, - "address": "0xea65bC1DEA1ED6b43efEFA04819F5b94bC574948" - }, - "ERC20Base": { - "address": "0xe68Fa7C59fC75bB985EAdaE5A740f0b47c478d8d", - "startBlock": 46050258 - }, - "SettingsFacet": { - "startBlock": 46050323, - "address": "0x04D8b9165f00933452D10dE556C04a5234ce3a58" - }, "doNotRemoveUsedToParseFile": [ "Globals", "Registry", @@ -44,26 +12,63 @@ "SettingsFacet", "ERC721FactoryFacet", "ERC20FactoryFacet", - "ERC721LazyDropFacet" + "ERC721LazyDropFacet", + "AppFactory" ], + "Proxy": { + "address": "0x429cB2c2A030952D3F5e10B534584aB49c303763", + "startBlock": 55743714 + }, + "ERC20FactoryFacet": { + "address": "0x87ee1Fbd30ec94d8e3A174e52c319d0E127f7898", + "startBlock": 55744025 + }, "ConstellationFactory": { - "address": "0x0cE3fB93111Dee33cDB59f97e3df84e93adE46DD", - "startBlock": 46050271 + "startBlock": 46050271, + "address": "0x0cE3fB93111Dee33cDB59f97e3df84e93adE46DD" + }, + "AppFactory": { + "startBlock": 55743736, + "address": "0x49c50D754F6118eB02DF6dDaD4a4d6D2a46AD837" + }, + "ERC721Base": { + "startBlock": 55743825, + "address": "0x0547FD7Ca54f49501c1aa2c4058B0AFA48eaE7Af" + }, + "ERC721FactoryFacet": { + "address": "0x49A508CBd7419e5132aB670a0054962A1DA7E322", + "startBlock": 55743995 + }, + "ERC721LazyDropFacet": { + "startBlock": 55744134, + "address": "0x811aD13193D4a4d3a16E2e35F7Af57AA288C9AA7" }, "Globals": { - "address": "0x451f72Cf4174F15AcFb3AA5feEA9Ec8BE607f9E4", - "startBlock": 46050206 + "startBlock": 55743666, + "address": "0x60a0AAbDeb54c37b3dB67251Ad8b3A8Fbb53cAAf" + }, + "Registry": { + "startBlock": 55743677, + "address": "0x0f9b837652717caEDA5bC4D5912C7BD8467b3E0A" }, "StarFactory": { - "address": "0x1e823247D26efd56f5172b8C19F6c44CA700F2c5", - "startBlock": 46050253 + "startBlock": 46050253, + "address": "0x1e823247D26efd56f5172b8C19F6c44CA700F2c5" }, - "ERC721LazyDropFacet": { - "startBlock": 46050494, - "address": "0x4d9D07E924F9bC486d496CacFaf2Bd9C7bC4E22F" + "ERC20Base": { + "startBlock": 55743757, + "address": "0x2Fe4349caC208D84cdcD47edaD4Fb4336Af1D83e" + }, + "ERC721LazyMint": { + "address": "0x265A242Bcf4CFd9021A666B427e2d4dce2F5eF54", + "startBlock": 55743856 }, "RewardFacet": { - "startBlock": 46050309, - "address": "0x3a75C73042aDe9b219518ca3be59bB4652fd2db5" + "address": "0x79a414D9778F5b2353943a9E6b6e3B3026ec932B", + "startBlock": 55743910 + }, + "SettingsFacet": { + "address": "0xe666904373557873d01008CC78A5fA3a2c36866F", + "startBlock": 55743963 } } \ No newline at end of file