Skip to content

Commit

Permalink
update hardhat finder to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
emre-tepe1 committed Oct 3, 2023
1 parent 1037263 commit cf4bdbf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"eslint": "^8.31.0",
"eslint-plugin-json": "^3.1.0",
"hardhat": "^2.0.4",
"hardhat-finder": "^2.0.4",
"hardhat-finder": "^3.0.0",
"mocha": "^10.2.0",
"prettier": "^2.8.2",
"ts-node": "^10.9.1",
Expand Down
9 changes: 8 additions & 1 deletion src/tasks/storageCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ const storageCheckAction: ActionType<StorageCheckTaskArguments> = async (
}

const [contractPath, contractName] = fullyQualifiedName.split(":");
await finder.setFor(contractPath, contractName, false);
await finder.setFor({
contractName,
contractPath,
options: {
noCompile: true,
hideWarnings: true,
},
});
const storage = finder.getStorageLayout()!!.storage;
if (
!finder.getStorageLayout() &&
Expand Down
9 changes: 8 additions & 1 deletion src/tasks/storageLock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ const storageLockAction: ActionType<StorageLockTaskArguments> = async (
const data: StorageVaultData = {};
for (const fullyQualifiedName of fullyQualifiedNames) {
const [contractPath, contractName] = fullyQualifiedName.split(":");
await finder.setFor(contractPath, contractName, false);
await finder.setFor({
contractName,
contractPath,
options: {
noCompile: true,
hideWarnings: true,
},
});
const storage = finder.getStorageLayout()!!.storage;
data[fullyQualifiedName] = {};

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2363,10 +2363,10 @@ grapheme-splitter@^1.0.4:
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==

hardhat-finder@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/hardhat-finder/-/hardhat-finder-2.0.4.tgz#6a53e2ad6bc54df90139652c42285c71ed07c959"
integrity sha512-d6iwM01ijHtkb/5Wy4/XPnHHNy+oBf6tRlQSNVqHZjl1YhmXDhflr9onM0AS3/6PLe5hFlrjlYEW5lMokHZ4SA==
hardhat-finder@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/hardhat-finder/-/hardhat-finder-3.0.0.tgz#eb8d4503e3e438747bb953f2759d6b695559f490"
integrity sha512-7f5uu7yrO87acSIHrW0uVvJijc8WOS8CZVsDdoaRj8tdhbkqBkwnFoyo5eGSd648hTbcxLxY87MsWkI0Df7WRw==
dependencies:
chalk "^4.1.2"
deepmerge "^4.2.2"
Expand Down

0 comments on commit cf4bdbf

Please sign in to comment.