Commit 98722d8c authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4325 from ethereum-optimism/sc/ctb-struct-comments

maint(ctb): comments for structs
parents 8b70a0f3 de860285
...@@ -20,7 +20,11 @@ import { Semver } from "../universal/Semver.sol"; ...@@ -20,7 +20,11 @@ import { Semver } from "../universal/Semver.sol";
*/ */
contract OptimismPortal is Initializable, ResourceMetering, Semver { contract OptimismPortal is Initializable, ResourceMetering, Semver {
/** /**
* @notice Represents a proven withdrawal * @notice Represents a proven withdrawal.
*
* @custom:field outputRoot Root of the L2 output this was proven against.
* @custom:field timestamp Timestamp at whcih the withdrawal was proven.
* @custom:field l2OutputIndex Index of the output this was proven against.
*/ */
struct ProvenWithdrawal { struct ProvenWithdrawal {
bytes32 outputRoot; bytes32 outputRoot;
......
...@@ -16,6 +16,10 @@ abstract contract ResourceMetering is Initializable { ...@@ -16,6 +16,10 @@ abstract contract ResourceMetering is Initializable {
/** /**
* @notice Represents the various parameters that control the way in which resources are * @notice Represents the various parameters that control the way in which resources are
* metered. Corresponds to the EIP-1559 resource metering system. * metered. Corresponds to the EIP-1559 resource metering system.
*
* @custom:field prevBaseFee Base fee from the previous block(s).
* @custom:field prevBoughtGas Amount of gas bought so far in the current block.
* @custom:field prevBlockNum Last block number that the base fee was updated.
*/ */
struct ResourceParams { struct ResourceParams {
uint128 prevBaseFee; uint128 prevBaseFee;
......
...@@ -27,6 +27,9 @@ library RLPReader { ...@@ -27,6 +27,9 @@ library RLPReader {
/** /**
* @notice Struct representing an RLP item. * @notice Struct representing an RLP item.
*
* @custom:field length Length of the RLP item.
* @custom:field ptr Pointer to the RLP item in memory.
*/ */
struct RLPItem { struct RLPItem {
uint256 length; uint256 length;
......
...@@ -13,6 +13,9 @@ import { RLPReader } from "../rlp/RLPReader.sol"; ...@@ -13,6 +13,9 @@ import { RLPReader } from "../rlp/RLPReader.sol";
library MerkleTrie { library MerkleTrie {
/** /**
* @notice Struct representing a node in the trie. * @notice Struct representing a node in the trie.
*
* @custom:field encoded The RLP-encoded node.
* @custom:field decoded The RLP-decoded node.
*/ */
struct TrieNode { struct TrieNode {
bytes encoded; bytes encoded;
......
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