|
receive(msg: Registration) { |
|
require(self.balance == 0, "you are registered"); |
|
if(self.groth16Verify_registration(msg.piA, msg.piB, msg.piC, msg.pubInputs)) { |
|
self.balance = msg.pubInputs.get(0)!!; |
|
self.key.g = msg.pubInputs.get(1)!!; |
|
self.key.n = msg.pubInputs.get(3)!!; |
|
self.key.powN2 = pow(msg.pubInputs.get(3)!!, 2); |
|
} else { |
|
nativeThrow(300); // wrong proof |
|
} |
|
} |
No check is done who is registering the wallet, therefore anyone can supply their own keys and owner will then be unable to access the jettons.
zkJetton/contracts/zk-jetton-wallet.tact
Lines 25 to 35 in a67aceb
No check is done who is registering the wallet, therefore anyone can supply their own keys and owner will then be unable to access the jettons.