Step 1 .( if required )
The call data for upgrading WalletRegistry to a new implementation follows this format:
// Function signature: upgrade(address,address)
// Call data: 0x4f1ef286 + proxy address (32 bytes) + new implementation address (32 bytes)
For a dummy new implementation at 0x1234567890123456789012345678901234567890, the call data would be:
const proxyAdmin = await upgrades.admin.getInstance()
const upgradeTxData = await proxyAdmin.interface.encodeFunctionData(
"upgrade",
[
"0x46d52E41C2F300BC82217Ce22b920c34995204eb", // WalletRegistry proxy
"0x1234567890123456789012345678901234567890" // Dummy new implementation
]
)
// Result: 0x4f1ef28600000000000000000000000046d52e41c2f300bc82217ce22b920c34995204eb0000000000000000000000001234567890123456789012345678901234567890
The full transaction to Timelock would be: 1
await timelock.schedule(
proxyAdmin.address, // target: 0x16A76d3cd3C1e3CE843C6680d6B37E9116b5C706
0, // value
upgradeTxData, // data: 0x4f1ef286...
zeroBytes32, // predecessor
zeroBytes32, // salt
86400 // delay: 24 hours
)
Step 2. ( Mandatory Changes )
‣