From b9268df145c14da7783a6ba3fc2ec703cfaa1c91 Mon Sep 17 00:00:00 2001 From: Volodymyr Lykhonis Date: Fri, 19 Jan 2024 14:33:13 +0100 Subject: [PATCH] Reset --- scripts/assets/lsp7/GenesisDigitalAsset.s.sol | 169 ------- scripts/assets/lsp7/data/42/genesis.json | 420 ------------------ scripts/assets/lsp7/data/4201/genesis.json | 16 - .../CollectorIdentifiableDigitalAsset.s.sol | 87 ---- scripts/marketplace/Participant.s.sol | 63 --- scripts/marketplace/lsp7/LSP7Listings.s.sol | 39 -- .../marketplace/lsp7/LSP7Marketplace.s.sol | 106 ----- scripts/marketplace/lsp7/LSP7Offers.s.sol | 40 -- scripts/marketplace/lsp8/LSP8Auctions.s.sol | 62 --- scripts/marketplace/lsp8/LSP8Listings.s.sol | 39 -- .../marketplace/lsp8/LSP8Marketplace.s.sol | 119 ----- scripts/marketplace/lsp8/LSP8Offers.s.sol | 40 -- scripts/page/PageName.s.sol | 99 ----- scripts/pool/Vault.s.sol | 83 ---- tools/artifacts.sh | 119 ----- tools/configure.sh | 107 ----- tools/deploy.sh | 125 ------ tools/local_network.sh | 12 - tools/submit_selectors.sh | 102 ----- tools/verify.sh | 106 ----- 20 files changed, 1953 deletions(-) delete mode 100644 scripts/assets/lsp7/GenesisDigitalAsset.s.sol delete mode 100644 scripts/assets/lsp7/data/42/genesis.json delete mode 100644 scripts/assets/lsp7/data/4201/genesis.json delete mode 100644 scripts/assets/lsp8/CollectorIdentifiableDigitalAsset.s.sol delete mode 100644 scripts/marketplace/Participant.s.sol delete mode 100644 scripts/marketplace/lsp7/LSP7Listings.s.sol delete mode 100644 scripts/marketplace/lsp7/LSP7Marketplace.s.sol delete mode 100644 scripts/marketplace/lsp7/LSP7Offers.s.sol delete mode 100644 scripts/marketplace/lsp8/LSP8Auctions.s.sol delete mode 100644 scripts/marketplace/lsp8/LSP8Listings.s.sol delete mode 100644 scripts/marketplace/lsp8/LSP8Marketplace.s.sol delete mode 100644 scripts/marketplace/lsp8/LSP8Offers.s.sol delete mode 100644 scripts/page/PageName.s.sol delete mode 100644 scripts/pool/Vault.s.sol delete mode 100755 tools/artifacts.sh delete mode 100755 tools/configure.sh delete mode 100755 tools/deploy.sh delete mode 100755 tools/local_network.sh delete mode 100755 tools/submit_selectors.sh delete mode 100755 tools/verify.sh diff --git a/scripts/assets/lsp7/GenesisDigitalAsset.s.sol b/scripts/assets/lsp7/GenesisDigitalAsset.s.sol deleted file mode 100644 index d08501a..0000000 --- a/scripts/assets/lsp7/GenesisDigitalAsset.s.sol +++ /dev/null @@ -1,169 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Merkle} from "murky/Merkle.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import {UniversalProfile} from "@lukso/lsp-smart-contracts/contracts/UniversalProfile.sol"; -import {OPERATION_0_CALL} from "@erc725/smart-contracts/contracts/constants.sol"; -import {GenesisDigitalAsset} from "../../../src/assets/lsp7/GenesisDigitalAsset.sol"; -import {DigitalAssetDrop} from "../../../src/assets/lsp7/DigitalAssetDrop.sol"; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address profile = vm.envAddress("PROFILE_ADDRESS"); - - vm.broadcast(admin); - GenesisDigitalAsset asset = new GenesisDigitalAsset("Universal Page Genesis", "UPG", profile, profile); - console.log(string.concat("GenesisDigitalAsset: ", Strings.toHexString(address(asset)))); - } -} - -contract Dispose is Script { - function run() external { - address controller = vm.envAddress("PROFILE_CONTROLLER_ADDRESS"); - UniversalProfile profile = UniversalProfile(payable(vm.envAddress("PROFILE_ADDRESS"))); - GenesisDigitalAsset genesisAsset = - GenesisDigitalAsset(payable(vm.envAddress("CONTRACT_GENESIS_DIGITAL_ASSET_ADDRESS"))); - - string memory json = vm.readFile( - string.concat(vm.projectRoot(), "/artifacts/data/", Strings.toString(block.chainid), "/genesis.json") - ); - - DigitalAssetDrop drop = DigitalAssetDrop(vm.parseJsonAddress(json, ".address")); - - uint256 releaseAmount = genesisAsset.balanceOf(address(drop)); - if (releaseAmount == 0) { - console.log("Drop is empty"); - return; - } - - console.log("Release drop:", releaseAmount); - vm.startBroadcast(controller); - profile.execute( - OPERATION_0_CALL, - address(drop), - 0, - abi.encodeWithSelector(DigitalAssetDrop.dispose.selector, address(profile)) - ); - profile.execute( - OPERATION_0_CALL, - address(genesisAsset), - 0, - abi.encodeWithSelector(GenesisDigitalAsset.release.selector, releaseAmount) - ); - vm.stopBroadcast(); - } -} - -contract Reserve is Script { - function run() external { - address controller = vm.envAddress("PROFILE_CONTROLLER_ADDRESS"); - UniversalProfile profile = UniversalProfile(payable(vm.envAddress("PROFILE_ADDRESS"))); - GenesisDigitalAsset genesisAsset = - GenesisDigitalAsset(payable(vm.envAddress("CONTRACT_GENESIS_DIGITAL_ASSET_ADDRESS"))); - - uint256 reserveAmount = 0; - - vm.startBroadcast(controller); - profile.execute( - OPERATION_0_CALL, - address(genesisAsset), - 0, - abi.encodeWithSelector(genesisAsset.reserve.selector, reserveAmount) - ); - vm.stopBroadcast(); - } -} - -contract Drop is Script { - struct Claim { - uint256 amount; - address profile; - } - - struct Data { - Claim[] claims; - } - - function run() external { - address controller = vm.envAddress("PROFILE_CONTROLLER_ADDRESS"); - UniversalProfile profile = UniversalProfile(payable(vm.envAddress("PROFILE_ADDRESS"))); - GenesisDigitalAsset genesisAsset = - GenesisDigitalAsset(payable(vm.envAddress("CONTRACT_GENESIS_DIGITAL_ASSET_ADDRESS"))); - - uint256 fundAmount = 0; - - // build merkle tree - string memory json = vm.readFile( - string.concat( - vm.projectRoot(), "/scripts/assets/lsp7/data/", Strings.toString(block.chainid), "/genesis.json" - ) - ); - Data memory jsonData = abi.decode(vm.parseJson(json), (Data)); - - console.log("Allowlist claims:", jsonData.claims.length); - bytes32[] memory data = new bytes32[](jsonData.claims.length); - for (uint256 i = 0; i < jsonData.claims.length; i++) { - Claim memory claim = jsonData.claims[i]; - console.log("-", i, claim.profile, claim.amount); - data[i] = keccak256(bytes.concat(keccak256(abi.encode(i, abi.encode(claim.profile, claim.amount))))); - console.logBytes32(data[i]); - fundAmount += claim.amount; - } - - Merkle merkle = new Merkle(); - bytes32 root = merkle.getRoot(data); - - // deploy drop - vm.broadcast(controller); - DigitalAssetDrop drop = new DigitalAssetDrop(genesisAsset, root, address(profile)); - console.log(string.concat("DigitalAssetDrop: ", Strings.toHexString(address(drop)))); - - // fund drop - console.log("Fund drop:", fundAmount); - vm.startBroadcast(controller); - profile.execute( - OPERATION_0_CALL, - address(genesisAsset), - 0, - abi.encodeWithSelector(genesisAsset.reserve.selector, fundAmount) - ); - profile.execute( - OPERATION_0_CALL, - address(genesisAsset), - 0, - abi.encodeWithSelector( - genesisAsset.transfer.selector, address(profile), address(drop), fundAmount, true, "" - ) - ); - vm.stopBroadcast(); - - // generate proofs - { - string memory claimsJson = "{}"; - for (uint256 i = 0; i < jsonData.claims.length; i++) { - Claim memory claim = jsonData.claims[i]; - bytes32[] memory proof = merkle.getProof(data, i); - - string memory object = string.concat("claim-", Strings.toString(i)); - vm.serializeUint(object, "index", i); - vm.serializeAddress(object, "profile", claim.profile); - vm.serializeUint(object, "amount", claim.amount); - string memory claimJson = vm.serializeBytes32(object, "proof", proof); - - claimsJson = vm.serializeString("claims", Strings.toString(i), claimJson); - } - - vm.serializeString("", "claims", claimsJson); - string memory dropJson = vm.serializeAddress("", "address", address(drop)); - - string memory outputDir = - string.concat(vm.projectRoot(), "/artifacts/data/", Strings.toString(block.chainid)); - vm.createDir(outputDir, true); - vm.writeJson(dropJson, string.concat(outputDir, "/genesis.json")); - } - } -} diff --git a/scripts/assets/lsp7/data/42/genesis.json b/scripts/assets/lsp7/data/42/genesis.json deleted file mode 100644 index f4ab9c8..0000000 --- a/scripts/assets/lsp7/data/42/genesis.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "claims": [ - { - "profile": "0xd9A4ddE76a63df1E72c4cE0cde16e80D4724fbA2", - "amount": 1 - }, - { - "profile": "0xAAE90E0000eC70ccC71De79130c563784360F60B", - "amount": 1 - }, - { - "profile": "0x44278F0A44f6A5FcdC3c771eD9F44b0B102e6161", - "amount": 1 - }, - { - "profile": "0x20b703332656425555b334d9FA11F4EE1D82b6d4", - "amount": 1 - }, - { - "profile": "0x5C5AFe4B214Fcefd8Df1a1c3b8e666591E8554f9", - "amount": 1 - }, - { - "profile": "0x5cB44b4FDFf97E1665b455F778f4929BaA31daa2", - "amount": 1 - }, - { - "profile": "0x4945bD66B3FaA4726F8c88A0553753F701A1F5F7", - "amount": 1 - }, - { - "profile": "0xBF8b247c08A3ACE0311044DE539025E6b565aE09", - "amount": 1 - }, - { - "profile": "0x26e7Da1968cfC61FB8aB2Aad039b5A083b9De21e", - "amount": 1 - }, - { - "profile": "0x378Be8577ede94b9d4b9F45447F21B826501bab8", - "amount": 1 - }, - { - "profile": "0xF06672a17baD3024f96C09769879555C38f1F9a2", - "amount": 1 - }, - { - "profile": "0xD5c09C0e190bA7AE151CEE8cb7c6df059BF2e06c", - "amount": 1 - }, - { - "profile": "0x310abe89C0351df7c4c9EC17179E4bEc90e8D9eD", - "amount": 1 - }, - { - "profile": "0x216C6D1C7897d9a59e7AB47Ca94f9907182e221C", - "amount": 1 - }, - { - "profile": "0xaDD8E3947A934467afd9A6588e2c19ac89c1e15a", - "amount": 1 - }, - { - "profile": "0x1110AFF98A2A13e12Adb4127e1F7dd2555a0f0Fd", - "amount": 1 - }, - { - "profile": "0x82C4DC98E27cFE9d7D312250e972e7380fBf6B77", - "amount": 1 - }, - { - "profile": "0x26526DEbD4Ac8Fcd9592c82970d5aC1e53a663d9", - "amount": 1 - }, - { - "profile": "0xe7890179F89626a491568C71a6e7B59d28670560", - "amount": 1 - }, - { - "profile": "0x9FCb78406C6132dFC230d47846094DE7D9a6d555", - "amount": 1 - }, - { - "profile": "0x188add574bAF734E074d8996494F9998ca67081D", - "amount": 1 - }, - { - "profile": "0x67D5E021131Ef89d5b10088847706771Dd30658f", - "amount": 1 - }, - { - "profile": "0x57d4876c0Bdc25D1A76EFd78738b764181AFE828", - "amount": 1 - }, - { - "profile": "0x7C179BA5b7F81C41f05cF0BE00a0517a8E9e262e", - "amount": 1 - }, - { - "profile": "0xB8baad053Eb12ef0c3360809bDE8Ec417E88C44A", - "amount": 1 - }, - { - "profile": "0x1db863a062d318F13fCEE456124cB62C76430846", - "amount": 1 - }, - { - "profile": "0x70717042CFF0b531628A3944c90031fdd80f138D", - "amount": 1 - }, - { - "profile": "0x926B7d49D58983C43c2ee2801432EEa0fB5FDd09", - "amount": 1 - }, - { - "profile": "0x2CD78F1883A32AC0314489d86BD6fC541f8060fF", - "amount": 1 - }, - { - "profile": "0x311b2036AC58832D448a47cFB08E67697D1Ea34B", - "amount": 1 - }, - { - "profile": "0xAc039e4C59f3Cd62F14D1Eea56FDa4ace1e700B3", - "amount": 1 - }, - { - "profile": "0x5dCdA909303126e0C99c2DBc5c14311eA4564BC7", - "amount": 1 - }, - { - "profile": "0x752C81c5826d14f60488651a78dE746e9a0b9415", - "amount": 1 - }, - { - "profile": "0x64516AB80bAc4e222E75192f192D7a407667E4CB", - "amount": 1 - }, - { - "profile": "0x29d7c7E4571a83B3eF5C867f75c81D736a9D58aa", - "amount": 1 - }, - { - "profile": "0x0B4a89c28F96894B822F0dcd30a7b6E0e3498EF8", - "amount": 1 - }, - { - "profile": "0xaE5a927aC8bC2c96361cEc14661Dc7231aEca1aC", - "amount": 1 - }, - { - "profile": "0x2CDfa4c1f3a6b4EFFeCD2220599a3736D5614500", - "amount": 1 - }, - { - "profile": "0x6582CF90c02c592EE6bB77Bd3a24dF190b6BC475", - "amount": 1 - }, - { - "profile": "0x67e3B0a9797D722Aa8E74D2145659970cD943Ac7", - "amount": 1 - }, - { - "profile": "0xAA60c36bB6D2231Dd5f082105C00e7B4A1EC4442", - "amount": 1 - }, - { - "profile": "0x859fE5D794cb2cbB6ed545805D19D9BaCb4aC3d9", - "amount": 1 - }, - { - "profile": "0x1C0b106cB4189FaCA9Ab34B6bf5CF86b7979342C", - "amount": 1 - }, - { - "profile": "0xf973A80F1CF2bfa90384B36A6a6853dba1f845EB", - "amount": 1 - }, - { - "profile": "0xa44a1A9A7aA79Be2cb88CF28B8d93b567E362e6e", - "amount": 1 - }, - { - "profile": "0xcE1F25E6bD35079d1b9Ed02F8b91271C4dDAd822", - "amount": 1 - }, - { - "profile": "0x2DF8C47621969AF302237A6a638C55f012783100", - "amount": 1 - }, - { - "profile": "0xB19846077fE2E113037478161f025c135A3F75D5", - "amount": 1 - }, - { - "profile": "0xb7BD1A8421a9FAE2fb3e34eeD29Eb9D2D61182ec", - "amount": 1 - }, - { - "profile": "0x74CfCcBe99f65aD33A3B33Df251d86aef939d12a", - "amount": 1 - }, - { - "profile": "0x00Aa9761286f21437c90AD2f895ef0dcA3484306", - "amount": 1 - }, - { - "profile": "0x9C0C39032dEa8B6d83Ae930Df390C2aa185e1Fdb", - "amount": 1 - }, - { - "profile": "0x5bA145ebB07e603328285A04589da2a7A202fCED", - "amount": 1 - }, - { - "profile": "0xEEa3CACda6f606e998a843CeeE29DCb40DCb22b4", - "amount": 1 - }, - { - "profile": "0x4006E8072272B0a9535F1B147aA75C30992723EF", - "amount": 1 - }, - { - "profile": "0x33bcA68c161D6681b06bC53cfbC139B8cC2Afa63", - "amount": 1 - }, - { - "profile": "0xf73f04399aF6cA60482e92e10262145aCE68d22d", - "amount": 1 - }, - { - "profile": "0xd4C4aE843EC8B1b86C4c3Ffe8EfD1749048D79E7", - "amount": 1 - }, - { - "profile": "0x8AdC83bBE4e97d0eB6936dce3325A2Bb04F6cb1a", - "amount": 1 - }, - { - "profile": "0xae0D6988d8C26CB54315D8D40dbCC86542fDb076", - "amount": 1 - }, - { - "profile": "0x0F4180da178ed1C71398a57ca8Cb177F69591f1f", - "amount": 1 - }, - { - "profile": "0x987b07f8D09f8eF221cFE03B8AE4027079782820", - "amount": 1 - }, - { - "profile": "0xe100b05Dc141EB1E13DF381A9Da4e725b3cC0656", - "amount": 1 - }, - { - "profile": "0xd1378c1e9CFe00F9775fdfE2dAD71c18b6778ed6", - "amount": 1 - }, - { - "profile": "0x9797953494aD45Dd40195C6416b289787DB9ABE6", - "amount": 1 - }, - { - "profile": "0x7963662322D0d8DD9f617Da500d22777cd0668a5", - "amount": 1 - }, - { - "profile": "0x71674Fe2f2a5962dd435D20A371d2DAA21f32f18", - "amount": 1 - }, - { - "profile": "0x77923803Bb23b5a8D987baDAe06c992194DD9cfe", - "amount": 1 - }, - { - "profile": "0xf35F9Ca7DCb1150A5b49DEc9718333Fb84F5E36D", - "amount": 1 - }, - { - "profile": "0xc0beBE1f597745CCa1e05Ad29bE09E1C4ea2E606", - "amount": 1 - }, - { - "profile": "0x32304E6246448e813DfCFCe1744793796DE1411A", - "amount": 1 - }, - { - "profile": "0x122926a5461Fc704E39C7f97770FEaf869D3E777", - "amount": 1 - }, - { - "profile": "0x140bE9B7B2d4d47b8d94d557D5212883D11dB44f", - "amount": 1 - }, - { - "profile": "0xE384C41C226Ec5AD5d781F294Be1e32f0549e317", - "amount": 1 - }, - { - "profile": "0x888A848aB6c50E65AD6a39AcDB34691725577e48", - "amount": 1 - }, - { - "profile": "0x9d15517360639eBA0A5676088e6074a8bcE98020", - "amount": 1 - }, - { - "profile": "0xfdC0dBc5b502cf480996BE3ffFAd82514B24e6A5", - "amount": 1 - }, - { - "profile": "0xe5887d3a857c684b93B8b1C77222ADD2706ec7e5", - "amount": 1 - }, - { - "profile": "0xEC4c1c3335D6BEC88d7aB8BD57858AB79b64a833", - "amount": 1 - }, - { - "profile": "0xa5118f0524c14EF9BFB7CeEC73D5CBDC2838DFe0", - "amount": 1 - }, - { - "profile": "0x4AB2Baae32baDeDA0B70C06e8316df67E252CaEc", - "amount": 1 - }, - { - "profile": "0x8735eC149A74C591FD2793C34C053d0368dBaE66", - "amount": 1 - }, - { - "profile": "0xf110A5E3af9135743116ba81CA37468205D22473", - "amount": 1 - }, - { - "profile": "0xdE0Da643334b4f0722f45baA9b1f7B7C71C82976", - "amount": 1 - }, - { - "profile": "0x0B9304dFC560D00323C8d9E279BA0B0A817CFa42", - "amount": 1 - }, - { - "profile": "0x3Cc4facFdBB453Df5623efdeB6f59Dfde955f331", - "amount": 1 - }, - { - "profile": "0x1916D7915001dEA6b2996Eb7B3585FCdE0167906", - "amount": 1 - }, - { - "profile": "0x7Ab1Ad3E60101Bc284E03D36B24515266C97248d", - "amount": 1 - }, - { - "profile": "0x577F6585c73332599e5B137987aC86998C75bb07", - "amount": 1 - }, - { - "profile": "0x5c60D171E73b62EE0e25e43994Ab1D6A4F67988e", - "amount": 1 - }, - { - "profile": "0xb5Ff6e168D8aAFeFBa446696c0E8Dad2f5342E4E", - "amount": 1 - }, - { - "profile": "0xB50e8Ebf927356016d7Bf686e67d61743e31f17e", - "amount": 1 - }, - { - "profile": "0x917364e11935e5FE270738777735f0157357eB01", - "amount": 1 - }, - { - "profile": "0x5464a786A650264c114EEaD93B4C8F5359EE98FA", - "amount": 1 - }, - { - "profile": "0xCe4F68B1B634959db9d3F858c7DfD6Ad4B81AA0e", - "amount": 1 - }, - { - "profile": "0xA1EE4CC968a0328E9b1cF76f3Cd7d4dbE9A02A78", - "amount": 1 - }, - { - "profile": "0xBaB0adc1E4CF8F9Da4E8D21763aD1012aBe9A26A", - "amount": 1 - }, - { - "profile": "0x89e0B0Fa7181566564b1A7eef67CdC4212a14852", - "amount": 1 - }, - { - "profile": "0x1fBCF5F8BF781e5B848E08098CDedB3d44f6c707", - "amount": 1 - }, - { - "profile": "0xfbe9f2CC6365614503679aF21AA9D28179bDFb4F", - "amount": 1 - }, - { - "profile": "0x00311Eea40Ef2687dC1049E5b6261481126fB9f3", - "amount": 10 - }, - { - "profile": "0xd99857bFf8c27E896BF54da265e51cae068D0379", - "amount": 1 - }, - { - "profile": "0x86a8289b1B9412A4923B2D06b2Ac448efEEFb299", - "amount": 1 - }, - { - "profile": "0xC28ac81561E730d9fBd5100db1A8D3317A19d236", - "amount": 1 - } - ] -} \ No newline at end of file diff --git a/scripts/assets/lsp7/data/4201/genesis.json b/scripts/assets/lsp7/data/4201/genesis.json deleted file mode 100644 index a7f1222..0000000 --- a/scripts/assets/lsp7/data/4201/genesis.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "claims": [ - { - "profile": "0x37fa9fb05c2e3e9541a59b891321e9c4b8246442", - "amount": 1 - }, - { - "profile": "0x07F15aB9F47A004A21552E6b8C81ad2b37ff52D5", - "amount": 2 - }, - { - "profile": "0x64f134CfF78A8A6EC55eF1992A36798C84460b26", - "amount": 3 - } - ] -} \ No newline at end of file diff --git a/scripts/assets/lsp8/CollectorIdentifiableDigitalAsset.s.sol b/scripts/assets/lsp8/CollectorIdentifiableDigitalAsset.s.sol deleted file mode 100644 index f2a0574..0000000 --- a/scripts/assets/lsp8/CollectorIdentifiableDigitalAsset.s.sol +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import {UniversalProfile} from "@lukso/lsp-smart-contracts/contracts/UniversalProfile.sol"; -import {LSP6KeyManager} from "@lukso/lsp-smart-contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol"; -import {OPERATION_0_CALL} from "@erc725/smart-contracts/contracts/constants.sol"; -import {CollectorIdentifiableDigitalAsset} from "../../../src/assets/lsp8/CollectorIdentifiableDigitalAsset.sol"; - -uint16 constant TOKEN_SUPPLY_LIMIT = 0; -uint256 constant PRICE = 10 ether; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - address controller = vm.envAddress("COLLECTOR_CONTROLLER_ADDRESS"); - - vm.broadcast(admin); - CollectorIdentifiableDigitalAsset asset = new CollectorIdentifiableDigitalAsset( - "Universal Page Collector", - "UPC", - owner, - controller, - 4200 - ); - console.log(string.concat("CollectorIdentifiableDigitalAsset: deploy ", Strings.toHexString(address(asset)))); - } -} - -contract Configure is Script { - bytes32 private constant _LSP8_TOKEN_METADATA_BASE_URI_KEY = - 0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843; - - bytes4 private constant _baseUriHash = bytes4(bytes32(keccak256("keccak256(utf8)"))); - - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - address controller = vm.envAddress("COLLECTOR_CONTROLLER_ADDRESS"); - CollectorIdentifiableDigitalAsset asset = - CollectorIdentifiableDigitalAsset(payable(vm.envAddress("CONTRACT_COLLECTOR_DIGITAL_ASSET_ADDRESS"))); - - bytes memory currentBaseUri = asset.getData(_LSP8_TOKEN_METADATA_BASE_URI_KEY); - string memory baseUri = vm.envString("COLLECTOR_DIGITAL_ASSET_BASE_URI"); - bytes memory encodedBaseUri = bytes.concat(_baseUriHash, bytes(baseUri)); - if (keccak256(encodedBaseUri) != keccak256(currentBaseUri)) { - vm.broadcast(owner); - asset.setData(_LSP8_TOKEN_METADATA_BASE_URI_KEY, encodedBaseUri); - console.log(string.concat("CollectorIdentifiableDigitalAsset: setBaseUri ", baseUri)); - } - - if (asset.controller() != controller) { - vm.broadcast(owner); - asset.setController(controller); - console.log( - string.concat("CollectorIdentifiableDigitalAsset: setController ", Strings.toHexString(controller)) - ); - } - - if (asset.beneficiary() != treasury) { - vm.broadcast(owner); - asset.setBeneficiary(treasury); - console.log( - string.concat("CollectorIdentifiableDigitalAsset: setBeneficiary ", Strings.toHexString(treasury)) - ); - } - - if (asset.price() != PRICE) { - vm.broadcast(owner); - asset.setPrice(PRICE); - console.log(string.concat("CollectorIdentifiableDigitalAsset: setPrice ", Strings.toHexString(PRICE))); - } - - if (asset.tokenSupplyLimit() != TOKEN_SUPPLY_LIMIT) { - vm.broadcast(owner); - asset.setTokenSupplyLimit(TOKEN_SUPPLY_LIMIT); - console.log( - string.concat( - "CollectorIdentifiableDigitalAsset: setTokenSupplyLimit ", Strings.toHexString(TOKEN_SUPPLY_LIMIT) - ) - ); - } - } -} diff --git a/scripts/marketplace/Participant.s.sol b/scripts/marketplace/Participant.s.sol deleted file mode 100644 index 8a4df90..0000000 --- a/scripts/marketplace/Participant.s.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {ILSP7DigitalAsset} from "@lukso/lsp-smart-contracts/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol"; -import {ICollectorIdentifiableDigitalAsset} from "../../src/assets/lsp8/ICollectorIdentifiableDigitalAsset.sol"; -import {Participant} from "../../src/marketplace/Participant.sol"; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_PARTICIPANT_ADDRESS", address(0)); - - vm.broadcast(admin); - Participant participant = new Participant(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(participant), - admin, - abi.encodeWithSelector(Participant.initialize.selector, owner) - ) - ); - console.log(string.concat("Participant: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(participant)); - console.log(string.concat("Participant: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} - -contract Configure is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - ICollectorIdentifiableDigitalAsset collectorAsset = - ICollectorIdentifiableDigitalAsset(vm.envAddress("CONTRACT_COLLECTOR_DIGITAL_ASSET_ADDRESS")); - ILSP7DigitalAsset genesisAsset = ILSP7DigitalAsset(vm.envAddress("CONTRACT_GENESIS_DIGITAL_ASSET_ADDRESS")); - Participant participant = Participant(vm.envAddress("CONTRACT_PARTICIPANT_ADDRESS")); - - if (address(participant.collectorAsset()) != address(collectorAsset)) { - vm.broadcast(owner); - participant.setCollectorAsset(collectorAsset); - console.log(string.concat("Participant: setCollectorAsset ", Strings.toHexString(address(collectorAsset)))); - } - - if (address(participant.genesisAsset()) != address(genesisAsset)) { - vm.broadcast(owner); - participant.setGenesisAsset(genesisAsset); - console.log(string.concat("Participant: setGenesisAsset ", Strings.toHexString(address(genesisAsset)))); - } - } -} diff --git a/scripts/marketplace/lsp7/LSP7Listings.s.sol b/scripts/marketplace/lsp7/LSP7Listings.s.sol deleted file mode 100644 index 3e166ef..0000000 --- a/scripts/marketplace/lsp7/LSP7Listings.s.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {LSP7Listings} from "../../../src/marketplace/lsp7/LSP7Listings.sol"; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP7_LISTINGS_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP7Listings listings = new LSP7Listings(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(listings), - admin, - abi.encodeWithSelector(LSP7Listings.initialize.selector, owner) - ) - ); - console.log(string.concat("LSP7Listings: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(listings)); - console.log(string.concat("LSP7Listings: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} diff --git a/scripts/marketplace/lsp7/LSP7Marketplace.s.sol b/scripts/marketplace/lsp7/LSP7Marketplace.s.sol deleted file mode 100644 index 5a09dd2..0000000 --- a/scripts/marketplace/lsp7/LSP7Marketplace.s.sol +++ /dev/null @@ -1,106 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IParticipant} from "../../../src/marketplace/IParticipant.sol"; -import {LSP7Marketplace} from "../../../src/marketplace/lsp7/LSP7Marketplace.sol"; -import {Module, MARKETPLACE_ROLE} from "../../../src/marketplace/common/Module.sol"; - -uint32 constant FEE_POINTS = 2_500; -uint32 constant ROYALTIES_THRESHOLD_POINTS = 10_000; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - address listings = vm.envAddress("CONTRACT_LSP7_LISTINGS_ADDRESS"); - address offers = vm.envAddress("CONTRACT_LSP7_OFFERS_ADDRESS"); - address participant = vm.envAddress("CONTRACT_PARTICIPANT_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP7_MARKETPLACE_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP7Marketplace marketplace = new LSP7Marketplace(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(marketplace), - admin, - abi.encodeWithSelector(LSP7Marketplace.initialize.selector, owner, treasury, listings, offers, participant) - ) - ); - console.log(string.concat("LSP7Marketplace: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(marketplace)); - console.log(string.concat("LSP7Marketplace: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} - -contract Claim is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - LSP7Marketplace marketplace = LSP7Marketplace(payable(vm.envAddress("CONTRACT_LSP7_MARKETPLACE_ADDRESS"))); - - if (address(marketplace).balance > 0) { - console.log( - string.concat("LSP7Marketplace: withdraw ", Strings.toString(address(marketplace).balance)), - "wei to", - Strings.toHexString(marketplace.beneficiary()) - ); - vm.broadcast(owner); - marketplace.withdraw(address(marketplace).balance); - } - } -} - -contract Configure is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - IParticipant participant = IParticipant(vm.envAddress("CONTRACT_PARTICIPANT_ADDRESS")); - Module listings = Module(vm.envAddress("CONTRACT_LSP7_LISTINGS_ADDRESS")); - Module offers = Module(vm.envAddress("CONTRACT_LSP7_OFFERS_ADDRESS")); - LSP7Marketplace marketplace = LSP7Marketplace(payable(vm.envAddress("CONTRACT_LSP7_MARKETPLACE_ADDRESS"))); - - if (marketplace.feePoints() != FEE_POINTS) { - vm.broadcast(owner); - marketplace.setFeePoints(FEE_POINTS); - } - - if (marketplace.royaltiesThresholdPoints() != ROYALTIES_THRESHOLD_POINTS) { - vm.broadcast(owner); - marketplace.setRoyaltiesThresholdPoints(ROYALTIES_THRESHOLD_POINTS); - } - - if (!listings.hasRole(address(marketplace), MARKETPLACE_ROLE)) { - vm.broadcast(owner); - listings.grantRole(address(marketplace), MARKETPLACE_ROLE); - } - - if (!offers.hasRole(address(marketplace), MARKETPLACE_ROLE)) { - vm.broadcast(owner); - offers.grantRole(address(marketplace), MARKETPLACE_ROLE); - } - - if (marketplace.beneficiary() != treasury) { - vm.broadcast(owner); - marketplace.setBeneficiary(treasury); - } - - if (address(marketplace.participant()) != address(participant)) { - vm.broadcast(owner); - marketplace.setParticipant(participant); - } - } -} diff --git a/scripts/marketplace/lsp7/LSP7Offers.s.sol b/scripts/marketplace/lsp7/LSP7Offers.s.sol deleted file mode 100644 index 1434a2c..0000000 --- a/scripts/marketplace/lsp7/LSP7Offers.s.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {LSP7Offers} from "../../../src/marketplace/lsp7/LSP7Offers.sol"; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - address listings = vm.envAddress("CONTRACT_LSP7_LISTINGS_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP7_OFFERS_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP7Offers offers = new LSP7Offers(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(offers), - admin, - abi.encodeWithSelector(LSP7Offers.initialize.selector, owner, listings) - ) - ); - console.log(string.concat("LSP7Offers: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(offers)); - console.log(string.concat("LSP7Offers: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} diff --git a/scripts/marketplace/lsp8/LSP8Auctions.s.sol b/scripts/marketplace/lsp8/LSP8Auctions.s.sol deleted file mode 100644 index 9d5a9f5..0000000 --- a/scripts/marketplace/lsp8/LSP8Auctions.s.sol +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {LSP8Auctions} from "../../../src/marketplace/lsp8/LSP8Auctions.sol"; - -uint32 constant BID_MIN_DELTA_POINTS = 2_000; -uint256 constant BID_TIME_EXTENSION = 5 minutes; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - address listings = vm.envAddress("CONTRACT_LSP8_LISTINGS_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP8_AUCTIONS_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP8Auctions auctions = new LSP8Auctions(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(auctions), - admin, - abi.encodeWithSelector(LSP8Auctions.initialize.selector, owner, listings) - ) - ); - console.log(string.concat("LSP8Auctions: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(auctions)); - console.log(string.concat("LSP8Auctions: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} - -contract Configure is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - LSP8Auctions auctions = LSP8Auctions(payable(vm.envAddress("CONTRACT_LSP8_AUCTIONS_ADDRESS"))); - - if (auctions.bidTimeExtension() != BID_TIME_EXTENSION) { - console.log("Setting bid time extension"); - vm.broadcast(owner); - auctions.setBidTimeExtension(BID_TIME_EXTENSION); - } - - if (auctions.minBidDetlaPoints() != BID_MIN_DELTA_POINTS) { - console.log("Setting min bid delta points"); - vm.broadcast(owner); - auctions.setMinBidDetlaPoints(BID_MIN_DELTA_POINTS); - } - } -} diff --git a/scripts/marketplace/lsp8/LSP8Listings.s.sol b/scripts/marketplace/lsp8/LSP8Listings.s.sol deleted file mode 100644 index b4a9af5..0000000 --- a/scripts/marketplace/lsp8/LSP8Listings.s.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {LSP8Listings} from "../../../src/marketplace/lsp8/LSP8Listings.sol"; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP8_LISTINGS_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP8Listings listings = new LSP8Listings(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(listings), - admin, - abi.encodeWithSelector(LSP8Listings.initialize.selector, owner) - ) - ); - console.log(string.concat("LSP8Listings: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(listings)); - console.log(string.concat("LSP8Listings: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} diff --git a/scripts/marketplace/lsp8/LSP8Marketplace.s.sol b/scripts/marketplace/lsp8/LSP8Marketplace.s.sol deleted file mode 100644 index 37bb4d7..0000000 --- a/scripts/marketplace/lsp8/LSP8Marketplace.s.sol +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {IParticipant} from "../../../src/marketplace/IParticipant.sol"; -import {LSP8Marketplace} from "../../../src/marketplace/lsp8/LSP8Marketplace.sol"; -import {Module, MARKETPLACE_ROLE} from "../../../src/marketplace/common/Module.sol"; - -uint32 constant FEE_POINTS = 2_500; -uint32 constant ROYALTIES_THRESHOLD_POINTS = 10_000; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - address listings = vm.envAddress("CONTRACT_LSP7_LISTINGS_ADDRESS"); - address offers = vm.envAddress("CONTRACT_LSP7_OFFERS_ADDRESS"); - address auctions = vm.envAddress("CONTRACT_LSP8_AUCTIONS_ADDRESS"); - address participant = vm.envAddress("CONTRACT_PARTICIPANT_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP8_MARKETPLACE_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP8Marketplace marketplace = new LSP8Marketplace(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(marketplace), - admin, - abi.encodeWithSelector(LSP8Marketplace.initialize.selector, owner, treasury, listings, offers, auctions, participant) - ) - ); - console.log(string.concat("LSP8Marketplace: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(marketplace)); - console.log(string.concat("LSP8Marketplace: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} - -contract Claim is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - LSP8Marketplace marketplace = LSP8Marketplace(payable(vm.envAddress("CONTRACT_LSP8_MARKETPLACE_ADDRESS"))); - - if (address(marketplace).balance > 0) { - console.log( - string.concat("LSP8Marketplace: withdraw ", Strings.toString(address(marketplace).balance)), - "wei to", - Strings.toHexString(marketplace.beneficiary()) - ); - vm.broadcast(owner); - marketplace.withdraw(address(marketplace).balance); - } - } -} - -contract Configure is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - IParticipant participant = IParticipant(vm.envAddress("CONTRACT_PARTICIPANT_ADDRESS")); - Module listings = Module(vm.envAddress("CONTRACT_LSP8_LISTINGS_ADDRESS")); - Module offers = Module(vm.envAddress("CONTRACT_LSP8_OFFERS_ADDRESS")); - Module auctions = Module(vm.envAddress("CONTRACT_LSP8_AUCTIONS_ADDRESS")); - - LSP8Marketplace marketplace = LSP8Marketplace(payable(vm.envAddress("CONTRACT_LSP8_MARKETPLACE_ADDRESS"))); - - if (marketplace.feePoints() != FEE_POINTS) { - vm.broadcast(owner); - marketplace.setFeePoints(FEE_POINTS); - } - - if (marketplace.royaltiesThresholdPoints() != ROYALTIES_THRESHOLD_POINTS) { - vm.broadcast(owner); - marketplace.setRoyaltiesThresholdPoints(ROYALTIES_THRESHOLD_POINTS); - } - - if (!listings.hasRole(address(marketplace), MARKETPLACE_ROLE)) { - vm.broadcast(owner); - listings.grantRole(address(marketplace), MARKETPLACE_ROLE); - } - - if (!listings.hasRole(address(auctions), MARKETPLACE_ROLE)) { - vm.broadcast(owner); - listings.grantRole(address(auctions), MARKETPLACE_ROLE); - } - - if (!offers.hasRole(address(marketplace), MARKETPLACE_ROLE)) { - vm.broadcast(owner); - offers.grantRole(address(marketplace), MARKETPLACE_ROLE); - } - - if (!auctions.hasRole(address(marketplace), MARKETPLACE_ROLE)) { - vm.broadcast(owner); - auctions.grantRole(address(marketplace), MARKETPLACE_ROLE); - } - - if (marketplace.beneficiary() != treasury) { - vm.broadcast(owner); - marketplace.setBeneficiary(treasury); - } - - if (address(marketplace.participant()) != address(participant)) { - vm.broadcast(owner); - marketplace.setParticipant(participant); - } - } -} diff --git a/scripts/marketplace/lsp8/LSP8Offers.s.sol b/scripts/marketplace/lsp8/LSP8Offers.s.sol deleted file mode 100644 index 28a17a6..0000000 --- a/scripts/marketplace/lsp8/LSP8Offers.s.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {LSP8Offers} from "../../../src/marketplace/lsp8/LSP8Offers.sol"; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - address listings = vm.envAddress("CONTRACT_LSP8_LISTINGS_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_LSP8_OFFERS_ADDRESS", address(0)); - - vm.broadcast(admin); - LSP8Offers offers = new LSP8Offers(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(offers), - admin, - abi.encodeWithSelector(LSP8Offers.initialize.selector, owner, listings) - ) - ); - console.log(string.concat("LSP8Offers: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(offers)); - console.log(string.concat("LSP8Offers: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} diff --git a/scripts/page/PageName.s.sol b/scripts/page/PageName.s.sol deleted file mode 100644 index fc41de6..0000000 --- a/scripts/page/PageName.s.sol +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {UniversalProfile} from "@lukso/lsp-smart-contracts/contracts/UniversalProfile.sol"; -import {OPERATION_0_CALL} from "@erc725/smart-contracts/contracts/constants.sol"; -import {PageName} from "../../src/page/PageName.sol"; - -uint8 constant MINIMUM_LENGTH = 3; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address profile = vm.envAddress("PROFILE_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - address controller = vm.envAddress("PAGE_NAME_CONTROLLER_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_PAGE_NAME_ADDRESS", address(0)); - - vm.broadcast(admin); - PageName pageName = new PageName(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(pageName), - admin, - abi.encodeWithSelector( - PageName.initialize.selector, - "Universal Page Name", - "UPN", - profile, - treasury, - controller, - MINIMUM_LENGTH) - ) - ); - console.log(string.concat("PageName: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(pageName)); - console.log(string.concat("PageName: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} - -contract Configure is Script { - bytes32 private constant _LSP8_TOKEN_METADATA_BASE_URI_KEY = - 0x1a7628600c3bac7101f53697f48df381ddc36b9015e7d7c9c5633d1252aa2843; - - bytes4 private constant _baseUriHash = bytes4(bytes32(keccak256("keccak256(utf8)"))); - - function run() external { - address controller = vm.envAddress("PROFILE_CONTROLLER_ADDRESS"); - address treasury = vm.envAddress("TREASURY_ADDRESS"); - UniversalProfile profile = UniversalProfile(payable(vm.envAddress("PROFILE_ADDRESS"))); - PageName pageName = PageName(payable(vm.envAddress("CONTRACT_PAGE_NAME_ADDRESS"))); - - bytes memory currentBaseUri = pageName.getData(_LSP8_TOKEN_METADATA_BASE_URI_KEY); - string memory baseUri = vm.envString("PAGE_NAME_BASE_URI"); - bytes memory encodedBaseUri = bytes.concat(_baseUriHash, bytes(baseUri)); - if (keccak256(encodedBaseUri) != keccak256(currentBaseUri)) { - vm.broadcast(controller); - profile.execute( - OPERATION_0_CALL, - address(pageName), - 0, - abi.encodeWithSelector(pageName.setData.selector, _LSP8_TOKEN_METADATA_BASE_URI_KEY, encodedBaseUri) - ); - } - - if (pageName.beneficiary() != treasury) { - vm.broadcast(controller); - profile.execute( - OPERATION_0_CALL, - address(pageName), - 0, - abi.encodeWithSelector(pageName.setBeneficiary.selector, treasury) - ); - } - - if (pageName.minimumLength() != MINIMUM_LENGTH) { - vm.broadcast(controller); - profile.execute( - OPERATION_0_CALL, - address(pageName), - 0, - abi.encodeWithSelector(pageName.setMinimumLength.selector, MINIMUM_LENGTH) - ); - } - } -} diff --git a/scripts/pool/Vault.s.sol b/scripts/pool/Vault.s.sol deleted file mode 100644 index 3cd9bef..0000000 --- a/scripts/pool/Vault.s.sol +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity =0.8.22; - -import "forge-std/Script.sol"; -import {console} from "forge-std/console.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import { - TransparentUpgradeableProxy, - ITransparentUpgradeableProxy -} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import {Vault} from "../../src/pool/Vault.sol"; -import {DepositContract} from "../../src/pool/IDepositContract.sol"; - -uint32 constant SERVICE_FEE = 8_000; // 8% -uint256 constant DEPOSIT_LIMIT = 1000 * 32 ether; - -contract Deploy is Script { - function run() external { - address admin = vm.envAddress("ADMIN_ADDRESS"); - address owner = vm.envAddress("OWNER_ADDRESS"); - - address proxy = vm.envOr("CONTRACT_POOL_VAULT", address(0)); - - vm.broadcast(admin); - Vault vault = new Vault(); - - if (proxy == address(0)) { - vm.broadcast(admin); - proxy = address( - new TransparentUpgradeableProxy( - address(vault), - admin, - abi.encodeWithSelector(Vault.initialize.selector, owner, DepositContract) - ) - ); - console.log(string.concat("Vault: deploy ", Strings.toHexString(address(proxy)))); - } else { - vm.broadcast(admin); - ITransparentUpgradeableProxy(proxy).upgradeTo(address(vault)); - console.log(string.concat("Vault: upgrade ", Strings.toHexString(address(proxy)))); - } - } -} - -contract Configure is Script { - function run() external { - address owner = vm.envAddress("OWNER_ADDRESS"); - address profile = vm.envAddress("PROFILE_ADDRESS"); - address oracle = vm.envAddress("POOL_ORACLE_ADDRESS"); - - Vault vault = Vault(payable(vm.envAddress("CONTRACT_POOL_VAULT"))); - - if (vault.feeRecipient() != profile) { - vm.broadcast(owner); - vault.setFeeRecipient(profile); - } - - if (vault.fee() != SERVICE_FEE) { - vm.broadcast(owner); - vault.setFee(SERVICE_FEE); - } - - if (vault.depositLimit() != DEPOSIT_LIMIT) { - vm.broadcast(owner); - vault.setDepositLimit(DEPOSIT_LIMIT); - } - - if (!vault.restricted()) { - vm.broadcast(owner); - vault.setRestricted(true); - } - - if (!vault.isAllowlisted(profile)) { - vm.broadcast(owner); - vault.allowlist(profile, true); - } - - if (!vault.isOracle(oracle)) { - vm.broadcast(owner); - vault.enableOracle(oracle, true); - } - } -} diff --git a/tools/artifacts.sh b/tools/artifacts.sh deleted file mode 100755 index 7626d32..0000000 --- a/tools/artifacts.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -set -e - -PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd) - -help() { - echo "" - echo "Usage: $0 -t NETWORK" - echo -e "\t-t --target: Target network to deploy to" - echo -e "\t-h --help: Prints this message" - exit 1 -} - -while [ -n "$1" ]; do - case "$1" in - -h | --help) - help - ;; - -t | --target) - [[ ! "$2" =~ ^- ]] && TARGET=$2 - shift 2 - ;; - --) - # remaining options are captured as "$*" - shift - break - ;; - *) - echo -e "Unknown option: $1" - help - ;; - esac -done - -if [ -z "${TARGET}" ]; then - help -fi - -case "${TARGET}" in -local | testnet | mainnet) ;; -*) - echo -e "Unknown target: ${TARGET}" - help - ;; -esac - -set -a -source "${PROJECT_DIR}/.env" -source "${PROJECT_DIR}/.env.${TARGET}" -set +a - -SRC_DIR=${PROJECT_DIR}/src -ABI_DIR=${PROJECT_DIR}/artifacts/abi -BYTECODE_DIR=${PROJECT_DIR}/artifacts/bytecode/${CHAIN_ID} - -exportAbi() { - path=$(dirname $1) - name=$(basename $1) - - echo "Exporting abi ${name}" - mkdir -p "${ABI_DIR}/${path}" - forge inspect "${SRC_DIR}/${path}/${name}.sol:${name}" abi \ - >"${ABI_DIR}/${path}/${name}.json" -} - -exportBytecode() { - path=$(dirname $1) - name=$(basename $1) - - echo "Exporting bytecode ${name}" - mkdir -p "${BYTECODE_DIR}/${path}" - forge inspect "${SRC_DIR}/${path}/${name}.sol:${name}" bytecode \ - --force \ - --optimize \ - --optimizer-runs 1000 \ - --libraries src/common/Points.sol:Points:${LIBRARY_POINTS_ADDRESS} \ - --libraries src/common/Royalties.sol:Royalties:${LIBRARY_ROYALTIES_ADDRESS} \ - >"${BYTECODE_DIR}/${path}/${name}.bin" -} - -exportAbi "assets/lsp7/GenesisDigitalAsset" - -exportAbi "assets/lsp7/DigitalAssetDrop" -exportBytecode "assets/lsp7/DigitalAssetDrop" - -exportAbi "assets/lsp7/MintableDigitalAsset" -exportBytecode "assets/lsp7/MintableDigitalAsset" - -exportAbi "assets/lsp8/MintableIdentifiableDigitalAsset" -exportBytecode "assets/lsp8/MintableIdentifiableDigitalAsset" - -exportAbi "assets/lsp8/CollectorIdentifiableDigitalAsset" - -exportAbi "drops/LSP7DropsDigitalAsset" -exportBytecode "drops/LSP7DropsDigitalAsset" -exportAbi "drops/LSP7DropsLightAsset" -exportBytecode "drops/LSP7DropsLightAsset" - -exportAbi "drops/LSP8DropsDigitalAsset" -exportBytecode "drops/LSP8DropsDigitalAsset" -exportAbi "drops/LSP8DropsLightAsset" -exportBytecode "drops/LSP8DropsLightAsset" - -exportAbi "marketplace/Participant" - -exportAbi "marketplace/lsp7/LSP7Listings" -exportAbi "marketplace/lsp7/LSP7Offers" -exportAbi "marketplace/lsp7/LSP7Marketplace" - -exportAbi "marketplace/lsp8/LSP8Listings" -exportAbi "marketplace/lsp8/LSP8Offers" -exportAbi "marketplace/lsp8/LSP8Auctions" -exportAbi "marketplace/lsp8/LSP8Marketplace" - -exportAbi "page/PageName" - -exportAbi "pool/Vault" -exportAbi "pool/IDepositContract" diff --git a/tools/configure.sh b/tools/configure.sh deleted file mode 100755 index 59ba105..0000000 --- a/tools/configure.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash - -set -e - -PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd) - -help() { - echo "" - echo "Usage: $0 -s SCRIPT_NAME -t NETWORK [-b] [-p] [-n SCRIPT_NAME]" - echo -e "\t-s --script: Script to run" - echo -e "\t-t --target: Target network" - echo -e "\t-b --broadcast: Broadcast transactions to a network" - echo -e "\t-p --profile: Use Universal Page profile to transact on behalf" - echo -e "\t-n --name: Name of script contract or 'Configure' if not specified" - echo -e "\t-h --help: Prints this message" - exit 1 -} - -while [ -n "$1" ]; do - case "$1" in - -h | --help) - help - ;; - -s | --script) - [[ ! "$2" =~ ^- ]] && SCRIPT=$2 - shift 2 - ;; - -n | --name) - [[ ! "$2" =~ ^- ]] && SCRIPT_NAME=$2 - shift 2 - ;; - -t | --target) - [[ ! "$2" =~ ^- ]] && TARGET=$2 - shift 2 - ;; - -b | --broadcast) - BROADCAST=true - shift - ;; - -p | --profile) - PROFILE=true - shift - ;; - --) - # remaining options are captured as "$*" - shift - break - ;; - *) - echo -e "Unknown option: $1" - help - ;; - esac -done - -if [ -z "${TARGET}" ] || [ -z "${SCRIPT}" ]; then - help -fi - -if [ -z "${SCRIPT_NAME}" ]; then - SCRIPT_NAME="Configure" -fi - -case "${TARGET}" in -local | testnet | mainnet) ;; -*) - echo -e "Unknown target: ${TARGET}" - help - ;; -esac - -set -a -source "${PROJECT_DIR}/.env" -source "${PROJECT_DIR}/.env.${TARGET}" -set +a - -# script arguments -ARGS="--rpc-url ${RPC_URL}" - -# known keys -if [ -n "${PROFILE_CONTROLLER_PRIVATE_KEY}" ]; then - ARGS+=" --private-keys ${PROFILE_CONTROLLER_PRIVATE_KEY}" -fi - -# use profile's controller or fallback to hardware wallet -if [ "${PROFILE}" = true ]; then - ARGS+=" --ledger --hd-paths ${PROFILE_CONTROLLER_LEDGER_DERIVATION_PATH}" -elif [ -n "${OWNER_PRIVATE_KEY}" ]; then - ARGS+=" --private-keys ${OWNER_PRIVATE_KEY}" -elif [ -n "${OWNER_LEDGER_DERIVATION_PATH}" ]; then - ARGS+=" --ledger --hd-paths ${OWNER_LEDGER_DERIVATION_PATH}" -fi - -# broadcast -if [ "${BROADCAST}" = true ]; then - ARGS+=" --broadcast" -fi - -# libraries -if [ -n "${LIBRARY_POINTS_ADDRESS}" ]; then - ARGS+=" --libraries src/common/Points.sol:Points:${LIBRARY_POINTS_ADDRESS}" -fi -if [ -n "${LIBRARY_ROYALTIES_ADDRESS}" ]; then - ARGS+=" --libraries src/common/Royalties.sol:Royalties:${LIBRARY_ROYALTIES_ADDRESS}" -fi - -forge script "${PROJECT_DIR}/scripts/${SCRIPT}:${SCRIPT_NAME}" ${ARGS} diff --git a/tools/deploy.sh b/tools/deploy.sh deleted file mode 100755 index de718eb..0000000 --- a/tools/deploy.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash - -set -e - -PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd) - -help() { - echo "" - echo "Usage: $0 -s SCRIPT_NAME -t NETWORK [-b] [-l]" - echo -e "\t-s --script: Script to run" - echo -e "\t-t --target: Target network to deploy to" - echo -e "\t-b --broadcast: Broadcast transactions to a network" - echo -e "\t-l --libraries: Deploys libraries only" - echo -e "\t-h --help: Prints this message" - exit 1 -} - -while [ -n "$1" ]; do - case "$1" in - -h | --help) - help - ;; - -s | --script) - [[ ! "$2" =~ ^- ]] && SCRIPT=$2 - shift 2 - ;; - -t | --target) - [[ ! "$2" =~ ^- ]] && TARGET=$2 - shift 2 - ;; - -b | --broadcast) - BROADCAST=true - shift - ;; - -l | --libraries) - LIBRARIES=true - shift - ;; - --) - # remaining options are captured as "$*" - shift - break - ;; - *) - echo -e "Unknown option: $1" - help - ;; - esac -done - -if [ -z "${TARGET}" ] || ([ -z "${SCRIPT}" ] && [ -z "${LIBRARIES}" ]); then - help -fi - -if [ -n "${SCRIPT}" ] && [ -n "${LIBRARIES}" ]; then - echo -e "Only can specify script or libraries to deploy" - help -fi - -case "${TARGET}" in -local | testnet | mainnet) ;; -*) - echo -e "Unknown target: ${TARGET}" - help - ;; -esac - -set -a -source "${PROJECT_DIR}/.env" -source "${PROJECT_DIR}/.env.${TARGET}" -set +a - -# script arguments -ARGS="--rpc-url ${RPC_URL}" - -# known keys -if [ -n "${ADMIN_PRIVATE_KEY}" ]; then - ARGS+=" --private-key ${ADMIN_PRIVATE_KEY}" -fi - -if [ -n "${LIBRARIES}" ]; then - - # known keys - if [ -z "${ADMIN_PRIVATE_KEY}" ]; then - # fallback to enter private key - ARGS+=" --interactive" - fi - - if [ -z "${LIBRARY_POINTS_ADDRESS}" ]; then - echo "Deploying Points" - forge create "${PROJECT_DIR}/src/common/Points.sol:Points" ${ARGS} - else - echo "Deployed Points: ${LIBRARY_POINTS_ADDRESS}" - fi - - if [ -z "${LIBRARY_ROYALTIES_ADDRESS}" ]; then - echo "Deploying Royalties" - forge create "${PROJECT_DIR}/src/common/Royalties.sol:Royalties" ${ARGS} - else - echo "Deployed Royalties: ${LIBRARY_ROYALTIES_ADDRESS}" - fi - -else - - # fallback to hardware wallet - if [ -z "${ADMIN_PRIVATE_KEY}" ] && [ -n "${ADMIN_LEDGER_DERIVATION_PATH}" ]; then - ARGS+=" --ledger --hd-paths ${ADMIN_LEDGER_DERIVATION_PATH}" - fi - - # broadcast - if [ "${BROADCAST}" = true ]; then - ARGS+=" --broadcast" - fi - - # libraries - if [ -n "${LIBRARY_POINTS_ADDRESS}" ]; then - ARGS+=" --libraries src/common/Points.sol:Points:${LIBRARY_POINTS_ADDRESS}" - fi - if [ -n "${LIBRARY_ROYALTIES_ADDRESS}" ]; then - ARGS+=" --libraries src/common/Royalties.sol:Royalties:${LIBRARY_ROYALTIES_ADDRESS}" - fi - - forge script "${PROJECT_DIR}/scripts/${SCRIPT}:Deploy" ${ARGS} - -fi diff --git a/tools/local_network.sh b/tools/local_network.sh deleted file mode 100755 index 14545d1..0000000 --- a/tools/local_network.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd) - -source "${PROJECT_DIR}/.env" -source "${PROJECT_DIR}/.env.local" - -anvil \ - --mnemonic "${MNEMONIC}" \ - --derivation-path "m/44'/60'/0'/0/" diff --git a/tools/submit_selectors.sh b/tools/submit_selectors.sh deleted file mode 100755 index 576b1e8..0000000 --- a/tools/submit_selectors.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash - -set -e - -PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd) - -help() { - echo "" - echo "Usage: $0 -t NETWORK" - echo -e "\t-t --target: Target network to deploy to" - echo -e "\t-h --help: Prints this message" - exit 1 -} - -while [ -n "$1" ]; do - case "$1" in - -h | --help) - help - ;; - -t | --target) - [[ ! "$2" =~ ^- ]] && TARGET=$2 - shift 2 - ;; - --) - # remaining options are captured as "$*" - shift - break - ;; - *) - echo -e "Unknown option: $1" - help - ;; - esac -done - -if [ -z "${TARGET}" ]; then - help -fi - -case "${TARGET}" in -local | testnet | mainnet) ;; -*) - echo -e "Unknown target: ${TARGET}" - help - ;; -esac - -set -a -source "${PROJECT_DIR}/.env" -source "${PROJECT_DIR}/.env.${TARGET}" -set +a - -SRC_DIR=${PROJECT_DIR}/src - -submit() { - path=$(dirname $1) - name=$(basename $1) - - # forge inspect ${name} methodIdentifiers - - abi=$(forge inspect "${SRC_DIR}/${path}/${name}.sol:${name}" abi) - content="{ \"contract_abi\": ${abi} }" - - echo "Submitting selectors of ${name} to openchain.xyz" - forge selectors upload ${name} - - # echo "Submitting selectors of ${name} to 4byte.directory" - # curl \ - # --header "Content-Type: application/json" \ - # --request POST \ - # --data "${content}" \ - # "https://www.4byte.directory/api/v1/import-solidity/" -} - -submit "assets/lsp7/GenesisDigitalAsset" - -submit "assets/lsp7/DigitalAssetDrop" - -submit "assets/lsp7/MintableDigitalAsset" - -submit "assets/lsp8/MintableIdentifiableDigitalAsset" - -submit "assets/lsp8/CollectorIdentifiableDigitalAsset" - -submit "drops/LSP7DropsDigitalAsset" - -submit "drops/LSP8DropsDigitalAsset" - -submit "marketplace/Participant" - -submit "marketplace/lsp7/LSP7Listings" -submit "marketplace/lsp7/LSP7Offers" -submit "marketplace/lsp7/LSP7Marketplace" - -submit "marketplace/lsp8/LSP8Listings" -submit "marketplace/lsp8/LSP8Offers" -submit "marketplace/lsp8/LSP8Auctions" -submit "marketplace/lsp8/LSP8Marketplace" - -submit "page/PageName" - -submit "pool/Vault" diff --git a/tools/verify.sh b/tools/verify.sh deleted file mode 100755 index 88ab0d9..0000000 --- a/tools/verify.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash - -set -e - -PROJECT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd) - -help() { - echo "" - echo "Usage: $0 -t NETWORK" - echo -e "\t-t --target: Target network to deploy to" - echo -e "\t-h --help: Prints this message" - exit 1 -} - -while [ -n "$1" ]; do - case "$1" in - -h | --help) - help - ;; - -t | --target) - [[ ! "$2" =~ ^- ]] && TARGET=$2 - shift 2 - ;; - --) - # remaining options are captured as "$*" - shift - break - ;; - *) - echo -e "Unknown option: $1" - help - ;; - esac -done - -if [ -z "${TARGET}" ]; then - help -fi - -case "${TARGET}" in -local | testnet | mainnet) ;; -*) - echo -e "Unknown target: ${TARGET}" - help - ;; -esac - -set -a -source "${PROJECT_DIR}/.env" -source "${PROJECT_DIR}/.env.${TARGET}" -set +a - -SRC_DIR=${PROJECT_DIR}/src - -verify() { - name=$1 - address=$2 - - echo "Verifying ${name} at ${address}" - - forge verify-contract \ - --optimizer-runs 1000 \ - --chain-id ${CHAIN_ID} \ - --verifier blockscout \ - --verifier-url "${BLOCKSCOUT_URL}/api?" \ - --watch \ - ${address} ${name} -} - -verifyProxy() { - name=$1 - address=$2 - - echo "Verifying proxy ${name} at ${address}" - - implementationValue=$( - cast storage \ - --chain ${CHAIN_ID} \ - --rpc-url ${RPC_URL} \ - ${address} 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc - ) - implementationAddress="0x${implementationValue:26:40}" - - echo "Implementation address: ${implementationAddress}" - - verify TransparentUpgradeableProxy ${address} - verify ${name} ${implementationAddress} -} - -verify CollectorIdentifiableDigitalAsset ${CONTRACT_COLLECTOR_DIGITAL_ASSET_ADDRESS} -verify GenesisDigitalAsset ${CONTRACT_GENESIS_DIGITAL_ASSET_ADDRESS} - -verifyProxy Participant ${CONTRACT_PARTICIPANT_ADDRESS} - -verifyProxy LSP7Listings ${CONTRACT_LSP7_LISTINGS_ADDRESS} -verifyProxy LSP7Offers ${CONTRACT_LSP7_OFFERS_ADDRESS} -verifyProxy LSP7Marketplace ${CONTRACT_LSP7_MARKETPLACE_ADDRESS} - -verifyProxy LSP8Listings ${CONTRACT_LSP8_LISTINGS_ADDRESS} -verifyProxy LSP8Offers ${CONTRACT_LSP8_OFFERS_ADDRESS} -verifyProxy LSP8Auctions ${CONTRACT_LSP8_AUCTIONS_ADDRESS} -verifyProxy LSP8Marketplace ${CONTRACT_LSP8_MARKETPLACE_ADDRESS} - -verifyProxy PageName ${CONTRACT_PAGE_NAME_ADDRESS} - -verifyProxy Vault ${CONTRACT_POOL_VAULT}