Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrower95 committed Nov 21, 2024
1 parent 6471aca commit 9a45fdb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/EncGnosisSafe.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ library EncGnosisSafe {
pure
returns (bytes memory)
{
// magic value for signature.
bytes1 v = bytes1(uint8(1));
bytes32 r = bytes32(uint256(uint160(from)));
bytes32 s;
Expand Down
26 changes: 26 additions & 0 deletions src/utils/ZeusScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,32 @@ abstract contract ZeusScript is Script, Test {
return uint32(vm.envUint(envvar));
}

/**
* Returns a uin16 set in the current environment.
* @param key The environment key. Corresponds to a ZEUS_* env variable.
*/
function zUint16(string memory key) public view returns (uint16) {
if (updatedTypes[key] != EnvironmentVariableType.UNMODIFIED) {
return updatedUInt16s[key];
}

string memory envvar = envPrefix.concat(key);
return uint16(vm.envUint(envvar));
}

/**
* Returns a uin16 set in the current environment.
* @param key The environment key. Corresponds to a ZEUS_* env variable.
*/
function zUint8(string memory key) public view returns (uint8) {
if (updatedTypes[key] != EnvironmentVariableType.UNMODIFIED) {
return updatedUInt8s[key];
}

string memory envvar = envPrefix.concat(key);
return uint8(vm.envUint(envvar));
}

/**
* Returns a uin64 set in the current environment.
* @param key The environment key. Corresponds to a ZEUS_* env variable.
Expand Down

0 comments on commit 9a45fdb

Please sign in to comment.