From d52b5a0da314414c158213f8883affd6b29b9c6d Mon Sep 17 00:00:00 2001 From: Saleel Date: Tue, 6 Aug 2024 11:53:14 +0400 Subject: [PATCH] contract: update verifier --- packages/app/.env | 2 +- packages/contracts/src/Verifier.sol | 9 ++++----- packages/contracts/test/TestTwitter.t.sol | 16 ++++++++-------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/app/.env b/packages/app/.env index a95f42a..415638f 100644 --- a/packages/app/.env +++ b/packages/app/.env @@ -1,3 +1,3 @@ -VITE_CONTRACT_ADDRESS=0x0afe6352B6f0c1b622CB1EEB053E469DE3C3d088 +VITE_CONTRACT_ADDRESS=0xaB157F13e9643F45aEa693fDb1A3C22DBDb984a5 VITE_CIRCUIT_ARTIFACTS_URL=https://storage.googleapis.com/proof-of-twitter-artifacts/87f1f79/ VITE_GOOGLE_CLIENT_ID=274960270901-ciaimkfeslrae1955ghq8bv7n8n3n71f.apps.googleusercontent.com \ No newline at end of file diff --git a/packages/contracts/src/Verifier.sol b/packages/contracts/src/Verifier.sol index fa255f5..e052349 100644 --- a/packages/contracts/src/Verifier.sol +++ b/packages/contracts/src/Verifier.sol @@ -12,7 +12,6 @@ // // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; - library Pairing { struct G1Point { uint X; @@ -195,10 +194,10 @@ contract Verifier { 8495653923123431417604973247489272438418190587263600148770280649306958101930] ); vk.delta2 = Pairing.G2Point( - [21130802517650493837556601119717873290293522594709681355040765979027122599637, - 17230161825435877830564363164193591424887211499837345257708258062660554857691], - [425264893407294420298463742599478455116250808169306368406237337940535665938, - 16653749341127206046895108027093313840543422187379667108090563003248696762314] + [15689642542677967497134067368563531820480674004982824717576658572626718466391, + 16652529577953158133724874987569713515723562698809526747487443883069189795186], + [19578730506967077591463930942667211516774284300936444243947842127193250517416, + 4536552593120443892406677780742987401638542379716848088897788244621510231909] ); vk.IC = new Pairing.G1Point[](4); diff --git a/packages/contracts/test/TestTwitter.t.sol b/packages/contracts/test/TestTwitter.t.sol index 29c7959..d3e2e6b 100644 --- a/packages/contracts/test/TestTwitter.t.sol +++ b/packages/contracts/test/TestTwitter.t.sol @@ -99,23 +99,23 @@ contract TwitterUtilsTest is Test { publicSignals[2] = 1163446621798851219159656704542204983322218017645; uint256[2] memory proof_a = [ - 3640944474395694725997243759485841281957193312051963127476944002118802846846, - 12944550183026778008163990773063308425923478727963224679176331024763573701239 + 5797457318420687771988333280962152259257379892303951979169813170317326477434, + 14189472520472776516417665921077060465051105690711006171274266938697420566951 ]; // Note: you need to swap the order of the two elements in each subarray uint256[2][2] memory proof_b = [ [ - 10523456350415273945424632760608655383131363971581062129080466479508555080398, - 331197707211751801275197709958580935302689167865628614323553219143124201916 + 18921035250897022958148917928657494416170154529165080398233299677407236026846, + 7543904973418857428529380479194238699124092071535155780217645796569464525390 ], [ - 1972650478757937359418230607673029701916211913722571079758270763366511464829, - 4348920096466422800547725696424734715037604091150017141469126675576995757268 + 16835983125386052464761616884519063200215669738277458297351574243466146108017, + 16210421528119385263780767241818749780020239542889025688358560426656253630309 ] ]; uint256[2] memory proof_c = [ - 300422780809443960202464842492214800226895503246789474221004192156031237272, - 10211818721022453551274836034175178964506392482691605135120369518092025537245 + 19160114768014303520076125815800143167812482606052748549955911430674608929788, + 18614452123455216414192085875877133967969502306927521502651735939542857695693 ]; uint256[8] memory proof = [