Commit 80107e98 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4321 from ethereum-optimism/sc/ctb-comment-types

maint(ctb): add comment to structs in Types
parents 3df55cc1 db182b3a
...@@ -10,6 +10,10 @@ library Types { ...@@ -10,6 +10,10 @@ library Types {
* @notice OutputProposal represents a commitment to the L2 state. The timestamp is the L1 * @notice OutputProposal represents a commitment to the L2 state. The timestamp is the L1
* timestamp that the output root is posted. This timestamp is used to verify that the * timestamp that the output root is posted. This timestamp is used to verify that the
* finalization period has passed since the output root was submitted. * finalization period has passed since the output root was submitted.
*
* @custom:field outputRoot Hash of the L2 output.
* @custom:field timestamp Timestamp of the L1 block that the output root was submitted in.
* @custom:field l2BlockNumber L2 block number that the output corresponds to.
*/ */
struct OutputProposal { struct OutputProposal {
bytes32 outputRoot; bytes32 outputRoot;
...@@ -20,6 +24,11 @@ library Types { ...@@ -20,6 +24,11 @@ library Types {
/** /**
* @notice Struct representing the elements that are hashed together to generate an output root * @notice Struct representing the elements that are hashed together to generate an output root
* which itself represents a snapshot of the L2 state. * which itself represents a snapshot of the L2 state.
*
* @custom:field version Version of the output root.
* @custom:field stateRoot Root of the state trie at the block of this output.
* @custom:field messagePasserStorageRoot Root of the message passer storage trie.
* @custom:field latestBlockhash Hash of the block this output was generated from.
*/ */
struct OutputRootProof { struct OutputRootProof {
bytes32 version; bytes32 version;
...@@ -31,6 +40,16 @@ library Types { ...@@ -31,6 +40,16 @@ library Types {
/** /**
* @notice Struct representing a deposit transaction (L1 => L2 transaction) created by an end * @notice Struct representing a deposit transaction (L1 => L2 transaction) created by an end
* user (as opposed to a system deposit transaction generated by the system). * user (as opposed to a system deposit transaction generated by the system).
*
* @custom:field from Address of the sender of the transaction.
* @custom:field to Address of the recipient of the transaction.
* @custom:field isCreation True if the transaction is a contract creation.
* @custom:field value Value to send to the recipient.
* @custom:field mint Amount of ETH to mint.
* @custom:field gasLimit Gas limit of the transaction.
* @custom:field data Data of the transaction.
* @custom:field l1BlockHash Hash of the block the transaction was submitted in.
* @custom:field logIndex Index of the log in the block the transaction was submitted in.
*/ */
struct UserDepositTransaction { struct UserDepositTransaction {
address from; address from;
...@@ -46,6 +65,13 @@ library Types { ...@@ -46,6 +65,13 @@ library Types {
/** /**
* @notice Struct representing a withdrawal transaction. * @notice Struct representing a withdrawal transaction.
*
* @custom:field nonce Nonce of the withdrawal transaction
* @custom:field sender Address of the sender of the transaction.
* @custom:field target Address of the recipient of the transaction.
* @custom:field value Value to send to the recipient.
* @custom:field gasLimit Gas limit of the transaction.
* @custom:field data Data of the transaction.
*/ */
struct WithdrawalTransaction { struct WithdrawalTransaction {
uint256 nonce; uint256 nonce;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment