ToolszkEVMArchitectureHigh levelSmart contractsApiConsensusValidiumMigration

PolygonValidiumStorageMigration.sol

## Functions ### ##### Parameters | Name | Type | Description | | :--- | :--- | :------------------------------------------------------------------- | | | contr

Functions

constructor

  function constructor(
    contract IPolygonZkEVMGlobalExitRootV2 _globalExitRootManager,
    contract IERC20Upgradeable _pol,
    contract IPolygonZkEVMBridgeV2 _bridgeAddress,
    contract PolygonRollupManager _rollupManager
  ) public
Parameters
NameTypeDescription
_globalExitRootManagercontract IPolygonZkEVMGlobalExitRootV2Global exit root manager address.
_polcontract IERC20UpgradeablePOL token address.
_bridgeAddresscontract IPolygonZkEVMBridgeV2Bridge address.
_rollupManagercontract PolygonRollupManagerGlobal exit root manager address.

initializeMigration

  function initializeMigration(
  ) external

sequenceBatchesValidium

Allows a sequencer to send multiple batches.

  function sequenceBatchesValidium(
    struct PolygonValidiumStorageMigration.ValidiumBatchData[] batches,
    uint64 maxSequenceTimestamp,
    uint64 initSequencedBatch,
    address l2Coinbase,
    bytes dataAvailabilityMessage
  ) external
Parameters
NameTypeDescription
batchesstruct PolygonValidiumStorageMigration.ValidiumBatchData[]Struct array which holds the data necessary for appending new batches to the sequence.
maxSequenceTimestampuint64Max timestamp of the sequence.
This timestamp must be within a safety range (actual + 36 seconds).
It should be equal or greater than the last block inside the sequence. Otherwise the batch is invalidated by the circuit.
initSequencedBatchuint64This parameter must match the current last batch sequenced.
This is a protection mechanism against the sequencer sending undesired data.
l2CoinbaseaddressAddress that will receive the fees from L2.
dataAvailabilityMessagebytesByte array containing the signatures and all the addresses of the committee in ascending order
[signature 0, ..., signature requiredAmountOfSignatures -1, address 0, ... address N]
Note that al signatures are ECDSA, therefore each must be 65 bytes long.

Note that POL is not a reentrant token.

sequenceBatches

Allows a sequencer to send multiple batches.

  function sequenceBatches(
    struct PolygonRollupBaseEtrogNoGap.BatchData[] batches,
    uint64 maxSequenceTimestamp,
    uint64 initSequencedBatch,
    address l2Coinbase
  ) public
Parameters
NameTypeDescription
batchesstruct PolygonRollupBaseEtrogNoGap.BatchData[]Struct array which holds the data necessary for appending new batches to the sequence.
maxSequenceTimestampuint64Max timestamp of the sequence.
The timestamp must be within a safety range (actual + 36 seconds).
It should be equal or greater than the last block inside the sequence. Otherwise the batch is invalidated by the circuit.
initSequencedBatchuint64This parameter must match the current last batch sequenced.
This is a protection mechanism against the sequencer sending undesired data.
l2CoinbaseaddressAddress that will receive the fees from L2.
Note that POL is not a reentrant token.

setDataAvailabilityProtocol

Allows the admin to set a new data availability protocol.

  function setDataAvailabilityProtocol(
    contract IDataAvailabilityProtocol newDataAvailabilityProtocol
  ) external
Parameters
NameTypeDescription
newDataAvailabilityProtocolcontract IDataAvailabilityProtocolAddress of the new data availability protocol.

switchSequenceWithDataAvailability

Allows the admin to switch the sequencing functionality to a data availability configuration.

  function switchSequenceWithDataAvailability(
    bool newIsSequenceWithDataAvailabilityAllowed
  ) external
Parameters
NameTypeDescription
newIsSequenceWithDataAvailabilityAllowedboolBoolean to switch.

Events

SetDataAvailabilityProtocol

Emitted when the admin updates the data availability protocol.

  event SetDataAvailabilityProtocol(
  )

SwitchSequenceWithDataAvailability

Emitted when switching the sequencing functionality to a data availability configuration.

  event SwitchSequenceWithDataAvailability(
  )
Edit on GitHub

Last updated on