From 684fb599beae49cc00a0bac293805dead34e39f6 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Mon, 29 Jul 2024 13:48:09 -0400 Subject: [PATCH 1/5] add script to patch proposal --- .../proposals/NovaFeeSweep/patchProposal.ts | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 scripts/proposals/NovaFeeSweep/patchProposal.ts diff --git a/scripts/proposals/NovaFeeSweep/patchProposal.ts b/scripts/proposals/NovaFeeSweep/patchProposal.ts new file mode 100644 index 000000000..89447716b --- /dev/null +++ b/scripts/proposals/NovaFeeSweep/patchProposal.ts @@ -0,0 +1,56 @@ +// takes proposal data as input and adds a transaction to sweep ETH from the L1 Timelock alias on Nova +// context: https://www.tally.xyz/gov/arbitrum/proposal/108288822474129076868455956066667369439381709547570289793612729242368710728616 + +import { ethers } from 'ethers' +import { + IInbox__factory, + L1ArbitrumTimelock__factory, +} from '../../../typechain-types' +import { JsonRpcProvider } from '@ethersproject/providers' + +;(async () => { + const inputData = + '0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000000e13fb8241eb0e976305ff5f40d43d783c08468da55f38eee093510e004f512aa000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000070000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd0000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000008e000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000019b715cf310c28c9020e53aaa11ce9df42e718b500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000658afc9d5ec4476fa6bb7033ea465f9901fbff2700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000af81c82ec98f86d0017d78cd66f1026f1a5cf1db00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000b040b105a4a0c7a9cc290164accbc3285536832200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd0000000000000000000000006dd43360d2a69bb9fffc5349f2511f2a3bcbc2da00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000061703bf337341f2e09d96dd6488c2907718a8e2600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000849e360a247132f961c9cbe95ba39106c72e126800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + + const l1TimelockAlias = '0xf7951d92b0c345144506576ec13ecf5103ac905a' + const novaInbox = '0xc4448b71118c9071Bcb9734A0EAc55D18A153949' + const novaToParentRouter = '0x36D0170D92F66e8949eB276C3AC4FEA64f83704d' + const maxSubmissionCost = ethers.utils.parseEther('0.01') + const callValue = await new JsonRpcProvider('https://nova.arbitrum.io/rpc').getBalance(l1TimelockAlias) + + const timelockIface = L1ArbitrumTimelock__factory.createInterface() + const inboxIface = IInbox__factory.createInterface() + + const unsafeCreateRetryableCalldata = inboxIface.encodeFunctionData( + 'unsafeCreateRetryableTicket', + [ + novaToParentRouter, // to + callValue, // l2CallValue + maxSubmissionCost, // maxSubmissionCost + novaToParentRouter, // excessFeeRefundAddress + novaToParentRouter, // callValueRefundAddress + 0, // gasLimit + 0, // maxFeePerGas + '0x', // calldata + ] + ) + + const decodedScheduleBatch = timelockIface.decodeFunctionData( + 'scheduleBatch', + inputData + ) + + const patchedScheduleBatchCalldata = timelockIface.encodeFunctionData( + 'scheduleBatch', + [ + [...decodedScheduleBatch[0], novaInbox], + [...decodedScheduleBatch[1], maxSubmissionCost], + [...decodedScheduleBatch[2], unsafeCreateRetryableCalldata], + decodedScheduleBatch[3], + decodedScheduleBatch[4], + decodedScheduleBatch[5], + ] + ) + + console.log(patchedScheduleBatchCalldata) +})() From e122a9b057c64f22080e84ff4110e81bef87f11d Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Mon, 29 Jul 2024 13:50:25 -0400 Subject: [PATCH 2/5] add comment --- scripts/proposals/NovaFeeSweep/patchProposal.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/proposals/NovaFeeSweep/patchProposal.ts b/scripts/proposals/NovaFeeSweep/patchProposal.ts index 89447716b..c56a0ff13 100644 --- a/scripts/proposals/NovaFeeSweep/patchProposal.ts +++ b/scripts/proposals/NovaFeeSweep/patchProposal.ts @@ -9,6 +9,8 @@ import { import { JsonRpcProvider } from '@ethersproject/providers' ;(async () => { + // this is the bianca payload and serves as an example + // TODO: this should be replaced with some future proposal const inputData = '0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000000e13fb8241eb0e976305ff5f40d43d783c08468da55f38eee093510e004f512aa000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000070000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd0000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000008e000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000019b715cf310c28c9020e53aaa11ce9df42e718b500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000658afc9d5ec4476fa6bb7033ea465f9901fbff2700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000af81c82ec98f86d0017d78cd66f1026f1a5cf1db00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000b040b105a4a0c7a9cc290164accbc3285536832200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd0000000000000000000000006dd43360d2a69bb9fffc5349f2511f2a3bcbc2da00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000061703bf337341f2e09d96dd6488c2907718a8e2600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000849e360a247132f961c9cbe95ba39106c72e126800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' From 0867b4e4d2c5594bd05957924a7d250455a9fbb3 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:46:18 -0400 Subject: [PATCH 3/5] present gas price instead of submission cost --- scripts/proposals/NovaFeeSweep/patchProposal.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/proposals/NovaFeeSweep/patchProposal.ts b/scripts/proposals/NovaFeeSweep/patchProposal.ts index c56a0ff13..45b1709ee 100644 --- a/scripts/proposals/NovaFeeSweep/patchProposal.ts +++ b/scripts/proposals/NovaFeeSweep/patchProposal.ts @@ -1,7 +1,7 @@ // takes proposal data as input and adds a transaction to sweep ETH from the L1 Timelock alias on Nova // context: https://www.tally.xyz/gov/arbitrum/proposal/108288822474129076868455956066667369439381709547570289793612729242368710728616 -import { ethers } from 'ethers' +import { BigNumber, ethers } from 'ethers' import { IInbox__factory, L1ArbitrumTimelock__factory, @@ -17,12 +17,14 @@ import { JsonRpcProvider } from '@ethersproject/providers' const l1TimelockAlias = '0xf7951d92b0c345144506576ec13ecf5103ac905a' const novaInbox = '0xc4448b71118c9071Bcb9734A0EAc55D18A153949' const novaToParentRouter = '0x36D0170D92F66e8949eB276C3AC4FEA64f83704d' - const maxSubmissionCost = ethers.utils.parseEther('0.01') + const maxL1GasPrice = ethers.utils.parseUnits('1000', 'gwei') // used to calculate maxSubmissionCost const callValue = await new JsonRpcProvider('https://nova.arbitrum.io/rpc').getBalance(l1TimelockAlias) const timelockIface = L1ArbitrumTimelock__factory.createInterface() const inboxIface = IInbox__factory.createInterface() + const maxSubmissionCost = calcSubmissionCost(maxL1GasPrice) + const unsafeCreateRetryableCalldata = inboxIface.encodeFunctionData( 'unsafeCreateRetryableTicket', [ @@ -56,3 +58,9 @@ import { JsonRpcProvider } from '@ethersproject/providers' console.log(patchedScheduleBatchCalldata) })() + +function calcSubmissionCost(baseFee: BigNumber) { + // data length is zero + // from the contract: return (1400 + 6 * dataLength) * (baseFee == 0 ? block.basefee : baseFee); + return baseFee.mul(1400) +} From f3f732f405abc4cd0b5efd6dd63033b3d5b28cb5 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:48:53 -0400 Subject: [PATCH 4/5] use l2 balance for submission fee --- scripts/proposals/NovaFeeSweep/patchProposal.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/proposals/NovaFeeSweep/patchProposal.ts b/scripts/proposals/NovaFeeSweep/patchProposal.ts index 45b1709ee..c2112d9a9 100644 --- a/scripts/proposals/NovaFeeSweep/patchProposal.ts +++ b/scripts/proposals/NovaFeeSweep/patchProposal.ts @@ -18,7 +18,7 @@ import { JsonRpcProvider } from '@ethersproject/providers' const novaInbox = '0xc4448b71118c9071Bcb9734A0EAc55D18A153949' const novaToParentRouter = '0x36D0170D92F66e8949eB276C3AC4FEA64f83704d' const maxL1GasPrice = ethers.utils.parseUnits('1000', 'gwei') // used to calculate maxSubmissionCost - const callValue = await new JsonRpcProvider('https://nova.arbitrum.io/rpc').getBalance(l1TimelockAlias) + const aliasBalance = await new JsonRpcProvider('https://nova.arbitrum.io/rpc').getBalance(l1TimelockAlias) const timelockIface = L1ArbitrumTimelock__factory.createInterface() const inboxIface = IInbox__factory.createInterface() @@ -29,7 +29,7 @@ import { JsonRpcProvider } from '@ethersproject/providers' 'unsafeCreateRetryableTicket', [ novaToParentRouter, // to - callValue, // l2CallValue + aliasBalance.sub(maxSubmissionCost), // l2CallValue maxSubmissionCost, // maxSubmissionCost novaToParentRouter, // excessFeeRefundAddress novaToParentRouter, // callValueRefundAddress @@ -48,7 +48,7 @@ import { JsonRpcProvider } from '@ethersproject/providers' 'scheduleBatch', [ [...decodedScheduleBatch[0], novaInbox], - [...decodedScheduleBatch[1], maxSubmissionCost], + [...decodedScheduleBatch[1], 0], [...decodedScheduleBatch[2], unsafeCreateRetryableCalldata], decodedScheduleBatch[3], decodedScheduleBatch[4], From ea053eb4a8d4ce0cafce7ce5d456fbd7086a46c9 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:01:58 -0500 Subject: [PATCH 5/5] timeboost extra items payload --- .../proposals/NovaFeeSweep/patchProposal.ts | 15 +++-- .../proposals/timeboost-extra-items/data.json | 16 +++++ .../timeboost-extra-items/generate.bash | 58 +++++++++++++++++++ 3 files changed, 81 insertions(+), 8 deletions(-) create mode 100644 scripts/proposals/timeboost-extra-items/data.json create mode 100755 scripts/proposals/timeboost-extra-items/generate.bash diff --git a/scripts/proposals/NovaFeeSweep/patchProposal.ts b/scripts/proposals/NovaFeeSweep/patchProposal.ts index c2112d9a9..81b7bba53 100644 --- a/scripts/proposals/NovaFeeSweep/patchProposal.ts +++ b/scripts/proposals/NovaFeeSweep/patchProposal.ts @@ -1,18 +1,15 @@ -// takes proposal data as input and adds a transaction to sweep ETH from the L1 Timelock alias on Nova -// context: https://www.tally.xyz/gov/arbitrum/proposal/108288822474129076868455956066667369439381709547570289793612729242368710728616 - import { BigNumber, ethers } from 'ethers' import { IInbox__factory, L1ArbitrumTimelock__factory, } from '../../../typechain-types' import { JsonRpcProvider } from '@ethersproject/providers' +import fs from 'fs' ;(async () => { - // this is the bianca payload and serves as an example - // TODO: this should be replaced with some future proposal - const inputData = - '0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000000e13fb8241eb0e976305ff5f40d43d783c08468da55f38eee093510e004f512aa000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000070000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd0000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005a0000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000008e000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000019b715cf310c28c9020e53aaa11ce9df42e718b500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000658afc9d5ec4476fa6bb7033ea465f9901fbff2700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000af81c82ec98f86d0017d78cd66f1026f1a5cf1db00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000b040b105a4a0c7a9cc290164accbc3285536832200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd0000000000000000000000006dd43360d2a69bb9fffc5349f2511f2a3bcbc2da00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000061703bf337341f2e09d96dd6488c2907718a8e2600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000849e360a247132f961c9cbe95ba39106c72e126800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + const proposalDataFile = process.argv[2] + const proposalData = JSON.parse(fs.readFileSync(proposalDataFile).toString()) + const inputData = proposalData.arbSysSendTxToL1Args.calldata const l1TimelockAlias = '0xf7951d92b0c345144506576ec13ecf5103ac905a' const novaInbox = '0xc4448b71118c9071Bcb9734A0EAc55D18A153949' @@ -56,7 +53,9 @@ import { JsonRpcProvider } from '@ethersproject/providers' ] ) - console.log(patchedScheduleBatchCalldata) + proposalData.arbSysSendTxToL1Args.calldata = patchedScheduleBatchCalldata + + fs.writeFileSync(proposalDataFile, JSON.stringify(proposalData, null, 2)) })() function calcSubmissionCost(baseFee: BigNumber) { diff --git a/scripts/proposals/timeboost-extra-items/data.json b/scripts/proposals/timeboost-extra-items/data.json new file mode 100644 index 000000000..310f6023f --- /dev/null +++ b/scripts/proposals/timeboost-extra-items/data.json @@ -0,0 +1,16 @@ +{ + "actionChainIds": [ + 1, + 42161, + 42170 + ], + "actionAddresses": [ + "0xBB86bBd4871728938B30A54Cc08E0eb2bC75302d", + "0x734B78823c4d979045EC23F38B54A070df7769FF", + "0x7d91da41DaF1C2e1c3dBC6143289E077E0DbA1eF" + ], + "arbSysSendTxToL1Args": { + "l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49", + "calldata": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000afa240dd4c6513a86965b2fdce079dc265548e8d301653ccf5602a9126c06bf8000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000040000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a153949000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000e41cff79cd000000000000000000000000bb86bbd4871728938b30a54cc08e0eb2bc75302d00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064e17f52e90000000000000000000000005613af0474eb9c528a34701a5b1662e3c8fa06780000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000de505e42d50abd07c8d39dcf692920d56cba35da000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e41cff79cd000000000000000000000000734b78823c4d979045ec23f38b54a070df7769ff00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064e17f52e9000000000000000000000000db216562328215e010f819b5abe947bad4ca961e000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000012b1389fbf261e781bdc3094d28636abfb03c5b3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000c4448b71118c9071bcb9734a0eac55d18a15394900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a748200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e41cff79cd0000000000000000000000007d91da41daf1c2e1c3dbc6143289e077e0dba1ef00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064e17f52e9000000000000000000000000f58ea15b20983116c21b05c876cc8e6cdae5c2b900000000000000000000000086a02dd71363c440b21f4c0e5b2ad01ffe1a7482000000000000000000000000ebb11bbd7d72165fac86bb5ab1b07a602540b286000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001246e6e8a6a00000000000000000000000036d0170d92f66e8949eb276c3ac4fea64f83704d0000000000000000000000000000000000000000000000663a9d579527ee69800000000000000000000000000000000000000000000000000004f94ae6af800000000000000000000000000036d0170d92f66e8949eb276c3ac4fea64f83704d00000000000000000000000036d0170d92f66e8949eb276c3ac4fea64f83704d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } +} \ No newline at end of file diff --git a/scripts/proposals/timeboost-extra-items/generate.bash b/scripts/proposals/timeboost-extra-items/generate.bash new file mode 100755 index 000000000..6f542a6d2 --- /dev/null +++ b/scripts/proposals/timeboost-extra-items/generate.bash @@ -0,0 +1,58 @@ +#!/bin/bash + +# We call ProxyUpgradeAction::perform(address admin, address payable target, address newLogic) + +# ProxyUpgradeAction contracts: +# L1: 0xBB86bBd4871728938B30A54Cc08E0eb2bC75302d +# Arb1: 0x734B78823c4d979045EC23F38B54A070df7769FF +# Nova: 0x7d91da41DaF1C2e1c3dBC6143289E077E0DbA1eF + +# UpgradeExecutor ProxyAdmins: +# L1: 0x5613AF0474EB9c528A34701A5b1662E3C8FA0678 +# Arb1: 0xdb216562328215E010F819B5aBe947bad4ca961e +# Nova: 0xf58eA15B20983116c21b05c876cc8e6CDAe5C2b9 + +# UpgradeExecutor Proxies: +# L1: 0x3ffFbAdAF827559da092217e474760E2b2c3CeDd +# Arb1: 0xCF57572261c7c2BCF21ffD220ea7d1a27D40A827 +# Nova: 0x86a02dD71363c440b21F4c0E5B2Ad01Ffe1A7482 + +# UpgradeExecutor Logics: +# L1: 0xDE505e42D50abd07c8D39Dcf692920d56cBA35Da +# Arb1: 0x12B1389Fbf261E781bdc3094d28636Abfb03C5b3 +# Nova: 0xebb11Bbd7d72165FaC86bb5AB1B07A602540b286 + +# First generate a proposal to upgrade the UpgradeExecutor on all 3 chains +yarn gen:proposalData \ + --govChainProviderRPC https://arb1.arbitrum.io/rpc \ + --predecessor 0x0000000000000000000000000000000000000000000000000000000000000000 \ + --upgradeValues 0 0 0 \ + --actionChainIds 1 42161 42170 \ + --actionAddresses \ + 0xBB86bBd4871728938B30A54Cc08E0eb2bC75302d \ + 0x734B78823c4d979045EC23F38B54A070df7769FF \ + 0x7d91da41DaF1C2e1c3dBC6143289E077E0DbA1eF \ + --upgradeDatas \ + $(cast calldata \ + "perform(address, address, address)" \ + 0x5613AF0474EB9c528A34701A5b1662E3C8FA0678 \ + 0x3ffFbAdAF827559da092217e474760E2b2c3CeDd \ + 0xDE505e42D50abd07c8D39Dcf692920d56cBA35Da \ + ) \ + $(cast calldata \ + "perform(address, address, address)" \ + 0xdb216562328215E010F819B5aBe947bad4ca961e \ + 0xCF57572261c7c2BCF21ffD220ea7d1a27D40A827 \ + 0x12B1389Fbf261E781bdc3094d28636Abfb03C5b3 \ + ) \ + $(cast calldata \ + "perform(address, address, address)" \ + 0xf58eA15B20983116c21b05c876cc8e6CDAe5C2b9 \ + 0x86a02dD71363c440b21F4c0E5B2Ad01Ffe1A7482 \ + 0xebb11Bbd7d72165FaC86bb5AB1B07A602540b286 \ + ) \ + --writeToJsonPath ./scripts/proposals/timeboost-extra-items/data.json + + +# Second, patch the proposal with the fee sweep +yarn ts-node ./scripts/proposals/NovaFeeSweep/patchProposal.ts ./scripts/proposals/timeboost-extra-items/data.json