Skip to content

Commit

Permalink
Merge pull request #27 from ethpandaops/pk910/fix-deployment
Browse files Browse the repository at this point in the history
fix deployment script
  • Loading branch information
pk910 authored Jun 10, 2024
2 parents d9e1400 + 982eec8 commit 8dc0a7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion fundingvault/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
},
holesky: {
chainId: 17000,
url: `https://rpc.sepolia.ethpandaops.io/`,
url: `https://rpc.holesky.ethpandaops.io/`,
accounts: DEPLOYER_PRIVATE_KEY,
},
ephemery: {
Expand Down
17 changes: 9 additions & 8 deletions fundingvault/scripts/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ async function main() {
console.log("deploying FundingVaultProxy...")
let Proxy = await ethers.getContractFactory("FundingVaultProxy");
let proxy = await Proxy.connect(deployer).deploy();
await proxy.waitForDeployment();
let proxyAddress = await proxy.getAddress();
console.log(" success: " + proxyAddress);

// Then deploy token
console.log("deploying FundingVaultToken...")
let FundingVaultToken = await ethers.getContractFactory("FundingVaultToken");
let token = await FundingVaultToken.deploy(proxyAddress);
await token.waitForDeployment();
let tokenAddress = await token.getAddress();
console.log(" success: " + tokenAddress);

// Lastly, deploy vault implementation
console.log("deploying FundingVaultV1...")
let FundingVault = await ethers.getContractFactory("FundingVaultV1");
let vault = await FundingVault.connect(deployer).deploy();
await vault.waitForDeployment();
let vaultAddress = await vault.getAddress();
console.log(" success: " + vaultAddress);

Expand All @@ -54,14 +57,12 @@ async function main() {
console.log("changing FundingVault admin to: " + ownerAddress);

console.log("calling grantRole & setProxyManager on FundingVault...");
await Promise.all([
proxiedVault.connect(deployer).grantRole(adminRole, ownerAddress, {
gasLimit: 60000,
}),
proxiedVault.connect(deployer).setProxyManager(ownerAddress, {
gasLimit: 40000,
}),
]);
await proxiedVault.connect(deployer).grantRole(adminRole, ownerAddress, {
gasLimit: 60000,
});
await proxiedVault.connect(deployer).setProxyManager(ownerAddress, {
gasLimit: 40000,
});
console.log(" success.");

console.log("calling revokeRole on FundingVault...");
Expand Down

0 comments on commit 8dc0a7f

Please sign in to comment.