Example Usage and Deployment
Example Usage and Deployment
Deployment: A script (e.g.,
DeployGateway.sol) deploysGateway.sol, assignsDEFAULT_ADMIN_ROLEto a Gnosis Safe, plusAPPENDER_ROLEto the aggregator account.Genesis Batch: The aggregator calls
submitBatchwithbytes32(0)forprevBatchHash. This finalizes initialization.Normal Batches: Each L2 block is compressed into a
BatchHeader. The aggregator callssubmitBatch(header)referencing the current_lastCommitHash.Fork Creation: If needed, a user with
FORKER_ROLEcallsforkChain(header, targetForkId). The system abandons irrelevant forks and incrementscurrentForkId.Pause and Unpause: If an emergency arises, an admin with
PAUSER_ROLEcallspause(). No further commits/forks can happen. Once resolved,unpause()is invoked by theUNPAUSER_ROLE.
Last updated
Was this helpful?