Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contracts: silence SIWE Solidity tests compile warnings #360

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

CedarMist
Copy link
Member

@CedarMist CedarMist commented Aug 26, 2024

  • Updates clients/py requirements to specify Web3.py v6.x
  • Fixes warnings in contracts/tests/SiweParserTests.sol

@CedarMist CedarMist requested a review from matevz August 26, 2024 13:50
@CedarMist CedarMist added contracts Pull requests that update sapphire-contracts solidity labels Aug 26, 2024
Copy link

netlify bot commented Aug 26, 2024

Deploy Preview for oasisprotocol-sapphire-paratime canceled.

Name Link
🔨 Latest commit bde8bfa
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-sapphire-paratime/deploys/66cc8a2f0f15f000084b4766

@CedarMist CedarMist marked this pull request as draft August 26, 2024 13:54
@CedarMist
Copy link
Member Author

CedarMist commented Aug 26, 2024

Apparently the Python client isn't compatible with Web3.py 7.x and we're not pinning the version in requirements.txt

7.x was released Aug 21, prior to that 6.x was being used.


Silences these warnings:

> @oasisprotocol/[email protected] build /src/sapphire-paratime/contracts
> hardhat compile

Warning: Function state mutability can be restricted to pure
 --> contracts/tests/SiweParserTests.sol:7:5:
  |
7 |     function testHexStringToAddress(bytes memory addr)
  |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/tests/SiweParserTests.sol:15:5:
   |
15 |     function testFromHexChar(uint8 c) external view returns (uint8) {
   |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/tests/SiweParserTests.sol:19:5:
   |
19 |     function testSubstr(
   |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/tests/SiweParserTests.sol:27:5:
   |
27 |     function testParseUint(bytes memory b) external view returns (uint256) {
   |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/tests/SiweParserTests.sol:31:5:
   |
31 |     function testParseField(
   |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/tests/SiweParserTests.sol:39:5:
   |
39 |     function testParseArray(bytes calldata str, uint256 i)
   |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/tests/SiweParserTests.sol:47:5:
   |
47 |     function testParseSiweMsg(bytes calldata siweMsg)
   |     ^ (Relevant source part starts here and spans across multiple lines).

@CedarMist CedarMist self-assigned this Aug 26, 2024
@CedarMist CedarMist marked this pull request as ready for review August 26, 2024 14:17
Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
cc @ZigaMr

@matevz
Copy link
Member

matevz commented Aug 26, 2024

Apparently the Python client isn't compatible with Web3.py 7.x and we're not pinning the version in requirements.txt

7.x was released Aug 21, prior to that 6.x was being used.

Related #355

@CedarMist CedarMist merged commit cf0cdd5 into main Aug 26, 2024
10 checks passed
@CedarMist CedarMist deleted the CedarMist/silence-siwe-test-warnings branch August 26, 2024 15:58
github-actions bot added a commit that referenced this pull request Aug 26, 2024
…edarMist/silence-siwe-test-warnings

contracts: silence SIWE Solidity tests compile warnings cf0cdd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts Pull requests that update sapphire-contracts solidity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants