Skip to content

Commit 365739b

Browse files
authored
Merge pull request #123 from hyperledger-labs/rename
Rename of deposit and withdraw circuits
2 parents f962f1c + 7979985 commit 365739b

32 files changed

+108
-653
lines changed

solidity/contracts/lib/zeto_fungible.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
// limitations under the License.
1616
pragma solidity ^0.8.27;
1717

18-
import {Groth16Verifier_CheckHashesValue} from "../verifiers/verifier_check_hashes_value.sol";
19-
import {Groth16Verifier_CheckNullifierValue} from "../verifiers/verifier_check_nullifier_value.sol";
18+
import {Groth16Verifier_Deposit} from "../verifiers/verifier_deposit.sol";
2019
import {Commonlib} from "./common.sol";
2120
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
2221
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
@@ -28,14 +27,14 @@ abstract contract ZetoFungible is OwnableUpgradeable {
2827
// _depositVerifier library for checking UTXOs against a claimed value.
2928
// this can be used in the optional deposit calls to verify that
3029
// the UTXOs match the deposited value
31-
Groth16Verifier_CheckHashesValue internal _depositVerifier;
30+
Groth16Verifier_Deposit internal _depositVerifier;
3231

3332
error WithdrawArrayTooLarge(uint256 maxAllowed);
3433

3534
IERC20 internal _erc20;
3635

3736
function __ZetoFungible_init(
38-
Groth16Verifier_CheckHashesValue depositVerifier
37+
Groth16Verifier_Deposit depositVerifier
3938
) public onlyInitializing {
4039
_depositVerifier = depositVerifier;
4140
}

solidity/contracts/lib/zeto_fungible_withdraw.sol

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
// limitations under the License.
1616
pragma solidity ^0.8.27;
1717

18-
import {Groth16Verifier_CheckHashesValue} from "../verifiers/verifier_check_hashes_value.sol";
19-
import {Groth16Verifier_CheckInputsOutputsValue} from "../verifiers/verifier_check_inputs_outputs_value.sol";
20-
import {Groth16Verifier_CheckInputsOutputsValueBatch} from "../verifiers/verifier_check_inputs_outputs_value_batch.sol";
18+
import {Groth16Verifier_Deposit} from "../verifiers/verifier_deposit.sol";
19+
import {Groth16Verifier_Withdraw} from "../verifiers/verifier_withdraw.sol";
20+
import {Groth16Verifier_WithdrawBatch} from "../verifiers/verifier_withdraw_batch.sol";
2121
import {ZetoFungible} from "./zeto_fungible.sol";
2222
import {Commonlib} from "./common.sol";
2323

@@ -31,14 +31,13 @@ abstract contract ZetoFungibleWithdraw is ZetoFungible {
3131
// nullifierVerifier library for checking nullifiers against a claimed value.
3232
// this can be used in the optional withdraw calls to verify that the nullifiers
3333
// match the withdrawn value
34-
Groth16Verifier_CheckInputsOutputsValue internal _withdrawVerifier;
35-
Groth16Verifier_CheckInputsOutputsValueBatch
36-
internal _batchWithdrawVerifier;
34+
Groth16Verifier_Withdraw internal _withdrawVerifier;
35+
Groth16Verifier_WithdrawBatch internal _batchWithdrawVerifier;
3736

3837
function __ZetoFungibleWithdraw_init(
39-
Groth16Verifier_CheckHashesValue depositVerifier,
40-
Groth16Verifier_CheckInputsOutputsValue withdrawVerifier,
41-
Groth16Verifier_CheckInputsOutputsValueBatch batchWithdrawVerifier
38+
Groth16Verifier_Deposit depositVerifier,
39+
Groth16Verifier_Withdraw withdrawVerifier,
40+
Groth16Verifier_WithdrawBatch batchWithdrawVerifier
4241
) public onlyInitializing {
4342
__ZetoFungible_init(depositVerifier);
4443
_withdrawVerifier = withdrawVerifier;

solidity/contracts/lib/zeto_fungible_withdraw_nullifier.sol

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
// limitations under the License.
1616
pragma solidity ^0.8.27;
1717

18-
import {Groth16Verifier_CheckHashesValue} from "../verifiers/verifier_check_hashes_value.sol";
19-
import {Groth16Verifier_CheckNullifierValue} from "../verifiers/verifier_check_nullifier_value.sol";
20-
import {Groth16Verifier_CheckNullifierValueBatch} from "../verifiers/verifier_check_nullifier_value_batch.sol";
18+
import {Groth16Verifier_Deposit} from "../verifiers/verifier_deposit.sol";
19+
import {Groth16Verifier_WithdrawNullifier} from "../verifiers/verifier_withdraw_nullifier.sol";
20+
import {Groth16Verifier_WithdrawNullifierBatch} from "../verifiers/verifier_withdraw_nullifier_batch.sol";
2121
import {ZetoFungible} from "./zeto_fungible.sol";
2222
import {Commonlib} from "./common.sol";
2323

@@ -31,13 +31,13 @@ abstract contract ZetoFungibleWithdrawWithNullifiers is ZetoFungible {
3131
// nullifierVerifier library for checking nullifiers against a claimed value.
3232
// this can be used in the optional withdraw calls to verify that the nullifiers
3333
// match the withdrawn value
34-
Groth16Verifier_CheckNullifierValue internal _withdrawVerifier;
35-
Groth16Verifier_CheckNullifierValueBatch internal _batchWithdrawVerifier;
34+
Groth16Verifier_WithdrawNullifier internal _withdrawVerifier;
35+
Groth16Verifier_WithdrawNullifierBatch internal _batchWithdrawVerifier;
3636

3737
function __ZetoFungibleWithdrawWithNullifiers_init(
38-
Groth16Verifier_CheckHashesValue depositVerifier,
39-
Groth16Verifier_CheckNullifierValue withdrawVerifier,
40-
Groth16Verifier_CheckNullifierValueBatch batchWithdrawVerifier
38+
Groth16Verifier_Deposit depositVerifier,
39+
Groth16Verifier_WithdrawNullifier withdrawVerifier,
40+
Groth16Verifier_WithdrawNullifierBatch batchWithdrawVerifier
4141
) internal onlyInitializing {
4242
__ZetoFungible_init(depositVerifier);
4343
_withdrawVerifier = withdrawVerifier;

solidity/contracts/verifiers/verifier_check_nullifiers_value.sol

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)