Update contract addresses file on deploy
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 33s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 33s
Details
This commit is contained in:
parent
5fd2841e77
commit
7e13449514
|
@ -6,7 +6,9 @@
|
|||
"scripts": {
|
||||
"test": "hardhat test",
|
||||
"automatic-staking-local": "hardhat run --network localhost scripts/automatic-staking.js",
|
||||
"automatic-staking-sepolia": "hardhat run --network sepolia scripts/automatic-staking.js"
|
||||
"automatic-staking-sepolia": "hardhat run --network sepolia scripts/automatic-staking.js",
|
||||
"deploy-local": "hardhat run --network localhost scripts/deploy.js",
|
||||
"deploy-sepolia": "hardhat run --network sepolia scripts/deploy.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
|
|
@ -3,6 +3,8 @@ const fs = require('fs');
|
|||
|
||||
const contractAddresses = require('../../contract-addresses.json');
|
||||
|
||||
const contractAddressesWritePath = '../contract-addresses.json';
|
||||
|
||||
const network = process.env.HARDHAT_NETWORK;
|
||||
|
||||
async function main() {
|
||||
|
@ -19,7 +21,8 @@ async function main() {
|
|||
console.log(`Work1 deployed to ${work1.target}`);
|
||||
contractAddresses[network].Work1 = work1.target;
|
||||
|
||||
fs.writeFileSync('../../contract-addresses.json', JSON.stringify(contractAddresses, null, 2));
|
||||
fs.writeFileSync(contractAddressesWritePath, JSON.stringify(contractAddresses, null, 2));
|
||||
console.log('Wrote file', fs.realpathSync(contractAddressesWritePath));
|
||||
}
|
||||
|
||||
// We recommend this pattern to be able to use async/await everywhere
|
||||
|
|
Loading…
Reference in New Issue