Skip to content

Commit

Permalink
fix notes
Browse files Browse the repository at this point in the history
  • Loading branch information
vladenysiuk committed Apr 2, 2024
1 parent d8943f9 commit c7db582
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions system-contracts/contracts/libraries/SystemContractsCaller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@ enum CalldataForwardingMode {
* @dev It is needed to call ContractDeployer and NonceHolder.
*/
library SystemContractsCaller {
/// @notice Makes a call with the `isSystem` flag.
/// @notice executes a low-level call with the `isSystem` flag.
/// @param gasLimit The gas limit for the call.
/// @param to The address to call.
/// @param value The value to pass with the transaction.
/// @param data The calldata.
/// @param dataStart Beggining of the calldata
/// @param dataLength The size of the calldata.
/// @return success Whether the transaction has been successful.
/// @dev Note, that the `isSystem` flag can only be set when calling system contracts.
function contractCall(uint32 gasLimit, address to, uint256 value, uint32 dataStart, uint32 dataLength) internal returns (bool success) {
function contractCall(
uint32 gasLimit,
address to,
uint256 value,
uint32 dataStart,
uint32 dataLength
) internal returns (bool success) {
address callAddr = SYSTEM_CALL_CALL_ADDRESS;
uint256 farCallAbi = SystemContractsCaller.getFarCallABI(
0,
Expand Down Expand Up @@ -113,6 +119,14 @@ library SystemContractsCaller {
}
}
}

/// @notice Makes a call with the `isSystem` flag.
/// @param gasLimit The gas limit for the call.
/// @param to The address to call.
/// @param value The value to pass with the transaction.
/// @param data The calldata.
/// @return success Whether the transaction has been successful.
/// @dev Note, that the `isSystem` flag can only be set when calling system contracts.
function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) {
uint32 dataStart;
assembly {
Expand Down

0 comments on commit c7db582

Please sign in to comment.