Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Add missing docstrings #104

Open
wants to merge 2 commits into
base: sb-short-term-fee-model
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions contracts/MsgValueSimulator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ contract MsgValueSimulator is ISystemContract {
to = address(uint160(addressAsUint));
}

/// @notice The fallback function that is the main entry point for the MsgValueSimulator.
/// @dev The contract accepts value, the callee and whether the call should a system one via its ABI params.
/// @param _data The calldata to be passed to the callee.
/// @return The return data from the callee.
fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) {
(uint256 value, bool isSystemCall, address to) = _getAbiParams();

Expand Down
4 changes: 4 additions & 0 deletions contracts/NonceHolder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ contract NonceHolder is INonceHolder, ISystemContract {
(prevDeploymentNonce, ) = _splitRawNonce(oldRawNonce);
}

/// @notice A method that checks whether the nonce has been used before.
/// @param _address The address the nonce of which is being checked.
/// @param _nonce The nonce value which is check.
/// @return `true` if the nonce has been used, `false` otherwise.
function isNonceUsed(address _address, uint256 _nonce) public view returns (bool) {
uint256 addressAsKey = uint256(uint160(_address));
return (_nonce < getMinNonce(_address) || nonceValues[addressAsKey][_nonce] > 0);
Expand Down
Loading