CDK 部署或重置后第一笔交易
交易组装
// Add the first batch of the created rollup
const newZKEVMContract = (await PolygonconsensusFactory.attach(newZKEVMAddress)) as PolygonZkEVMV2;
const batchData = {
transactions: await newZKEVMContract.generateInitializeTransaction(
rollupID,
gasTokenAddress,
gasTokenNetwork,
gasTokenMetadata as any
),
globalExitRoot: globalExitRoot,
timestamp: timestampReceipt,
sequencer: trustedSequencer,
};
outputJson.firstBatchData = batchData;
测试数据
"firstBatchData": {
"transactions": "0xf901e480808401c9c38094d66bd4a99f128cab5723ab98443bdda0a8ae65d280b901c4f811bff700000000000000000000000000000000000000000000000000000000000000010000000000000000000000003ec3d234625cde1e0f3267014e26e193610e50ac0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40d5f56745a118d0906a34e69aec8c0db1cb8fa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000084d4158546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034d4158000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ca1ab1e0000000000000000000000000000000000000000000000000000000005ca1ab1e1bff",
"globalExitRoot": "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5",
"timestamp": 1731804000,
"sequencer": "0x85472577b11837bC157F45643047Cb86136985f2"
}
第一个batch信息为
- 一笔zkEVM合约初始化交易
- globalExitRoot
- timestamp
- trustedSequencer
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »