Skip to content

Commit

Permalink
Merge branches 'main' and 'main' of https://github.com/smart-transact…
Browse files Browse the repository at this point in the history
  • Loading branch information
laudiacay committed Nov 28, 2023
2 parents 2575804 + abcf463 commit 3b7e1be
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 300 deletions.
43 changes: 0 additions & 43 deletions src/timetravel/SmarterContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import "../timetravel/CallBreaker.sol";

contract SmarterContract {
CallBreaker public callbreaker;
mapping(address => bool) public auditedContracts;
mapping(address => bool) public ofacCensoredAddresses;

/// @dev Selector 0xab63c583
error FutureCallExpected();
Expand Down Expand Up @@ -61,47 +59,6 @@ contract SmarterContract {
_;
}

modifier onlyAudited(address _address) {
auditedBlocker(_address);
_;
}

modifier onlyOFACApproved(address _address) {
OFAC_censoredBlocker(_address);
_;
}

/// @notice Prevents execution by un-audited contracts
/// @dev This function checks whether the provided address is in the list of audited contracts
/// @param _address The address to check
function auditedBlocker(address _address) public view {
if (!auditedContracts[_address]) {
revert Unaudited();
}
}

/// @notice Prevents calls to all addresses in the list
/// @dev This function checks whether the provided address is in the list of OFAC censored addresses
function OFAC_censoredBlocker(address _address) public view {
if (ofacCensoredAddresses[_address]) {
revert NotApproved();
}
}

/// @notice Sets a contract as OFAC blocked
/// @dev This function adds the provided address to the list of OFAC censored addresses
/// @param _address The address to be added to the list of OFAC censored addresses
function setOFACBlocked(address _address) public {
ofacCensoredAddresses[_address] = true;
}

/// @notice Sets a contract as audited
/// @dev This function adds the provided address to the list of audited contracts
/// @param _address The address to be added to the list of audited contracts
function setAuditedContract(address _address) public {
auditedContracts[_address] = true;
}

/// @notice Returns the call index, callobj, and returnobj of the currently executing call
/// @dev This function allows for time travel by returning the returnobj of the currently executing call
/// @return A pair consisting of the CallObject and ReturnObject of the currently executing call
Expand Down
82 changes: 0 additions & 82 deletions test/Whitelist.t.sol

This file was deleted.

31 changes: 0 additions & 31 deletions test/examples/Caller.sol

This file was deleted.

144 changes: 0 additions & 144 deletions test/solve-lib/Whitelist.sol

This file was deleted.

0 comments on commit 3b7e1be

Please sign in to comment.