Skip to content

Commit

Permalink
Merge pull request #21 from spherex-collab/N03
Browse files Browse the repository at this point in the history
N03
  • Loading branch information
sfeyal committed Jul 31, 2023
2 parents cfdd63c + ed86e8a commit 6f77a96
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/ISphereXEngine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pragma solidity ^0.8.17;

import {IERC165} from "openzeppelin-contracts/utils/introspection/IERC165.sol";
/**
* @title Interface for SphereXEngine - defenitions of core functionality
* @author SphereX Technolegies ltd
* @title Interface for SphereXEngine - definitions of core functionality
* @author SphereX Technologies ltd
* @notice This interface is imported by SphereXProtected, so that SphereXProtected can call functions from SphereXEngine
* @dev Full docs of these functions can be found in SphereXEngine
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SphereXEngine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ contract SphereXEngine is ISphereXEngine, AccessControlDefaultAdminRules {
* @param num id of function to add. Should be positive
* @param sender For future use
* @param data For future use
* @return result in the future will return insturction on what storage slots to gather, but not used for now
* @return result in the future will return instruction on what storage slots to gather, but not used for now
*/
function sphereXValidatePre(int256 num, address sender, bytes calldata data)
external
Expand Down
10 changes: 5 additions & 5 deletions src/SphereXProtected.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract contract SphereXProtected {

/**
* @dev used when the client doesn't use a proxy
* @notice constructor visibality is required to support all compiler versions
* @notice constructor visibility is required to support all compiler versions
*/
constructor() internal {
__SphereXProtected_init();
Expand All @@ -64,7 +64,7 @@ abstract contract SphereXProtected {
}

/**
* Stores a new address in an abitrary slot
* Stores a new address in an arbitrary slot
* @param slot where to store the address
* @param newAddress address to store in given slot
*/
Expand Down Expand Up @@ -160,7 +160,7 @@ abstract contract SphereXProtected {
/**
*
* @param newSphereXEngine new address of the spherex engine
* @dev this is also used to actually enable the defence
* @dev this is also used to actually enable the defense
* (because as long is this address is 0, the protection is disabled).
*/
function changeSphereXEngine(address newSphereXEngine) external onlyOperator {
Expand Down Expand Up @@ -236,7 +236,7 @@ abstract contract SphereXProtected {
* @dev internal function for engine communication. We use it to reduce contract size.
* Should be called after the code of a function.
* @param num function identifier
* @param gas the gas saved before the original function nody run
* @param gas the gas saved before the original function body run
*/
function _sphereXValidateInternalPost(int256 num, uint256 gas) private returnsIfNotActivated {
_sphereXEngine().sphereXValidateInternalPost(num, gas - gasleft());
Expand All @@ -261,7 +261,7 @@ abstract contract SphereXProtected {
}

/**
* @dev Modifier to be incorporated in all public rotected non-view functions
* @dev Modifier to be incorporated in all public protected non-view functions
*/
modifier sphereXGuardPublic(int256 num, bytes4 selector) {
ModifierLocals memory locals = _sphereXValidatePre(num, msg.sig == selector);
Expand Down

0 comments on commit 6f77a96

Please sign in to comment.