Skip to content
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4b60fdd
feat: Try upgradeTo for testing
fusmanii Sep 2, 2025
ef3b756
Added pause deposits toggle to spoke pool upgrade script
fusmanii Sep 3, 2025
acb0084
Added option to only do upgrade
fusmanii Sep 3, 2025
ff54e7a
Added comment explaning the multicall
fusmanii Sep 3, 2025
3520c92
update comment
fusmanii Sep 3, 2025
747d79a
Using abi from artifact
fusmanii Sep 4, 2025
1c11d8b
Dropped optional param
fusmanii Sep 18, 2025
dccb12e
feat: Upgrade CCTP V1 deployments to V2
nicholaspai Oct 3, 2025
39572ff
latest
nicholaspai Oct 3, 2025
a9cccb6
deploy arbitrum
nicholaspai Oct 3, 2025
2502eed
arbitrum
nicholaspai Oct 3, 2025
0ea2d06
deploy optimism
nicholaspai Oct 3, 2025
ab40641
optimism
nicholaspai Oct 3, 2025
93e3684
deplooy optimism spoke pool and polygon adapter
nicholaspai Oct 3, 2025
c32c1c9
update
nicholaspai Oct 3, 2025
1700936
deploy polygon spoke
nicholaspai Oct 3, 2025
5c2742c
polygon deployed
nicholaspai Oct 3, 2025
3aa592e
Deploy base and unichain adapters
nicholaspai Oct 3, 2025
e037c30
deployments
nicholaspai Oct 3, 2025
053756c
Deploy unichain and base spoke pools
nicholaspai Oct 3, 2025
0622e19
pdate deployed
nicholaspai Oct 3, 2025
9c52646
Update upgradeSpokePool.ts
nicholaspai Oct 4, 2025
2411e6e
Merge branch 'cctp-v2-eveerywhere' of github.com:across-protocol/cont…
fusmanii Oct 6, 2025
ed1b242
removed unsed var
fusmanii Oct 6, 2025
e8ba2a3
upgrade forge-std
fusmanii Oct 6, 2025
14acd39
pin forge-std version
fusmanii Oct 6, 2025
c371869
forge install foundry-rs/forge-std
nicholaspai Oct 6, 2025
26dbd53
Merge branch 'cctp-v2-eveerywhere' of github.com:across-protocol/cont…
fusmanii Oct 6, 2025
de3deb6
Merge branch 'master' of github.com:across-protocol/contracts into fa…
fusmanii Oct 6, 2025
83f9dd3
Update upgradeSpokePool.ts
nicholaspai Oct 6, 2025
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
24 changes: 20 additions & 4 deletions tasks/upgradeSpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,30 @@ task("upgrade-spokepool", "Generate calldata to upgrade a SpokePool deployment")

const { ethers } = hre;

const artifact = await hre.artifacts.readArtifact("SpokePool");

// @dev Any spoke pool's interface can be used here since they all should have the same upgradeTo function signature.
const abi = ["function upgradeTo(address newImplementation) external"];
const abi = artifact.abi;
const spokePool = new ethers.Contract(implementation, abi);

const upgradeTo = spokePool.interface.encodeFunctionData("upgradeTo", [implementation]);
console.log(`upgradeTo bytes: `, upgradeTo);
let calldata = "";

/**
* We perform this seemingly unnecessary pause/unpause sequence because we want to ensure that the
* upgrade is successful and the new implementation gets forwarded calls by the proxy contract as expected
*
* Since the upgrade and call happens atomically, the upgrade will revert if the new implementation
* is not functioning correctly.
*/
const data = spokePool.interface.encodeFunctionData("multicall", [
[
spokePool.interface.encodeFunctionData("pauseDeposits", [true]),
spokePool.interface.encodeFunctionData("pauseDeposits", [false]),
],
]);

calldata = spokePool.interface.encodeFunctionData("upgradeToAndCall", [implementation, data]);
console.log(
`Call relaySpokePoolAdminFunction() with the params [<chainId>, ${upgradeTo}] on the hub pool from the owner's account.`
`Call relaySpokePoolAdminFunction() with the params [<chainId>, ${calldata}] on the hub pool from the owner's account.`
);
});
Loading