Skip to content

Commit

Permalink
Merge pull request #360 from oasisprotocol/CedarMist/silence-siwe-tes…
Browse files Browse the repository at this point in the history
…t-warnings

contracts: silence SIWE Solidity tests compile warnings
  • Loading branch information
CedarMist authored Aug 26, 2024
2 parents a884b64 + bde8bfa commit cf0cdd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clients/py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cbor2
pynacl
web3
web3==6.*
14 changes: 7 additions & 7 deletions contracts/contracts/tests/SiweParserTests.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,47 @@ import {ParsedSiweMessage, SiweParser} from "../SiweParser.sol";
contract SiweParserTests {
function testHexStringToAddress(bytes memory addr)
external
view
pure
returns (address)
{
return SiweParser._hexStringToAddress(addr);
}

function testFromHexChar(uint8 c) external view returns (uint8) {
function testFromHexChar(uint8 c) external pure returns (uint8) {
return SiweParser._fromHexChar(c);
}

function testSubstr(
bytes memory str,
uint256 startIndex,
uint256 endIndex
) external view returns (bytes memory) {
) external pure returns (bytes memory) {
return SiweParser._substr(str, startIndex, endIndex);
}

function testParseUint(bytes memory b) external view returns (uint256) {
function testParseUint(bytes memory b) external pure returns (uint256) {
return SiweParser._parseUint(b);
}

function testParseField(
bytes calldata str,
string memory name,
uint256 i
) external view returns (bytes memory value, uint256) {
) external pure returns (bytes memory value, uint256) {
return SiweParser._parseField(str, name, i);
}

function testParseArray(bytes calldata str, uint256 i)
external
view
pure
returns (bytes[] memory values, uint256 count)
{
return SiweParser._parseArray(str, i);
}

function testParseSiweMsg(bytes calldata siweMsg)
external
view
pure
returns (ParsedSiweMessage memory)
{
return SiweParser.parseSiweMsg(siweMsg);
Expand Down

0 comments on commit cf0cdd5

Please sign in to comment.