Skip to content

Commit

Permalink
Fix sdk typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Jul 21, 2023
1 parent 0ec2786 commit 7065620
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 38 deletions.
21 changes: 9 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@
"url": "https://github.com/gnosis/zodiac.git"
},
"devDependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
"@nomicfoundation/hardhat-toolbox": "^2.0.2",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@typechain/ethers-v5": "^10.2.1",
"@typechain/hardhat": "^6.1.6",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomicfoundation/hardhat-network-helpers": "^1.0.7",
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "2.2.3",
"@nomiclabs/hardhat-etherscan": "3.1.7",
"@typechain/ethers-v5": "^10.2.0",
"@typechain/hardhat": "^6.1.5",
"@types/chai": "^4.3.3",
"@types/ethereumjs-abi": "^0.6.3",
"@types/mocha": "^10.0.0",
Expand All @@ -83,12 +81,11 @@
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
"rimraf": "^3.0.2",
"solc": "^0.8.17",
"solhint": "^3.3.7",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.8.2",
"solidity-coverage": "^0.8.4",
"ts-node": "^10.9.1",
"typechain": "^8.1.1",
"typechain": "^8.3.0",
"typescript": "^4.8.4",
"yargs": "^17.6.0"
},
Expand Down
11 changes: 5 additions & 6 deletions tasks/deploy-replay.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import assert from "assert";
import { task } from "hardhat/config";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import {
Expand Down Expand Up @@ -27,12 +28,10 @@ export const deploy = async (
const [deployer] = await hre.ethers.getSigners();
const signer = hre.ethers.provider.getSigner(deployer.address);
for (let index = 0; index < contracts.length; index++) {
const initData: InitData = MasterCopyInitData[contracts[index]];
if (
MasterCopyInitData[contracts[index]] &&
initData.initCode &&
initData.salt
) {
const initData: InitData | undefined =
MasterCopyInitData[contracts[index]];

if (initData && initData.initCode && initData.salt) {
console.log(` \x1B[4m${contracts[index]}\x1B[0m`);
try {
await deployMastercopyWithInitData(
Expand Down
2 changes: 1 addition & 1 deletion tasks/singleton-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";
import { KnownContracts, MasterCopyInitData } from "../sdk/factory";
import { deployModuleFactory } from "../sdk/factory/deployModuleFactory";

const FactoryInitCode = MasterCopyInitData[KnownContracts.FACTORY].initCode;
const FactoryInitCode = MasterCopyInitData[KnownContracts.FACTORY]?.initCode;

export const deploy = async (_: null, hre: HardhatRuntimeEnvironment) => {
const Factory = await hre.ethers.getContractFactory("ModuleProxyFactory");
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.cjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"outDir": "dist/cjs",
"module": "commonjs"
},
"include": ["sdk/**/*.ts"]
"files": ["./hardhat.config.ts"]
}
2 changes: 1 addition & 1 deletion tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"outDir": "dist/esm",
"module": "es6"
},
"include": ["sdk/**/*.ts"]
"files": ["./hardhat.config.ts"]
}
34 changes: 17 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@
mcl-wasm "^0.7.1"
rustbn.js "~0.2.0"

"@nomicfoundation/hardhat-chai-matchers@^1.0.6":
"@nomicfoundation/hardhat-chai-matchers@^1.0.5":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc"
integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==
Expand All @@ -682,14 +682,14 @@
deep-eql "^4.0.1"
ordinal "^1.0.3"

"@nomicfoundation/hardhat-network-helpers@^1.0.8":
"@nomicfoundation/hardhat-network-helpers@^1.0.7":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz#e4fe1be93e8a65508c46d73c41fa26c7e9f84931"
integrity sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q==
dependencies:
ethereumjs-util "^7.1.4"

"@nomicfoundation/hardhat-toolbox@^2.0.2":
"@nomicfoundation/hardhat-toolbox@^2.0.0":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156"
integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg==
Expand Down Expand Up @@ -760,12 +760,12 @@
"@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1"
"@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1"

"@nomiclabs/hardhat-ethers@^2.2.3":
"@nomiclabs/[email protected]":
version "2.2.3"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0"
integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==

"@nomiclabs/hardhat-etherscan@^3.1.7":
"@nomiclabs/[email protected]":
version "3.1.7"
resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz#72e3d5bd5d0ceb695e097a7f6f5ff6fcbf062b9a"
integrity sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ==
Expand Down Expand Up @@ -881,7 +881,7 @@
"@sentry/types" "5.30.0"
tslib "^1.9.3"

"@solidity-parser/parser@^0.14.0", "@solidity-parser/parser@^0.14.1":
"@solidity-parser/parser@^0.14.0":
version "0.14.5"
resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804"
integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==
Expand Down Expand Up @@ -915,15 +915,15 @@
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e"
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==

"@typechain/ethers-v5@^10.2.1":
"@typechain/ethers-v5@^10.2.0":
version "10.2.1"
resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz#50241e6957683281ecfa03fb5a6724d8a3ce2391"
integrity sha512-n3tQmCZjRE6IU4h6lqUGiQ1j866n5MTCBJreNEHHVWXa2u9GJTaeYyU1/k+1qLutkyw+sS6VAN+AbeiTqsxd/A==
dependencies:
lodash "^4.17.15"
ts-essentials "^7.0.1"

"@typechain/hardhat@^6.1.6":
"@typechain/hardhat@^6.1.5":
version "6.1.6"
resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.6.tgz#1a749eb35e5054c80df531cf440819cb347c62ea"
integrity sha512-BiVnegSs+ZHVymyidtK472syodx1sXYlYJJixZfRstHVGYTi8V1O7QG4nsjyb0PC/LORcq7sfBUcHto1y6UgJA==
Expand Down Expand Up @@ -5057,13 +5057,13 @@ solidity-comments-extractor@^0.0.7:
resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19"
integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==

solidity-coverage@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813"
integrity sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ==
solidity-coverage@^0.8.4:
version "0.8.4"
resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.4.tgz#c57a21979f5e86859c5198de9fbae2d3bc6324a5"
integrity sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==
dependencies:
"@ethersproject/abi" "^5.0.9"
"@solidity-parser/parser" "^0.14.1"
"@solidity-parser/parser" "^0.16.0"
chalk "^2.4.2"
death "^1.1.0"
detect-port "^1.3.0"
Expand Down Expand Up @@ -5504,10 +5504,10 @@ type-fest@^0.7.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48"
integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==

typechain@^8.1.1:
version "8.1.1"
resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd"
integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ==
typechain@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.3.0.tgz#d95566de822332651152bd682ed1ec7b0e1b8610"
integrity sha512-AxtAYyOA7f2p28/JkcqrF+gnzam94VNTIbXcaUKodkrKzMX6P/XqBaP6d/OPuBZOi0WgOOmkg1zOSojX8uGkOg==
dependencies:
"@types/prettier" "^2.1.1"
debug "^4.3.1"
Expand Down

0 comments on commit 7065620

Please sign in to comment.