ethereum: tighten up some test funcs to pure/view

Fallout from #2956
This commit is contained in:
Jeff Schroeder 2023-09-08 03:26:43 +00:00
parent 846deb2f40
commit 049ca971df
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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);
@ -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;