mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-10 06:28:04 -05:00
chore: spelling fixes (#1378)
This commit is contained in:
@@ -147,7 +147,7 @@ func (b *EventUpdateLogic) updateL2WithdrawMessageInfos(ctx context.Context, bat
|
||||
}
|
||||
|
||||
if withdrawTrie.NextMessageNonce != l2WithdrawMessages[0].MessageNonce {
|
||||
log.Error("nonce mismatch", "expected next message nonce", withdrawTrie.NextMessageNonce, "actuall next message nonce", l2WithdrawMessages[0].MessageNonce)
|
||||
log.Error("nonce mismatch", "expected next message nonce", withdrawTrie.NextMessageNonce, "actual next message nonce", l2WithdrawMessages[0].MessageNonce)
|
||||
return fmt.Errorf("nonce mismatch")
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Mapping from L2 ERC20 token address to corresponding L2ERC20Gateway.
|
||||
function defaultERC20Gateway() external view returns (address)
|
||||
```
|
||||
|
||||
The addess of default L2 ERC20 gateway, normally the L2StandardERC20Gateway contract.
|
||||
The address of default L2 ERC20 gateway, normally the L2StandardERC20Gateway contract.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -945,7 +945,7 @@ error ErrorRevertFinalizedBatch()
|
||||
|
||||
|
||||
|
||||
*Thrown when reverting a finialized batch.*
|
||||
*Thrown when reverting a finalized batch.*
|
||||
|
||||
|
||||
### ErrorRevertNotStartFromEnd
|
||||
@@ -956,7 +956,7 @@ error ErrorRevertNotStartFromEnd()
|
||||
|
||||
|
||||
|
||||
*Thrown when the reverted batches are not in the ending of commited batch chain.*
|
||||
*Thrown when the reverted batches are not in the ending of committed batch chain.*
|
||||
|
||||
|
||||
### ErrorRevertZeroBatches
|
||||
|
||||
@@ -44,7 +44,7 @@ contract L1ScrollMessenger is ScrollMessengerBase, IL1ScrollMessenger {
|
||||
struct ReplayState {
|
||||
// The number of replayed times.
|
||||
uint128 times;
|
||||
// The queue index of lastest replayed one. If it is zero, it means the message has not been replayed.
|
||||
// The queue index of latest replayed one. If it is zero, it means the message has not been replayed.
|
||||
uint128 lastIndex;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ abstract contract L1ERC20Gateway is IL1ERC20Gateway, IMessageDropCallback, Scrol
|
||||
/// @dev Internal function to do all the deposit operations.
|
||||
///
|
||||
/// @param _token The token to deposit.
|
||||
/// @param _to The recipient address to recieve the token in L2.
|
||||
/// @param _to The recipient address to receive the token in L2.
|
||||
/// @param _amount The amount of token to deposit.
|
||||
/// @param _data Optional data to forward to recipient's account.
|
||||
/// @param _gasLimit Gas limit required to complete the deposit on L2.
|
||||
|
||||
@@ -25,7 +25,7 @@ contract L1GatewayRouter is OwnableUpgradeable, IL1GatewayRouter {
|
||||
/// @notice The address of L1ETHGateway.
|
||||
address public ethGateway;
|
||||
|
||||
/// @notice The addess of default ERC20 gateway, normally the L1StandardERC20Gateway contract.
|
||||
/// @notice The address of default ERC20 gateway, normally the L1StandardERC20Gateway contract.
|
||||
address public defaultERC20Gateway;
|
||||
|
||||
/// @notice Mapping from ERC20 token address to corresponding L1ERC20Gateway.
|
||||
|
||||
@@ -97,7 +97,7 @@ contract L1StandardERC20Gateway is L1ERC20Gateway {
|
||||
|
||||
/// @inheritdoc IL1ERC20Gateway
|
||||
function getL2ERC20Address(address _l1Token) public view override returns (address) {
|
||||
// In StandardERC20Gateway, all corresponding l2 tokens are depoyed by Create2 with salt,
|
||||
// In StandardERC20Gateway, all corresponding l2 tokens are deployed by Create2 with salt,
|
||||
// we can calculate the l2 address directly.
|
||||
bytes32 _salt = keccak256(abi.encodePacked(counterpart, keccak256(abi.encodePacked(_l1Token))));
|
||||
|
||||
|
||||
@@ -89,10 +89,10 @@ contract ScrollChain is OwnableUpgradeable, PausableUpgradeable, IScrollChain {
|
||||
/// @dev Thrown when the number of batches to revert is zero.
|
||||
error ErrorRevertZeroBatches();
|
||||
|
||||
/// @dev Thrown when the reverted batches are not in the ending of commited batch chain.
|
||||
/// @dev Thrown when the reverted batches are not in the ending of committed batch chain.
|
||||
error ErrorRevertNotStartFromEnd();
|
||||
|
||||
/// @dev Thrown when reverting a finialized batch.
|
||||
/// @dev Thrown when reverting a finalized batch.
|
||||
error ErrorRevertFinalizedBatch();
|
||||
|
||||
/// @dev Thrown when the given state root is zero.
|
||||
@@ -580,7 +580,7 @@ contract ScrollChain is OwnableUpgradeable, PausableUpgradeable, IScrollChain {
|
||||
/// @param _chunks The list of chunks to commit.
|
||||
/// @param _skippedL1MessageBitmap The bitmap indicates whether each L1 message is skipped or not.
|
||||
/// @return _batchDataHash The computed data hash for the list of chunks.
|
||||
/// @return _totalL1MessagesPoppedInBatch The total number of L1 messages poped in this batch, including skipped one.
|
||||
/// @return _totalL1MessagesPoppedInBatch The total number of L1 messages popped in this batch, including skipped one.
|
||||
function _commitChunksV0(
|
||||
uint256 _totalL1MessagesPoppedOverall,
|
||||
bytes[] memory _chunks,
|
||||
@@ -627,7 +627,7 @@ contract ScrollChain is OwnableUpgradeable, PausableUpgradeable, IScrollChain {
|
||||
/// @param _skippedL1MessageBitmap The bitmap indicates whether each L1 message is skipped or not.
|
||||
/// @return _blobVersionedHash The blob versioned hash for the blob carried in this transaction.
|
||||
/// @return _batchDataHash The computed data hash for the list of chunks.
|
||||
/// @return _totalL1MessagesPoppedInBatch The total number of L1 messages poped in this batch, including skipped one.
|
||||
/// @return _totalL1MessagesPoppedInBatch The total number of L1 messages popped in this batch, including skipped one.
|
||||
function _commitChunksV1(
|
||||
uint256 _totalL1MessagesPoppedOverall,
|
||||
bytes[] memory _chunks,
|
||||
@@ -950,7 +950,7 @@ contract ScrollChain is OwnableUpgradeable, PausableUpgradeable, IScrollChain {
|
||||
|
||||
/// @dev Internal function to pop finalized l1 messages.
|
||||
/// @param bitmapPtr The memory offset of `skippedL1MessageBitmap`.
|
||||
/// @param totalL1MessagePopped The total number of L1 messages poped in all batches including current batch.
|
||||
/// @param totalL1MessagePopped The total number of L1 messages popped in all batches including current batch.
|
||||
/// @param l1MessagePopped The number of L1 messages popped in current batch.
|
||||
function _popL1Messages(
|
||||
uint256 bitmapPtr,
|
||||
|
||||
@@ -21,7 +21,7 @@ contract L2GatewayRouter is OwnableUpgradeable, IL2GatewayRouter {
|
||||
/// @notice The address of L2ETHGateway.
|
||||
address public ethGateway;
|
||||
|
||||
/// @notice The addess of default L2 ERC20 gateway, normally the L2StandardERC20Gateway contract.
|
||||
/// @notice The address of default L2 ERC20 gateway, normally the L2StandardERC20Gateway contract.
|
||||
address public defaultERC20Gateway;
|
||||
|
||||
/// @notice Mapping from L2 ERC20 token address to corresponding L2ERC20Gateway.
|
||||
|
||||
@@ -242,7 +242,7 @@ contract L1BlockContainer is OwnableBase, IL1BlockContainer {
|
||||
let _computedBlockHash := keccak256(memPtr, headerPayloadLength)
|
||||
require(eq(_blockHash, _computedBlockHash), "Block hash mismatch")
|
||||
|
||||
// load 16 vaules
|
||||
// load 16 values
|
||||
for {
|
||||
let i := 0
|
||||
} lt(i, 16) {
|
||||
|
||||
@@ -23,7 +23,7 @@ contract ScrollStandardERC20Factory is Ownable, IScrollStandardERC20Factory {
|
||||
|
||||
/// @inheritdoc IScrollStandardERC20Factory
|
||||
function computeL2TokenAddress(address _gateway, address _l1Token) external view returns (address) {
|
||||
// In StandardERC20Gateway, all corresponding l2 tokens are depoyed by Create2 with salt,
|
||||
// In StandardERC20Gateway, all corresponding l2 tokens are deployed by Create2 with salt,
|
||||
// we can calculate the l2 address directly.
|
||||
bytes32 _salt = _getSalt(_gateway, _l1Token);
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ library PatriciaMerkleTrieVerifier {
|
||||
|
||||
// first item is considered the root node.
|
||||
// Otherwise verifies that the hash of the current node
|
||||
// is the same as the previous choosen one.
|
||||
// is the same as the previous chosen one.
|
||||
switch i
|
||||
case 1 {
|
||||
rootHash := hash
|
||||
@@ -425,7 +425,7 @@ library PatriciaMerkleTrieVerifier {
|
||||
}
|
||||
}
|
||||
|
||||
// lastly, derive the path of the choosen one (TM)
|
||||
// lastly, derive the path of the chosen one (TM)
|
||||
path := derivePath(key, depth)
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ library ZkTrieVerifier {
|
||||
|
||||
// first item is considered the root node.
|
||||
// Otherwise verifies that the hash of the current node
|
||||
// is the same as the previous choosen one.
|
||||
// is the same as the previous chosen one.
|
||||
switch depth
|
||||
case 1 {
|
||||
rootHash := hash
|
||||
@@ -262,7 +262,7 @@ library ZkTrieVerifier {
|
||||
ptr, storageValue := verifyStorageProof(poseidon, storageKey, storageRootHash, ptr)
|
||||
|
||||
// the one and only boundary check
|
||||
// in case an attacker crafted a malicous payload
|
||||
// in case an attacker crafted a malicious payload
|
||||
// and succeeds in the prior verification steps
|
||||
// then this should catch any bogus accesses
|
||||
if iszero(eq(ptr, add(proof.offset, proof.length))) {
|
||||
|
||||
Reference in New Issue
Block a user