Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sim for dac update #21

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions sims/arbcore-dac-add.sim.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* @notice Simulation configuration file for AIP 7
*/
import { ethers } from 'ethers'
import { SimulationConfigNew } from '../types'

const ARBSYS = '0x0000000000000000000000000000000000000064'


// from https://github.com/ArbitrumFoundation/governance/blob/6c1af17352f218885d0488ecd9efacb3359c9161/scripts/proposals/non-emergency/data/42161-dac-update-data.json
const txInfo = {
arbSysSendTxToL1Args: {
l1Timelock: '0xE6841D92B0C345144506576eC13ECf5103aC7f49',
calldata:
'0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000000000000000000000010000000000000000000000003fffbadaf827559da092217e474760e2b2c3cedd000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000def5cfe3246882bc7f65f9346a8b974ba27d3f4e00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
},
}
const iface = new ethers.utils.Interface(['function sendTxToL1(address,bytes)'])
const calldata = iface.encodeFunctionData('sendTxToL1', [
txInfo.arbSysSendTxToL1Args.l1Timelock,
txInfo.arbSysSendTxToL1Args.calldata,
])

const call1 = {
target: ARBSYS,
calldata: calldata,
value: 0,
signature: '',
}

export const config: SimulationConfigNew = {
type: 'new',
daoName: 'ArbCore',
governorType: 'arb',
governorAddress: '0xf07ded9dc292157749b6fd268e37df6ea38395b9',
targets: [call1.target], // Array of targets to call.
values: [call1.value], // Array of values with each call.
signatures: [call1.signature], // Array of function signatures. Leave empty if generating calldata with ethers like we do here.
calldatas: [call1.calldata], // Array of encoded calldatas.
description: 'Update DAC Simulation',
}