Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/proxy admin finder #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const config: HardhatUserConfig = {
: [],
},
xDAI: {
url: "https://rpc.gnosischain.com/",
url: process.env.GNOSIS_CHAIN_RPC || "https://rpc.gnosischain.com/",
gasPrice: 2000000000,
accounts: process.env.PRIVATE_KEY_XDAI
? [`${process.env.PRIVATE_KEY_XDAI}`]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
],
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^2.1.3",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "3.4.1-solc-0.7-2",
"@openzeppelin/hardhat-upgrades": "^1.9.0",
Expand All @@ -70,7 +70,7 @@
"ethereum-waffle": "^3.3.0",
"ethereumjs-util": "^7.1.0",
"ethers": "^5.4.1",
"hardhat": "^2.4.1",
"hardhat": "^2.14.0",
"hardhat-gas-reporter": "^1.0.4",
"mocha-chai-jest-snapshot": "^1.1.3",
"openzeppelin-contracts-upgradable-v4": "npm:@openzeppelin/contracts-upgradeable@^4.1.0",
Expand Down
22 changes: 22 additions & 0 deletions scripts/proxyAdminFinder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const hre = require("hardhat");
const { upgrades } = hre;

const args = process.argv.slice(2);
const contractAddress = args[0];
async function main() {
console.log(
await upgrades.erc1967.getImplementationAddress(contractAddress),
" getImplementationAddress",
);
console.log(
await upgrades.erc1967.getAdminAddress(contractAddress),
" getProxyAdmin",
);
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
Loading