Skip to content

Commit

Permalink
Merge pull request #30 from skalenetwork/feature/multiple-transactions
Browse files Browse the repository at this point in the history
Save after upgrade transactions to files
  • Loading branch information
DimaStebaev authored Jun 23, 2022
2 parents a0d30e7 + 120ddf9 commit 375e764
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ export async function upgrade<ContractManagerType extends OwnableUpgradeable>(
let transactionsBatches: string[][] | undefined;
if (afterUpgrade !== undefined) {
transactionsBatches = await afterUpgrade(abi, contractManager);
for (const { index, batch } of transactionsBatches.map((batch, index) => ({index, batch}))) {
await fs.writeFile(`data/after-transactions-${index}-${version}-${network.name}.json`, JSON.stringify(batch, null, 4));
}
}
if (!safeMock) {
const chainId = (await ethers.provider.getNetwork()).chainId;
Expand Down

0 comments on commit 375e764

Please sign in to comment.