Skip to content

Commit

Permalink
update Groth16VerifierTwitter.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
foolo committed Dec 2, 2023
1 parent a991789 commit 9dd5ce3
Showing 1 changed file with 19 additions and 30 deletions.
49 changes: 19 additions & 30 deletions packages/twitter-verifier-contracts/src/Groth16VerifierTwitter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -194,43 +194,32 @@ contract Verifier {
8495653923123431417604973247489272438418190587263600148770280649306958101930]
);
vk.delta2 = Pairing.G2Point(
[5938801666574625047566102233959687460952152363696515606168583822921507389119,
10918201764747649777782799376622765302845679246108662722964209581764572035297],
[6990274420431404026324684434662820352800238926844941333351340078923202666983,
6109800108489389215058190689963113905869810537652575151335623354060770121283]
[1411884373000769449437483751486459601622189180218164851330761008617406533027,
15792958559606444568396975899039408493722531565501366837963331207237235001419],
[2575065074715395863370598110922663391573897308318965012149300439660964120485,
19044742011129984072841409487465851235530430914234063005549661972569048496311]
);
vk.IC = new Pairing.G1Point[](6);
vk.IC = new Pairing.G1Point[](4);

vk.IC[0] = Pairing.G1Point(
9942523009266305932100524503910635327308257016647289590384335335606257198744,
14193954042776971929190893115676305586653586954384295528131095483552721736892
6859010054331630848468967083765435436493863384569969274721848726225977202221,
10242300017406806193161834793403901820179996281216190152651296265739614552868
);

vk.IC[1] = Pairing.G1Point(
15397140881479566875681588514236180449106311252644461780837111806381448649965,
12252623742615548636838696472148126917072786115479382722936545058893488919689
13813406490863084206092938061446900717080325405654970574069607640148570522692,
17739983704483777721661152271094003122106524171755597673058690749028752371458
);

vk.IC[2] = Pairing.G1Point(
1298382700610429988857026147727603024220758781503546464738398079737381970488,
17296829596655096468908613071417885526220179359199094987517295554383405350532
16328132342858671503433789165066881660930288980972396083606820665099615669139,
10872967553924581626488061473226012036184917513404207708716578569944518666845
);

vk.IC[3] = Pairing.G1Point(
19629529837982752176328045574977906840343156732417558568707956084867192470939,
18087912902416870641248352074059656754420867519385464490357246192254170619878
);

vk.IC[4] = Pairing.G1Point(
4559094722283049092613975821932010663823618324169123930510904130570127315029,
14466920779070829336615408534268341091630993637428219133229264641731044379532
);

vk.IC[5] = Pairing.G1Point(
7671729601589983387223246942164624752030810215133950644403590246055046662281,
13466138146999331642502698906709772064957615280677367136288889147248862438709
);

19819018003805484970826899312120056423674066969815841428396605364330979173973,
19282358028712194861762875908057285798796179924442560793811014687897560619630
);
}
function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {
uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
Expand All @@ -256,7 +245,7 @@ contract Verifier {
uint[2] memory a,
uint[2][2] memory b,
uint[2] memory c,
uint[5] memory input
uint[3] memory input
) public view returns (bool r) {
Proof memory proof;
proof.A = Pairing.G1Point(a[0], a[1]);
Expand Down

0 comments on commit 9dd5ce3

Please sign in to comment.