Skip to content

Commit

Permalink
Change variable naming of to
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Zhang <[email protected]>
  • Loading branch information
jimthematrix committed Aug 21, 2024
1 parent d7c4ffe commit be9e994
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 30 deletions.
4 changes: 2 additions & 2 deletions solidity/contracts/erc20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import "hardhat/console.sol";
/// - the sender possesses the private BabyJubjub key, whose public key is part of the pre-image of the input commitment hashes
contract SampleERC20 is ERC20, Ownable {
constructor(
address authority
) ERC20("Sample ERC20 token", "SampleERC20") Ownable(authority) {
address initialOwner
) ERC20("Sample ERC20 token", "SampleERC20") Ownable(initialOwner) {
_mint(msg.sender, 1000000 * 10 ** 18);
}

Expand Down
8 changes: 4 additions & 4 deletions solidity/contracts/factory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract ZetoTokenFactory {

function deployZetoFungibleToken(
string memory name,
address authority,
address initialOwner,
address _depositVerifier,
address _withdrawVerifier,
address _verifier
Expand All @@ -46,7 +46,7 @@ contract ZetoTokenFactory {
"Factory: failed to find implementation"
);
(IZetoFungibleInitializable(instance)).initialize(
authority,
initialOwner,
_depositVerifier,
_withdrawVerifier,
_verifier
Expand All @@ -57,7 +57,7 @@ contract ZetoTokenFactory {

function deployZetoNonFungibleToken(
string memory name,
address authority,
address initialOwner,
address _verifier
) public returns (address) {
address instance = Clones.clone(implementations[name]);
Expand All @@ -66,7 +66,7 @@ contract ZetoTokenFactory {
"Factory: failed to find implementation"
);
(IZetoNonFungibleInitializable(instance)).initialize(
authority,
initialOwner,
_verifier
);
emit ZetoTokenDeployed(instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pragma solidity ^0.8.20;

interface IZetoFungibleInitializable {
function initialize(
address authority,
address initialOwner,
address _depositVerifier,
address _withdrawVerifier,
address _verifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
pragma solidity ^0.8.20;

interface IZetoNonFungibleInitializable {
function initialize(address authority, address _verifier) external;
function initialize(address initialOwner, address _verifier) external;
}
4 changes: 2 additions & 2 deletions solidity/contracts/lib/zeto_base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ abstract contract ZetoBase is ZetoCommon {
// maintains all the UTXOs
mapping(uint256 => UTXOStatus) internal _utxos;

function __ZetoBase_init(address authority) internal onlyInitializing {
__ZetoCommon_init(authority);
function __ZetoBase_init(address initialOwner) internal onlyInitializing {
__ZetoCommon_init(initialOwner);
}

/// @dev query whether a UTXO is currently spent
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/lib/zeto_common.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ abstract contract ZetoCommon is OwnableUpgradeable {
// that did the locking.
mapping(bytes32 => address) internal lockedProofs;

function __ZetoCommon_init(address authority) internal onlyInitializing {
__Ownable_init(authority);
function __ZetoCommon_init(address initialOwner) internal onlyInitializing {
__Ownable_init(initialOwner);
}

// should be called by escrow contracts that will use uploaded proofs
Expand Down
6 changes: 4 additions & 2 deletions solidity/contracts/lib/zeto_nullifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ abstract contract ZetoNullifier is ZetoCommon {

error UTXORootNotFound(uint256 root);

function __ZetoNullifier_init(address authority) internal onlyInitializing {
__ZetoCommon_init(authority);
function __ZetoNullifier_init(
address initialOwner
) internal onlyInitializing {
__ZetoCommon_init(initialOwner);
_commitmentsTree.initialize(MAX_SMT_DEPTH);
}

Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ contract Zeto_Anon is ZetoBase, ZetoFungibleWithdraw, UUPSUpgradeable {
Groth16Verifier_Anon internal verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_CheckHashesValue _depositVerifier,
Groth16Verifier_CheckInputsOutputsValue _withdrawVerifier,
Groth16Verifier_Anon _verifier
) public initializer {
__ZetoBase_init(authority);
__ZetoBase_init(initialOwner);
__ZetoFungibleWithdraw_init(_depositVerifier, _withdrawVerifier);
verifier = _verifier;
}
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon_enc.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ contract Zeto_AnonEnc is ZetoBase, ZetoFungibleWithdraw, UUPSUpgradeable {
Groth16Verifier_AnonEnc internal verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_CheckHashesValue _depositVerifier,
Groth16Verifier_CheckInputsOutputsValue _withdrawVerifier,
Groth16Verifier_AnonEnc _verifier
) public initializer {
__ZetoBase_init(authority);
__ZetoBase_init(initialOwner);
__ZetoFungibleWithdraw_init(_depositVerifier, _withdrawVerifier);
verifier = _verifier;
}
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon_enc_nullifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ contract Zeto_AnonEncNullifier is
Groth16Verifier_AnonEncNullifier verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_CheckHashesValue _depositVerifier,
Groth16Verifier_CheckNullifierValue _withdrawVerifier,
Groth16Verifier_AnonEncNullifier _verifier
) public initializer {
__ZetoNullifier_init(authority);
__ZetoNullifier_init(initialOwner);
__ZetoFungibleWithdrawWithNullifiers_init(
_depositVerifier,
_withdrawVerifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ contract Zeto_AnonEncNullifierNonRepudiation is
uint256[2] private arbiter;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_CheckHashesValue _depositVerifier,
Groth16Verifier_CheckNullifierValue _withdrawVerifier,
Groth16Verifier_AnonEncNullifierNonRepudiation _verifier
) public initializer {
__ZetoNullifier_init(authority);
__ZetoNullifier_init(initialOwner);
__ZetoFungibleWithdrawWithNullifiers_init(
_depositVerifier,
_withdrawVerifier
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon_nullifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ contract Zeto_AnonNullifier is
Groth16Verifier_AnonNullifier verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_CheckHashesValue _depositVerifier,
Groth16Verifier_CheckNullifierValue _withdrawVerifier,
Groth16Verifier_AnonNullifier _verifier
) public initializer {
__ZetoNullifier_init(authority);
__ZetoNullifier_init(initialOwner);
__ZetoFungibleWithdrawWithNullifiers_init(
_depositVerifier,
_withdrawVerifier
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_anon_nullifier_kyc.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ contract Zeto_AnonNullifierKyc is
Groth16Verifier_AnonNullifierKyc verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_CheckHashesValue _depositVerifier,
Groth16Verifier_CheckNullifierValue _withdrawVerifier,
Groth16Verifier_AnonNullifierKyc _verifier
) public initializer {
__Registry_init();
__ZetoNullifier_init(authority);
__ZetoNullifier_init(initialOwner);
__ZetoFungibleWithdrawWithNullifiers_init(
_depositVerifier,
_withdrawVerifier
Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_nf_anon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ contract Zeto_NfAnon is ZetoBase, UUPSUpgradeable {
Groth16Verifier_NfAnon internal verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_NfAnon _verifier
) public initializer {
__ZetoBase_init(authority);
__ZetoBase_init(initialOwner);
verifier = _verifier;
}

Expand Down
4 changes: 2 additions & 2 deletions solidity/contracts/zeto_nf_anon_nullifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ contract Zeto_NfAnonNullifier is ZetoNullifier, UUPSUpgradeable {
Groth16Verifier_NfAnonNullifier verifier;

function initialize(
address authority,
address initialOwner,
Groth16Verifier_NfAnonNullifier _verifier
) public initializer {
__ZetoNullifier_init(authority);
__ZetoNullifier_init(initialOwner);
verifier = _verifier;
}

Expand Down

0 comments on commit be9e994

Please sign in to comment.