ToolszkEVMArchitectureHigh levelSmart contractsApi

PolygonZkEVMGlobalExitRootV2.sol

Contract responsible for managing the exit roots across multiple networks. ## Functions ### ##### Parameters | Name | Type | Description | | :--- | :--- | :----

Contract responsible for managing the exit roots across multiple networks.

Functions

constructor

  function constructor(
    address _rollupManager,
    address _bridgeAddress
  ) public
Parameters
NameTypeDescription
_rollupManageraddressRollup manager contract address
_bridgeAddressaddressPolygonZkEVMBridge contract address

updateExitRoot

Updates the exit root of any of the networks and the global exit root.

  function updateExitRoot(
    bytes32 newRoot
  ) external
Parameters
NameTypeDescription
newRootbytes32new exit tree root

getLastGlobalExitRoot

Returns last global exit root.

  function getLastGlobalExitRoot(
  ) public returns (bytes32)

getRoot

Computes and returns the Merkle root of the L1InfoTree.

  function getRoot(
  ) public returns (bytes32)

getLeafValue

Given leaf data, it returns the leaf hash.

  function getLeafValue(
    bytes32 newGlobalExitRoot,
    uint256 lastBlockHash,
    uint64 timestamp
  ) public returns (bytes32)
Parameters
NameTypeDescription
newGlobalExitRootbytes32Last global exit root
lastBlockHashuint256Last accesible block hash
timestampuint64Ethereum timestamp in seconds

Events

UpdateL1InfoTree

Emitted when the global exit root is updated.

  event UpdateL1InfoTree(
  )
Edit on GitHub

Last updated on