Skip to content

Commit

Permalink
ethereum: tighten up some test funcs to pure/view
Browse files Browse the repository at this point in the history
  • Loading branch information
SEJeff committed Sep 11, 2023
1 parent 846deb2 commit 049ca97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ethereum/forge-test/MessagesRV.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ contract TestMessagesRV is TestUtils {
}

function generateGuardianSet(GuardianSetParams memory params)
internal
internal pure
returns (Structs.GuardianSet memory)
{
for (uint8 i = 0; i < params.guardianCount; ++i)
Expand Down
2 changes: 1 addition & 1 deletion ethereum/forge-test/TokenImplementation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ contract TestTokenImplementation is TokenImplementation, Test {
address spender,
uint256 amount,
uint256 deadline
) public returns (SignatureSetup memory output) {
) public view returns (SignatureSetup memory output) {
// prepare signer allowing for tokens to be spent
uint256 sk = uint256(walletPrivateKey);
output.allower = vm.addr(sk);
Expand Down
4 changes: 2 additions & 2 deletions ethereum/forge-test/rv-helpers/TestUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ contract TestUtils is Test, KEVMCheats {
uint8 consistencyLevel,
bytes memory payload,
uint256 pk)
internal
internal pure
returns (bytes memory _vm, bytes32 hash)
{
bytes memory header = validVmHeader(guardianSetIndex);
Expand All @@ -176,7 +176,7 @@ contract TestUtils is Test, KEVMCheats {
_vm = bytes.concat(header, signature, body);
}

function validSignature(uint256 pk, bytes32 hash) public returns (bytes memory signature) {
function validSignature(uint256 pk, bytes32 hash) public pure returns (bytes memory signature) {
uint8 v;
bytes32 r;
bytes32 s;
Expand Down

0 comments on commit 049ca97

Please sign in to comment.