Skip to content

Commit bd02535

Browse files
committed
refactor(contracts): fix eslint warnings
1 parent 7e69ffd commit bd02535

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

packages/contracts/contracts/Semaphore.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.4;
33

4-
import "./interfaces/ISemaphore.sol";
5-
import "./interfaces/ISemaphoreVerifier.sol";
4+
import {ISemaphore} from "./interfaces/ISemaphore.sol";
5+
import {ISemaphoreVerifier} from "./interfaces/ISemaphoreVerifier.sol";
66
import {SemaphoreGroups} from "./base/SemaphoreGroups.sol";
77

88
/// @title Semaphore

packages/contracts/contracts/base/SemaphoreGroups.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//SPDX-License-Identifier: MIT
22
pragma solidity 0.8.4;
33

4-
import "../interfaces/ISemaphoreGroups.sol";
4+
import {ISemaphoreGroups} from "../interfaces/ISemaphoreGroups.sol";
55
import {InternalLeanIMT, LeanIMTData} from "@zk-kit/imt.sol/internal/InternalLeanIMT.sol";
66

77
/// @title Semaphore groups contract.

packages/contracts/contracts/base/SemaphoreVerifier.sol

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,63 +18,63 @@
1818
along with snarkJS. If not, see <https://www.gnu.org/licenses/>.
1919
*/
2020

21-
pragma solidity >=0.7.0 <0.9.0;
21+
pragma solidity 0.8.4;
2222

2323
contract SemaphoreVerifier {
2424
// Scalar field size
25-
uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
25+
uint256 public constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
2626
// Base field size
27-
uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;
27+
uint256 public constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;
2828

2929
// Verification Key data
30-
uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042;
31-
uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958;
30+
uint256 public constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042;
31+
uint256 public constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958;
3232

33-
uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132;
34-
uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731;
33+
uint256 public constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132;
34+
uint256 public constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731;
3535

36-
uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679;
37-
uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856;
36+
uint256 public constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679;
37+
uint256 public constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856;
3838

39-
uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
40-
uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
39+
uint256 public constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
40+
uint256 public constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
4141

42-
uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;
43-
uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;
42+
uint256 public constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;
43+
uint256 public constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;
4444

45-
uint256 constant deltax1 = 4802212656094790438590349860247775075786991105131547807727284652635601493451;
46-
uint256 constant deltax2 = 3192001579163161965737706068451660722884189926734050314177195054150514444526;
45+
uint256 public constant deltax1 = 4802212656094790438590349860247775075786991105131547807727284652635601493451;
46+
uint256 public constant deltax2 = 3192001579163161965737706068451660722884189926734050314177195054150514444526;
4747

48-
uint256 constant deltay1 = 15972350841447731019470651411783473840114797777894828544121644904018624203926;
49-
uint256 constant deltay2 = 16736984041748862942817824193402022794140982482563484226161429255394796148810;
48+
uint256 public constant deltay1 = 15972350841447731019470651411783473840114797777894828544121644904018624203926;
49+
uint256 public constant deltay2 = 16736984041748862942817824193402022794140982482563484226161429255394796148810;
5050

51-
uint256 constant IC0x = 7810627885438804854799393101615420860004300484567847086674409667961806655819;
52-
uint256 constant IC0y = 17752894058911463947056561254031971003439956976683150238952280384884265610345;
51+
uint256 public constant IC0x = 7810627885438804854799393101615420860004300484567847086674409667961806655819;
52+
uint256 public constant IC0y = 17752894058911463947056561254031971003439956976683150238952280384884265610345;
5353

54-
uint256 constant IC1x = 1859027844886249956101358092211425783821368393550326618436626137559481879491;
55-
uint256 constant IC1y = 21054817398797605484546956719908640544118839476669181800056403255004730797738;
54+
uint256 public constant IC1x = 1859027844886249956101358092211425783821368393550326618436626137559481879491;
55+
uint256 public constant IC1y = 21054817398797605484546956719908640544118839476669181800056403255004730797738;
5656

57-
uint256 constant IC2x = 15796976765804300435452771769828280808531244272386620395606681167033336150695;
58-
uint256 constant IC2y = 903968937841233929826399002238948203245370749106069849010375461873649600286;
57+
uint256 public constant IC2x = 15796976765804300435452771769828280808531244272386620395606681167033336150695;
58+
uint256 public constant IC2y = 903968937841233929826399002238948203245370749106069849010375461873649600286;
5959

60-
uint256 constant IC3x = 9939447176137952809861441974771884976492003509733419789700227062163769465749;
61-
uint256 constant IC3y = 10252048733134373819769164658668132695840284406808712977431939424744406823235;
60+
uint256 public constant IC3x = 9939447176137952809861441974771884976492003509733419789700227062163769465749;
61+
uint256 public constant IC3y = 10252048733134373819769164658668132695840284406808712977431939424744406823235;
6262

63-
uint256 constant IC4x = 7393464059707248328549959352154443030400062088967711800345697753542770722400;
64-
uint256 constant IC4y = 7750652018971809526357985723000957185438256496025176410178561237545956517939;
63+
uint256 public constant IC4x = 7393464059707248328549959352154443030400062088967711800345697753542770722400;
64+
uint256 public constant IC4y = 7750652018971809526357985723000957185438256496025176410178561237545956517939;
6565

6666
// Memory data
67-
uint16 constant pVk = 0;
68-
uint16 constant pPairing = 128;
67+
uint16 public constant pVk = 0;
68+
uint16 public constant pPairing = 128;
6969

70-
uint16 constant pLastMem = 896;
70+
uint16 public constant pLastMem = 896;
7171

7272
function verifyProof(
7373
uint[2] calldata _pA,
7474
uint[2][2] calldata _pB,
7575
uint[2] calldata _pC,
7676
uint[4] calldata _pubSignals
77-
) public view returns (bool) {
77+
) external view returns (bool) {
7878
assembly {
7979
function checkField(v) {
8080
if iszero(lt(v, q)) {

0 commit comments

Comments
 (0)