diff --git a/solidity/contracts/erc20.sol b/solidity/contracts/erc20.sol index bcbe017..bafd737 100644 --- a/solidity/contracts/erc20.sol +++ b/solidity/contracts/erc20.sol @@ -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); } diff --git a/solidity/contracts/factory.sol b/solidity/contracts/factory.sol index 10d72bb..78bccc2 100644 --- a/solidity/contracts/factory.sol +++ b/solidity/contracts/factory.sol @@ -35,7 +35,7 @@ contract ZetoTokenFactory { function deployZetoFungibleToken( string memory name, - address authority, + address initialOwner, address _depositVerifier, address _withdrawVerifier, address _verifier @@ -46,7 +46,7 @@ contract ZetoTokenFactory { "Factory: failed to find implementation" ); (IZetoFungibleInitializable(instance)).initialize( - authority, + initialOwner, _depositVerifier, _withdrawVerifier, _verifier @@ -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]); @@ -66,7 +66,7 @@ contract ZetoTokenFactory { "Factory: failed to find implementation" ); (IZetoNonFungibleInitializable(instance)).initialize( - authority, + initialOwner, _verifier ); emit ZetoTokenDeployed(instance); diff --git a/solidity/contracts/lib/interfaces/zeto_fungible_initializable.sol b/solidity/contracts/lib/interfaces/zeto_fungible_initializable.sol index 7812bbf..88996cb 100644 --- a/solidity/contracts/lib/interfaces/zeto_fungible_initializable.sol +++ b/solidity/contracts/lib/interfaces/zeto_fungible_initializable.sol @@ -17,7 +17,7 @@ pragma solidity ^0.8.20; interface IZetoFungibleInitializable { function initialize( - address authority, + address initialOwner, address _depositVerifier, address _withdrawVerifier, address _verifier diff --git a/solidity/contracts/lib/interfaces/zeto_nf_initializable.sol b/solidity/contracts/lib/interfaces/zeto_nf_initializable.sol index 7880b2b..00dd56b 100644 --- a/solidity/contracts/lib/interfaces/zeto_nf_initializable.sol +++ b/solidity/contracts/lib/interfaces/zeto_nf_initializable.sol @@ -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; } diff --git a/solidity/contracts/lib/zeto_base.sol b/solidity/contracts/lib/zeto_base.sol index fa997f4..dd0692b 100644 --- a/solidity/contracts/lib/zeto_base.sol +++ b/solidity/contracts/lib/zeto_base.sol @@ -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 diff --git a/solidity/contracts/lib/zeto_common.sol b/solidity/contracts/lib/zeto_common.sol index 963f204..94826be 100644 --- a/solidity/contracts/lib/zeto_common.sol +++ b/solidity/contracts/lib/zeto_common.sol @@ -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 diff --git a/solidity/contracts/lib/zeto_nullifier.sol b/solidity/contracts/lib/zeto_nullifier.sol index 832bb5f..c442e0e 100644 --- a/solidity/contracts/lib/zeto_nullifier.sol +++ b/solidity/contracts/lib/zeto_nullifier.sol @@ -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); } diff --git a/solidity/contracts/zeto_anon.sol b/solidity/contracts/zeto_anon.sol index d2b51f5..2699edf 100644 --- a/solidity/contracts/zeto_anon.sol +++ b/solidity/contracts/zeto_anon.sol @@ -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; } diff --git a/solidity/contracts/zeto_anon_enc.sol b/solidity/contracts/zeto_anon_enc.sol index 9918916..17e6468 100644 --- a/solidity/contracts/zeto_anon_enc.sol +++ b/solidity/contracts/zeto_anon_enc.sol @@ -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; } diff --git a/solidity/contracts/zeto_anon_enc_nullifier.sol b/solidity/contracts/zeto_anon_enc_nullifier.sol index 35e95ab..96ff6f6 100644 --- a/solidity/contracts/zeto_anon_enc_nullifier.sol +++ b/solidity/contracts/zeto_anon_enc_nullifier.sol @@ -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 diff --git a/solidity/contracts/zeto_anon_enc_nullifier_non_repudiation.sol b/solidity/contracts/zeto_anon_enc_nullifier_non_repudiation.sol index 0e8bfa7..9cc7473 100644 --- a/solidity/contracts/zeto_anon_enc_nullifier_non_repudiation.sol +++ b/solidity/contracts/zeto_anon_enc_nullifier_non_repudiation.sol @@ -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 diff --git a/solidity/contracts/zeto_anon_nullifier.sol b/solidity/contracts/zeto_anon_nullifier.sol index d4d5d34..f6e87e7 100644 --- a/solidity/contracts/zeto_anon_nullifier.sol +++ b/solidity/contracts/zeto_anon_nullifier.sol @@ -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 diff --git a/solidity/contracts/zeto_anon_nullifier_kyc.sol b/solidity/contracts/zeto_anon_nullifier_kyc.sol index 28d329b..84c4434 100644 --- a/solidity/contracts/zeto_anon_nullifier_kyc.sol +++ b/solidity/contracts/zeto_anon_nullifier_kyc.sol @@ -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 diff --git a/solidity/contracts/zeto_nf_anon.sol b/solidity/contracts/zeto_nf_anon.sol index 09f88dc..fdf881a 100644 --- a/solidity/contracts/zeto_nf_anon.sol +++ b/solidity/contracts/zeto_nf_anon.sol @@ -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; } diff --git a/solidity/contracts/zeto_nf_anon_nullifier.sol b/solidity/contracts/zeto_nf_anon_nullifier.sol index 6965e9d..9c33baf 100644 --- a/solidity/contracts/zeto_nf_anon_nullifier.sol +++ b/solidity/contracts/zeto_nf_anon_nullifier.sol @@ -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; }