Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
80107e98
Unverified
Commit
80107e98
authored
Dec 08, 2022
by
mergify[bot]
Committed by
GitHub
Dec 08, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4321 from ethereum-optimism/sc/ctb-comment-types
maint(ctb): add comment to structs in Types
parents
3df55cc1
db182b3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
Types.sol
packages/contracts-bedrock/contracts/libraries/Types.sol
+26
-0
No files found.
packages/contracts-bedrock/contracts/libraries/Types.sol
View file @
80107e98
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment