22pragma solidity ^ 0.8.30 ;
33
44import {IXanV2} from "../interfaces/IXanV2.sol " ;
5+ import {Parameters} from "../libs/Parameters.sol " ;
56import {XanV1} from "../XanV1.sol " ;
67
78/// @notice A draft of the second version of the XAN contract.
@@ -10,7 +11,7 @@ import {XanV1} from "../XanV1.sol";
1011contract XanV2 is IXanV2 , XanV1 {
1112 /// @notice The [ERC-7201](https://eips.ethereum.org/EIPS/eip-7201) storage of the contract.
1213 /// @custom:storage-location erc7201:anoma.storage.Xan.v2
13- /// @param proposedUpgrades The upgrade proposed from a current implementation .
14+ /// @param forwarder The forwarder being allowed to mint more tokens .
1415 struct XanV2Storage {
1516 address forwarder;
1617 }
@@ -28,6 +29,9 @@ contract XanV2 is IXanV2, XanV1 {
2829 _;
2930 }
3031
32+ /// @notice Initializes the proxy.
33+ /// @param initialMintRecipient The initial recipient of the minted tokens.
34+ /// @param xanV2Forwarder The XanV2 forwarder contract.
3135 /// @custom:oz-upgrades-validate-as-initializer
3236 // solhint-disable-next-line comprehensive-interface
3337 function initialize (address initialMintRecipient , address xanV2Forwarder ) external reinitializer (2 ) {
@@ -39,6 +43,7 @@ contract XanV2 is IXanV2, XanV1 {
3943 /// @custom:oz-upgrades-validate-as-initializer
4044 // solhint-disable-next-line comprehensive-interface
4145 function initializeV2 (address xanV2Forwarder ) external reinitializer (2 ) {
46+ // Initialize the XanV2 contract
4247 __XanV2_init ({xanV2Forwarder: xanV2Forwarder});
4348 }
4449
@@ -52,13 +57,16 @@ contract XanV2 is IXanV2, XanV1 {
5257 addr = _getXanV2Storage ().forwarder;
5358 }
5459
60+ /// @notice Initializes the XanV2 contract and newly inherited contracts.
61+ /// @param xanV2Forwarder The XanV2 forwarder contract.
5562 /// @custom:oz-upgrades-unsafe-allow missing-initializer-call
5663 // solhint-disable-next-line func-name-mixedcase
5764 function __XanV2_init (address xanV2Forwarder ) internal onlyInitializing {
5865 __XanV2_init_unchained ({xanV2Forwarder: xanV2Forwarder});
5966 }
6067
61- /// @custom:oz-upgrades-unsafe-allow missing-initializer-call
68+ /// @notice Initializes the XanV2 contract.
69+ /// @param xanV2Forwarder The XanV2 forwarder contract.
6270 // solhint-disable-next-line func-name-mixedcase
6371 function __XanV2_init_unchained (address xanV2Forwarder ) internal onlyInitializing {
6472 _getXanV2Storage ().forwarder = xanV2Forwarder;
0 commit comments