Skip to content

Commit

Permalink
Correct chainId when generating Gnosis file
Browse files Browse the repository at this point in the history
(cherry picked from commit 27b4e82)
  • Loading branch information
naddison36 authored and sparrowDom committed Jan 16, 2025
1 parent e84a3f1 commit 39475d2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions contracts/utils/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ const executeGovernanceProposalOnFork = async ({
if (proposalState === "Succeeded") {
await governorSix.connect(sMultisig5of8)["queue(uint256)"](proposalIdBn);
log("Proposal queued");
newState = await getProposalState(proposalIdBn);
let newState = await getProposalState(proposalIdBn);
if (newState !== "Queued") {
throw new Error(
`Proposal state should now be "Queued" but is ${newState}`
Expand Down Expand Up @@ -991,16 +991,17 @@ function constructContractMethod(contract, functionSignature) {
};
}

function buildAndWriteGnosisJson(
async function buildAndWriteGnosisJson(
safeAddress,
targets,
contractMethods,
contractInputsValues,
name
) {
const { chainId } = await ethers.provider.getNetwork();
const json = {
version: "1.0",
chainId: "1",
chainId: chainId.toString(),
createdAt: parseInt(Date.now() / 1000),
meta: {
name: "Transaction Batch",
Expand Down Expand Up @@ -1092,7 +1093,7 @@ async function handleTransitionGovernance(propDesc, propArgs) {
delay: delay.toString(),
};

buildAndWriteGnosisJson(
await buildAndWriteGnosisJson(
addresses.mainnet.Guardian,
[timelock.address],
[contractMethod],
Expand Down Expand Up @@ -1141,7 +1142,7 @@ async function handleTransitionGovernance(propDesc, propArgs) {
salt: args[4],
};

buildAndWriteGnosisJson(
await buildAndWriteGnosisJson(
addresses.mainnet.Guardian,
[timelock.address],
[executionContractMethod],
Expand Down

0 comments on commit 39475d2

Please sign in to comment.