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: Use Viem in finalizer for some OpStack chains #1798

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1372c1d
[WIP]: Experimentally use Viem in OpStack finalizer
nicholaspai Aug 30, 2024
c733365
Merge branch 'master' into npai/viem-finalizer
nicholaspai Aug 30, 2024
49ce552
Add timeToFinalize estimate
nicholaspai Sep 6, 2024
75bb389
Update opStack.ts
nicholaspai Sep 6, 2024
14ead74
Merge branch 'master' into npai/viem-finalizer
nicholaspai Sep 26, 2024
594fd24
Add calldata construction using viem
nicholaspai Sep 26, 2024
0b76755
Add more helpers
nicholaspai Oct 15, 2024
03ecf1b
Merge remote-tracking branch 'origin/master' into npai/viem-finalizer
pxrl Oct 16, 2024
eac6e3d
Merge branch 'master' into npai/viem-finalizer
nicholaspai Oct 16, 2024
c089aa9
Merge branch 'master' into npai/viem-finalizer
nicholaspai Oct 16, 2024
a53188d
Use new viem version that allows logIndex to be passed to getWithdraw…
nicholaspai Oct 21, 2024
27d6582
Refactor
nicholaspai Oct 22, 2024
34e55f0
Update opStack.ts
nicholaspai Oct 22, 2024
0b22777
Update opStack.ts
nicholaspai Oct 22, 2024
a9f6dbc
Fix
nicholaspai Oct 22, 2024
6bd9e15
Update opStack.ts
nicholaspai Oct 22, 2024
6669c1d
Merge branch 'master' into npai/viem-finalizer
nicholaspai Oct 23, 2024
11cc9e8
Update opStack.ts
nicholaspai Oct 23, 2024
82850f0
Update opStack.ts
nicholaspai Oct 23, 2024
1ec0613
Update opStack.ts
nicholaspai Oct 23, 2024
f32f35f
Add op stack support
nicholaspai Oct 23, 2024
d380194
wip
nicholaspai Oct 23, 2024
466d7e6
Merge branch 'master' into npai/viem-finalizer
nicholaspai Oct 28, 2024
aa365bd
bump to support base fraud proofs
nicholaspai Oct 30, 2024
3f365e4
Merge branch 'master' into npai/viem-finalizer
nicholaspai Oct 30, 2024
a423a37
Update opStack.ts
nicholaspai Oct 30, 2024
7e77ffb
Merge branch 'master' into npai/viem-finalizer
nicholaspai Oct 31, 2024
f79ee1b
Improve types
nicholaspai Nov 1, 2024
a368f18
Merge branch 'master' into npai/viem-finalizer
nicholaspai Nov 4, 2024
bd5066c
Merge branch 'master' into npai/viem-finalizer
nicholaspai Dec 17, 2024
8565ee4
Update opStack.ts
nicholaspai Dec 17, 2024
2607782
Update yarn.lock
nicholaspai Dec 17, 2024
b027fbc
Merge branch 'master' into npai/viem-finalizer
nicholaspai Dec 17, 2024
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"redis4": "npm:redis@^4.1.0",
"superstruct": "^1.0.3",
"ts-node": "^10.9.1",
"viem": "^2.21.18",
"viem": "^2.21.37",
"winston": "^3.10.0",
"zksync-ethers": "^5.7.2"
},
Expand Down
172 changes: 172 additions & 0 deletions src/common/abi/OpStackPortalL1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
[
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "gasLimit",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"internalType": "struct Types.WithdrawalTransaction",
"name": "_tx",
"type": "tuple"
},
{
"internalType": "address",
"name": "_proofSubmitter",
"type": "address"
}
],
"name": "finalizeWithdrawalTransactionExternalProof",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{ "internalType": "uint256", "name": "nonce", "type": "uint256" },
{ "internalType": "address", "name": "sender", "type": "address" },
{ "internalType": "address", "name": "target", "type": "address" },
{ "internalType": "uint256", "name": "value", "type": "uint256" },
{ "internalType": "uint256", "name": "gasLimit", "type": "uint256" },
{ "internalType": "bytes", "name": "data", "type": "bytes" }
],
"internalType": "struct Types.WithdrawalTransaction",
"name": "_tx",
"type": "tuple"
}
],
"name": "finalizeWithdrawalTransaction",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "gasLimit",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"internalType": "struct Types.WithdrawalTransaction",
"name": "_tx",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "_disputeGameIndex",
"type": "uint256"
},
{
"components": [
{
"internalType": "bytes32",
"name": "version",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "stateRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "messagePasserStorageRoot",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "latestBlockhash",
"type": "bytes32"
}
],
"internalType": "struct Types.OutputRootProof",
"name": "_outputRootProof",
"type": "tuple"
},
{
"internalType": "bytes[]",
"name": "_withdrawalProof",
"type": "bytes[]"
}
],
"name": "proveWithdrawalTransaction",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "bytes32", "name": "_withdrawalHash", "type": "bytes32" }],
"name": "numProofSubmitters",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "bytes32", "name": "", "type": "bytes32" },
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"name": "proofSubmitters",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
}
]
Loading
Loading