From 6454406e3d7febe4d4b697a9b021b19f15c5a42e Mon Sep 17 00:00:00 2001 From: juliopavila Date: Mon, 26 Aug 2024 12:07:00 -0300 Subject: [PATCH] chore: add the zodiac-core package and clean code --- packages/contracts/package.json | 2 +- .../contracts/tasks/deploy-mastercopies.ts | 3 +- packages/contracts/tasks/deploy-mastercopy.ts | 6 +-- packages/contracts/yarn.lock | 37 ++++--------------- 4 files changed, 10 insertions(+), 38 deletions(-) diff --git a/packages/contracts/package.json b/packages/contracts/package.json index fb99213..8396b20 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -25,7 +25,7 @@ "author": "", "license": "LGPL-3.0+", "devDependencies": { - "@gnosis-guild/zodiac-core": "file:../../../zodiac-core", + "@gnosis-guild/zodiac-core": "^2.0.0", "@nomicfoundation/hardhat-chai-matchers": "^2.0.7", "@nomicfoundation/hardhat-ethers": "^3.0.6", "@nomicfoundation/hardhat-ignition": "^0.15.5", diff --git a/packages/contracts/tasks/deploy-mastercopies.ts b/packages/contracts/tasks/deploy-mastercopies.ts index fc2fc57..a078add 100644 --- a/packages/contracts/tasks/deploy-mastercopies.ts +++ b/packages/contracts/tasks/deploy-mastercopies.ts @@ -9,8 +9,7 @@ task( ).setAction(async (_, hre) => { const [signer] = await hre.ethers.getSigners(); const provider = createEIP1193(hre.network.provider, signer); - - for (const mastercopy of await readMastercopies()) { + for (const mastercopy of readMastercopies()) { const { contractName, contractVersion, diff --git a/packages/contracts/tasks/deploy-mastercopy.ts b/packages/contracts/tasks/deploy-mastercopy.ts index 719f46b..9b6fec0 100644 --- a/packages/contracts/tasks/deploy-mastercopy.ts +++ b/packages/contracts/tasks/deploy-mastercopy.ts @@ -17,7 +17,7 @@ task( const [signer] = await hre.ethers.getSigners(); const provider = createEIP1193(hre.network.provider, signer); - for (const mastercopy of await readMastercopies({ contractVersion })) { + for (const mastercopy of readMastercopies({ contractVersion })) { const { contractName, contractVersion, @@ -26,7 +26,6 @@ task( constructorArgs, salt, } = mastercopy; - const { address, noop } = await deployMastercopy({ factory, bytecode, @@ -44,9 +43,6 @@ task( `🔄 ${contractName}@${contractVersion}: Already deployed at ${address}` ); } else { - console.log( - `🚀 ${contractName}@${contractVersion}: Successfully deployed at ${address}` - ); } } }); diff --git a/packages/contracts/yarn.lock b/packages/contracts/yarn.lock index 73ebae1..252dee1 100644 --- a/packages/contracts/yarn.lock +++ b/packages/contracts/yarn.lock @@ -309,8 +309,10 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== -"@gnosis-guild/zodiac-core@file:../../../zodiac-core": - version "1.1.1" +"@gnosis-guild/zodiac-core@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@gnosis-guild/zodiac-core/-/zodiac-core-2.0.0.tgz#eed83229414b47a1656c1deebfe635beda24786c" + integrity sha512-R3ggh7fv+kS5meN89k/PTCOrTgw73LP3yOykbyBNVzgivXkX8uoaUwJ4anzj5Z18E+Ufbw99fLBvxn9jPTSpqg== dependencies: "@gnosis.pm/safe-contracts" "1.3.0" "@openzeppelin/contracts" "5.0.2" @@ -4571,16 +4573,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -4633,14 +4626,7 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -5132,16 +5118,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==