Skip to content

feat: add finalizer support for messages from HubPool to UniversalSpoke #2203

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

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ea38af8
implement new finalizer adapter: helios.ts. Not tested and probably b…
grasphoper Apr 29, 2025
6dd6e53
checkpoint
grasphoper Apr 30, 2025
5ae49c7
change FinalizerPromise returned txns type from Multicall2Call to (Mu…
grasphoper Apr 30, 2025
dfbe2b9
changes to helios.ts to submit individual txs rather than use multicall
grasphoper Apr 30, 2025
36a5e4a
revert logging additions from TransactionClient
grasphoper Apr 30, 2025
5273bf5
remove more
grasphoper Apr 30, 2025
2b75bc0
move ABI import to helios.ts
grasphoper Apr 30, 2025
7973c1b
cleanup
grasphoper Apr 30, 2025
a72fdbe
fix tx sending bugs
grasphoper May 1, 2025
cfc7d58
refactor
grasphoper May 1, 2025
de365d4
update deps. BNB -> BSC
grasphoper May 1, 2025
ade32d2
Merge branch 'master' into if/helios-finalizer
grasphoper May 1, 2025
0dcaa58
return missing EOF whitespace
grasphoper May 1, 2025
6c85303
polish
grasphoper May 1, 2025
9dce411
allow completing half-finalized messages
grasphoper May 1, 2025
12b65d2
Merge remote-tracking branch 'origin/master' into if/helios-finalizer
grasphoper May 1, 2025
c3da00a
remove all BSC TEST crutches; adjust log severity in helios.ts
grasphoper May 1, 2025
cde34f0
polish
grasphoper May 1, 2025
381fc4d
fix lint + use real proof instead of 0x on .update tx submission
grasphoper May 1, 2025
4f8a0c3
add newline to .prettierignore
grasphoper May 1, 2025
d7c7b1d
Merge branch 'master' into if/helios-finalizer
grasphoper May 1, 2025
dabccb9
Merge branch 'master' into if/helios-finalizer
nicholaspai May 2, 2025
9bcc28a
strip abi files
grasphoper May 2, 2025
4340345
address part of the PR comments
grasphoper May 2, 2025
f23444a
Move some code into interface/ utils/ folder instead of helios.ts
grasphoper May 2, 2025
ee3ec3f
remove all but one try - catch statements
grasphoper May 2, 2025
6a5ae93
address the rest of the review issues except .reduce / spreadEventWit…
grasphoper May 2, 2025
910b586
add isAugmentedTransaction + spreadEventWithBlockNumber
grasphoper May 2, 2025
f719359
use stringifyThrownValue
grasphoper May 2, 2025
f5e4361
Merge branch 'master' into if/helios-finalizer
grasphoper May 2, 2025
4adbb2d
merge chainFinalizers entries for BSC
grasphoper May 2, 2025
093d9c5
clarify ZK API response handling
grasphoper May 2, 2025
380cc2b
move contract utility functions to src/utils
grasphoper May 2, 2025
9a281ff
fix lint
grasphoper May 2, 2025
7d160f6
fix 1 more lint warning
grasphoper May 2, 2025
e57ab8f
new SP1Helios address; manual gasLimit; shorter event lookback on L1
grasphoper May 3, 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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage*
gasReporterOutput.json
dist
typechain*
addresses.json
12 changes: 12 additions & 0 deletions src/common/ContractAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import BLAST_OPTIMISM_PORTAL_ABI from "./abi/BlastOptimismPortal.json";
import SCROLL_GATEWAY_ROUTER_L1_ABI from "./abi/ScrollGatewayRouterL1.json";
import SCROLL_GATEWAY_ROUTER_L2_ABI from "./abi/ScrollGatewayRouterL2.json";
import SCROLL_GAS_PRICE_ORACLE_ABI from "./abi/ScrollGasPriceOracle.json";
import HUB_POOL_STORE_ABI from "./abi/HubPoolStore.json";
import SP1_HELIOS_ABI from "./abi/SP1Helios.json";

// Constants file exporting hardcoded contract addresses per chain.
export const CONTRACT_ADDRESSES: {
Expand Down Expand Up @@ -199,6 +201,10 @@ export const CONTRACT_ADDRESSES: {
address: "0xc186fA914353c44b2E33eBE05f21846F1048bEda",
abi: HUB_POOL_ABI,
},
hubPoolStore: {
address: "0x1Ace3BbD69b63063F859514Eca29C9BDd8310E61",
abi: HUB_POOL_STORE_ABI,
},
blastBridge: {
address: "0x3a05E5d33d7Ab3864D53aaEc93c8301C1Fa49115",
abi: BLAST_BRIDGE_ABI,
Expand Down Expand Up @@ -249,6 +255,12 @@ export const CONTRACT_ADDRESSES: {
abi: CCTP_TOKEN_MESSENGER_ABI,
},
},
[CHAIN_IDs.BSC]: {
sp1Helios: {
address: "0xcdf08CB3d3436c3c21F277b6AD45E3D7aB1Ce12F",
abi: SP1_HELIOS_ABI,
},
},
[CHAIN_IDs.POLYGON]: {
withdrawableErc20: {
abi: POLYGON_WITHDRAWABLE_ERC20_ABI,
Expand Down
43 changes: 43 additions & 0 deletions src/common/abi/HubPoolStore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[
{
"inputs": [{ "internalType": "address", "name": "_hubPool", "type": "address" }],
"stateMutability": "nonpayable",
"type": "constructor"
},
{ "inputs": [], "name": "NotHubPool", "type": "error" },
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "target", "type": "address" },
{ "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" },
{ "indexed": true, "internalType": "uint256", "name": "nonce", "type": "uint256" }
],
"name": "StoredCallData",
"type": "event"
},
{
"inputs": [],
"name": "hubPool",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"name": "relayMessageCallData",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "target", "type": "address" },
{ "internalType": "bytes", "name": "data", "type": "bytes" },
{ "internalType": "bool", "name": "isAdminSender", "type": "bool" }
],
"name": "storeRelayMessageCalldata",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading