Skip to content

Commit

Permalink
Update dependencies, migrate to ethers v6
Browse files Browse the repository at this point in the history
  • Loading branch information
TomiOhl committed Jun 29, 2023
1 parent 07a79ad commit 7fffe9f
Show file tree
Hide file tree
Showing 8 changed files with 1,099 additions and 605 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ Networks can be configured in _[hardhat.config.ts](hardhat.config.ts)_. We've pr

## Verification

For source code verification on block explorers, you can use the Etherscan plugin:
For source code verification on block explorers, you can use the Verify plugin:

```bash
npx hardhat verify [contractAddress] [constructorArguments] --network [networkName]
```

For more detailed instructions, check out it's documentation [here](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan#usage).
For more detailed instructions, check out it's documentation [here](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#usage).

## Linting

Expand Down
10 changes: 5 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
import "@openzeppelin/hardhat-upgrades";
import "dotenv/config";
import "hardhat-gas-reporter";
import { HardhatUserConfig } from "hardhat/config";
import "solidity-docgen";
import "dotenv/config";
import "@openzeppelin/hardhat-upgrades";

const config: HardhatUserConfig = {
solidity: {
Expand Down
1,476 changes: 989 additions & 487 deletions package-lock.json

Large diffs are not rendered by default.

35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,36 @@
"test": "hardhat test"
},
"license": "MIT",
"engines": {
"node": ">=16"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomiclabs/hardhat-ethers": "^2.2.2",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@openzeppelin/contracts": "^4.8.2",
"@openzeppelin/contracts-upgradeable": "^4.8.2",
"@openzeppelin/hardhat-upgrades": "^1.22.1",
"@types/chai": "^4.3.4",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.1",
"@nomicfoundation/hardhat-ethers": "^3.0.3",
"@nomicfoundation/hardhat-verify": "^1.0.3",
"@openzeppelin/contracts": "^4.9.2",
"@openzeppelin/contracts-upgradeable": "^4.9.2",
"@openzeppelin/hardhat-upgrades": "^2.0.0-alpha.0",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^18.15.5",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"@types/node": "^20.3.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"chai": "^4.3.7",
"dotenv": "^16.0.3",
"eslint": "^8.36.0",
"dotenv": "^16.3.1",
"eslint": "^8.43.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-node": "^11.1.0",
"ethers": "^5.7.2",
"hardhat": "^2.13.0",
"ethers": "^6.6.2",
"hardhat": "^2.16.1",
"hardhat-gas-reporter": "^1.0.9",
"prettier": "^2.8.6",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
"solhint": "^3.4.1",
"solidity-docgen": "^0.6.0-beta.35",
"ts-node": "^10.9.1",
"typescript": "^5.0.2"
"typescript": "^5.1.6"
}
}
13 changes: 5 additions & 8 deletions scripts/deploy-pin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ async function main() {
kind: "uups"
});

console.log(
`Deploying contract to ${
ethers.provider.network.name !== "unknown" ? ethers.provider.network.name : ethers.provider.network.chainId
}...`
);
console.log(`Tx hash: ${guildPin.deployTransaction.hash}`);
const network = await ethers.provider.getNetwork();
console.log(`Deploying contract to ${network.name !== "unknown" ? network.name : network.chainId}...`);
console.log(`Tx hash: ${guildPin.deploymentTransaction()?.hash}`);

await guildPin.deployed();
await guildPin.waitForDeployment();

console.log("GuildPin deployed to:", guildPin.address);
console.log("GuildPin deployed to:", await guildPin.getAddress());
}

main().catch((error) => {
Expand Down
13 changes: 5 additions & 8 deletions scripts/upgrade-pin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ async function main() {
// call: { fn: "reInitialize", args: [] }
});

console.log(
`Deploying contract to ${
ethers.provider.network.name !== "unknown" ? ethers.provider.network.name : ethers.provider.network.chainId
}...`
);
console.log(`Tx hash: ${guildPin.deployTransaction.hash}`);
const network = await ethers.provider.getNetwork();
console.log(`Deploying contract to ${network.name !== "unknown" ? network.name : network.chainId}...`);
console.log(`Tx hash: ${guildPin.deploymentTransaction()?.hash}`);

await guildPin.deployed();
await guildPin.waitForDeployment();

console.log("GuildPin deployed to:", guildPin.address);
console.log("GuildPin deployed to:", await guildPin.getAddress());
}

main().catch((error) => {
Expand Down
Loading

0 comments on commit 7fffe9f

Please sign in to comment.