diff --git a/CHANGELOG.md b/CHANGELOG.md
index 952710ba..c2e312d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,27 @@
Please follow conventions.
+## Checklist
+
+> Before a new release, perform the following tasks
+
+- Code: Update the version name in the base core module, variable VERSION
+- Run linter
+
+> npm run-script lint:all:prettier
+
+- Documentation
+ - Perform a code coverage and update the files in the corresponding directory [./doc/general/test/coverage](./doc/general/test/coverage)
+ - Perform an audit with several audit tools (Mythril and Slither), update the report in the corresponding directory [./doc/audits/tools](./doc/audits/tools)
+ - Update surya doc by running the 3 scripts in [./doc/script](./doc/script)
+
+ - Update changelog
+
+## 2.5.1 - 20241003
+
+- Beacon Factory: deploy an implementation inside the constructor if no implementation is provided
+- Run [myhtril](https://github.com/Consensys/mythril)
+
## 2.5.0 - 20240910
- Change Solidity version to 0.8.27 (latest)
diff --git a/README.md b/README.md
index 59b22598..a232bd77 100644
--- a/README.md
+++ b/README.md
@@ -143,7 +143,7 @@ Here is the list of the different version available for each CMTAT version.
| Name | RuleEngine |
| ----------------------- | ------------------------------------------------------------ |
-| CMTAT 2.5.0 (unaudited) | RuleEngine >= [v2.0.3](https://github.com/CMTA/RuleEngine/releases/tag/v2.0.3) |
+| CMTAT 2.5.0 (unaudited) | RuleEngine >= [v2.0.3](https://github.com/CMTA/RuleEngine/releases/tag/v2.0.3) (unaudited) |
| CMTAT 2.4.0 (unaudited) | RuleEngine >=v2.0.0
Last version: [v2.0.2](https://github.com/CMTA/RuleEngine/releases/tag/v2.0.2)(unaudited) |
| CMTAT 2.3.0 | [RuleEngine v1.0.2](https://github.com/CMTA/RuleEngine/releases/tag/v1.0.2) |
| CMTAT 2.0 (unaudited) | [RuleEngine 1.0](https://github.com/CMTA/RuleEngine/releases/tag/1.0) (unaudited) |
@@ -254,6 +254,8 @@ Please see the OpenZeppelin [upgradeable contracts documentation](https://docs.o
Please see the OpenZeppelin [Upgrades plugins](https://docs.openzeppelin.com/upgrades-plugins/1.x/) for more information about plugin upgrades in general.
+CMTAT also implements the [ERC-7201](https://eips.ethereum.org/EIPS/eip-7201) to manage the storage location.
+
Note that deployment via a proxy is not mandatory, but is recommended by CMTA.
### Factory
@@ -324,15 +326,23 @@ The report is available in [ABDK_CMTA_CMTATRuleEngine_v_1_0.pdf](doc/audits/ABDK
### Tools
+#### Slither
+
You will find the report produced by [Slither](https://github.com/crytic/slither) in
| Version | File |
| ------------ | ------------------------------------------------------------ |
-| Last version | [slither-report.md](doc/audits/tools/slither-report.md) |
-| v2.3.0 | [v2.3.0-slither-report.md](doc/audits/tools/v2.3.0-slither-report.md) |
-| v2.3.1 | [v2.3.1-slither-report.md](doc/audits/tools/v2.3.1-slither-report.md) |
-| v2.4.0 | [v2.4.0-slither-report.md](doc/audits/tools/v2.4.0-slither-report.md) |
+| Last version | [slither-report.md](doc/audits/tools/slither//slither-report.md) |
+| v2.3.0 | [v2.3.0-slither-report.md](doc/audits/tools/slither/v2.3.0-slither-report.md) |
+| v2.3.1 | [v2.3.1-slither-report.md](doc/audits/tools/slither/v2.3.1-slither-report.md) |
+| v2.4.0 | [v2.4.0-slither-report.md](doc/audits/tools/slither/v2.4.0-slither-report.md) |
+| v2.5.0 | [v2.5.0-slither-report.md](doc/audits/tools/slither/v2.5.0-slither-report.md) |
+
+#### [Mythril](https://github.com/Consensys/mythril)
+| Version | File |
+| ------------ | ------------------------------------------------------------ |
+| Last version | [mythril-report-standalone.md](doc/audits/tools/mythril/myth_standalone_report.md)
[mythril-report-proxy.md](doc/audits/tools/mythril/myth_proxy_report.md)
|
### Test
diff --git a/contracts/deployment/CMTAT_BEACON_FACTORY.sol b/contracts/deployment/CMTAT_BEACON_FACTORY.sol
index 947c45b9..a9309a91 100644
--- a/contracts/deployment/CMTAT_BEACON_FACTORY.sol
+++ b/contracts/deployment/CMTAT_BEACON_FACTORY.sol
@@ -13,7 +13,6 @@ import "./libraries/CMTATFactoryRoot.sol";
*
*/
contract CMTAT_BEACON_FACTORY is AccessControl, CMTATFactoryRoot {
- // public
UpgradeableBeacon public immutable beacon;
/**
* @param implementation_ contract implementation
@@ -25,7 +24,8 @@ contract CMTAT_BEACON_FACTORY is AccessControl, CMTATFactoryRoot {
revert FactoryErrors.CMTAT_Factory_AddressZeroNotAllowedForBeaconOwner();
}
if(implementation_ == address(0)){
- revert FactoryErrors.CMTAT_Factory_AddressZeroNotAllowedForLogicContract();
+ // Forwarder is the zero address if no implementation provided
+ implementation_ = address(new CMTAT_PROXY(address(0)));
}
beacon = new UpgradeableBeacon(implementation_, beaconOwner);
}
diff --git a/contracts/deployment/CMTAT_TP_FACTORY.sol b/contracts/deployment/CMTAT_TP_FACTORY.sol
index 5a0c9129..8c48df96 100644
--- a/contracts/deployment/CMTAT_TP_FACTORY.sol
+++ b/contracts/deployment/CMTAT_TP_FACTORY.sol
@@ -14,6 +14,11 @@ import "./libraries/CMTATFactoryBase.sol";
*/
contract CMTAT_TP_FACTORY is CMTATFactoryBase {
+ /**
+ * @param logic_ contract implementation, cannot be zero
+ * @param factoryAdmin admin
+ * @param useCustomSalt_ custom salt with create2 or not
+ */
constructor(address logic_, address factoryAdmin, bool useCustomSalt_) CMTATFactoryBase(logic_, factoryAdmin,useCustomSalt_){}
/*//////////////////////////////////////////////////////////////
diff --git a/contracts/deployment/CMTAT_UUPS_FACTORY.sol b/contracts/deployment/CMTAT_UUPS_FACTORY.sol
index 10642f5f..808cc949 100644
--- a/contracts/deployment/CMTAT_UUPS_FACTORY.sol
+++ b/contracts/deployment/CMTAT_UUPS_FACTORY.sol
@@ -14,8 +14,9 @@ import "./libraries/CMTATFactoryBase.sol";
*/
contract CMTAT_UUPS_FACTORY is CMTATFactoryBase {
/**
- * @param logic_ contract implementation
+ * @param logic_ contract implementation, cannot be zero
* @param factoryAdmin admin
+ * @param useCustomSalt_ custom salt with create2 or not
*/
constructor(address logic_, address factoryAdmin, bool useCustomSalt_) CMTATFactoryBase(logic_, factoryAdmin,useCustomSalt_){}
diff --git a/contracts/modules/wrapper/core/BaseModule.sol b/contracts/modules/wrapper/core/BaseModule.sol
index b5bf3275..e24ec686 100644
--- a/contracts/modules/wrapper/core/BaseModule.sol
+++ b/contracts/modules/wrapper/core/BaseModule.sol
@@ -10,7 +10,7 @@ abstract contract BaseModule is AuthorizationModule {
* @notice
* Get the current version of the smart contract
*/
- string public constant VERSION = "2.5.0";
+ string public constant VERSION = "2.5.1";
/* ============ Events ============ */
event Term(string indexed newTermIndexed, string newTerm);
diff --git a/doc/TOOLCHAIN.md b/doc/TOOLCHAIN.md
index 03b64792..8f3a2d56 100644
--- a/doc/TOOLCHAIN.md
+++ b/doc/TOOLCHAIN.md
@@ -206,3 +206,22 @@ Slither is a Solidity static analysis framework written in Python3
slither . --checklist --filter-paths "openzeppelin-contracts-upgradeable|openzeppelin-contracts|@openzeppelin|test" > slither-report.md
```
+
+
+
+
+### [Mythril](https://github.com/Consensys/mythril)
+
+- Standalone
+
+```bash
+myth analyze contracts/CMTAT_STANDALONE.sol --solc-json solc_setting.json > myth_standalone_report.md
+```
+
+- With proxy
+
+```bash
+myth analyze contracts/CMTAT_PROXY.sol --solc-json solc_setting.json > myth_proxy_report.md
+```
+
+File path for `solc` is configured in `solc_setting.json`
diff --git a/doc/USAGE.md b/doc/USAGE.md
index 13999bdf..8aaa98c0 100644
--- a/doc/USAGE.md
+++ b/doc/USAGE.md
@@ -101,3 +101,10 @@ For Solidity:
npm run-script lint:sol
npm run-script lint:sol:fix
```
+
+## Compilation with solc
+
+```bash
+solc --base-path . --include-path ./node_modules/ contracts/CMTAT_STANDALONE.sol
+```
+
diff --git a/doc/audits/tools/mythril/myth_proxy_report.md b/doc/audits/tools/mythril/myth_proxy_report.md
new file mode 100644
index 00000000..086b5039
--- /dev/null
+++ b/doc/audits/tools/mythril/myth_proxy_report.md
@@ -0,0 +1,2 @@
+The analysis was completed successfully. No issues were detected.
+
diff --git a/doc/audits/tools/mythril/myth_standalone_report.md b/doc/audits/tools/mythril/myth_standalone_report.md
new file mode 100644
index 00000000..086b5039
--- /dev/null
+++ b/doc/audits/tools/mythril/myth_standalone_report.md
@@ -0,0 +1,2 @@
+The analysis was completed successfully. No issues were detected.
+
diff --git a/doc/audits/tools/slither/slither-report.md b/doc/audits/tools/slither/slither-report.md
new file mode 100644
index 00000000..0804fd62
--- /dev/null
+++ b/doc/audits/tools/slither/slither-report.md
@@ -0,0 +1,759 @@
+**THIS CHECKLIST IS NOT COMPLETE**. Use `--show-ignored-findings` to show all the results.
+Summary
+ - [incorrect-equality](#incorrect-equality) (2 results) (Medium)
+ - [uninitialized-local](#uninitialized-local) (1 results) (Medium)
+ - [unused-return](#unused-return) (1 results) (Medium)
+ - [shadowing-local](#shadowing-local) (1 results) (Low)
+ - [missing-zero-check](#missing-zero-check) (1 results) (Low)
+ - [calls-loop](#calls-loop) (4 results) (Low)
+ - [timestamp](#timestamp) (5 results) (Low)
+ - [assembly](#assembly) (9 results) (Informational)
+ - [costly-loop](#costly-loop) (1 results) (Informational)
+ - [dead-code](#dead-code) (1 results) (Informational)
+ - [solc-version](#solc-version) (1 results) (Informational)
+ - [naming-convention](#naming-convention) (56 results) (Informational)
+ - [similar-names](#similar-names) (3 results) (Informational)
+ - [too-many-digits](#too-many-digits) (2 results) (Informational)
+## incorrect-equality
+
+> Mock: not intended to be used in production
+
+Impact: Medium
+Confidence: High
+
+ - [ ] ID-0
+ [DocumentEngineMock.removeDocument(bytes32)](contracts/mocks/DocumentEngineMock.sol#L72-L89) uses a dangerous strict equality:
+ - [bytes(documents[name_].uri).length == 0](contracts/mocks/DocumentEngineMock.sol#L73)
+
+contracts/mocks/DocumentEngineMock.sol#L72-L89
+
+
+ - [ ] ID-1
+ [DocumentEngineMock.getDocument(bytes32)](contracts/mocks/DocumentEngineMock.sol#L37-L49) uses a dangerous strict equality:
+ - [bytes(documents[name_].uri).length == 0](contracts/mocks/DocumentEngineMock.sol#L43)
+
+contracts/mocks/DocumentEngineMock.sol#L37-L49
+
+## uninitialized-local
+
+> The concerned variable local `mostRecent` is initialized in the loop
+
+Impact: Medium
+Confidence: Medium
+
+ - [ ] ID-2
+[SnapshotModuleBase._findScheduledMostRecentPastSnapshot().mostRecent](contracts/modules/internal/base/SnapshotModuleBase.sol#L385) is a local variable never initialized
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L385
+
+## unused-return
+
+> Not the case
+
+Impact: Medium
+Confidence: Medium
+
+ - [ ] ID-3
+[DocumentModule.getDocument(bytes32)](contracts/modules/wrapper/extensions/DocumentModule.sol#L74-L81) ignores return value by [$._documentEngine.getDocument(_name)](contracts/modules/wrapper/extensions/DocumentModule.sol#L77)
+
+contracts/modules/wrapper/extensions/DocumentModule.sol#L74-L81
+
+## shadowing-local
+
+> Mock: not intended to be used in production
+
+Impact: Low
+Confidence: High
+
+ - [ ] ID-4
+ [IDebtEngineMock.setCreditEvents(IDebtGlobal.CreditEvents).creditEvents](contracts/mocks/DebtEngineMock.sol#L7) shadows:
+ - [IDebtEngine.creditEvents()](contracts/interfaces/engine/IDebtEngine.sol#L17) (function)
+
+contracts/mocks/DebtEngineMock.sol#L7
+
+## missing-zero-check
+
+> Mock: not intended to be used in production
+
+Impact: Low
+Confidence: Medium
+
+ - [ ] ID-5
+ [AuthorizationEngineMock.authorizeAdminChange(address).newAdmin](contracts/mocks/AuthorizationEngineMock.sol#L22) lacks a zero-check on :
+ - [nextAdmin = newAdmin](contracts/mocks/AuthorizationEngineMock.sol#L23)
+
+contracts/mocks/AuthorizationEngineMock.sol#L22
+
+## calls-loop
+
+> ValidationModuleInternal: Acknowledge
+>
+> Mock: not intended to be used in production
+> ValidationModuleInternal: the loop happens only for batch function. A relevant alternative could be the creation of a batch function for the RuleEngine, but for the moment we don't have an implemented solution.
+
+
+
+Impact: Low
+Confidence: Medium
+ - [ ] ID-6
+[RuleEngineMock.messageForTransferRestriction(uint8)](contracts/mocks/RuleEngine/RuleEngineMock.sol#L83-L97) has external calls inside a loop: [_rules[i].canReturnTransferRestrictionCode(_restrictionCode)](contracts/mocks/RuleEngine/RuleEngineMock.sol#L88)
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L83-L97
+
+
+ - [ ] ID-7
+[RuleEngineMock.messageForTransferRestriction(uint8)](contracts/mocks/RuleEngine/RuleEngineMock.sol#L83-L97) has external calls inside a loop: [_rules[i].messageForTransferRestriction(_restrictionCode)](contracts/mocks/RuleEngine/RuleEngineMock.sol#L89-L90)
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L83-L97
+
+
+ - [ ] ID-8
+[ValidationModuleInternal._operateOnTransfer(address,address,uint256)](contracts/modules/internal/ValidationModuleInternal.sol#L89-L92) has external calls inside a loop: [$._ruleEngine.operateOnTransfer(from,to,amount)](contracts/modules/internal/ValidationModuleInternal.sol#L91)
+
+contracts/modules/internal/ValidationModuleInternal.sol#L89-L92
+
+
+ - [ ] ID-9
+[RuleEngineMock.detectTransferRestriction(address,address,uint256)](contracts/mocks/RuleEngine/RuleEngineMock.sol#L39-L59) has external calls inside a loop: [restriction = _rules[i].detectTransferRestriction(_from,_to,_amount)](contracts/mocks/RuleEngine/RuleEngineMock.sol#L46-L50)
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L39-L59
+
+## timestamp
+
+> With the Proof of Work, it was possible for a miner to modify the timestamp in a range of about 15 seconds
+>
+> With the Proof Of Stake, a new block is created every 12 seconds
+>
+> In all cases, we are not looking for such precision
+
+Impact: Low
+Confidence: Medium
+
+ - [ ] ID-10
+ [SnapshotModuleBase._findScheduledMostRecentPastSnapshot()](contracts/modules/internal/base/SnapshotModuleBase.sol#L370-L398) uses timestamp for comparisons
+ Dangerous comparisons:
+ - [$._scheduledSnapshots[i] <= block.timestamp](contracts/modules/internal/base/SnapshotModuleBase.sol#L389)
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L370-L398
+
+
+ - [ ] ID-11
+ [DocumentEngineMock.getDocument(bytes32)](contracts/mocks/DocumentEngineMock.sol#L37-L49) uses timestamp for comparisons
+ Dangerous comparisons:
+ - [bytes(documents[name_].uri).length == 0](contracts/mocks/DocumentEngineMock.sol#L43)
+
+contracts/mocks/DocumentEngineMock.sol#L37-L49
+
+
+ - [ ] ID-12
+ [SnapshotModuleBase._checkTimeSnapshotAlreadyDone(uint256)](contracts/modules/internal/base/SnapshotModuleBase.sol#L420-L424) uses timestamp for comparisons
+ Dangerous comparisons:
+ - [time <= block.timestamp](contracts/modules/internal/base/SnapshotModuleBase.sol#L421)
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L420-L424
+
+
+ - [ ] ID-13
+ [SnapshotModuleBase._checkTimeInThePast(uint256)](contracts/modules/internal/base/SnapshotModuleBase.sol#L412-L419) uses timestamp for comparisons
+ Dangerous comparisons:
+ - [time <= block.timestamp](contracts/modules/internal/base/SnapshotModuleBase.sol#L413)
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L412-L419
+
+
+ - [ ] ID-14
+ [DocumentEngineMock.removeDocument(bytes32)](contracts/mocks/DocumentEngineMock.sol#L72-L89) uses timestamp for comparisons
+ Dangerous comparisons:
+ - [bytes(documents[name_].uri).length == 0](contracts/mocks/DocumentEngineMock.sol#L73)
+
+contracts/mocks/DocumentEngineMock.sol#L72-L89
+
+## assembly
+
+> use to implement ERC-7201
+
+Impact: Informational
+Confidence: High
+
+ - [ ] ID-15
+ [AuthorizationModule._getAuthorizationModuleStorage()](contracts/modules/security/AuthorizationModule.sol#L114-L118) uses assembly
+ - [INLINE ASM](contracts/modules/security/AuthorizationModule.sol#L115-L117)
+
+contracts/modules/security/AuthorizationModule.sol#L114-L118
+
+
+ - [ ] ID-16
+ [EnforcementModuleInternal._getEnforcementModuleInternalStorage()](contracts/modules/internal/EnforcementModuleInternal.sol#L112-L116) uses assembly
+ - [INLINE ASM](contracts/modules/internal/EnforcementModuleInternal.sol#L113-L115)
+
+contracts/modules/internal/EnforcementModuleInternal.sol#L112-L116
+
+
+ - [ ] ID-17
+ [ValidationModuleInternal._getValidationModuleInternalStorage()](contracts/modules/internal/ValidationModuleInternal.sol#L96-L100) uses assembly
+ - [INLINE ASM](contracts/modules/internal/ValidationModuleInternal.sol#L97-L99)
+
+contracts/modules/internal/ValidationModuleInternal.sol#L96-L100
+
+
+ - [ ] ID-18
+ [SnapshotModuleBase._getSnapshotModuleBaseStorage()](contracts/modules/internal/base/SnapshotModuleBase.sol#L427-L431) uses assembly
+ - [INLINE ASM](contracts/modules/internal/base/SnapshotModuleBase.sol#L428-L430)
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L427-L431
+
+
+ - [ ] ID-19
+ [DocumentModule._getDocumentModuleStorage()](contracts/modules/wrapper/extensions/DocumentModule.sol#L96-L100) uses assembly
+ - [INLINE ASM](contracts/modules/wrapper/extensions/DocumentModule.sol#L97-L99)
+
+contracts/modules/wrapper/extensions/DocumentModule.sol#L96-L100
+
+
+ - [ ] ID-20
+ [PauseModule._getPauseModuleStorage()](contracts/modules/wrapper/core/PauseModule.sol#L104-L108) uses assembly
+ - [INLINE ASM](contracts/modules/wrapper/core/PauseModule.sol#L105-L107)
+
+contracts/modules/wrapper/core/PauseModule.sol#L104-L108
+
+
+ - [ ] ID-21
+ [DebtModule._getDebtModuleStorage()](contracts/modules/wrapper/extensions/DebtModule.sol#L94-L98) uses assembly
+ - [INLINE ASM](contracts/modules/wrapper/extensions/DebtModule.sol#L95-L97)
+
+contracts/modules/wrapper/extensions/DebtModule.sol#L94-L98
+
+
+ - [ ] ID-22
+ [BaseModule._getBaseModuleStorage()](contracts/modules/wrapper/core/BaseModule.sol#L108-L112) uses assembly
+ - [INLINE ASM](contracts/modules/wrapper/core/BaseModule.sol#L109-L111)
+
+contracts/modules/wrapper/core/BaseModule.sol#L108-L112
+
+
+ - [ ] ID-23
+ [ERC20BaseModule._getERC20BaseModuleStorage()](contracts/modules/wrapper/core/ERC20BaseModule.sol#L134-L138) uses assembly
+ - [INLINE ASM](contracts/modules/wrapper/core/ERC20BaseModule.sol#L135-L137)
+
+contracts/modules/wrapper/core/ERC20BaseModule.sol#L134-L138
+
+## costly-loop
+
+> Acknowledge
+>
+> Mocks are not destined to be used in production
+
+
+
+Impact: Informational
+Confidence: Medium
+
+ - [ ] ID-24
+ [DocumentEngineMock.removeDocument(bytes32)](contracts/mocks/DocumentEngineMock.sol#L72-L89) has costly operations inside a loop:
+ - [documentNames.pop()](contracts/mocks/DocumentEngineMock.sol#L83)
+
+contracts/mocks/DocumentEngineMock.sol#L72-L89
+
+## dead-code
+
+> - Implemented to be gasless compatible (see MetaTxModule)
+>
+> - If we remove this function, we will have the following error:
+>
+> "Derived contract must override function "_msgData". Two or more base classes define function with same name and parameter types."
+
+Impact: Informational
+Confidence: Medium
+
+ - [ ] ID-25
+[CMTAT_BASE._msgData()](contracts/modules/CMTAT_BASE.sol#L232-L239) is never used and should be removed
+
+contracts/modules/CMTAT_BASE.sol#L232-L239
+
+## solc-version
+
+> The version set in the config file is 0.8.27
+
+Impact: Informational
+Confidence: High
+ - [ ] ID-26
+ Version constraint ^0.8.20 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)
+ - VerbatimInvalidDeduplication
+ - FullInlinerNonExpressionSplitArgumentEvaluationOrder
+ - MissingSideEffectsOnSelectorAccess.
+ It is used by:
+ - node_modules/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/metatx/ERC2771ContextUpgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/metatx/ERC2771ForwarderUpgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol#3
+ - node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol#4
+ - node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol#4
+ - node_modules/@openzeppelin/contracts/access/AccessControl.sol#4
+ - node_modules/@openzeppelin/contracts/access/IAccessControl.sol#4
+ - node_modules/@openzeppelin/contracts/access/Ownable.sol#4
+ - node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol#4
+ - node_modules/@openzeppelin/contracts/interfaces/IERC5267.sol#4
+ - node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol#4
+ - node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol#3
+ - node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/Proxy.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol#4
+ - node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol#4
+ - node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol#4
+ - node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol#4
+ - node_modules/@openzeppelin/contracts/utils/Address.sol#4
+ - node_modules/@openzeppelin/contracts/utils/Arrays.sol#4
+ - node_modules/@openzeppelin/contracts/utils/Context.sol#4
+ - node_modules/@openzeppelin/contracts/utils/Create2.sol#4
+ - node_modules/@openzeppelin/contracts/utils/StorageSlot.sol#5
+ - node_modules/@openzeppelin/contracts/utils/Strings.sol#4
+ - node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol#4
+ - node_modules/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol#4
+ - node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol#4
+ - node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol#4
+ - node_modules/@openzeppelin/contracts/utils/math/Math.sol#4
+ - node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol#4
+ - contracts/CMTAT_PROXY.sol#3
+ - contracts/CMTAT_PROXY_UUPS.sol#3
+ - contracts/CMTAT_STANDALONE.sol#3
+ - contracts/deployment/CMTAT_BEACON_FACTORY.sol#2
+ - contracts/deployment/CMTAT_TP_FACTORY.sol#2
+ - contracts/deployment/CMTAT_UUPS_FACTORY.sol#2
+ - contracts/deployment/libraries/CMTATFactoryBase.sol#2
+ - contracts/deployment/libraries/CMTATFactoryInvariant.sol#2
+ - contracts/deployment/libraries/CMTATFactoryRoot.sol#2
+ - contracts/interfaces/ICCIPToken.sol#3
+ - contracts/interfaces/ICMTATConstructor.sol#2
+ - contracts/interfaces/ICMTATSnapshot.sol#3
+ - contracts/interfaces/draft-IERC1404/draft-IERC1404.sol#3
+ - contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol#3
+ - contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol#3
+ - contracts/interfaces/engine/IAuthorizationEngine.sol#3
+ - contracts/interfaces/engine/IDebtEngine.sol#3
+ - contracts/interfaces/engine/IDebtGlobal.sol#3
+ - contracts/interfaces/engine/IRuleEngine.sol#3
+ - contracts/interfaces/engine/draft-IERC1643.sol#3
+ - contracts/libraries/Errors.sol#3
+ - contracts/libraries/FactoryErrors.sol#3
+ - contracts/mocks/AuthorizationEngineMock.sol#3
+ - contracts/mocks/DebtEngineMock.sol#3
+ - contracts/mocks/DocumentEngineMock.sol#3
+ - contracts/mocks/MinimalForwarderMock.sol#3
+ - contracts/mocks/RuleEngine/CodeList.sol#3
+ - contracts/mocks/RuleEngine/RuleEngineMock.sol#3
+ - contracts/mocks/RuleEngine/RuleMock.sol#3
+ - contracts/mocks/RuleEngine/interfaces/IRule.sol#3
+ - contracts/mocks/RuleEngine/interfaces/IRuleEngineMock.sol#3
+ - contracts/modules/CMTAT_BASE.sol#3
+ - contracts/modules/internal/ERC20SnapshotModuleInternal.sol#3
+ - contracts/modules/internal/EnforcementModuleInternal.sol#3
+ - contracts/modules/internal/ValidationModuleInternal.sol#3
+ - contracts/modules/internal/base/SnapshotModuleBase.sol#3
+ - contracts/modules/security/AuthorizationModule.sol#3
+ - contracts/modules/wrapper/controllers/ValidationModule.sol#3
+ - contracts/modules/wrapper/core/BaseModule.sol#3
+ - contracts/modules/wrapper/core/ERC20BaseModule.sol#3
+ - contracts/modules/wrapper/core/ERC20BurnModule.sol#3
+ - contracts/modules/wrapper/core/ERC20MintModule.sol#3
+ - contracts/modules/wrapper/core/EnforcementModule.sol#3
+ - contracts/modules/wrapper/core/PauseModule.sol#3
+ - contracts/modules/wrapper/extensions/DebtModule.sol#3
+ - contracts/modules/wrapper/extensions/DocumentModule.sol#3
+ - contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#3
+ - contracts/modules/wrapper/extensions/MetaTxModule.sol#3
+ - contracts/test/proxy/CMTAT_PROXY_TEST.sol#3
+ - contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol#3
+
+## naming-convention
+
+> It is not really necessary to rename all the variables. It will generate a lot of work for a minor improvement.
+
+Impact: Informational
+Confidence: High
+ - [ ] ID-27
+Contract [CMTAT_PROXY_UUPS](contracts/CMTAT_PROXY_UUPS.sol#L11-L54) is not in CapWords
+
+contracts/CMTAT_PROXY_UUPS.sol#L11-L54
+
+
+ - [ ] ID-28
+Enum [IERC1404EnumCode.REJECTED_CODE_BASE](contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol#L9-L14) is not in CapWords
+
+contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol#L9-L14
+
+
+ - [ ] ID-29
+Constant [EnforcementModuleInternal.EnforcementModuleInternalStorageLocation](contracts/modules/internal/EnforcementModuleInternal.sol#L41) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/internal/EnforcementModuleInternal.sol#L41
+
+
+ - [ ] ID-30
+Function [CMTATFactoryRoot.CMTATProxyAddress(uint256)](contracts/deployment/libraries/CMTATFactoryRoot.sol#L45-L47) is not in mixedCase
+
+contracts/deployment/libraries/CMTATFactoryRoot.sol#L45-L47
+
+
+ - [ ] ID-31
+Parameter [RuleEngineMock.detectTransferRestriction(address,address,uint256)._amount](contracts/mocks/RuleEngine/RuleEngineMock.sol#L42) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L42
+
+
+ - [ ] ID-32
+Constant [PauseModule.PauseModuleStorageLocation](contracts/modules/wrapper/core/PauseModule.sol#L28) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/wrapper/core/PauseModule.sol#L28
+
+
+ - [ ] ID-33
+Contract [CMTAT_UUPS_FACTORY](contracts/deployment/CMTAT_UUPS_FACTORY.sol#L15-L93) is not in CapWords
+
+contracts/deployment/CMTAT_UUPS_FACTORY.sol#L15-L93
+
+
+ - [ ] ID-34
+Contract [CMTAT_PROXY](contracts/CMTAT_PROXY.sol#L11-L23) is not in CapWords
+
+contracts/CMTAT_PROXY.sol#L11-L23
+
+
+ - [ ] ID-35
+Function [PauseModule.__PauseModule_init_unchained()](contracts/modules/wrapper/core/PauseModule.sol#L34-L36) is not in mixedCase
+
+contracts/modules/wrapper/core/PauseModule.sol#L34-L36
+
+
+ - [ ] ID-36
+Function [BaseModule.__Base_init_unchained(string,string,string)](contracts/modules/wrapper/core/BaseModule.sol#L40-L49) is not in mixedCase
+
+contracts/modules/wrapper/core/BaseModule.sol#L40-L49
+
+
+ - [ ] ID-37
+Function [EnforcementModuleInternal.__Enforcement_init_unchained()](contracts/modules/internal/EnforcementModuleInternal.sol#L53-L55) is not in mixedCase
+
+contracts/modules/internal/EnforcementModuleInternal.sol#L53-L55
+
+
+ - [ ] ID-38
+Struct [CMTATFactoryInvariant.CMTAT_ARGUMENT](contracts/deployment/libraries/CMTATFactoryInvariant.sol#L13-L18) is not in CapWords
+
+contracts/deployment/libraries/CMTATFactoryInvariant.sol#L13-L18
+
+
+ - [ ] ID-39
+Function [ERC20BurnModule.__ERC20BurnModule_init_unchained()](contracts/modules/wrapper/core/ERC20BurnModule.sol#L32-L34) is not in mixedCase
+
+contracts/modules/wrapper/core/ERC20BurnModule.sol#L32-L34
+
+
+ - [ ] ID-40
+Function [ValidationModuleInternal.__Validation_init_unchained(IRuleEngine)](contracts/modules/internal/ValidationModuleInternal.sol#L30-L38) is not in mixedCase
+
+contracts/modules/internal/ValidationModuleInternal.sol#L30-L38
+
+
+ - [ ] ID-41
+Constant [ValidationModuleInternal.ValidationModuleInternalStorageLocation](contracts/modules/internal/ValidationModuleInternal.sol#L24) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/internal/ValidationModuleInternal.sol#L24
+
+
+ - [ ] ID-42
+Contract [CMTAT_STANDALONE](contracts/CMTAT_STANDALONE.sol#L11-L37) is not in CapWords
+
+contracts/CMTAT_STANDALONE.sol#L11-L37
+
+
+ - [ ] ID-43
+Parameter [RuleEngineMock.operateOnTransfer(address,address,uint256)._to](contracts/mocks/RuleEngine/RuleEngineMock.sol#L74) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L74
+
+
+ - [ ] ID-44
+Parameter [RuleEngineMock.validateTransfer(address,address,uint256)._amount](contracts/mocks/RuleEngine/RuleEngineMock.sol#L64) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L64
+
+
+ - [ ] ID-45
+Parameter [RuleEngineMock.operateOnTransfer(address,address,uint256)._from](contracts/mocks/RuleEngine/RuleEngineMock.sol#L73) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L73
+
+
+ - [ ] ID-46
+Parameter [RuleMock.validateTransfer(address,address,uint256)._to](contracts/mocks/RuleEngine/RuleMock.sol#L15) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleMock.sol#L15
+
+
+ - [ ] ID-47
+Parameter [RuleEngineMock.operateOnTransfer(address,address,uint256)._amount](contracts/mocks/RuleEngine/RuleEngineMock.sol#L75) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L75
+
+
+ - [ ] ID-48
+Parameter [RuleMock.canReturnTransferRestrictionCode(uint8)._restrictionCode](contracts/mocks/RuleEngine/RuleMock.sol#L36) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleMock.sol#L36
+
+
+ - [ ] ID-49
+Function [DebtModule.__DebtModule_init_unchained(IDebtEngine)](contracts/modules/wrapper/extensions/DebtModule.sol#L41-L50) is not in mixedCase
+
+contracts/modules/wrapper/extensions/DebtModule.sol#L41-L50
+
+
+ - [ ] ID-50
+Parameter [RuleEngineMock.validateTransfer(address,address,uint256)._to](contracts/mocks/RuleEngine/RuleEngineMock.sol#L63) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L63
+
+
+ - [ ] ID-51
+Function [DocumentModule.__DocumentModule_init_unchained(IERC1643)](contracts/modules/wrapper/extensions/DocumentModule.sol#L41-L48) is not in mixedCase
+
+contracts/modules/wrapper/extensions/DocumentModule.sol#L41-L48
+
+
+ - [ ] ID-52
+Parameter [DocumentModule.getDocument(bytes32)._name](contracts/modules/wrapper/extensions/DocumentModule.sol#L74) is not in mixedCase
+
+contracts/modules/wrapper/extensions/DocumentModule.sol#L74
+
+
+ - [ ] ID-53
+Constant [SnapshotModuleBase.SnapshotModuleBaseStorageLocation](contracts/modules/internal/base/SnapshotModuleBase.sol#L45) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L45
+
+
+ - [ ] ID-54
+Function [AuthorizationModule.__AuthorizationModule_init_unchained(address,IAuthorizationEngine)](contracts/modules/security/AuthorizationModule.sol#L30-L41) is not in mixedCase
+
+contracts/modules/security/AuthorizationModule.sol#L30-L41
+
+
+ - [ ] ID-55
+Function [CMTAT_BASE.__CMTAT_init(address,ICMTATConstructor.ERC20Attributes,ICMTATConstructor.BaseModuleAttributes,ICMTATConstructor.Engine)](contracts/modules/CMTAT_BASE.sol#L77-L129) is not in mixedCase
+
+contracts/modules/CMTAT_BASE.sol#L77-L129
+
+
+ - [ ] ID-56
+Constant [ERC20BaseModule.ERC20BaseModuleStorageLocation](contracts/modules/wrapper/core/ERC20BaseModule.sol#L26) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/wrapper/core/ERC20BaseModule.sol#L26
+
+
+ - [ ] ID-57
+Parameter [RuleEngineMock.validateTransfer(address,address,uint256)._from](contracts/mocks/RuleEngine/RuleEngineMock.sol#L62) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L62
+
+
+ - [ ] ID-58
+Parameter [RuleMock.validateTransfer(address,address,uint256)._amount](contracts/mocks/RuleEngine/RuleMock.sol#L16) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleMock.sol#L16
+
+
+ - [ ] ID-59
+Parameter [CMTAT_PROXY_UUPS.initialize(address,ICMTATConstructor.ERC20Attributes,ICMTATConstructor.BaseModuleAttributes,ICMTATConstructor.Engine).ERC20Attributes_](contracts/CMTAT_PROXY_UUPS.sol#L39) is not in mixedCase
+
+contracts/CMTAT_PROXY_UUPS.sol#L39
+
+
+ - [ ] ID-60
+Parameter [CMTAT_BASE.initialize(address,ICMTATConstructor.ERC20Attributes,ICMTATConstructor.BaseModuleAttributes,ICMTATConstructor.Engine).ERC20Attributes_](contracts/modules/CMTAT_BASE.sol#L61) is not in mixedCase
+
+contracts/modules/CMTAT_BASE.sol#L61
+
+
+ - [ ] ID-61
+Function [CMTAT_BASE.__CMTAT_init_unchained()](contracts/modules/CMTAT_BASE.sol#L131-L133) is not in mixedCase
+
+contracts/modules/CMTAT_BASE.sol#L131-L133
+
+
+ - [ ] ID-62
+Constant [DocumentModule.DocumentModuleStorageLocation](contracts/modules/wrapper/extensions/DocumentModule.sol#L27) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/wrapper/extensions/DocumentModule.sol#L27
+
+
+ - [ ] ID-63
+Parameter [RuleMock.detectTransferRestriction(address,address,uint256)._amount](contracts/mocks/RuleEngine/RuleMock.sol#L27) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleMock.sol#L27
+
+
+ - [ ] ID-64
+Function [ERC20BaseModule.__ERC20BaseModule_init_unchained(uint8)](contracts/modules/wrapper/core/ERC20BaseModule.sol#L39-L44) is not in mixedCase
+
+contracts/modules/wrapper/core/ERC20BaseModule.sol#L39-L44
+
+
+ - [ ] ID-65
+Parameter [RuleMock.messageForTransferRestriction(uint8)._restrictionCode](contracts/mocks/RuleEngine/RuleMock.sol#L42) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleMock.sol#L42
+
+
+ - [ ] ID-66
+Constant [AuthorizationModule.AuthorizationModuleStorageLocation](contracts/modules/security/AuthorizationModule.sol#L17) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/security/AuthorizationModule.sol#L17
+
+
+ - [ ] ID-67
+Function [ERC20MintModule.__ERC20MintModule_init_unchained()](contracts/modules/wrapper/core/ERC20MintModule.sol#L27-L29) is not in mixedCase
+
+contracts/modules/wrapper/core/ERC20MintModule.sol#L27-L29
+
+
+ - [ ] ID-68
+Parameter [RuleEngineMock.detectTransferRestriction(address,address,uint256)._to](contracts/mocks/RuleEngine/RuleEngineMock.sol#L41) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L41
+
+
+ - [ ] ID-69
+Constant [BaseModule.BaseModuleStorageLocation](contracts/modules/wrapper/core/BaseModule.sol#L25) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/wrapper/core/BaseModule.sol#L25
+
+
+ - [ ] ID-70
+Function [SnapshotModuleBase.__SnapshotModuleBase_init_unchained()](contracts/modules/internal/base/SnapshotModuleBase.sol#L70-L73) is not in mixedCase
+
+contracts/modules/internal/base/SnapshotModuleBase.sol#L70-L73
+
+
+ - [ ] ID-71
+Contract [CMTAT_BEACON_FACTORY](contracts/deployment/CMTAT_BEACON_FACTORY.sol#L15-L110) is not in CapWords
+
+contracts/deployment/CMTAT_BEACON_FACTORY.sol#L15-L110
+
+
+ - [ ] ID-72
+Parameter [CMTAT_BASE.__CMTAT_init(address,ICMTATConstructor.ERC20Attributes,ICMTATConstructor.BaseModuleAttributes,ICMTATConstructor.Engine).ERC20Attributes_](contracts/modules/CMTAT_BASE.sol#L79) is not in mixedCase
+
+contracts/modules/CMTAT_BASE.sol#L79
+
+
+ - [ ] ID-73
+Contract [CMTAT_BASE](contracts/modules/CMTAT_BASE.sol#L29-L240) is not in CapWords
+
+contracts/modules/CMTAT_BASE.sol#L29-L240
+
+
+ - [ ] ID-74
+Parameter [RuleEngineMock.messageForTransferRestriction(uint8)._restrictionCode](contracts/mocks/RuleEngine/RuleEngineMock.sol#L84) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L84
+
+
+ - [ ] ID-75
+Function [ValidationModule.__ValidationModule_init_unchained()](contracts/modules/wrapper/controllers/ValidationModule.sol#L28-L30) is not in mixedCase
+
+contracts/modules/wrapper/controllers/ValidationModule.sol#L28-L30
+
+
+ - [ ] ID-76
+Parameter [RuleEngineMock.detectTransferRestriction(address,address,uint256)._from](contracts/mocks/RuleEngine/RuleEngineMock.sol#L40) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleEngineMock.sol#L40
+
+
+ - [ ] ID-77
+Constant [DebtModule.DebtModuleStorageLocation](contracts/modules/wrapper/extensions/DebtModule.sol#L20) is not in UPPER_CASE_WITH_UNDERSCORES
+
+contracts/modules/wrapper/extensions/DebtModule.sol#L20
+
+
+ - [ ] ID-78
+Function [ERC20SnapshotModule.__ERC20SnasphotModule_init_unchained()](contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L22-L24) is not in mixedCase
+
+contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol#L22-L24
+
+
+ - [ ] ID-79
+Function [EnforcementModule.__EnforcementModule_init_unchained()](contracts/modules/wrapper/core/EnforcementModule.sol#L27-L29) is not in mixedCase
+
+contracts/modules/wrapper/core/EnforcementModule.sol#L27-L29
+
+
+ - [ ] ID-80
+Function [ERC20SnapshotModuleInternal.__ERC20Snapshot_init_unchained()](contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L21-L24) is not in mixedCase
+
+contracts/modules/internal/ERC20SnapshotModuleInternal.sol#L21-L24
+
+
+ - [ ] ID-81
+Contract [CMTAT_TP_FACTORY](contracts/deployment/CMTAT_TP_FACTORY.sol#L15-L98) is not in CapWords
+
+contracts/deployment/CMTAT_TP_FACTORY.sol#L15-L98
+
+
+ - [ ] ID-82
+Parameter [RuleMock.validateTransfer(address,address,uint256)._from](contracts/mocks/RuleEngine/RuleMock.sol#L14) is not in mixedCase
+
+contracts/mocks/RuleEngine/RuleMock.sol#L14
+
+## similar-names
+
+> Acknowledge
+
+Impact: Informational
+Confidence: Medium
+
+ - [ ] ID-83
+Variable [IERC1643Whole.setDocument(bytes32,string,bytes32)._documentHash](contracts/mocks/DocumentEngineMock.sol#L8) is too similar to [DocumentEngineMock.setDocument(bytes32,string,bytes32).documentHash_](contracts/mocks/DocumentEngineMock.sol#L55)
+
+contracts/mocks/DocumentEngineMock.sol#L8
+
+
+ - [ ] ID-84
+Variable [CMTAT_BEACON_FACTORY._getBytecode(CMTATFactoryInvariant.CMTAT_ARGUMENT)._implementation](contracts/deployment/CMTAT_BEACON_FACTORY.sol#L100-L106) is too similar to [CMTAT_BEACON_FACTORY.constructor(address,address,address,bool).implementation_](contracts/deployment/CMTAT_BEACON_FACTORY.sol#L22)
+
+contracts/deployment/CMTAT_BEACON_FACTORY.sol#L100-L106
+
+
+ - [ ] ID-85
+Variable [DebtEngineMock._creditEvents](contracts/mocks/DebtEngineMock.sol#L15) is too similar to [DebtEngineMock.setCreditEvents(IDebtGlobal.CreditEvents).creditEvents_](contracts/mocks/DebtEngineMock.sol#L29)
+
+contracts/mocks/DebtEngineMock.sol#L15
+
+## too-many-digits
+
+> Don't understand
+
+Impact: Informational
+Confidence: Medium
+ - [ ] ID-86
+ [CMTAT_TP_FACTORY._getBytecode(address,CMTATFactoryInvariant.CMTAT_ARGUMENT)](contracts/deployment/CMTAT_TP_FACTORY.sol#L85-L96) uses literals with too many digits:
+ - [bytecode = abi.encodePacked(type()(TransparentUpgradeableProxy).creationCode,abi.encode(logic,proxyAdminOwner,implementation))](contracts/deployment/CMTAT_TP_FACTORY.sol#L95)
+
+contracts/deployment/CMTAT_TP_FACTORY.sol#L85-L96
+
+
+ - [ ] ID-87
+ [CMTAT_BEACON_FACTORY._getBytecode(CMTATFactoryInvariant.CMTAT_ARGUMENT)](contracts/deployment/CMTAT_BEACON_FACTORY.sol#L97-L108) uses literals with too many digits:
+ - [bytecode = abi.encodePacked(type()(BeaconProxy).creationCode,abi.encode(address(beacon),_implementation))](contracts/deployment/CMTAT_BEACON_FACTORY.sol#L107)
+
+contracts/deployment/CMTAT_BEACON_FACTORY.sol#L97-L108
+
diff --git a/doc/audits/tools/v2.3.0-slither-report.md b/doc/audits/tools/slither/v2.3.0-slither-report.md
similarity index 100%
rename from doc/audits/tools/v2.3.0-slither-report.md
rename to doc/audits/tools/slither/v2.3.0-slither-report.md
diff --git a/doc/audits/tools/v2.3.1-slither-report.md b/doc/audits/tools/slither/v2.3.1-slither-report.md
similarity index 100%
rename from doc/audits/tools/v2.3.1-slither-report.md
rename to doc/audits/tools/slither/v2.3.1-slither-report.md
diff --git a/doc/audits/tools/slither-report-v2.4.0.md b/doc/audits/tools/slither/v2.4.0-slither-report.md
similarity index 100%
rename from doc/audits/tools/slither-report-v2.4.0.md
rename to doc/audits/tools/slither/v2.4.0-slither-report.md
diff --git a/doc/audits/tools/slither-report.md b/doc/audits/tools/slither/v2.5.0-slither-report.md
similarity index 100%
rename from doc/audits/tools/slither-report.md
rename to doc/audits/tools/slither/v2.5.0-slither-report.md
diff --git a/doc/general/test/coverage/contracts/CMTAT_PROXY.sol.html b/doc/general/test/coverage/contracts/CMTAT_PROXY.sol.html
index c1f44cd5..9ed16b05 100644
--- a/doc/general/test/coverage/contracts/CMTAT_PROXY.sol.html
+++ b/doc/general/test/coverage/contracts/CMTAT_PROXY.sol.html
@@ -65,7 +65,9 @@
20
21
22
-23
+23
+24 |
+
@@ -93,6 +95,7 @@
import "./modules/CMTAT_BASE.sol";
+
/**
* @title CMTAT version for a proxy deployment (Transparent or Beacon proxy)
*/
@@ -115,7 +118,7 @@
diff --git a/doc/general/test/coverage/contracts/CMTAT_PROXY_UUPS.sol.html b/doc/general/test/coverage/contracts/CMTAT_PROXY_UUPS.sol.html
index 215b7b65..fdef59e1 100644
--- a/doc/general/test/coverage/contracts/CMTAT_PROXY_UUPS.sol.html
+++ b/doc/general/test/coverage/contracts/CMTAT_PROXY_UUPS.sol.html
@@ -96,7 +96,9 @@
51
52
53
-54 |
+54
+55 |
+
@@ -155,6 +157,7 @@
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "./modules/CMTAT_BASE.sol";
+
/**
* @title CMTAT version for a proxy deployment with UUPS proxy
*/
@@ -208,7 +211,7 @@
diff --git a/doc/general/test/coverage/contracts/CMTAT_STANDALONE.sol.html b/doc/general/test/coverage/contracts/CMTAT_STANDALONE.sol.html
index 8ba53413..a2fdbad4 100644
--- a/doc/general/test/coverage/contracts/CMTAT_STANDALONE.sol.html
+++ b/doc/general/test/coverage/contracts/CMTAT_STANDALONE.sol.html
@@ -79,7 +79,9 @@
34
35
36
-37 |
+37
+38 |
+
@@ -121,6 +123,7 @@
import "./modules/CMTAT_BASE.sol";
+
/**
* @title CMTAT version for a standalone deployment (without proxy)
*/
@@ -157,7 +160,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html b/doc/general/test/coverage/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html
index 8258d70f..c1c3d8e0 100644
--- a/doc/general/test/coverage/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html
+++ b/doc/general/test/coverage/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html
@@ -173,11 +173,11 @@
-
-8×
+7×
1×
-7×
+6×
+
1×
6×
@@ -195,12 +195,12 @@
-2×
-2×
+3×
+3×
-2×
-2×
+3×
+3×
@@ -234,13 +234,13 @@
-2×
-2×
-2×
-2×
-2×
-2×
-2×
+3×
+3×
+3×
+3×
+3×
+3×
+3×
@@ -250,14 +250,14 @@
-4×
+5×
-4×
+5×
| //SPDX-License-Identifier: MPL-2.0
pragma solidity ^0.8.20;
@@ -274,7 +274,6 @@
*
*/
contract CMTAT_BEACON_FACTORY is AccessControl, CMTATFactoryRoot {
- // public
UpgradeableBeacon public immutable beacon;
/**
* @param implementation_ contract implementation
@@ -286,7 +285,8 @@
revert FactoryErrors.CMTAT_Factory_AddressZeroNotAllowedForBeaconOwner();
}
if(implementation_ == address(0)){
- revert FactoryErrors.CMTAT_Factory_AddressZeroNotAllowedForLogicContract();
+ // Forwarder is the zero address if no implementation provided
+ implementation_ = address(new CMTAT_PROXY(address(0)));
}
beacon = new UpgradeableBeacon(implementation_, beaconOwner);
}
@@ -373,7 +373,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/CMTAT_TP_FACTORY.sol.html b/doc/general/test/coverage/contracts/deployment/CMTAT_TP_FACTORY.sol.html
index f5293bd9..e50cd33c 100644
--- a/doc/general/test/coverage/contracts/deployment/CMTAT_TP_FACTORY.sol.html
+++ b/doc/general/test/coverage/contracts/deployment/CMTAT_TP_FACTORY.sol.html
@@ -132,7 +132,21 @@
87
88
89
-90 |
+90
+91
+92
+93
+94
+95
+96
+97 |
+
+
+
+
+
+
+
@@ -226,15 +240,22 @@
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "../CMTAT_PROXY.sol";
-import '@openzeppelin/contracts/utils/Create2.sol';
+import "@openzeppelin/contracts/utils/Create2.sol";
import "./libraries/CMTATFactoryInvariant.sol";
import "./libraries/CMTATFactoryBase.sol";
+
+
/**
* @notice Factory to deploy CMTAT with a transparent proxy
*
*/
contract CMTAT_TP_FACTORY is CMTATFactoryBase {
+ /**
+ * @param logic_ contract implementation, cannot be zero
+ * @param factoryAdmin admin
+ * @param useCustomSalt_ custom salt with create2 or not
+ */
constructor(address logic_, address factoryAdmin, bool useCustomSalt_) CMTATFactoryBase(logic_, factoryAdmin,useCustomSalt_){}
/*//////////////////////////////////////////////////////////////
@@ -316,7 +337,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html b/doc/general/test/coverage/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html
index 68ec547c..d265e30a 100644
--- a/doc/general/test/coverage/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html
+++ b/doc/general/test/coverage/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html
@@ -131,7 +131,13 @@
86
87
88
-89 |
+89
+90
+91
+92 |
+
+
+
@@ -224,17 +230,20 @@
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import "../CMTAT_PROXY_UUPS.sol";
-import '@openzeppelin/contracts/utils/Create2.sol';
+import "@openzeppelin/contracts/utils/Create2.sol";
import "./libraries/CMTATFactoryInvariant.sol";
import "./libraries/CMTATFactoryBase.sol";
+
+
/**
* @notice Factory to deploy CMTAT with a UUPS proxy
*
*/
contract CMTAT_UUPS_FACTORY is CMTATFactoryBase {
/**
- * @param logic_ contract implementation
+ * @param logic_ contract implementation, cannot be zero
* @param factoryAdmin admin
+ * @param useCustomSalt_ custom salt with create2 or not
*/
constructor(address logic_, address factoryAdmin, bool useCustomSalt_) CMTATFactoryBase(logic_, factoryAdmin,useCustomSalt_){}
@@ -313,7 +322,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/index.html b/doc/general/test/coverage/contracts/deployment/index.html
index fe5266d0..ec2b356f 100644
--- a/doc/general/test/coverage/contracts/deployment/index.html
+++ b/doc/general/test/coverage/contracts/deployment/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryBase.sol.html b/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryBase.sol.html
index af7247ce..47dd6ba7 100644
--- a/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryBase.sol.html
+++ b/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryBase.sol.html
@@ -118,7 +118,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html b/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html
index 87c19507..9bf8bb27 100644
--- a/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html
+++ b/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html
@@ -118,7 +118,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryRoot.sol.html b/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryRoot.sol.html
index 9b9b198c..c0528424 100644
--- a/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryRoot.sol.html
+++ b/doc/general/test/coverage/contracts/deployment/libraries/CMTATFactoryRoot.sol.html
@@ -137,14 +137,14 @@
-27×
-3×
+25×
+2×
-24×
-15×
+23×
+13×
-24×
-24×
+23×
+23×
@@ -157,7 +157,7 @@
-13×
+14×
@@ -170,7 +170,7 @@
-11×
+12×
5×
2×
@@ -178,7 +178,7 @@
3×
-6×
+7×
| //SPDX-License-Identifier: MPL-2.0
@@ -256,7 +256,7 @@
diff --git a/doc/general/test/coverage/contracts/deployment/libraries/index.html b/doc/general/test/coverage/contracts/deployment/libraries/index.html
index 8490a669..f46787fe 100644
--- a/doc/general/test/coverage/contracts/deployment/libraries/index.html
+++ b/doc/general/test/coverage/contracts/deployment/libraries/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/index.html b/doc/general/test/coverage/contracts/index.html
index 9ce29ff8..6585f11a 100644
--- a/doc/general/test/coverage/contracts/index.html
+++ b/doc/general/test/coverage/contracts/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/ICCIPToken.sol.html b/doc/general/test/coverage/contracts/interfaces/ICCIPToken.sol.html
index b526f339..46226201 100644
--- a/doc/general/test/coverage/contracts/interfaces/ICCIPToken.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/ICCIPToken.sol.html
@@ -121,7 +121,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/ICMTATConstructor.sol.html b/doc/general/test/coverage/contracts/interfaces/ICMTATConstructor.sol.html
index aae2f6ee..6643f881 100644
--- a/doc/general/test/coverage/contracts/interfaces/ICMTATConstructor.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/ICMTATConstructor.sol.html
@@ -78,7 +78,9 @@
33
34
35
-36 |
+36
+37 |
+
@@ -114,12 +116,13 @@
| //SPDX-License-Identifier: MPL-2.0
+pragma solidity ^0.8.20;
import "./engine/IDebtEngine.sol";
import "./engine/IRuleEngine.sol";
import "./engine/IAuthorizationEngine.sol";
import "./engine/draft-IERC1643.sol";
-pragma solidity ^0.8.20;
+
/**
* @notice interface to represent arguments used for CMTAT constructor / initialize
@@ -154,7 +157,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/ICMTATSnapshot.sol.html b/doc/general/test/coverage/contracts/interfaces/ICMTATSnapshot.sol.html
index 904f4196..1395b22e 100644
--- a/doc/general/test/coverage/contracts/interfaces/ICMTATSnapshot.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/ICMTATSnapshot.sol.html
@@ -163,7 +163,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html
index 082e383c..f02bbeca 100644
--- a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html
@@ -127,7 +127,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html
index e8b5ea44..89805afc 100644
--- a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html
@@ -94,7 +94,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html
index 66534533..109ee153 100644
--- a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/index.html b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/index.html
index c3b92b57..a5b41084 100644
--- a/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/index.html
+++ b/doc/general/test/coverage/contracts/interfaces/draft-IERC1404/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/engine/IAuthorizationEngine.sol.html b/doc/general/test/coverage/contracts/interfaces/engine/IAuthorizationEngine.sol.html
index 3c637833..14799def 100644
--- a/doc/general/test/coverage/contracts/interfaces/engine/IAuthorizationEngine.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/engine/IAuthorizationEngine.sol.html
@@ -118,7 +118,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/engine/IDebtEngine.sol.html b/doc/general/test/coverage/contracts/interfaces/engine/IDebtEngine.sol.html
index 81a7c34a..e9679c05 100644
--- a/doc/general/test/coverage/contracts/interfaces/engine/IDebtEngine.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/engine/IDebtEngine.sol.html
@@ -106,7 +106,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/engine/IDebtGlobal.sol.html b/doc/general/test/coverage/contracts/interfaces/engine/IDebtGlobal.sol.html
index 9b5e6243..ef54cf40 100644
--- a/doc/general/test/coverage/contracts/interfaces/engine/IDebtGlobal.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/engine/IDebtGlobal.sol.html
@@ -136,7 +136,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/engine/IRuleEngine.sol.html b/doc/general/test/coverage/contracts/interfaces/engine/IRuleEngine.sol.html
index 5c20a1d7..6193844d 100644
--- a/doc/general/test/coverage/contracts/interfaces/engine/IRuleEngine.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/engine/IRuleEngine.sol.html
@@ -109,7 +109,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/engine/draft-IERC1643.sol.html b/doc/general/test/coverage/contracts/interfaces/engine/draft-IERC1643.sol.html
index de24c346..0c21387c 100644
--- a/doc/general/test/coverage/contracts/interfaces/engine/draft-IERC1643.sol.html
+++ b/doc/general/test/coverage/contracts/interfaces/engine/draft-IERC1643.sol.html
@@ -79,7 +79,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/engine/index.html b/doc/general/test/coverage/contracts/interfaces/engine/index.html
index 68e5bddc..9192c698 100644
--- a/doc/general/test/coverage/contracts/interfaces/engine/index.html
+++ b/doc/general/test/coverage/contracts/interfaces/engine/index.html
@@ -129,7 +129,7 @@
diff --git a/doc/general/test/coverage/contracts/interfaces/index.html b/doc/general/test/coverage/contracts/interfaces/index.html
index 632bd98d..36e947e6 100644
--- a/doc/general/test/coverage/contracts/interfaces/index.html
+++ b/doc/general/test/coverage/contracts/interfaces/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/libraries/Errors.sol.html b/doc/general/test/coverage/contracts/libraries/Errors.sol.html
index f24beaf0..8ce419b5 100644
--- a/doc/general/test/coverage/contracts/libraries/Errors.sol.html
+++ b/doc/general/test/coverage/contracts/libraries/Errors.sol.html
@@ -256,7 +256,7 @@
diff --git a/doc/general/test/coverage/contracts/libraries/FactoryErrors.sol.html b/doc/general/test/coverage/contracts/libraries/FactoryErrors.sol.html
index c608b4a9..23707973 100644
--- a/doc/general/test/coverage/contracts/libraries/FactoryErrors.sol.html
+++ b/doc/general/test/coverage/contracts/libraries/FactoryErrors.sol.html
@@ -88,7 +88,7 @@
diff --git a/doc/general/test/coverage/contracts/libraries/index.html b/doc/general/test/coverage/contracts/libraries/index.html
index e3e50a9e..d8d79f13 100644
--- a/doc/general/test/coverage/contracts/libraries/index.html
+++ b/doc/general/test/coverage/contracts/libraries/index.html
@@ -90,7 +90,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/CMTAT_BASE.sol.html b/doc/general/test/coverage/contracts/modules/CMTAT_BASE.sol.html
index c18f34a8..04d9627e 100644
--- a/doc/general/test/coverage/contracts/modules/CMTAT_BASE.sol.html
+++ b/doc/general/test/coverage/contracts/modules/CMTAT_BASE.sol.html
@@ -347,7 +347,7 @@
-384×
+385×
@@ -367,50 +367,50 @@
-384×
-384×
+385×
+385×
-384×
+385×
-384×
-384×
+385×
+385×
-384×
+385×
-384×
-384×
+385×
+385×
-384×
+385×
-384×
-382×
-382×
+385×
+383×
+383×
-382×
-382×
+383×
+383×
-382×
-382×
+383×
+383×
-382×
-382×
-382×
+383×
+383×
+383×
-382×
+383×
-382×
+383×
@@ -476,7 +476,7 @@
-438×
+439×
17×
@@ -484,8 +484,8 @@
-421×
-421×
+422×
+422×
@@ -499,7 +499,7 @@
-1389×
+1391×
@@ -508,7 +508,7 @@
-1389×
+1391×
@@ -769,7 +769,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/index.html b/doc/general/test/coverage/contracts/modules/index.html
index f16eff78..bd35beff 100644
--- a/doc/general/test/coverage/contracts/modules/index.html
+++ b/doc/general/test/coverage/contracts/modules/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html b/doc/general/test/coverage/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html
index 7fd178e9..3b52a76d 100644
--- a/doc/general/test/coverage/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html
+++ b/doc/general/test/coverage/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html
@@ -287,8 +287,8 @@
-421×
-421×
+422×
+422×
77×
77×
@@ -300,8 +300,8 @@
-344×
-344×
+345×
+345×
@@ -309,16 +309,16 @@
-464×
-464×
+465×
+465×
-378×
-378×
+379×
+379×
| //SPDX-License-Identifier: MPL-2.0
@@ -466,7 +466,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/internal/EnforcementModuleInternal.sol.html b/doc/general/test/coverage/contracts/modules/internal/EnforcementModuleInternal.sol.html
index a04d6a48..77e63443 100644
--- a/doc/general/test/coverage/contracts/modules/internal/EnforcementModuleInternal.sol.html
+++ b/doc/general/test/coverage/contracts/modules/internal/EnforcementModuleInternal.sol.html
@@ -224,8 +224,8 @@
-944×
-944×
+946×
+946×
@@ -272,7 +272,7 @@
-974×
+976×
@@ -400,7 +400,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/internal/ValidationModuleInternal.sol.html b/doc/general/test/coverage/contracts/modules/internal/ValidationModuleInternal.sol.html
index 8a9dd3c7..71d93b5c 100644
--- a/doc/general/test/coverage/contracts/modules/internal/ValidationModuleInternal.sol.html
+++ b/doc/general/test/coverage/contracts/modules/internal/ValidationModuleInternal.sol.html
@@ -176,7 +176,7 @@
-384×
+385×
18×
18×
18×
@@ -240,7 +240,7 @@
-628×
+629×
@@ -352,7 +352,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/internal/base/SnapshotModuleBase.sol.html b/doc/general/test/coverage/contracts/modules/internal/base/SnapshotModuleBase.sol.html
index f2cf0053..e7f0ea38 100644
--- a/doc/general/test/coverage/contracts/modules/internal/base/SnapshotModuleBase.sol.html
+++ b/doc/general/test/coverage/contracts/modules/internal/base/SnapshotModuleBase.sol.html
@@ -775,9 +775,9 @@
-842×
-842×
-842×
+844×
+844×
+844×
36×
36×
@@ -789,12 +789,12 @@
-421×
-421×
+422×
+422×
-421×
+422×
18×
18×
@@ -806,8 +806,8 @@
-842×
-834×
+844×
+836×
8×
@@ -849,14 +849,14 @@
-489×
-489×
+490×
+490×
-489×
+490×
-403×
+404×
86×
@@ -902,7 +902,7 @@
-4856×
+4862×
@@ -1345,7 +1345,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/internal/base/index.html b/doc/general/test/coverage/contracts/modules/internal/base/index.html
index 6d5f9ab3..6b2ce4d7 100644
--- a/doc/general/test/coverage/contracts/modules/internal/base/index.html
+++ b/doc/general/test/coverage/contracts/modules/internal/base/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/internal/index.html b/doc/general/test/coverage/contracts/modules/internal/index.html
index 25d642d7..53c42414 100644
--- a/doc/general/test/coverage/contracts/modules/internal/index.html
+++ b/doc/general/test/coverage/contracts/modules/internal/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/security/AuthorizationModule.sol.html b/doc/general/test/coverage/contracts/modules/security/AuthorizationModule.sol.html
index ad289c2e..bc716af6 100644
--- a/doc/general/test/coverage/contracts/modules/security/AuthorizationModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/security/AuthorizationModule.sol.html
@@ -193,11 +193,11 @@
-384×
+385×
2×
-382×
-382×
+383×
+383×
16×
16×
16×
@@ -262,10 +262,10 @@
-1283×
-759×
+1285×
+760×
-524×
+525×
@@ -406,7 +406,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/security/index.html b/doc/general/test/coverage/contracts/modules/security/index.html
index f42cc844..b0be96c4 100644
--- a/doc/general/test/coverage/contracts/modules/security/index.html
+++ b/doc/general/test/coverage/contracts/modules/security/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/controllers/ValidationModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/controllers/ValidationModule.sol.html
index 380bcb96..ef51ee6d 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/controllers/ValidationModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/controllers/ValidationModule.sol.html
@@ -328,21 +328,21 @@
-457×
+458×
18×
-439×
+440×
-438×
+439×
14×
-424×
-424×
+425×
+425×
60×
-364×
+365×
| //SPDX-License-Identifier: MPL-2.0
@@ -502,7 +502,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/controllers/index.html b/doc/general/test/coverage/contracts/modules/wrapper/controllers/index.html
index 6b3304d3..ca23daa8 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/controllers/index.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/controllers/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/BaseModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/core/BaseModule.sol.html
index b07d3d33..964e3579 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/BaseModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/BaseModule.sol.html
@@ -201,10 +201,10 @@
-382×
-382×
-382×
-382×
+383×
+383×
+383×
+383×
@@ -265,7 +265,7 @@
-416×
+417×
@@ -391,7 +391,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BaseModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BaseModule.sol.html
index ec809312..ee11870a 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BaseModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BaseModule.sol.html
@@ -223,8 +223,8 @@
-382×
-382×
+383×
+383×
@@ -316,7 +316,7 @@
-384×
+385×
@@ -466,7 +466,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BurnModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BurnModule.sol.html
index 4d20e959..5af9fc26 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BurnModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20BurnModule.sol.html
@@ -436,7 +436,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20MintModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20MintModule.sol.html
index eae1319c..ec866ec8 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20MintModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/ERC20MintModule.sol.html
@@ -175,8 +175,8 @@
-290×
-290×
+291×
+291×
@@ -304,7 +304,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/EnforcementModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/core/EnforcementModule.sol.html
index bdd8dc50..94408cc1 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/EnforcementModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/EnforcementModule.sol.html
@@ -226,7 +226,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/PauseModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/core/PauseModule.sol.html
index 09614f07..6d02c4f3 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/PauseModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/PauseModule.sol.html
@@ -376,7 +376,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/core/index.html b/doc/general/test/coverage/contracts/modules/wrapper/core/index.html
index c78c57db..b00ff654 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/core/index.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/core/index.html
@@ -142,7 +142,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/extensions/DebtModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/extensions/DebtModule.sol.html
index 25046249..4156c3c8 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/extensions/DebtModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/extensions/DebtModule.sol.html
@@ -185,7 +185,7 @@
-382×
+383×
3×
3×
3×
@@ -349,7 +349,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/extensions/DocumentModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/extensions/DocumentModule.sol.html
index 01963048..d91a9797 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/extensions/DocumentModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/extensions/DocumentModule.sol.html
@@ -186,7 +186,7 @@
-382×
+383×
12×
12×
12×
@@ -352,7 +352,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html
index f0c7c091..405ba87a 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html
@@ -289,7 +289,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/extensions/MetaTxModule.sol.html b/doc/general/test/coverage/contracts/modules/wrapper/extensions/MetaTxModule.sol.html
index 8a138cb0..a204efaa 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/extensions/MetaTxModule.sol.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/extensions/MetaTxModule.sol.html
@@ -115,7 +115,7 @@
diff --git a/doc/general/test/coverage/contracts/modules/wrapper/extensions/index.html b/doc/general/test/coverage/contracts/modules/wrapper/extensions/index.html
index decf28ce..4d80eba3 100644
--- a/doc/general/test/coverage/contracts/modules/wrapper/extensions/index.html
+++ b/doc/general/test/coverage/contracts/modules/wrapper/extensions/index.html
@@ -116,7 +116,7 @@
diff --git a/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html b/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html
index 5bc6f0c8..f951aa06 100644
--- a/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html
+++ b/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html
@@ -64,7 +64,9 @@
19
20
21
-22 |
+22
+23 |
+
@@ -91,6 +93,7 @@
import "../../CMTAT_PROXY.sol";
+
/**
* @title a contrat used to test the proxy upgrade functionality
*/
@@ -112,7 +115,7 @@
diff --git a/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html b/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html
index 6a50bb09..aa1985b7 100644
--- a/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html
+++ b/doc/general/test/coverage/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html
@@ -64,7 +64,9 @@
19
20
21
-22 |
+22
+23 |
+
@@ -91,6 +93,7 @@
import "../../CMTAT_PROXY_UUPS.sol";
+
/**
* @title a contrat used to test the proxy upgrade functionality
*/
@@ -112,7 +115,7 @@
diff --git a/doc/general/test/coverage/contracts/test/proxy/index.html b/doc/general/test/coverage/contracts/test/proxy/index.html
index 45758912..0e09264a 100644
--- a/doc/general/test/coverage/contracts/test/proxy/index.html
+++ b/doc/general/test/coverage/contracts/test/proxy/index.html
@@ -90,7 +90,7 @@
diff --git a/doc/general/test/coverage/coverage-final.json b/doc/general/test/coverage/coverage-final.json
index 129ad0e8..650ed9c2 100644
--- a/doc/general/test/coverage/coverage-final.json
+++ b/doc/general/test/coverage/coverage-final.json
@@ -1,42 +1,42 @@
{
-"contracts/CMTAT_PROXY_UUPS.sol":{"l":{"21":9,"41":5,"45":5},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/CMTAT_PROXY_UUPS.sol","s":{"1":9,"2":5,"3":5},"b":{"1":[5,0],"2":[2,1]},"f":{"1":9,"2":5,"3":2},"fnMap":{"1":{"name":"constructor","line":19,"loc":{"start":{"line":17,"column":4},"end":{"line":22,"column":4}}},"2":{"name":"initialize","line":40,"loc":{"start":{"line":37,"column":4},"end":{"line":46,"column":4}}},"3":{"name":"_authorizeUpgrade","line":52,"loc":{"start":{"line":52,"column":4},"end":{"line":52,"column":88}}}},"statementMap":{"1":{"start":{"line":21,"column":8},"end":{"line":21,"column":29}},"2":{"start":{"line":41,"column":8},"end":{"line":41,"column":1705}},"3":{"start":{"line":45,"column":8},"end":{"line":45,"column":41}}},"branchMap":{"1":{"line":40,"type":"if","locations":[{"start":{"line":40,"column":67},"end":{"line":40,"column":67}},{"start":{"line":40,"column":67},"end":{"line":40,"column":67}}]},"2":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":58},"end":{"line":52,"column":58}},{"start":{"line":52,"column":58},"end":{"line":52,"column":58}}]}}},
-"contracts/CMTAT_PROXY.sol":{"l":{"20":198},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/CMTAT_PROXY.sol","s":{"1":198},"b":{},"f":{"1":198},"fnMap":{"1":{"name":"constructor","line":18,"loc":{"start":{"line":16,"column":4},"end":{"line":21,"column":4}}}},"statementMap":{"1":{"start":{"line":20,"column":8},"end":{"line":20,"column":29}}},"branchMap":{}},
-"contracts/CMTAT_STANDALONE.sol":{"l":{"29":191},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/CMTAT_STANDALONE.sol","s":{"1":191},"b":{},"f":{"1":191},"fnMap":{"1":{"name":"constructor","line":26,"loc":{"start":{"line":20,"column":4},"end":{"line":35,"column":4}}}},"statementMap":{"1":{"start":{"line":29,"column":8},"end":{"line":29,"column":1112}}},"branchMap":{}},
-"contracts/deployment/CMTAT_BEACON_FACTORY.sol":{"l":{"24":8,"25":1,"27":7,"28":1,"30":6,"45":2,"46":2,"49":2,"50":2,"62":2,"65":2,"73":1,"84":2,"85":2,"86":2,"87":2,"88":2,"89":2,"90":2,"100":4,"107":4},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/CMTAT_BEACON_FACTORY.sol","s":{"1":8,"2":7,"3":2,"4":2,"5":2,"6":2,"7":2,"8":1,"9":2,"10":2,"11":2,"12":2,"13":4},"b":{"1":[1,7],"2":[1,6],"3":[2,1]},"f":{"1":8,"2":2,"3":2,"4":1,"5":2,"6":4},"fnMap":{"1":{"name":"constructor","line":23,"loc":{"start":{"line":23,"column":4},"end":{"line":31,"column":4}}},"2":{"name":"deployCMTAT","line":44,"loc":{"start":{"line":40,"column":4},"end":{"line":51,"column":4}}},"3":{"name":"computedProxyAddress","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":66,"column":4}}},"4":{"name":"implementation","line":72,"loc":{"start":{"line":72,"column":4},"end":{"line":74,"column":4}}},"5":{"name":"_deployBytecode","line":83,"loc":{"start":{"line":83,"column":4},"end":{"line":91,"column":5}}},"6":{"name":"_getBytecode","line":97,"loc":{"start":{"line":97,"column":5},"end":{"line":108,"column":5}}}},"statementMap":{"1":{"start":{"line":24,"column":8},"end":{"line":24,"column":799}},"2":{"start":{"line":27,"column":8},"end":{"line":27,"column":935}},"3":{"start":{"line":45,"column":8},"end":{"line":45,"column":86}},"4":{"start":{"line":46,"column":8},"end":{"line":46,"column":1738}},"5":{"start":{"line":50,"column":8},"end":{"line":50,"column":20}},"6":{"start":{"line":62,"column":8},"end":{"line":62,"column":2316}},"7":{"start":{"line":65,"column":8},"end":{"line":65,"column":91}},"8":{"start":{"line":73,"column":8},"end":{"line":73,"column":38}},"9":{"start":{"line":84,"column":20},"end":{"line":84,"column":86}},"10":{"start":{"line":87,"column":20},"end":{"line":87,"column":62}},"11":{"start":{"line":89,"column":20},"end":{"line":89,"column":50}},"12":{"start":{"line":90,"column":20},"end":{"line":90,"column":32}},"13":{"start":{"line":100,"column":8},"end":{"line":100,"column":3755}}},"branchMap":{"1":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":8},"end":{"line":24,"column":8}},{"start":{"line":24,"column":8},"end":{"line":24,"column":8}}]},"2":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":8},"end":{"line":27,"column":8}},{"start":{"line":27,"column":8},"end":{"line":27,"column":8}}]},"3":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":13},"end":{"line":44,"column":13}},{"start":{"line":44,"column":13},"end":{"line":44,"column":13}}]}}},
-"contracts/deployment/CMTAT_TP_FACTORY.sol":{"l":{"29":7,"30":5,"33":5,"35":5,"49":2,"52":2,"65":5,"66":5,"67":5,"68":5,"69":5,"70":5,"71":5,"81":7,"88":7},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/CMTAT_TP_FACTORY.sol","s":{"1":7,"2":5,"3":5,"4":2,"5":2,"6":5,"7":5,"8":5,"9":5,"10":7},"b":{"1":[7,2]},"f":{"1":9,"2":7,"3":2,"4":5,"5":7},"fnMap":{"1":{"name":"constructor","line":15,"loc":{"start":{"line":15,"column":4},"end":{"line":15,"column":129}}},"2":{"name":"deployCMTAT","line":28,"loc":{"start":{"line":23,"column":4},"end":{"line":36,"column":4}}},"3":{"name":"computedProxyAddress","line":44,"loc":{"start":{"line":44,"column":4},"end":{"line":53,"column":4}}},"4":{"name":"_deployBytecode","line":64,"loc":{"start":{"line":64,"column":4},"end":{"line":72,"column":5}}},"5":{"name":"_getBytecode","line":78,"loc":{"start":{"line":78,"column":5},"end":{"line":89,"column":5}}}},"statementMap":{"1":{"start":{"line":29,"column":8},"end":{"line":29,"column":86}},"2":{"start":{"line":30,"column":8},"end":{"line":30,"column":1235}},"3":{"start":{"line":35,"column":8},"end":{"line":35,"column":20}},"4":{"start":{"line":49,"column":8},"end":{"line":49,"column":1919}},"5":{"start":{"line":52,"column":8},"end":{"line":52,"column":91}},"6":{"start":{"line":65,"column":20},"end":{"line":65,"column":86}},"7":{"start":{"line":68,"column":20},"end":{"line":68,"column":62}},"8":{"start":{"line":70,"column":20},"end":{"line":70,"column":50}},"9":{"start":{"line":71,"column":20},"end":{"line":71,"column":32}},"10":{"start":{"line":81,"column":8},"end":{"line":81,"column":3210}}},"branchMap":{"1":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":13},"end":{"line":28,"column":13}},{"start":{"line":28,"column":13},"end":{"line":28,"column":13}}]}}},
-"contracts/deployment/CMTAT_UUPS_FACTORY.sol":{"l":{"32":2,"33":2,"36":2,"38":2,"50":2,"53":2,"64":2,"65":2,"66":2,"67":2,"68":2,"69":2,"70":2,"80":4,"87":4},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/CMTAT_UUPS_FACTORY.sol","s":{"1":2,"2":2,"3":2,"4":2,"5":2,"6":2,"7":2,"8":2,"9":2,"10":4},"b":{"1":[2,1]},"f":{"1":5,"2":2,"3":2,"4":2,"5":4},"fnMap":{"1":{"name":"constructor","line":18,"loc":{"start":{"line":18,"column":4},"end":{"line":18,"column":129}}},"2":{"name":"deployCMTAT","line":31,"loc":{"start":{"line":27,"column":4},"end":{"line":39,"column":4}}},"3":{"name":"computedProxyAddress","line":46,"loc":{"start":{"line":46,"column":4},"end":{"line":54,"column":4}}},"4":{"name":"_deployBytecode","line":63,"loc":{"start":{"line":63,"column":4},"end":{"line":71,"column":5}}},"5":{"name":"_getBytecode","line":77,"loc":{"start":{"line":77,"column":5},"end":{"line":88,"column":5}}}},"statementMap":{"1":{"start":{"line":32,"column":8},"end":{"line":32,"column":86}},"2":{"start":{"line":33,"column":8},"end":{"line":33,"column":1266}},"3":{"start":{"line":38,"column":8},"end":{"line":38,"column":20}},"4":{"start":{"line":50,"column":8},"end":{"line":50,"column":1853}},"5":{"start":{"line":53,"column":8},"end":{"line":53,"column":91}},"6":{"start":{"line":64,"column":20},"end":{"line":64,"column":86}},"7":{"start":{"line":67,"column":20},"end":{"line":67,"column":62}},"8":{"start":{"line":69,"column":20},"end":{"line":69,"column":50}},"9":{"start":{"line":70,"column":20},"end":{"line":70,"column":32}},"10":{"start":{"line":80,"column":8},"end":{"line":80,"column":3072}}},"branchMap":{"1":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":13},"end":{"line":31,"column":13}},{"start":{"line":31,"column":13},"end":{"line":31,"column":13}}]}}},
-"contracts/deployment/libraries/CMTATFactoryBase.sol":{"l":{"19":16,"20":2,"22":14},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/libraries/CMTATFactoryBase.sol","s":{"1":16},"b":{"1":[2,14]},"f":{"1":16},"fnMap":{"1":{"name":"constructor","line":18,"loc":{"start":{"line":18,"column":4},"end":{"line":23,"column":4}}}},"statementMap":{"1":{"start":{"line":19,"column":8},"end":{"line":19,"column":575}}},"branchMap":{"1":{"line":19,"type":"if","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":8}},{"start":{"line":19,"column":8},"end":{"line":19,"column":8}}]}}},
-"contracts/deployment/libraries/CMTATFactoryInvariant.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/libraries/CMTATFactoryInvariant.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/deployment/libraries/CMTATFactoryRoot.sol":{"l":{"26":27,"27":3,"29":24,"30":15,"32":24,"33":24,"46":13,"59":11,"60":5,"61":2,"63":3,"64":3,"67":6},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/libraries/CMTATFactoryRoot.sol","s":{"1":27,"2":24,"3":24,"4":24,"5":13,"6":11,"7":5},"b":{"1":[3,24],"2":[15,9],"3":[5,6],"4":[2,3]},"f":{"1":27,"2":13,"3":11},"fnMap":{"1":{"name":"constructor","line":25,"loc":{"start":{"line":25,"column":4},"end":{"line":34,"column":4}}},"2":{"name":"CMTATProxyAddress","line":45,"loc":{"start":{"line":45,"column":4},"end":{"line":47,"column":4}}},"3":{"name":"_checkAndDetermineDeploymentSalt","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":69,"column":4}}}},"statementMap":{"1":{"start":{"line":26,"column":8},"end":{"line":26,"column":814}},"2":{"start":{"line":29,"column":8},"end":{"line":29,"column":952}},"3":{"start":{"line":32,"column":8},"end":{"line":32,"column":51}},"4":{"start":{"line":33,"column":8},"end":{"line":33,"column":52}},"5":{"start":{"line":46,"column":8},"end":{"line":46,"column":38}},"6":{"start":{"line":59,"column":7},"end":{"line":59,"column":2000}},"7":{"start":{"line":60,"column":12},"end":{"line":60,"column":2035}}},"branchMap":{"1":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":8},"end":{"line":26,"column":8}},{"start":{"line":26,"column":8},"end":{"line":26,"column":8}}]},"2":{"line":29,"type":"if","locations":[{"start":{"line":29,"column":8},"end":{"line":29,"column":8}},{"start":{"line":29,"column":8},"end":{"line":29,"column":8}}]},"3":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":7},"end":{"line":59,"column":7}},{"start":{"line":59,"column":7},"end":{"line":59,"column":7}}]},"4":{"line":60,"type":"if","locations":[{"start":{"line":60,"column":12},"end":{"line":60,"column":12}},{"start":{"line":60,"column":12},"end":{"line":60,"column":12}}]}}},
-"contracts/interfaces/draft-IERC1404/draft-IERC1404.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/engine/draft-IERC1643.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/draft-IERC1643.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/engine/IAuthorizationEngine.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IAuthorizationEngine.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/engine/IDebtEngine.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IDebtEngine.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/engine/IDebtGlobal.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IDebtGlobal.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/engine/IRuleEngine.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IRuleEngine.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/ICCIPToken.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/ICCIPToken.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/ICMTATConstructor.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/ICMTATConstructor.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/interfaces/ICMTATSnapshot.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/ICMTATSnapshot.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/libraries/Errors.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/libraries/Errors.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/libraries/FactoryErrors.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/libraries/FactoryErrors.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
-"contracts/modules/CMTAT_BASE.sol":{"l":{"65":384,"85":384,"86":384,"88":384,"90":384,"91":384,"94":384,"99":384,"100":384,"102":384,"106":384,"107":382,"108":382,"110":382,"111":382,"113":382,"114":382,"120":382,"121":382,"122":382,"125":382,"128":382,"150":2,"163":10,"178":6,"179":4,"194":438,"195":17,"202":421,"203":421,"217":1389,"226":1389,"238":0},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/CMTAT_BASE.sol","s":{"1":384,"2":384,"3":384,"4":384,"5":384,"6":384,"7":384,"8":384,"9":384,"10":384,"11":384,"12":382,"13":382,"14":382,"15":382,"16":382,"17":382,"18":382,"19":382,"20":382,"21":382,"22":382,"23":2,"24":10,"25":6,"26":4,"27":438,"28":421,"29":421,"30":1389,"31":1389,"32":0},"b":{"1":[384,1],"2":[384,0],"3":[382,0],"4":[17,421]},"f":{"1":384,"2":384,"3":382,"4":2,"5":10,"6":6,"7":438,"8":1389,"9":1389,"10":0},"fnMap":{"1":{"name":"initialize","line":64,"loc":{"start":{"line":59,"column":4},"end":{"line":71,"column":4}}},"2":{"name":"__CMTAT_init","line":82,"loc":{"start":{"line":77,"column":4},"end":{"line":129,"column":4}}},"3":{"name":"__CMTAT_init_unchained","line":131,"loc":{"start":{"line":131,"column":4},"end":{"line":133,"column":4}}},"4":{"name":"decimals","line":143,"loc":{"start":{"line":143,"column":4},"end":{"line":151,"column":4}}},"5":{"name":"transferFrom","line":153,"loc":{"start":{"line":153,"column":4},"end":{"line":164,"column":4}}},"6":{"name":"burnAndMint","line":177,"loc":{"start":{"line":177,"column":4},"end":{"line":180,"column":4}}},"7":{"name":"_update","line":189,"loc":{"start":{"line":189,"column":4},"end":{"line":204,"column":4}}},"8":{"name":"_msgSender","line":211,"loc":{"start":{"line":211,"column":4},"end":{"line":218,"column":4}}},"9":{"name":"_contextSuffixLength","line":223,"loc":{"start":{"line":223,"column":4},"end":{"line":227,"column":4}}},"10":{"name":"_msgData","line":232,"loc":{"start":{"line":232,"column":4},"end":{"line":239,"column":4}}}},"statementMap":{"1":{"start":{"line":65,"column":8},"end":{"line":65,"column":2165}},"2":{"start":{"line":85,"column":8},"end":{"line":85,"column":33}},"3":{"start":{"line":86,"column":8},"end":{"line":86,"column":99}},"4":{"start":{"line":88,"column":8},"end":{"line":88,"column":32}},"5":{"start":{"line":90,"column":8},"end":{"line":90,"column":39}},"6":{"start":{"line":91,"column":8},"end":{"line":91,"column":34}},"7":{"start":{"line":94,"column":8},"end":{"line":94,"column":37}},"8":{"start":{"line":99,"column":8},"end":{"line":99,"column":44}},"9":{"start":{"line":100,"column":8},"end":{"line":100,"column":39}},"10":{"start":{"line":102,"column":8},"end":{"line":102,"column":56}},"11":{"start":{"line":106,"column":8},"end":{"line":106,"column":81}},"12":{"start":{"line":107,"column":8},"end":{"line":107,"column":41}},"13":{"start":{"line":108,"column":8},"end":{"line":108,"column":41}},"14":{"start":{"line":110,"column":8},"end":{"line":110,"column":43}},"15":{"start":{"line":111,"column":8},"end":{"line":111,"column":77}},"16":{"start":{"line":113,"column":8},"end":{"line":113,"column":37}},"17":{"start":{"line":114,"column":8},"end":{"line":114,"column":42}},"18":{"start":{"line":120,"column":8},"end":{"line":120,"column":45}},"19":{"start":{"line":121,"column":8},"end":{"line":121,"column":64}},"20":{"start":{"line":122,"column":8},"end":{"line":122,"column":56}},"21":{"start":{"line":125,"column":8},"end":{"line":125,"column":123}},"22":{"start":{"line":128,"column":8},"end":{"line":128,"column":31}},"23":{"start":{"line":150,"column":8},"end":{"line":150,"column":41}},"24":{"start":{"line":163,"column":8},"end":{"line":163,"column":70}},"25":{"start":{"line":178,"column":8},"end":{"line":178,"column":39}},"26":{"start":{"line":179,"column":8},"end":{"line":179,"column":29}},"27":{"start":{"line":194,"column":8},"end":{"line":194,"column":6702}},"28":{"start":{"line":202,"column":8},"end":{"line":202,"column":60}},"29":{"start":{"line":203,"column":8},"end":{"line":203,"column":49}},"30":{"start":{"line":217,"column":8},"end":{"line":217,"column":53}},"31":{"start":{"line":226,"column":9},"end":{"line":226,"column":64}},"32":{"start":{"line":238,"column":8},"end":{"line":238,"column":51}}},"branchMap":{"1":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":21},"end":{"line":64,"column":21}},{"start":{"line":64,"column":21},"end":{"line":64,"column":21}}]},"2":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":15},"end":{"line":82,"column":15}},{"start":{"line":82,"column":15},"end":{"line":82,"column":15}}]},"3":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":47},"end":{"line":131,"column":47}},{"start":{"line":131,"column":47},"end":{"line":131,"column":47}}]},"4":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":8},"end":{"line":194,"column":8}},{"start":{"line":194,"column":8},"end":{"line":194,"column":8}}]}}},
-"contracts/modules/internal/base/SnapshotModuleBase.sol":{"l":{"83":2,"84":2,"92":76,"93":76,"95":76,"96":68,"101":68,"102":48,"105":20,"107":8,"110":8,"112":8,"113":8,"120":28,"132":170,"134":170,"136":168,"138":94,"141":94,"142":2,"148":2,"151":164,"152":164,"159":12,"160":12,"161":10,"163":10,"164":2,"167":8,"168":2,"170":6,"173":6,"174":10,"175":10,"176":10,"179":6,"181":8,"188":22,"190":22,"191":20,"192":18,"193":2,"195":16,"196":12,"197":8,"198":8,"199":2,"205":2,"208":8,"209":4,"210":2,"216":6,"218":6,"225":14,"227":14,"228":10,"229":2,"232":8,"233":2,"235":6,"236":6,"246":10,"247":10,"249":10,"251":8,"252":6,"254":8,"282":1920,"284":1920,"285":1484,"287":436,"301":842,"302":842,"303":842,"304":36,"305":36,"315":421,"316":421,"320":421,"321":18,"322":18,"332":842,"333":834,"335":8,"346":36,"347":36,"348":36,"350":36,"354":22,"358":8,"362":6,"375":489,"376":489,"378":489,"382":403,"385":86,"386":86,"388":86,"389":116,"390":52,"391":52,"394":64,"397":86,"406":26,"407":26,"408":6,"410":20,"413":202,"414":6,"421":46,"422":6,"428":4856},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/base/SnapshotModuleBase.sol","s":{"1":2,"2":2,"3":76,"4":76,"5":76,"6":68,"7":68,"8":48,"9":20,"10":8,"11":8,"12":28,"13":170,"14":170,"15":168,"16":94,"17":94,"18":92,"19":164,"20":164,"21":12,"22":12,"23":10,"24":10,"25":8,"26":2,"27":6,"28":6,"29":8,"30":22,"31":22,"32":20,"33":18,"34":16,"35":12,"36":8,"37":8,"38":6,"39":8,"40":4,"41":6,"42":14,"43":14,"44":10,"45":8,"46":6,"47":6,"48":10,"49":10,"50":10,"51":8,"52":8,"53":1920,"54":1920,"55":1484,"56":436,"57":842,"58":842,"59":842,"60":36,"61":36,"62":421,"63":421,"64":421,"65":842,"66":834,"67":8,"68":36,"69":36,"70":36,"71":36,"72":22,"73":14,"74":8,"75":6,"76":489,"77":489,"78":489,"79":403,"80":86,"81":86,"82":116,"83":86,"84":26,"85":26,"86":20,"87":202,"88":46},"b":{"1":[384,0],"2":[68,8],"3":[48,20],"4":[8,12],"5":[94,74],"6":[2,92],"7":[2,90],"8":[2,8],"9":[2,6],"10":[2,16],"11":[8,4],"12":[2,6],"13":[2,4],"14":[4,4],"15":[2,2],"16":[2,8],"17":[2,6],"18":[1484,436],"19":[36,806],"20":[18,403],"21":[834,8],"22":[22,14],"23":[8,6],"24":[403,86],"25":[403,0],"26":[52,64],"27":[6,20],"28":[6,196],"29":[6,40]},"f":{"1":384,"2":2,"3":76,"4":170,"5":12,"6":22,"7":14,"8":10,"9":1920,"10":842,"11":421,"12":842,"13":36,"14":489,"15":26,"16":202,"17":46,"18":4856},"fnMap":{"1":{"name":"__SnapshotModuleBase_init_unchained","line":70,"loc":{"start":{"line":70,"column":4},"end":{"line":73,"column":4}}},"2":{"name":"getAllSnapshots","line":82,"loc":{"start":{"line":82,"column":4},"end":{"line":85,"column":4}}},"3":{"name":"getNextSnapshots","line":91,"loc":{"start":{"line":91,"column":4},"end":{"line":121,"column":4}}},"4":{"name":"_scheduleSnapshot","line":131,"loc":{"start":{"line":131,"column":4},"end":{"line":153,"column":4}}},"5":{"name":"_scheduleSnapshotNotOptimized","line":158,"loc":{"start":{"line":158,"column":4},"end":{"line":182,"column":4}}},"6":{"name":"_rescheduleSnapshot","line":187,"loc":{"start":{"line":187,"column":4},"end":{"line":219,"column":4}}},"7":{"name":"_unscheduleLastSnapshot","line":224,"loc":{"start":{"line":224,"column":4},"end":{"line":237,"column":4}}},"8":{"name":"_unscheduleSnapshotNotOptimized","line":245,"loc":{"start":{"line":245,"column":4},"end":{"line":255,"column":4}}},"9":{"name":"_valueAt","line":264,"loc":{"start":{"line":264,"column":4},"end":{"line":289,"column":4}}},"10":{"name":"_updateSnapshot","line":297,"loc":{"start":{"line":297,"column":4},"end":{"line":307,"column":4}}},"11":{"name":"_setCurrentSnapshot","line":314,"loc":{"start":{"line":314,"column":4},"end":{"line":324,"column":4}}},"12":{"name":"_lastSnapshot","line":329,"loc":{"start":{"line":329,"column":4},"end":{"line":337,"column":4}}},"13":{"name":"_findScheduledSnapshotIndex","line":343,"loc":{"start":{"line":343,"column":4},"end":{"line":364,"column":4}}},"14":{"name":"_findScheduledMostRecentPastSnapshot","line":370,"loc":{"start":{"line":370,"column":4},"end":{"line":398,"column":4}}},"15":{"name":"_findAndRevertScheduledSnapshotIndex","line":403,"loc":{"start":{"line":403,"column":4},"end":{"line":411,"column":4}}},"16":{"name":"_checkTimeInThePast","line":412,"loc":{"start":{"line":412,"column":4},"end":{"line":419,"column":4}}},"17":{"name":"_checkTimeSnapshotAlreadyDone","line":420,"loc":{"start":{"line":420,"column":4},"end":{"line":424,"column":4}}},"18":{"name":"_getSnapshotModuleBaseStorage","line":427,"loc":{"start":{"line":427,"column":4},"end":{"line":431,"column":4}}}},"statementMap":{"1":{"start":{"line":83,"column":8},"end":{"line":83,"column":77}},"2":{"start":{"line":84,"column":8},"end":{"line":84,"column":36}},"3":{"start":{"line":92,"column":8},"end":{"line":92,"column":77}},"4":{"start":{"line":93,"column":8},"end":{"line":93,"column":65}},"5":{"start":{"line":95,"column":8},"end":{"line":95,"column":3657}},"6":{"start":{"line":96,"column":12},"end":{"line":96,"column":3755}},"7":{"start":{"line":101,"column":12},"end":{"line":101,"column":3918}},"8":{"start":{"line":102,"column":16},"end":{"line":102,"column":44}},"9":{"start":{"line":105,"column":16},"end":{"line":105,"column":4128}},"10":{"start":{"line":107,"column":20},"end":{"line":107,"column":4318}},"11":{"start":{"line":112,"column":20},"end":{"line":112,"column":4596}},"12":{"start":{"line":120,"column":8},"end":{"line":120,"column":36}},"13":{"start":{"line":132,"column":8},"end":{"line":132,"column":77}},"14":{"start":{"line":134,"column":7},"end":{"line":134,"column":31}},"15":{"start":{"line":136,"column":8},"end":{"line":136,"column":5453}},"16":{"start":{"line":138,"column":12},"end":{"line":138,"column":5564}},"17":{"start":{"line":141,"column":12},"end":{"line":141,"column":5689}},"18":{"start":{"line":147,"column":19},"end":{"line":147,"column":5942}},"19":{"start":{"line":151,"column":8},"end":{"line":151,"column":39}},"20":{"start":{"line":152,"column":8},"end":{"line":152,"column":38}},"21":{"start":{"line":159,"column":8},"end":{"line":159,"column":77}},"22":{"start":{"line":160,"column":8},"end":{"line":160,"column":32}},"23":{"start":{"line":161,"column":8},"end":{"line":161,"column":73}},"24":{"start":{"line":163,"column":8},"end":{"line":163,"column":6518}},"25":{"start":{"line":167,"column":8},"end":{"line":167,"column":6709}},"26":{"start":{"line":168,"column":12},"end":{"line":168,"column":43}},"27":{"start":{"line":170,"column":12},"end":{"line":170,"column":6833}},"28":{"start":{"line":173,"column":12},"end":{"line":173,"column":6960}},"29":{"start":{"line":181,"column":8},"end":{"line":181,"column":38}},"30":{"start":{"line":188,"column":8},"end":{"line":188,"column":77}},"31":{"start":{"line":190,"column":8},"end":{"line":190,"column":45}},"32":{"start":{"line":191,"column":8},"end":{"line":191,"column":35}},"33":{"start":{"line":192,"column":8},"end":{"line":192,"column":7691}},"34":{"start":{"line":195,"column":8},"end":{"line":195,"column":69}},"35":{"start":{"line":196,"column":8},"end":{"line":196,"column":7891}},"36":{"start":{"line":197,"column":12},"end":{"line":197,"column":71}},"37":{"start":{"line":198,"column":12},"end":{"line":198,"column":8028}},"38":{"start":{"line":204,"column":19},"end":{"line":204,"column":8286}},"39":{"start":{"line":208,"column":8},"end":{"line":208,"column":8425}},"40":{"start":{"line":209,"column":12},"end":{"line":209,"column":8467}},"41":{"start":{"line":218,"column":8},"end":{"line":218,"column":47}},"42":{"start":{"line":225,"column":8},"end":{"line":225,"column":77}},"43":{"start":{"line":227,"column":8},"end":{"line":227,"column":42}},"44":{"start":{"line":228,"column":8},"end":{"line":228,"column":9173}},"45":{"start":{"line":232,"column":8},"end":{"line":232,"column":9373}},"46":{"start":{"line":235,"column":8},"end":{"line":235,"column":34}},"47":{"start":{"line":236,"column":8},"end":{"line":236,"column":37}},"48":{"start":{"line":246,"column":8},"end":{"line":246,"column":77}},"49":{"start":{"line":247,"column":8},"end":{"line":247,"column":42}},"50":{"start":{"line":249,"column":8},"end":{"line":249,"column":66}},"51":{"start":{"line":251,"column":8},"end":{"line":251,"column":10194}},"52":{"start":{"line":254,"column":8},"end":{"line":254,"column":34}},"53":{"start":{"line":282,"column":8},"end":{"line":282,"column":58}},"54":{"start":{"line":284,"column":8},"end":{"line":284,"column":12023}},"55":{"start":{"line":285,"column":12},"end":{"line":285,"column":29}},"56":{"start":{"line":287,"column":12},"end":{"line":287,"column":50}},"57":{"start":{"line":301,"column":8},"end":{"line":301,"column":77}},"58":{"start":{"line":302,"column":8},"end":{"line":302,"column":48}},"59":{"start":{"line":303,"column":8},"end":{"line":303,"column":12661}},"60":{"start":{"line":304,"column":12},"end":{"line":304,"column":38}},"61":{"start":{"line":305,"column":12},"end":{"line":305,"column":46}},"62":{"start":{"line":315,"column":8},"end":{"line":315,"column":77}},"63":{"start":{"line":316,"column":8},"end":{"line":316,"column":13151}},"64":{"start":{"line":320,"column":8},"end":{"line":320,"column":13255}},"65":{"start":{"line":332,"column":8},"end":{"line":332,"column":13609}},"66":{"start":{"line":333,"column":12},"end":{"line":333,"column":20}},"67":{"start":{"line":335,"column":12},"end":{"line":335,"column":38}},"68":{"start":{"line":346,"column":8},"end":{"line":346,"column":77}},"69":{"start":{"line":347,"column":8},"end":{"line":347,"column":71}},"70":{"start":{"line":348,"column":8},"end":{"line":348,"column":72}},"71":{"start":{"line":350,"column":8},"end":{"line":350,"column":14239}},"72":{"start":{"line":354,"column":12},"end":{"line":354,"column":37}},"73":{"start":{"line":357,"column":13},"end":{"line":357,"column":14456}},"74":{"start":{"line":358,"column":12},"end":{"line":358,"column":38}},"75":{"start":{"line":362,"column":12},"end":{"line":362,"column":53}},"76":{"start":{"line":375,"column":8},"end":{"line":375,"column":77}},"77":{"start":{"line":376,"column":8},"end":{"line":376,"column":63}},"78":{"start":{"line":378,"column":8},"end":{"line":378,"column":15173}},"79":{"start":{"line":382,"column":12},"end":{"line":382,"column":40}},"80":{"start":{"line":385,"column":8},"end":{"line":385,"column":26}},"81":{"start":{"line":388,"column":8},"end":{"line":388,"column":15538}},"82":{"start":{"line":389,"column":12},"end":{"line":389,"column":15626}},"83":{"start":{"line":397,"column":8},"end":{"line":397,"column":34}},"84":{"start":{"line":406,"column":8},"end":{"line":406,"column":73}},"85":{"start":{"line":407,"column":8},"end":{"line":407,"column":16172}},"86":{"start":{"line":410,"column":8},"end":{"line":410,"column":20}},"87":{"start":{"line":413,"column":8},"end":{"line":413,"column":16371}},"88":{"start":{"line":421,"column":8},"end":{"line":421,"column":16674}}},"branchMap":{"1":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":60},"end":{"line":70,"column":60}},{"start":{"line":70,"column":60},"end":{"line":70,"column":60}}]},"2":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":8},"end":{"line":95,"column":8}},{"start":{"line":95,"column":8},"end":{"line":95,"column":8}}]},"3":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":12},"end":{"line":101,"column":12}},{"start":{"line":101,"column":12},"end":{"line":101,"column":12}}]},"4":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":16},"end":{"line":105,"column":16}},{"start":{"line":105,"column":16},"end":{"line":105,"column":16}}]},"5":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":8},"end":{"line":136,"column":8}},{"start":{"line":136,"column":8},"end":{"line":136,"column":8}}]},"6":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":12},"end":{"line":141,"column":12}},{"start":{"line":141,"column":12},"end":{"line":141,"column":12}}]},"7":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":19},"end":{"line":147,"column":19}},{"start":{"line":147,"column":19},"end":{"line":147,"column":19}}]},"8":{"line":163,"type":"if","locations":[{"start":{"line":163,"column":8},"end":{"line":163,"column":8}},{"start":{"line":163,"column":8},"end":{"line":163,"column":8}}]},"9":{"line":167,"type":"if","locations":[{"start":{"line":167,"column":8},"end":{"line":167,"column":8}},{"start":{"line":167,"column":8},"end":{"line":167,"column":8}}]},"10":{"line":192,"type":"if","locations":[{"start":{"line":192,"column":8},"end":{"line":192,"column":8}},{"start":{"line":192,"column":8},"end":{"line":192,"column":8}}]},"11":{"line":196,"type":"if","locations":[{"start":{"line":196,"column":8},"end":{"line":196,"column":8}},{"start":{"line":196,"column":8},"end":{"line":196,"column":8}}]},"12":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":12},"end":{"line":198,"column":12}},{"start":{"line":198,"column":12},"end":{"line":198,"column":12}}]},"13":{"line":204,"type":"if","locations":[{"start":{"line":204,"column":19},"end":{"line":204,"column":19}},{"start":{"line":204,"column":19},"end":{"line":204,"column":19}}]},"14":{"line":208,"type":"if","locations":[{"start":{"line":208,"column":8},"end":{"line":208,"column":8}},{"start":{"line":208,"column":8},"end":{"line":208,"column":8}}]},"15":{"line":209,"type":"if","locations":[{"start":{"line":209,"column":12},"end":{"line":209,"column":12}},{"start":{"line":209,"column":12},"end":{"line":209,"column":12}}]},"16":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":8},"end":{"line":228,"column":8}},{"start":{"line":228,"column":8},"end":{"line":228,"column":8}}]},"17":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":8},"end":{"line":232,"column":8}},{"start":{"line":232,"column":8},"end":{"line":232,"column":8}}]},"18":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":8},"end":{"line":284,"column":8}},{"start":{"line":284,"column":8},"end":{"line":284,"column":8}}]},"19":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":8},"end":{"line":303,"column":8}},{"start":{"line":303,"column":8},"end":{"line":303,"column":8}}]},"20":{"line":320,"type":"if","locations":[{"start":{"line":320,"column":8},"end":{"line":320,"column":8}},{"start":{"line":320,"column":8},"end":{"line":320,"column":8}}]},"21":{"line":332,"type":"if","locations":[{"start":{"line":332,"column":8},"end":{"line":332,"column":8}},{"start":{"line":332,"column":8},"end":{"line":332,"column":8}}]},"22":{"line":350,"type":"if","locations":[{"start":{"line":350,"column":8},"end":{"line":350,"column":8}},{"start":{"line":350,"column":8},"end":{"line":350,"column":8}}]},"23":{"line":357,"type":"if","locations":[{"start":{"line":357,"column":13},"end":{"line":357,"column":13}},{"start":{"line":357,"column":13},"end":{"line":357,"column":13}}]},"24":{"line":378,"type":"if","locations":[{"start":{"line":378,"column":8},"end":{"line":378,"column":8}},{"start":{"line":378,"column":8},"end":{"line":378,"column":8}}]},"25":{"line":379,"type":"cond-expr","locations":[{"start":{"line":379,"column":12},"end":{"line":379,"column":32}},{"start":{"line":380,"column":12},"end":{"line":380,"column":77}}]},"26":{"line":389,"type":"if","locations":[{"start":{"line":389,"column":12},"end":{"line":389,"column":12}},{"start":{"line":389,"column":12},"end":{"line":389,"column":12}}]},"27":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":8},"end":{"line":407,"column":8}},{"start":{"line":407,"column":8},"end":{"line":407,"column":8}}]},"28":{"line":413,"type":"if","locations":[{"start":{"line":413,"column":8},"end":{"line":413,"column":8}},{"start":{"line":413,"column":8},"end":{"line":413,"column":8}}]},"29":{"line":421,"type":"if","locations":[{"start":{"line":421,"column":8},"end":{"line":421,"column":8}},{"start":{"line":421,"column":8},"end":{"line":421,"column":8}}]}}},
-"contracts/modules/internal/EnforcementModuleInternal.sol":{"l":{"65":944,"66":944,"83":22,"84":22,"85":2,"87":20,"88":20,"89":20,"101":8,"102":8,"103":2,"105":6,"106":6,"108":6,"113":974},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/EnforcementModuleInternal.sol","s":{"1":944,"2":944,"3":22,"4":22,"5":2,"6":20,"7":20,"8":8,"9":8,"10":2,"11":6,"12":6},"b":{"1":[384,0],"2":[2,20],"3":[2,6]},"f":{"1":384,"2":944,"3":22,"4":8,"5":974},"fnMap":{"1":{"name":"__Enforcement_init_unchained","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":55,"column":4}}},"2":{"name":"frozen","line":64,"loc":{"start":{"line":64,"column":4},"end":{"line":67,"column":4}}},"3":{"name":"_freeze","line":79,"loc":{"start":{"line":79,"column":4},"end":{"line":90,"column":4}}},"4":{"name":"_unfreeze","line":97,"loc":{"start":{"line":97,"column":4},"end":{"line":109,"column":4}}},"5":{"name":"_getEnforcementModuleInternalStorage","line":112,"loc":{"start":{"line":112,"column":4},"end":{"line":116,"column":4}}}},"statementMap":{"1":{"start":{"line":65,"column":8},"end":{"line":65,"column":91}},"2":{"start":{"line":66,"column":8},"end":{"line":66,"column":33}},"3":{"start":{"line":83,"column":8},"end":{"line":83,"column":91}},"4":{"start":{"line":84,"column":8},"end":{"line":84,"column":2789}},"5":{"start":{"line":85,"column":12},"end":{"line":85,"column":24}},"6":{"start":{"line":88,"column":8},"end":{"line":88,"column":58}},"7":{"start":{"line":89,"column":8},"end":{"line":89,"column":19}},"8":{"start":{"line":101,"column":8},"end":{"line":101,"column":91}},"9":{"start":{"line":102,"column":8},"end":{"line":102,"column":3351}},"10":{"start":{"line":103,"column":12},"end":{"line":103,"column":24}},"11":{"start":{"line":106,"column":8},"end":{"line":106,"column":60}},"12":{"start":{"line":108,"column":8},"end":{"line":108,"column":19}}},"branchMap":{"1":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":53},"end":{"line":53,"column":53}},{"start":{"line":53,"column":53},"end":{"line":53,"column":53}}]},"2":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":8},"end":{"line":84,"column":8}},{"start":{"line":84,"column":8},"end":{"line":84,"column":8}}]},"3":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":8},"end":{"line":102,"column":8}},{"start":{"line":102,"column":8},"end":{"line":102,"column":8}}]}}},
-"contracts/modules/internal/ERC20SnapshotModuleInternal.sol":{"l":{"35":480,"36":480,"44":160,"45":160,"46":480,"48":160,"56":80,"57":80,"58":80,"59":80,"71":1200,"72":1200,"77":1200,"86":720,"87":720,"91":720,"106":421,"107":421,"109":77,"110":77,"112":43,"115":34,"119":344,"120":344,"128":464,"129":464,"136":378,"137":378},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/ERC20SnapshotModuleInternal.sol","s":{"1":160,"2":80,"3":1200,"4":1200,"5":1200,"6":720,"7":720,"8":720,"9":421,"10":421,"11":77,"12":77,"13":43,"14":34,"15":344,"16":344,"17":464,"18":464,"19":378,"20":378},"b":{"1":[384,0],"2":[400,800],"3":[36,684],"4":[77,344],"5":[43,34]},"f":{"1":384,"2":480,"3":160,"4":80,"5":1200,"6":720,"7":421,"8":464,"9":378},"fnMap":{"1":{"name":"__ERC20Snapshot_init_unchained","line":21,"loc":{"start":{"line":21,"column":4},"end":{"line":24,"column":4}}},"2":{"name":"snapshotInfo","line":34,"loc":{"start":{"line":34,"column":4},"end":{"line":37,"column":4}}},"3":{"name":"snapshotInfoBatch","line":43,"loc":{"start":{"line":43,"column":4},"end":{"line":49,"column":4}}},"4":{"name":"snapshotInfoBatch","line":55,"loc":{"start":{"line":55,"column":4},"end":{"line":61,"column":4}}},"5":{"name":"snapshotBalanceOf","line":67,"loc":{"start":{"line":67,"column":4},"end":{"line":78,"column":4}}},"6":{"name":"snapshotTotalSupply","line":85,"loc":{"start":{"line":85,"column":4},"end":{"line":92,"column":4}}},"7":{"name":"_snapshotUpdate","line":102,"loc":{"start":{"line":102,"column":4},"end":{"line":122,"column":4}}},"8":{"name":"_updateAccountSnapshot","line":127,"loc":{"start":{"line":127,"column":4},"end":{"line":130,"column":4}}},"9":{"name":"_updateTotalSupplySnapshot","line":135,"loc":{"start":{"line":135,"column":4},"end":{"line":138,"column":4}}}},"statementMap":{"1":{"start":{"line":45,"column":8},"end":{"line":45,"column":2070}},"2":{"start":{"line":58,"column":8},"end":{"line":58,"column":2733}},"3":{"start":{"line":71,"column":8},"end":{"line":71,"column":77}},"4":{"start":{"line":72,"column":8},"end":{"line":72,"column":3316}},"5":{"start":{"line":77,"column":8},"end":{"line":77,"column":53}},"6":{"start":{"line":86,"column":8},"end":{"line":86,"column":77}},"7":{"start":{"line":87,"column":8},"end":{"line":87,"column":3868}},"8":{"start":{"line":91,"column":8},"end":{"line":91,"column":50}},"9":{"start":{"line":106,"column":8},"end":{"line":106,"column":28}},"10":{"start":{"line":107,"column":8},"end":{"line":107,"column":4593}},"11":{"start":{"line":109,"column":12},"end":{"line":109,"column":39}},"12":{"start":{"line":110,"column":12},"end":{"line":110,"column":4719}},"13":{"start":{"line":112,"column":16},"end":{"line":112,"column":41}},"14":{"start":{"line":115,"column":16},"end":{"line":115,"column":43}},"15":{"start":{"line":119,"column":12},"end":{"line":119,"column":37}},"16":{"start":{"line":120,"column":12},"end":{"line":120,"column":39}},"17":{"start":{"line":128,"column":8},"end":{"line":128,"column":77}},"18":{"start":{"line":129,"column":8},"end":{"line":129,"column":79}},"19":{"start":{"line":136,"column":8},"end":{"line":136,"column":77}},"20":{"start":{"line":137,"column":8},"end":{"line":137,"column":62}}},"branchMap":{"1":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":55},"end":{"line":21,"column":55}},{"start":{"line":21,"column":55},"end":{"line":21,"column":55}}]},"2":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":29},"end":{"line":77,"column":33}},{"start":{"line":77,"column":37},"end":{"line":77,"column":52}}]},"3":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":29},"end":{"line":91,"column":33}},{"start":{"line":91,"column":37},"end":{"line":91,"column":49}}]},"4":{"line":107,"type":"if","locations":[{"start":{"line":107,"column":8},"end":{"line":107,"column":8}},{"start":{"line":107,"column":8},"end":{"line":107,"column":8}}]},"5":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":12},"end":{"line":110,"column":12}},{"start":{"line":110,"column":12},"end":{"line":110,"column":12}}]}}},
-"contracts/modules/internal/ValidationModuleInternal.sol":{"l":{"33":384,"34":18,"35":18,"36":18,"46":32,"47":32,"63":12,"64":12,"73":6,"74":6,"85":6,"86":6,"90":60,"91":60,"97":628},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/ValidationModuleInternal.sol","s":{"1":384,"2":18,"3":18,"4":32,"5":32,"6":12,"7":12,"8":6,"9":6,"10":6,"11":6,"12":60,"13":60},"b":{"1":[384,0],"2":[18,366]},"f":{"1":384,"2":32,"3":12,"4":6,"5":6,"6":60,"7":628},"fnMap":{"1":{"name":"__Validation_init_unchained","line":32,"loc":{"start":{"line":30,"column":4},"end":{"line":38,"column":4}}},"2":{"name":"ruleEngine","line":45,"loc":{"start":{"line":45,"column":4},"end":{"line":48,"column":4}}},"3":{"name":"_validateTransfer","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":65,"column":4}}},"4":{"name":"_messageForTransferRestriction","line":70,"loc":{"start":{"line":70,"column":4},"end":{"line":75,"column":4}}},"5":{"name":"_detectTransferRestriction","line":80,"loc":{"start":{"line":80,"column":4},"end":{"line":87,"column":4}}},"6":{"name":"_operateOnTransfer","line":89,"loc":{"start":{"line":89,"column":4},"end":{"line":92,"column":4}}},"7":{"name":"_getValidationModuleInternalStorage","line":96,"loc":{"start":{"line":96,"column":4},"end":{"line":100,"column":4}}}},"statementMap":{"1":{"start":{"line":33,"column":8},"end":{"line":33,"column":1219}},"2":{"start":{"line":34,"column":12},"end":{"line":34,"column":93}},"3":{"start":{"line":36,"column":12},"end":{"line":36,"column":40}},"4":{"start":{"line":46,"column":8},"end":{"line":46,"column":89}},"5":{"start":{"line":47,"column":8},"end":{"line":47,"column":28}},"6":{"start":{"line":63,"column":8},"end":{"line":63,"column":89}},"7":{"start":{"line":64,"column":8},"end":{"line":64,"column":63}},"8":{"start":{"line":73,"column":8},"end":{"line":73,"column":89}},"9":{"start":{"line":74,"column":8},"end":{"line":74,"column":75}},"10":{"start":{"line":85,"column":8},"end":{"line":85,"column":89}},"11":{"start":{"line":86,"column":8},"end":{"line":86,"column":72}},"12":{"start":{"line":90,"column":8},"end":{"line":90,"column":89}},"13":{"start":{"line":91,"column":8},"end":{"line":91,"column":64}}},"branchMap":{"1":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":15},"end":{"line":32,"column":15}},{"start":{"line":32,"column":15},"end":{"line":32,"column":15}}]},"2":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":8},"end":{"line":33,"column":8}},{"start":{"line":33,"column":8},"end":{"line":33,"column":8}}]}}},
-"contracts/modules/security/AuthorizationModule.sol":{"l":{"32":384,"33":2,"35":382,"36":382,"37":16,"38":16,"39":16,"49":2,"50":2,"61":16,"62":16,"63":4,"65":12,"66":12,"70":40,"71":40,"72":8,"73":8,"75":4,"78":36,"82":10,"83":10,"84":8,"85":8,"87":4,"90":6,"101":1283,"102":759,"104":524,"115":84},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/security/AuthorizationModule.sol","s":{"1":384,"2":382,"3":382,"4":16,"5":16,"6":2,"7":2,"8":16,"9":16,"10":12,"11":40,"12":40,"13":8,"14":8,"15":36,"16":10,"17":10,"18":8,"19":8,"20":6,"21":1283,"22":759,"23":524},"b":{"1":[384,0],"2":[2,382],"3":[16,366],"4":[16,4],"5":[4,12],"6":[40,2],"7":[8,32],"8":[4,4],"9":[10,2],"10":[8,2],"11":[4,4],"12":[759,524]},"f":{"1":384,"2":2,"3":16,"4":40,"5":10,"6":1283,"7":84},"fnMap":{"1":{"name":"__AuthorizationModule_init_unchained","line":31,"loc":{"start":{"line":30,"column":4},"end":{"line":41,"column":4}}},"2":{"name":"authorizationEngine","line":48,"loc":{"start":{"line":48,"column":4},"end":{"line":51,"column":4}}},"3":{"name":"setAuthorizationEngine","line":60,"loc":{"start":{"line":58,"column":4},"end":{"line":67,"column":4}}},"4":{"name":"grantRole","line":69,"loc":{"start":{"line":69,"column":4},"end":{"line":79,"column":4}}},"5":{"name":"revokeRole","line":81,"loc":{"start":{"line":81,"column":4},"end":{"line":91,"column":4}}},"6":{"name":"hasRole","line":96,"loc":{"start":{"line":96,"column":4},"end":{"line":105,"column":4}}},"7":{"name":"_getAuthorizationModuleStorage","line":114,"loc":{"start":{"line":114,"column":4},"end":{"line":118,"column":4}}}},"statementMap":{"1":{"start":{"line":32,"column":8},"end":{"line":32,"column":1354}},"2":{"start":{"line":35,"column":8},"end":{"line":35,"column":44}},"3":{"start":{"line":36,"column":8},"end":{"line":36,"column":1521}},"4":{"start":{"line":37,"column":12},"end":{"line":37,"column":83}},"5":{"start":{"line":39,"column":12},"end":{"line":39,"column":58}},"6":{"start":{"line":49,"column":8},"end":{"line":49,"column":79}},"7":{"start":{"line":50,"column":8},"end":{"line":50,"column":37}},"8":{"start":{"line":61,"column":8},"end":{"line":61,"column":79}},"9":{"start":{"line":62,"column":8},"end":{"line":62,"column":2578}},"10":{"start":{"line":66,"column":8},"end":{"line":66,"column":54}},"11":{"start":{"line":70,"column":8},"end":{"line":70,"column":79}},"12":{"start":{"line":71,"column":8},"end":{"line":71,"column":3034}},"13":{"start":{"line":72,"column":12},"end":{"line":72,"column":82}},"14":{"start":{"line":73,"column":12},"end":{"line":73,"column":3188}},"15":{"start":{"line":78,"column":8},"end":{"line":78,"column":64}},"16":{"start":{"line":82,"column":8},"end":{"line":82,"column":79}},"17":{"start":{"line":83,"column":8},"end":{"line":83,"column":3630}},"18":{"start":{"line":84,"column":12},"end":{"line":84,"column":83}},"19":{"start":{"line":85,"column":12},"end":{"line":85,"column":3785}},"20":{"start":{"line":90,"column":8},"end":{"line":90,"column":65}},"21":{"start":{"line":101,"column":8},"end":{"line":101,"column":4316}},"22":{"start":{"line":102,"column":12},"end":{"line":102,"column":23}},"23":{"start":{"line":104,"column":8},"end":{"line":104,"column":62}}},"branchMap":{"1":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":13},"end":{"line":31,"column":13}},{"start":{"line":31,"column":13},"end":{"line":31,"column":13}}]},"2":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":8},"end":{"line":32,"column":8}},{"start":{"line":32,"column":8},"end":{"line":32,"column":8}}]},"3":{"line":36,"type":"if","locations":[{"start":{"line":36,"column":8},"end":{"line":36,"column":8}},{"start":{"line":36,"column":8},"end":{"line":36,"column":8}}]},"4":{"line":60,"type":"if","locations":[{"start":{"line":60,"column":15},"end":{"line":60,"column":15}},{"start":{"line":60,"column":15},"end":{"line":60,"column":15}}]},"5":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":8},"end":{"line":62,"column":8}},{"start":{"line":62,"column":8},"end":{"line":62,"column":8}}]},"6":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":70},"end":{"line":69,"column":70}},{"start":{"line":69,"column":70},"end":{"line":69,"column":70}}]},"7":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":8},"end":{"line":71,"column":8}},{"start":{"line":71,"column":8},"end":{"line":71,"column":8}}]},"8":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":12},"end":{"line":73,"column":12}},{"start":{"line":73,"column":12},"end":{"line":73,"column":12}}]},"9":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":71},"end":{"line":81,"column":71}},{"start":{"line":81,"column":71},"end":{"line":81,"column":71}}]},"10":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]},"11":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":12},"end":{"line":85,"column":12}},{"start":{"line":85,"column":12},"end":{"line":85,"column":12}}]},"12":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":8},"end":{"line":101,"column":8}},{"start":{"line":101,"column":8},"end":{"line":101,"column":8}}]}}},
-"contracts/modules/wrapper/controllers/ValidationModule.sol":{"l":{"44":18,"45":18,"46":3,"48":15,"49":15,"60":20,"61":20,"62":3,"67":4,"72":2,"77":2,"79":6,"81":3,"97":17,"98":17,"99":4,"101":2,"103":2,"105":6,"107":3,"116":19,"117":4,"119":15,"120":15,"121":12,"123":3,"135":457,"136":18,"138":439,"142":438,"143":14,"145":424,"146":424,"147":60,"149":364},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/controllers/ValidationModule.sol","s":{"1":18,"2":18,"3":15,"4":20,"5":20,"6":3,"7":17,"8":4,"9":13,"10":2,"11":11,"12":2,"13":9,"14":6,"15":3,"16":17,"17":17,"18":4,"19":13,"20":2,"21":11,"22":2,"23":9,"24":6,"25":3,"26":19,"27":4,"28":15,"29":15,"30":12,"31":3,"32":457,"33":18,"34":439,"35":438,"36":14,"37":424,"38":424,"39":60,"40":364},"b":{"1":[382,0],"2":[18,3],"3":[3,15],"4":[3,17],"5":[4,13],"6":[2,11],"7":[2,9],"8":[6,3],"9":[4,13],"10":[2,11],"11":[2,9],"12":[6,3],"13":[4,15],"14":[12,3],"15":[18,439],"16":[12,4],"17":[4,2],"18":[14,424],"19":[60,364]},"f":{"1":382,"2":18,"3":20,"4":17,"5":19,"6":457,"7":438},"fnMap":{"1":{"name":"__ValidationModule_init_unchained","line":28,"loc":{"start":{"line":28,"column":4},"end":{"line":30,"column":4}}},"2":{"name":"setRuleEngine","line":43,"loc":{"start":{"line":41,"column":4},"end":{"line":50,"column":4}}},"3":{"name":"messageForTransferRestriction","line":57,"loc":{"start":{"line":57,"column":4},"end":{"line":83,"column":4}}},"4":{"name":"detectTransferRestriction","line":92,"loc":{"start":{"line":92,"column":4},"end":{"line":109,"column":4}}},"5":{"name":"validateTransfer","line":111,"loc":{"start":{"line":111,"column":4},"end":{"line":124,"column":4}}},"6":{"name":"_validateTransferByModule","line":130,"loc":{"start":{"line":130,"column":4},"end":{"line":139,"column":4}}},"7":{"name":"_operateOnTransfer","line":141,"loc":{"start":{"line":141,"column":4},"end":{"line":150,"column":4}}}},"statementMap":{"1":{"start":{"line":44,"column":8},"end":{"line":44,"column":89}},"2":{"start":{"line":45,"column":8},"end":{"line":45,"column":1409}},"3":{"start":{"line":49,"column":8},"end":{"line":49,"column":36}},"4":{"start":{"line":60,"column":10},"end":{"line":60,"column":91}},"5":{"start":{"line":61,"column":8},"end":{"line":61,"column":2191}},"6":{"start":{"line":62,"column":12},"end":{"line":62,"column":35}},"7":{"start":{"line":63,"column":15},"end":{"line":63,"column":2307}},"8":{"start":{"line":67,"column":12},"end":{"line":67,"column":48}},"9":{"start":{"line":68,"column":15},"end":{"line":68,"column":2483}},"10":{"start":{"line":72,"column":12},"end":{"line":72,"column":53}},"11":{"start":{"line":73,"column":15},"end":{"line":73,"column":2669}},"12":{"start":{"line":77,"column":12},"end":{"line":77,"column":51}},"13":{"start":{"line":78,"column":15},"end":{"line":78,"column":2851}},"14":{"start":{"line":79,"column":12},"end":{"line":79,"column":66}},"15":{"start":{"line":81,"column":12},"end":{"line":81,"column":36}},"16":{"start":{"line":97,"column":8},"end":{"line":97,"column":89}},"17":{"start":{"line":98,"column":8},"end":{"line":98,"column":3641}},"18":{"start":{"line":99,"column":12},"end":{"line":99,"column":69}},"19":{"start":{"line":100,"column":15},"end":{"line":100,"column":3743}},"20":{"start":{"line":101,"column":12},"end":{"line":101,"column":74}},"21":{"start":{"line":102,"column":15},"end":{"line":102,"column":3854}},"22":{"start":{"line":103,"column":12},"end":{"line":103,"column":72}},"23":{"start":{"line":104,"column":15},"end":{"line":104,"column":3961}},"24":{"start":{"line":105,"column":12},"end":{"line":105,"column":63}},"25":{"start":{"line":107,"column":12},"end":{"line":107,"column":56}},"26":{"start":{"line":116,"column":8},"end":{"line":116,"column":4310}},"27":{"start":{"line":117,"column":12},"end":{"line":117,"column":24}},"28":{"start":{"line":119,"column":8},"end":{"line":119,"column":89}},"29":{"start":{"line":120,"column":8},"end":{"line":120,"column":4497}},"30":{"start":{"line":121,"column":12},"end":{"line":121,"column":54}},"31":{"start":{"line":123,"column":8},"end":{"line":123,"column":19}},"32":{"start":{"line":135,"column":8},"end":{"line":135,"column":4983}},"33":{"start":{"line":136,"column":12},"end":{"line":136,"column":24}},"34":{"start":{"line":138,"column":8},"end":{"line":138,"column":19}},"35":{"start":{"line":142,"column":8},"end":{"line":142,"column":5209}},"36":{"start":{"line":143,"column":12},"end":{"line":143,"column":24}},"37":{"start":{"line":145,"column":8},"end":{"line":145,"column":89}},"38":{"start":{"line":146,"column":8},"end":{"line":146,"column":5395}},"39":{"start":{"line":147,"column":12},"end":{"line":147,"column":80}},"40":{"start":{"line":149,"column":8},"end":{"line":149,"column":19}}},"branchMap":{"1":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":58},"end":{"line":28,"column":58}},{"start":{"line":28,"column":58},"end":{"line":28,"column":58}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":15},"end":{"line":43,"column":15}},{"start":{"line":43,"column":15},"end":{"line":43,"column":15}}]},"3":{"line":45,"type":"if","locations":[{"start":{"line":45,"column":8},"end":{"line":45,"column":8}},{"start":{"line":45,"column":8},"end":{"line":45,"column":8}}]},"4":{"line":61,"type":"if","locations":[{"start":{"line":61,"column":8},"end":{"line":61,"column":8}},{"start":{"line":61,"column":8},"end":{"line":61,"column":8}}]},"5":{"line":63,"type":"if","locations":[{"start":{"line":63,"column":15},"end":{"line":63,"column":15}},{"start":{"line":63,"column":15},"end":{"line":63,"column":15}}]},"6":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":15},"end":{"line":68,"column":15}},{"start":{"line":68,"column":15},"end":{"line":68,"column":15}}]},"7":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":15},"end":{"line":73,"column":15}},{"start":{"line":73,"column":15},"end":{"line":73,"column":15}}]},"8":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":15},"end":{"line":78,"column":15}},{"start":{"line":78,"column":15},"end":{"line":78,"column":15}}]},"9":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":8},"end":{"line":98,"column":8}},{"start":{"line":98,"column":8},"end":{"line":98,"column":8}}]},"10":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":15},"end":{"line":100,"column":15}},{"start":{"line":100,"column":15},"end":{"line":100,"column":15}}]},"11":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":15},"end":{"line":102,"column":15}},{"start":{"line":102,"column":15},"end":{"line":102,"column":15}}]},"12":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":15},"end":{"line":104,"column":15}},{"start":{"line":104,"column":15},"end":{"line":104,"column":15}}]},"13":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":8},"end":{"line":116,"column":8}},{"start":{"line":116,"column":8},"end":{"line":116,"column":8}}]},"14":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":8},"end":{"line":120,"column":8}},{"start":{"line":120,"column":8},"end":{"line":120,"column":8}}]},"15":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]},"16":{"line":135,"type":"cond-expr","locations":[{"start":{"line":135,"column":12},"end":{"line":135,"column":19}},{"start":{"line":135,"column":24},"end":{"line":135,"column":35}}]},"17":{"line":135,"type":"cond-expr","locations":[{"start":{"line":135,"column":12},"end":{"line":135,"column":35}},{"start":{"line":135,"column":40},"end":{"line":135,"column":49}}]},"18":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":8}},{"start":{"line":142,"column":8},"end":{"line":142,"column":8}}]},"19":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":8},"end":{"line":146,"column":8}},{"start":{"line":146,"column":8},"end":{"line":146,"column":8}}]}}},
-"contracts/modules/wrapper/core/BaseModule.sol":{"l":{"45":382,"46":382,"47":382,"48":382,"56":10,"57":10,"61":10,"62":10,"65":8,"66":8,"75":2,"76":2,"77":2,"86":2,"87":2,"88":2,"97":2,"98":2,"99":2,"109":416},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/BaseModule.sol","s":{"1":382,"2":10,"3":10,"4":10,"5":10,"6":8,"7":8,"8":2,"9":2,"10":2,"11":2,"12":2,"13":2},"b":{"1":[382,0],"2":[2,2],"3":[2,2],"4":[2,2]},"f":{"1":382,"2":10,"3":10,"4":8,"5":2,"6":2,"7":2,"8":416},"fnMap":{"1":{"name":"__Base_init_unchained","line":44,"loc":{"start":{"line":40,"column":4},"end":{"line":49,"column":4}}},"2":{"name":"tokenId","line":55,"loc":{"start":{"line":55,"column":4},"end":{"line":58,"column":4}}},"3":{"name":"terms","line":60,"loc":{"start":{"line":60,"column":4},"end":{"line":63,"column":4}}},"4":{"name":"information","line":64,"loc":{"start":{"line":64,"column":4},"end":{"line":67,"column":4}}},"5":{"name":"setTokenId","line":74,"loc":{"start":{"line":72,"column":4},"end":{"line":78,"column":4}}},"6":{"name":"setTerms","line":85,"loc":{"start":{"line":83,"column":4},"end":{"line":89,"column":4}}},"7":{"name":"setInformation","line":96,"loc":{"start":{"line":94,"column":4},"end":{"line":100,"column":4}}},"8":{"name":"_getBaseModuleStorage","line":108,"loc":{"start":{"line":108,"column":4},"end":{"line":112,"column":4}}}},"statementMap":{"1":{"start":{"line":45,"column":8},"end":{"line":45,"column":61}},"2":{"start":{"line":56,"column":8},"end":{"line":56,"column":61}},"3":{"start":{"line":57,"column":8},"end":{"line":57,"column":25}},"4":{"start":{"line":61,"column":8},"end":{"line":61,"column":61}},"5":{"start":{"line":62,"column":8},"end":{"line":62,"column":23}},"6":{"start":{"line":65,"column":8},"end":{"line":65,"column":61}},"7":{"start":{"line":66,"column":8},"end":{"line":66,"column":29}},"8":{"start":{"line":75,"column":8},"end":{"line":75,"column":61}},"9":{"start":{"line":77,"column":8},"end":{"line":77,"column":40}},"10":{"start":{"line":86,"column":8},"end":{"line":86,"column":61}},"11":{"start":{"line":88,"column":8},"end":{"line":88,"column":33}},"12":{"start":{"line":97,"column":8},"end":{"line":97,"column":61}},"13":{"start":{"line":99,"column":8},"end":{"line":99,"column":52}}},"branchMap":{"1":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":15},"end":{"line":44,"column":15}},{"start":{"line":44,"column":15},"end":{"line":44,"column":15}}]},"2":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":13},"end":{"line":74,"column":13}},{"start":{"line":74,"column":13},"end":{"line":74,"column":13}}]},"3":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":13},"end":{"line":85,"column":13}},{"start":{"line":85,"column":13},"end":{"line":85,"column":13}}]},"4":{"line":96,"type":"if","locations":[{"start":{"line":96,"column":13},"end":{"line":96,"column":13}},{"start":{"line":96,"column":13},"end":{"line":96,"column":13}}]}}},
-"contracts/modules/wrapper/core/EnforcementModule.sol":{"l":{"43":22,"57":8},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/EnforcementModule.sol","s":{"1":22,"2":8},"b":{"1":[382,0],"2":[22,2],"3":[8,2]},"f":{"1":382,"2":22,"3":8},"fnMap":{"1":{"name":"__EnforcementModule_init_unchained","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":29,"column":4}}},"2":{"name":"freeze","line":42,"loc":{"start":{"line":39,"column":4},"end":{"line":44,"column":4}}},"3":{"name":"unfreeze","line":56,"loc":{"start":{"line":53,"column":4},"end":{"line":58,"column":4}}}},"statementMap":{"1":{"start":{"line":43,"column":8},"end":{"line":43,"column":39}},"2":{"start":{"line":57,"column":8},"end":{"line":57,"column":41}}},"branchMap":{"1":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":59},"end":{"line":27,"column":59}},{"start":{"line":27,"column":59},"end":{"line":27,"column":59}}]},"2":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":13},"end":{"line":42,"column":13}},{"start":{"line":42,"column":13},"end":{"line":42,"column":13}}]},"3":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":13},"end":{"line":56,"column":13}},{"start":{"line":56,"column":13},"end":{"line":56,"column":13}}]}}},
-"contracts/modules/wrapper/core/ERC20BaseModule.sol":{"l":{"42":382,"43":382,"54":2,"55":2,"74":10,"75":2,"79":8,"80":4,"83":4,"86":10,"90":2,"105":10,"107":2,"108":2,"111":2,"120":4,"121":4,"122":2,"124":4,"135":384},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/ERC20BaseModule.sol","s":{"1":382,"2":2,"3":2,"4":10,"5":8,"6":4,"7":10,"8":2,"9":10,"10":2,"11":2,"12":2,"13":4},"b":{"1":[382,0],"2":[2,8],"3":[4,4],"4":[2,0]},"f":{"1":382,"2":2,"3":10,"4":10,"5":4,"6":384},"fnMap":{"1":{"name":"__ERC20BaseModule_init_unchained","line":41,"loc":{"start":{"line":39,"column":4},"end":{"line":44,"column":4}}},"2":{"name":"decimals","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":56,"column":4}}},"3":{"name":"transferBatch","line":70,"loc":{"start":{"line":70,"column":4},"end":{"line":91,"column":4}}},"4":{"name":"transferFrom","line":100,"loc":{"start":{"line":100,"column":4},"end":{"line":112,"column":4}}},"5":{"name":"balanceInfo","line":119,"loc":{"start":{"line":119,"column":4},"end":{"line":125,"column":4}}},"6":{"name":"_getERC20BaseModuleStorage","line":134,"loc":{"start":{"line":134,"column":4},"end":{"line":138,"column":4}}}},"statementMap":{"1":{"start":{"line":42,"column":8},"end":{"line":42,"column":71}},"2":{"start":{"line":54,"column":8},"end":{"line":54,"column":71}},"3":{"start":{"line":55,"column":8},"end":{"line":55,"column":26}},"4":{"start":{"line":74,"column":8},"end":{"line":74,"column":2789}},"5":{"start":{"line":79,"column":8},"end":{"line":79,"column":3006}},"6":{"start":{"line":83,"column":8},"end":{"line":83,"column":3201}},"7":{"start":{"line":86,"column":12},"end":{"line":86,"column":70}},"8":{"start":{"line":90,"column":8},"end":{"line":90,"column":19}},"9":{"start":{"line":105,"column":8},"end":{"line":105,"column":68}},"10":{"start":{"line":107,"column":8},"end":{"line":107,"column":4151}},"11":{"start":{"line":108,"column":12},"end":{"line":108,"column":49}},"12":{"start":{"line":111,"column":8},"end":{"line":111,"column":21}},"13":{"start":{"line":121,"column":8},"end":{"line":121,"column":4644}}},"branchMap":{"1":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":15},"end":{"line":41,"column":15}},{"start":{"line":41,"column":15},"end":{"line":41,"column":15}}]},"2":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":8},"end":{"line":74,"column":8}},{"start":{"line":74,"column":8},"end":{"line":74,"column":8}}]},"3":{"line":79,"type":"if","locations":[{"start":{"line":79,"column":8},"end":{"line":79,"column":8}},{"start":{"line":79,"column":8},"end":{"line":79,"column":8}}]},"4":{"line":107,"type":"if","locations":[{"start":{"line":107,"column":8},"end":{"line":107,"column":8}},{"start":{"line":107,"column":8},"end":{"line":107,"column":8}}]}}},
-"contracts/modules/wrapper/core/ERC20BurnModule.sol":{"l":{"54":14,"55":12,"78":12,"79":2,"83":10,"84":4,"87":6,"88":18,"89":16,"112":4,"113":4,"114":4,"116":2,"119":2,"120":2,"123":2,"125":2,"127":2},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/ERC20BurnModule.sol","s":{"1":14,"2":12,"3":12,"4":10,"5":6,"6":18,"7":16,"8":4,"9":4,"10":4,"11":2,"12":2,"13":2,"14":2},"b":{"1":[382,0],"2":[14,4],"3":[12,2],"4":[2,10],"5":[4,6],"6":[4,2],"7":[2,2]},"f":{"1":382,"2":14,"3":12,"4":4},"fnMap":{"1":{"name":"__ERC20BurnModule_init_unchained","line":32,"loc":{"start":{"line":32,"column":4},"end":{"line":34,"column":4}}},"2":{"name":"burn","line":53,"loc":{"start":{"line":49,"column":4},"end":{"line":56,"column":4}}},"3":{"name":"burnBatch","line":77,"loc":{"start":{"line":73,"column":4},"end":{"line":91,"column":4}}},"4":{"name":"burnFrom","line":109,"loc":{"start":{"line":107,"column":4},"end":{"line":128,"column":4}}}},"statementMap":{"1":{"start":{"line":54,"column":8},"end":{"line":54,"column":28}},"2":{"start":{"line":55,"column":8},"end":{"line":55,"column":41}},"3":{"start":{"line":78,"column":8},"end":{"line":78,"column":2750}},"4":{"start":{"line":83,"column":8},"end":{"line":83,"column":2972}},"5":{"start":{"line":87,"column":8},"end":{"line":87,"column":3172}},"6":{"start":{"line":88,"column":12},"end":{"line":88,"column":40}},"7":{"start":{"line":89,"column":12},"end":{"line":89,"column":53}},"8":{"start":{"line":112,"column":8},"end":{"line":112,"column":38}},"9":{"start":{"line":113,"column":8},"end":{"line":113,"column":61}},"10":{"start":{"line":114,"column":8},"end":{"line":114,"column":4061}},"11":{"start":{"line":120,"column":12},"end":{"line":120,"column":62}},"12":{"start":{"line":123,"column":8},"end":{"line":123,"column":28}},"13":{"start":{"line":125,"column":8},"end":{"line":125,"column":45}},"14":{"start":{"line":127,"column":8},"end":{"line":127,"column":45}}},"branchMap":{"1":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":57},"end":{"line":32,"column":57}},{"start":{"line":32,"column":57},"end":{"line":32,"column":57}}]},"2":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":13},"end":{"line":53,"column":13}},{"start":{"line":53,"column":13},"end":{"line":53,"column":13}}]},"3":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":13},"end":{"line":77,"column":13}},{"start":{"line":77,"column":13},"end":{"line":77,"column":13}}]},"4":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":8},"end":{"line":78,"column":8}},{"start":{"line":78,"column":8},"end":{"line":78,"column":8}}]},"5":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]},"6":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":8},"end":{"line":109,"column":8}},{"start":{"line":109,"column":8},"end":{"line":109,"column":8}}]},"7":{"line":114,"type":"if","locations":[{"start":{"line":114,"column":8},"end":{"line":114,"column":8}},{"start":{"line":114,"column":8},"end":{"line":114,"column":8}}]}}},
-"contracts/modules/wrapper/core/ERC20MintModule.sol":{"l":{"48":290,"49":290,"71":24,"72":2,"76":22,"77":4,"80":18,"81":54,"82":54},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/ERC20MintModule.sol","s":{"1":290,"2":290,"3":24,"4":22,"5":18,"6":54,"7":54},"b":{"1":[382,0],"2":[290,4],"3":[24,2],"4":[2,22],"5":[4,18]},"f":{"1":382,"2":290,"3":24},"fnMap":{"1":{"name":"__ERC20MintModule_init_unchained","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":29,"column":4}}},"2":{"name":"mint","line":47,"loc":{"start":{"line":47,"column":4},"end":{"line":50,"column":4}}},"3":{"name":"mintBatch","line":70,"loc":{"start":{"line":67,"column":4},"end":{"line":84,"column":4}}}},"statementMap":{"1":{"start":{"line":48,"column":8},"end":{"line":48,"column":28}},"2":{"start":{"line":49,"column":8},"end":{"line":49,"column":33}},"3":{"start":{"line":71,"column":8},"end":{"line":71,"column":2514}},"4":{"start":{"line":76,"column":8},"end":{"line":76,"column":2736}},"5":{"start":{"line":80,"column":8},"end":{"line":80,"column":2936}},"6":{"start":{"line":81,"column":12},"end":{"line":81,"column":40}},"7":{"start":{"line":82,"column":12},"end":{"line":82,"column":45}}},"branchMap":{"1":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":57},"end":{"line":27,"column":57}},{"start":{"line":27,"column":57},"end":{"line":27,"column":57}}]},"2":{"line":47,"type":"if","locations":[{"start":{"line":47,"column":57},"end":{"line":47,"column":57}},{"start":{"line":47,"column":57},"end":{"line":47,"column":57}}]},"3":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":13},"end":{"line":70,"column":13}},{"start":{"line":70,"column":13},"end":{"line":70,"column":13}}]},"4":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":8},"end":{"line":71,"column":8}},{"start":{"line":71,"column":8},"end":{"line":71,"column":8}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]}}},
-"contracts/modules/wrapper/core/PauseModule.sol":{"l":{"51":14,"63":6,"64":6,"65":2,"67":4,"83":2,"84":2,"85":2,"86":2,"93":4,"94":4,"105":12},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/PauseModule.sol","s":{"1":14,"2":6,"3":6,"4":4,"5":2,"6":2,"7":2,"8":4,"9":4},"b":{"1":[382,0],"2":[14,3],"3":[6,2],"4":[2,4],"5":[2,2]},"f":{"1":382,"2":14,"3":6,"4":2,"5":4,"6":12},"fnMap":{"1":{"name":"__PauseModule_init_unchained","line":34,"loc":{"start":{"line":34,"column":4},"end":{"line":36,"column":4}}},"2":{"name":"pause","line":50,"loc":{"start":{"line":50,"column":4},"end":{"line":52,"column":4}}},"3":{"name":"unpause","line":62,"loc":{"start":{"line":62,"column":4},"end":{"line":68,"column":4}}},"4":{"name":"deactivateContract","line":81,"loc":{"start":{"line":79,"column":4},"end":{"line":87,"column":4}}},"5":{"name":"deactivated","line":92,"loc":{"start":{"line":92,"column":4},"end":{"line":95,"column":4}}},"6":{"name":"_getPauseModuleStorage","line":104,"loc":{"start":{"line":104,"column":4},"end":{"line":108,"column":4}}}},"statementMap":{"1":{"start":{"line":51,"column":8},"end":{"line":51,"column":15}},"2":{"start":{"line":63,"column":8},"end":{"line":63,"column":63}},"3":{"start":{"line":64,"column":8},"end":{"line":64,"column":2386}},"4":{"start":{"line":67,"column":8},"end":{"line":67,"column":17}},"5":{"start":{"line":83,"column":8},"end":{"line":83,"column":63}},"6":{"start":{"line":85,"column":7},"end":{"line":85,"column":14}},"7":{"start":{"line":86,"column":7},"end":{"line":86,"column":37}},"8":{"start":{"line":93,"column":8},"end":{"line":93,"column":63}},"9":{"start":{"line":94,"column":8},"end":{"line":94,"column":31}}},"branchMap":{"1":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":53},"end":{"line":34,"column":53}},{"start":{"line":34,"column":53},"end":{"line":34,"column":53}}]},"2":{"line":50,"type":"if","locations":[{"start":{"line":50,"column":28},"end":{"line":50,"column":28}},{"start":{"line":50,"column":28},"end":{"line":50,"column":28}}]},"3":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":30},"end":{"line":62,"column":30}},{"start":{"line":62,"column":30},"end":{"line":62,"column":30}}]},"4":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":8},"end":{"line":64,"column":8}},{"start":{"line":64,"column":8},"end":{"line":64,"column":8}}]},"5":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":81,"column":8}},{"start":{"line":81,"column":8},"end":{"line":81,"column":8}}]}}},
-"contracts/modules/wrapper/extensions/DebtModule.sol":{"l":{"43":382,"44":3,"45":3,"46":3,"55":8,"56":8,"66":5,"67":5,"68":1,"70":4,"71":4,"75":3,"76":3,"77":2,"82":3,"83":3,"84":2,"95":22},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/DebtModule.sol","s":{"1":382,"2":3,"3":3,"4":8,"5":8,"6":5,"7":5,"8":4,"9":3,"10":3,"11":3,"12":3},"b":{"1":[382,0],"2":[3,379],"3":[5,1],"4":[1,4],"5":[2,1],"6":[2,1]},"f":{"1":382,"2":8,"3":5,"4":3,"5":3,"6":22},"fnMap":{"1":{"name":"__DebtModule_init_unchained","line":42,"loc":{"start":{"line":41,"column":4},"end":{"line":50,"column":4}}},"2":{"name":"debtEngine","line":54,"loc":{"start":{"line":54,"column":4},"end":{"line":57,"column":4}}},"3":{"name":"setDebtEngine","line":65,"loc":{"start":{"line":63,"column":4},"end":{"line":72,"column":4}}},"4":{"name":"debt","line":74,"loc":{"start":{"line":74,"column":4},"end":{"line":79,"column":4}}},"5":{"name":"creditEvents","line":81,"loc":{"start":{"line":81,"column":4},"end":{"line":86,"column":4}}},"6":{"name":"_getDebtModuleStorage","line":94,"loc":{"start":{"line":94,"column":4},"end":{"line":98,"column":4}}}},"statementMap":{"1":{"start":{"line":43,"column":8},"end":{"line":43,"column":1427}},"2":{"start":{"line":44,"column":12},"end":{"line":44,"column":65}},"3":{"start":{"line":46,"column":12},"end":{"line":46,"column":40}},"4":{"start":{"line":55,"column":8},"end":{"line":55,"column":61}},"5":{"start":{"line":56,"column":8},"end":{"line":56,"column":28}},"6":{"start":{"line":66,"column":8},"end":{"line":66,"column":61}},"7":{"start":{"line":67,"column":8},"end":{"line":67,"column":2257}},"8":{"start":{"line":71,"column":8},"end":{"line":71,"column":36}},"9":{"start":{"line":75,"column":8},"end":{"line":75,"column":61}},"10":{"start":{"line":76,"column":8},"end":{"line":76,"column":2584}},"11":{"start":{"line":82,"column":8},"end":{"line":82,"column":61}},"12":{"start":{"line":83,"column":8},"end":{"line":83,"column":2855}}},"branchMap":{"1":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":13},"end":{"line":42,"column":13}},{"start":{"line":42,"column":13},"end":{"line":42,"column":13}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":8},"end":{"line":43,"column":8}},{"start":{"line":43,"column":8},"end":{"line":43,"column":8}}]},"3":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":15},"end":{"line":65,"column":15}},{"start":{"line":65,"column":15},"end":{"line":65,"column":15}}]},"4":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":8},"end":{"line":67,"column":8}},{"start":{"line":67,"column":8},"end":{"line":67,"column":8}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]},"6":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]}}},
-"contracts/modules/wrapper/extensions/DocumentModule.sol":{"l":{"43":382,"44":12,"45":12,"46":12,"54":28,"55":28,"65":16,"66":16,"67":2,"69":14,"70":14,"75":18,"76":18,"77":16,"79":2,"84":6,"85":6,"86":4,"97":80},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/DocumentModule.sol","s":{"1":382,"2":12,"3":12,"4":28,"5":28,"6":16,"7":16,"8":14,"9":18,"10":18,"11":16,"12":2,"13":6,"14":6},"b":{"1":[382,0],"2":[12,370],"3":[16,2],"4":[2,14],"5":[16,2],"6":[4,2]},"f":{"1":382,"2":28,"3":16,"4":18,"5":6,"6":80},"fnMap":{"1":{"name":"__DocumentModule_init_unchained","line":42,"loc":{"start":{"line":41,"column":4},"end":{"line":48,"column":4}}},"2":{"name":"documentEngine","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":56,"column":4}}},"3":{"name":"setDocumentEngine","line":64,"loc":{"start":{"line":62,"column":4},"end":{"line":71,"column":4}}},"4":{"name":"getDocument","line":74,"loc":{"start":{"line":74,"column":4},"end":{"line":81,"column":4}}},"5":{"name":"getAllDocuments","line":83,"loc":{"start":{"line":83,"column":4},"end":{"line":88,"column":4}}},"6":{"name":"_getDocumentModuleStorage","line":96,"loc":{"start":{"line":96,"column":4},"end":{"line":100,"column":4}}}},"statementMap":{"1":{"start":{"line":43,"column":8},"end":{"line":43,"column":1401}},"2":{"start":{"line":44,"column":12},"end":{"line":44,"column":73}},"3":{"start":{"line":46,"column":12},"end":{"line":46,"column":48}},"4":{"start":{"line":54,"column":8},"end":{"line":54,"column":69}},"5":{"start":{"line":55,"column":8},"end":{"line":55,"column":32}},"6":{"start":{"line":65,"column":8},"end":{"line":65,"column":69}},"7":{"start":{"line":66,"column":8},"end":{"line":66,"column":2280}},"8":{"start":{"line":70,"column":8},"end":{"line":70,"column":44}},"9":{"start":{"line":75,"column":8},"end":{"line":75,"column":69}},"10":{"start":{"line":76,"column":8},"end":{"line":76,"column":2667}},"11":{"start":{"line":77,"column":12},"end":{"line":77,"column":56}},"12":{"start":{"line":79,"column":12},"end":{"line":79,"column":30}},"13":{"start":{"line":84,"column":8},"end":{"line":84,"column":69}},"14":{"start":{"line":85,"column":8},"end":{"line":85,"column":2996}}},"branchMap":{"1":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":13},"end":{"line":42,"column":13}},{"start":{"line":42,"column":13},"end":{"line":42,"column":13}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":8},"end":{"line":43,"column":8}},{"start":{"line":43,"column":8},"end":{"line":43,"column":8}}]},"3":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":15},"end":{"line":64,"column":15}},{"start":{"line":64,"column":15},"end":{"line":64,"column":15}}]},"4":{"line":66,"type":"if","locations":[{"start":{"line":66,"column":8},"end":{"line":66,"column":8}},{"start":{"line":66,"column":8},"end":{"line":66,"column":8}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]},"6":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":8},"end":{"line":85,"column":8}},{"start":{"line":85,"column":8},"end":{"line":85,"column":8}}]}}},
-"contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol":{"l":{"34":170,"45":12,"57":22,"68":14,"78":10},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol","s":{"1":170,"2":12,"3":22,"4":14,"5":10},"b":{"1":[382,0],"2":[170,2],"3":[12,2],"4":[22,2],"5":[14,2],"6":[10,2]},"f":{"1":382,"2":170,"3":12,"4":22,"5":14,"6":10},"fnMap":{"1":{"name":"__ERC20SnasphotModule_init_unchained","line":22,"loc":{"start":{"line":22,"column":4},"end":{"line":24,"column":4}}},"2":{"name":"scheduleSnapshot","line":33,"loc":{"start":{"line":33,"column":4},"end":{"line":35,"column":4}}},"3":{"name":"scheduleSnapshotNotOptimized","line":44,"loc":{"start":{"line":42,"column":4},"end":{"line":46,"column":4}}},"4":{"name":"rescheduleSnapshot","line":56,"loc":{"start":{"line":53,"column":4},"end":{"line":58,"column":4}}},"5":{"name":"unscheduleLastSnapshot","line":67,"loc":{"start":{"line":65,"column":4},"end":{"line":69,"column":4}}},"6":{"name":"unscheduleSnapshotNotOptimized","line":77,"loc":{"start":{"line":75,"column":4},"end":{"line":79,"column":4}}}},"statementMap":{"1":{"start":{"line":34,"column":8},"end":{"line":34,"column":30}},"2":{"start":{"line":45,"column":8},"end":{"line":45,"column":42}},"3":{"start":{"line":57,"column":8},"end":{"line":57,"column":44}},"4":{"start":{"line":68,"column":8},"end":{"line":68,"column":36}},"5":{"start":{"line":78,"column":8},"end":{"line":78,"column":44}}},"branchMap":{"1":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":61},"end":{"line":22,"column":61}},{"start":{"line":22,"column":61},"end":{"line":22,"column":61}}]},"2":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":51},"end":{"line":33,"column":51}},{"start":{"line":33,"column":51},"end":{"line":33,"column":51}}]},"3":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":13},"end":{"line":44,"column":13}},{"start":{"line":44,"column":13},"end":{"line":44,"column":13}}]},"4":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":13},"end":{"line":56,"column":13}},{"start":{"line":56,"column":13},"end":{"line":56,"column":13}}]},"5":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":13},"end":{"line":67,"column":13}},{"start":{"line":67,"column":13},"end":{"line":67,"column":13}}]},"6":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":13},"end":{"line":77,"column":13}},{"start":{"line":77,"column":13},"end":{"line":77,"column":13}}]}}},
-"contracts/modules/wrapper/extensions/MetaTxModule.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/MetaTxModule.sol","s":{},"b":{},"f":{"1":398},"fnMap":{"1":{"name":"constructor","line":19,"loc":{"start":{"line":17,"column":4},"end":{"line":21,"column":4}}}},"statementMap":{},"branchMap":{}},
-"contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol","s":{},"b":{},"f":{"1":3},"fnMap":{"1":{"name":"constructor","line":18,"loc":{"start":{"line":16,"column":4},"end":{"line":20,"column":4}}}},"statementMap":{},"branchMap":{}},
-"contracts/test/proxy/CMTAT_PROXY_TEST.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT_old2/contracts/test/proxy/CMTAT_PROXY_TEST.sol","s":{},"b":{},"f":{"1":1},"fnMap":{"1":{"name":"constructor","line":18,"loc":{"start":{"line":16,"column":4},"end":{"line":20,"column":4}}}},"statementMap":{},"branchMap":{}}}
+"contracts/CMTAT_PROXY_UUPS.sol":{"l":{"22":9,"42":5,"46":5},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/CMTAT_PROXY_UUPS.sol","s":{"1":9,"2":5,"3":5},"b":{"1":[5,0],"2":[2,1]},"f":{"1":9,"2":5,"3":2},"fnMap":{"1":{"name":"constructor","line":20,"loc":{"start":{"line":18,"column":4},"end":{"line":23,"column":4}}},"2":{"name":"initialize","line":41,"loc":{"start":{"line":38,"column":4},"end":{"line":47,"column":4}}},"3":{"name":"_authorizeUpgrade","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":53,"column":88}}}},"statementMap":{"1":{"start":{"line":22,"column":8},"end":{"line":22,"column":29}},"2":{"start":{"line":42,"column":8},"end":{"line":42,"column":1706}},"3":{"start":{"line":46,"column":8},"end":{"line":46,"column":41}}},"branchMap":{"1":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":67},"end":{"line":41,"column":67}},{"start":{"line":41,"column":67},"end":{"line":41,"column":67}}]},"2":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":58},"end":{"line":53,"column":58}},{"start":{"line":53,"column":58},"end":{"line":53,"column":58}}]}}},
+"contracts/CMTAT_PROXY.sol":{"l":{"21":198},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/CMTAT_PROXY.sol","s":{"1":198},"b":{},"f":{"1":198},"fnMap":{"1":{"name":"constructor","line":19,"loc":{"start":{"line":17,"column":4},"end":{"line":22,"column":4}}}},"statementMap":{"1":{"start":{"line":21,"column":8},"end":{"line":21,"column":29}}},"branchMap":{}},
+"contracts/CMTAT_STANDALONE.sol":{"l":{"30":191},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/CMTAT_STANDALONE.sol","s":{"1":191},"b":{},"f":{"1":191},"fnMap":{"1":{"name":"constructor","line":27,"loc":{"start":{"line":21,"column":4},"end":{"line":36,"column":4}}}},"statementMap":{"1":{"start":{"line":30,"column":8},"end":{"line":30,"column":1113}}},"branchMap":{}},
+"contracts/deployment/CMTAT_BEACON_FACTORY.sol":{"l":{"23":7,"24":1,"26":6,"28":1,"30":6,"45":3,"46":3,"49":3,"50":3,"62":2,"65":2,"73":1,"84":3,"85":3,"86":3,"87":3,"88":3,"89":3,"90":3,"100":5,"107":5},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/deployment/CMTAT_BEACON_FACTORY.sol","s":{"1":7,"2":6,"3":3,"4":3,"5":3,"6":2,"7":2,"8":1,"9":3,"10":3,"11":3,"12":3,"13":5},"b":{"1":[1,6],"2":[1,5],"3":[3,1]},"f":{"1":7,"2":3,"3":2,"4":1,"5":3,"6":5},"fnMap":{"1":{"name":"constructor","line":22,"loc":{"start":{"line":22,"column":4},"end":{"line":31,"column":4}}},"2":{"name":"deployCMTAT","line":44,"loc":{"start":{"line":40,"column":4},"end":{"line":51,"column":4}}},"3":{"name":"computedProxyAddress","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":66,"column":4}}},"4":{"name":"implementation","line":72,"loc":{"start":{"line":72,"column":4},"end":{"line":74,"column":4}}},"5":{"name":"_deployBytecode","line":83,"loc":{"start":{"line":83,"column":4},"end":{"line":91,"column":5}}},"6":{"name":"_getBytecode","line":97,"loc":{"start":{"line":97,"column":5},"end":{"line":108,"column":5}}}},"statementMap":{"1":{"start":{"line":23,"column":8},"end":{"line":23,"column":785}},"2":{"start":{"line":26,"column":8},"end":{"line":26,"column":921}},"3":{"start":{"line":45,"column":8},"end":{"line":45,"column":86}},"4":{"start":{"line":46,"column":8},"end":{"line":46,"column":1776}},"5":{"start":{"line":50,"column":8},"end":{"line":50,"column":20}},"6":{"start":{"line":62,"column":8},"end":{"line":62,"column":2354}},"7":{"start":{"line":65,"column":8},"end":{"line":65,"column":91}},"8":{"start":{"line":73,"column":8},"end":{"line":73,"column":38}},"9":{"start":{"line":84,"column":20},"end":{"line":84,"column":86}},"10":{"start":{"line":87,"column":20},"end":{"line":87,"column":62}},"11":{"start":{"line":89,"column":20},"end":{"line":89,"column":50}},"12":{"start":{"line":90,"column":20},"end":{"line":90,"column":32}},"13":{"start":{"line":100,"column":8},"end":{"line":100,"column":3793}}},"branchMap":{"1":{"line":23,"type":"if","locations":[{"start":{"line":23,"column":8},"end":{"line":23,"column":8}},{"start":{"line":23,"column":8},"end":{"line":23,"column":8}}]},"2":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":8},"end":{"line":26,"column":8}},{"start":{"line":26,"column":8},"end":{"line":26,"column":8}}]},"3":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":13},"end":{"line":44,"column":13}},{"start":{"line":44,"column":13},"end":{"line":44,"column":13}}]}}},
+"contracts/deployment/CMTAT_TP_FACTORY.sol":{"l":{"36":7,"37":5,"40":5,"42":5,"56":2,"59":2,"72":5,"73":5,"74":5,"75":5,"76":5,"77":5,"78":5,"88":7,"95":7},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/deployment/CMTAT_TP_FACTORY.sol","s":{"1":7,"2":5,"3":5,"4":2,"5":2,"6":5,"7":5,"8":5,"9":5,"10":7},"b":{"1":[7,2]},"f":{"1":9,"2":7,"3":2,"4":5,"5":7},"fnMap":{"1":{"name":"constructor","line":22,"loc":{"start":{"line":22,"column":4},"end":{"line":22,"column":129}}},"2":{"name":"deployCMTAT","line":35,"loc":{"start":{"line":30,"column":4},"end":{"line":43,"column":4}}},"3":{"name":"computedProxyAddress","line":51,"loc":{"start":{"line":51,"column":4},"end":{"line":60,"column":4}}},"4":{"name":"_deployBytecode","line":71,"loc":{"start":{"line":71,"column":4},"end":{"line":79,"column":5}}},"5":{"name":"_getBytecode","line":85,"loc":{"start":{"line":85,"column":5},"end":{"line":96,"column":5}}}},"statementMap":{"1":{"start":{"line":36,"column":8},"end":{"line":36,"column":86}},"2":{"start":{"line":37,"column":8},"end":{"line":37,"column":1404}},"3":{"start":{"line":42,"column":8},"end":{"line":42,"column":20}},"4":{"start":{"line":56,"column":8},"end":{"line":56,"column":2088}},"5":{"start":{"line":59,"column":8},"end":{"line":59,"column":91}},"6":{"start":{"line":72,"column":20},"end":{"line":72,"column":86}},"7":{"start":{"line":75,"column":20},"end":{"line":75,"column":62}},"8":{"start":{"line":77,"column":20},"end":{"line":77,"column":50}},"9":{"start":{"line":78,"column":20},"end":{"line":78,"column":32}},"10":{"start":{"line":88,"column":8},"end":{"line":88,"column":3379}}},"branchMap":{"1":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":13},"end":{"line":35,"column":13}},{"start":{"line":35,"column":13},"end":{"line":35,"column":13}}]}}},
+"contracts/deployment/CMTAT_UUPS_FACTORY.sol":{"l":{"35":2,"36":2,"39":2,"41":2,"53":2,"56":2,"67":2,"68":2,"69":2,"70":2,"71":2,"72":2,"73":2,"83":4,"90":4},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/deployment/CMTAT_UUPS_FACTORY.sol","s":{"1":2,"2":2,"3":2,"4":2,"5":2,"6":2,"7":2,"8":2,"9":2,"10":4},"b":{"1":[2,1]},"f":{"1":5,"2":2,"3":2,"4":2,"5":4},"fnMap":{"1":{"name":"constructor","line":21,"loc":{"start":{"line":21,"column":4},"end":{"line":21,"column":129}}},"2":{"name":"deployCMTAT","line":34,"loc":{"start":{"line":30,"column":4},"end":{"line":42,"column":4}}},"3":{"name":"computedProxyAddress","line":49,"loc":{"start":{"line":49,"column":4},"end":{"line":57,"column":4}}},"4":{"name":"_deployBytecode","line":66,"loc":{"start":{"line":66,"column":4},"end":{"line":74,"column":5}}},"5":{"name":"_getBytecode","line":80,"loc":{"start":{"line":80,"column":5},"end":{"line":91,"column":5}}}},"statementMap":{"1":{"start":{"line":35,"column":8},"end":{"line":35,"column":86}},"2":{"start":{"line":36,"column":8},"end":{"line":36,"column":1344}},"3":{"start":{"line":41,"column":8},"end":{"line":41,"column":20}},"4":{"start":{"line":53,"column":8},"end":{"line":53,"column":1931}},"5":{"start":{"line":56,"column":8},"end":{"line":56,"column":91}},"6":{"start":{"line":67,"column":20},"end":{"line":67,"column":86}},"7":{"start":{"line":70,"column":20},"end":{"line":70,"column":62}},"8":{"start":{"line":72,"column":20},"end":{"line":72,"column":50}},"9":{"start":{"line":73,"column":20},"end":{"line":73,"column":32}},"10":{"start":{"line":83,"column":8},"end":{"line":83,"column":3150}}},"branchMap":{"1":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":13},"end":{"line":34,"column":13}},{"start":{"line":34,"column":13},"end":{"line":34,"column":13}}]}}},
+"contracts/deployment/libraries/CMTATFactoryBase.sol":{"l":{"19":16,"20":2,"22":14},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/deployment/libraries/CMTATFactoryBase.sol","s":{"1":16},"b":{"1":[2,14]},"f":{"1":16},"fnMap":{"1":{"name":"constructor","line":18,"loc":{"start":{"line":18,"column":4},"end":{"line":23,"column":4}}}},"statementMap":{"1":{"start":{"line":19,"column":8},"end":{"line":19,"column":575}}},"branchMap":{"1":{"line":19,"type":"if","locations":[{"start":{"line":19,"column":8},"end":{"line":19,"column":8}},{"start":{"line":19,"column":8},"end":{"line":19,"column":8}}]}}},
+"contracts/deployment/libraries/CMTATFactoryInvariant.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/deployment/libraries/CMTATFactoryInvariant.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/deployment/libraries/CMTATFactoryRoot.sol":{"l":{"26":25,"27":2,"29":23,"30":13,"32":23,"33":23,"46":14,"59":12,"60":5,"61":2,"63":3,"64":3,"67":7},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/deployment/libraries/CMTATFactoryRoot.sol","s":{"1":25,"2":23,"3":23,"4":23,"5":14,"6":12,"7":5},"b":{"1":[2,23],"2":[13,10],"3":[5,7],"4":[2,3]},"f":{"1":25,"2":14,"3":12},"fnMap":{"1":{"name":"constructor","line":25,"loc":{"start":{"line":25,"column":4},"end":{"line":34,"column":4}}},"2":{"name":"CMTATProxyAddress","line":45,"loc":{"start":{"line":45,"column":4},"end":{"line":47,"column":4}}},"3":{"name":"_checkAndDetermineDeploymentSalt","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":69,"column":4}}}},"statementMap":{"1":{"start":{"line":26,"column":8},"end":{"line":26,"column":814}},"2":{"start":{"line":29,"column":8},"end":{"line":29,"column":952}},"3":{"start":{"line":32,"column":8},"end":{"line":32,"column":51}},"4":{"start":{"line":33,"column":8},"end":{"line":33,"column":52}},"5":{"start":{"line":46,"column":8},"end":{"line":46,"column":38}},"6":{"start":{"line":59,"column":7},"end":{"line":59,"column":2000}},"7":{"start":{"line":60,"column":12},"end":{"line":60,"column":2035}}},"branchMap":{"1":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":8},"end":{"line":26,"column":8}},{"start":{"line":26,"column":8},"end":{"line":26,"column":8}}]},"2":{"line":29,"type":"if","locations":[{"start":{"line":29,"column":8},"end":{"line":29,"column":8}},{"start":{"line":29,"column":8},"end":{"line":29,"column":8}}]},"3":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":7},"end":{"line":59,"column":7}},{"start":{"line":59,"column":7},"end":{"line":59,"column":7}}]},"4":{"line":60,"type":"if","locations":[{"start":{"line":60,"column":12},"end":{"line":60,"column":12}},{"start":{"line":60,"column":12},"end":{"line":60,"column":12}}]}}},
+"contracts/interfaces/draft-IERC1404/draft-IERC1404.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/engine/draft-IERC1643.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/draft-IERC1643.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/engine/IAuthorizationEngine.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IAuthorizationEngine.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/engine/IDebtEngine.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IDebtEngine.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/engine/IDebtGlobal.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IDebtGlobal.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/engine/IRuleEngine.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IRuleEngine.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/ICCIPToken.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/ICCIPToken.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/ICMTATConstructor.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/ICMTATConstructor.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/interfaces/ICMTATSnapshot.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/ICMTATSnapshot.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/libraries/Errors.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/libraries/Errors.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/libraries/FactoryErrors.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/libraries/FactoryErrors.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},
+"contracts/modules/CMTAT_BASE.sol":{"l":{"65":385,"85":385,"86":385,"88":385,"90":385,"91":385,"94":385,"99":385,"100":385,"102":385,"106":385,"107":383,"108":383,"110":383,"111":383,"113":383,"114":383,"120":383,"121":383,"122":383,"125":383,"128":383,"150":2,"163":10,"178":6,"179":4,"194":439,"195":17,"202":422,"203":422,"217":1391,"226":1391,"238":0},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/CMTAT_BASE.sol","s":{"1":385,"2":385,"3":385,"4":385,"5":385,"6":385,"7":385,"8":385,"9":385,"10":385,"11":385,"12":383,"13":383,"14":383,"15":383,"16":383,"17":383,"18":383,"19":383,"20":383,"21":383,"22":383,"23":2,"24":10,"25":6,"26":4,"27":439,"28":422,"29":422,"30":1391,"31":1391,"32":0},"b":{"1":[385,1],"2":[385,0],"3":[383,0],"4":[17,422]},"f":{"1":385,"2":385,"3":383,"4":2,"5":10,"6":6,"7":439,"8":1391,"9":1391,"10":0},"fnMap":{"1":{"name":"initialize","line":64,"loc":{"start":{"line":59,"column":4},"end":{"line":71,"column":4}}},"2":{"name":"__CMTAT_init","line":82,"loc":{"start":{"line":77,"column":4},"end":{"line":129,"column":4}}},"3":{"name":"__CMTAT_init_unchained","line":131,"loc":{"start":{"line":131,"column":4},"end":{"line":133,"column":4}}},"4":{"name":"decimals","line":143,"loc":{"start":{"line":143,"column":4},"end":{"line":151,"column":4}}},"5":{"name":"transferFrom","line":153,"loc":{"start":{"line":153,"column":4},"end":{"line":164,"column":4}}},"6":{"name":"burnAndMint","line":177,"loc":{"start":{"line":177,"column":4},"end":{"line":180,"column":4}}},"7":{"name":"_update","line":189,"loc":{"start":{"line":189,"column":4},"end":{"line":204,"column":4}}},"8":{"name":"_msgSender","line":211,"loc":{"start":{"line":211,"column":4},"end":{"line":218,"column":4}}},"9":{"name":"_contextSuffixLength","line":223,"loc":{"start":{"line":223,"column":4},"end":{"line":227,"column":4}}},"10":{"name":"_msgData","line":232,"loc":{"start":{"line":232,"column":4},"end":{"line":239,"column":4}}}},"statementMap":{"1":{"start":{"line":65,"column":8},"end":{"line":65,"column":2165}},"2":{"start":{"line":85,"column":8},"end":{"line":85,"column":33}},"3":{"start":{"line":86,"column":8},"end":{"line":86,"column":99}},"4":{"start":{"line":88,"column":8},"end":{"line":88,"column":32}},"5":{"start":{"line":90,"column":8},"end":{"line":90,"column":39}},"6":{"start":{"line":91,"column":8},"end":{"line":91,"column":34}},"7":{"start":{"line":94,"column":8},"end":{"line":94,"column":37}},"8":{"start":{"line":99,"column":8},"end":{"line":99,"column":44}},"9":{"start":{"line":100,"column":8},"end":{"line":100,"column":39}},"10":{"start":{"line":102,"column":8},"end":{"line":102,"column":56}},"11":{"start":{"line":106,"column":8},"end":{"line":106,"column":81}},"12":{"start":{"line":107,"column":8},"end":{"line":107,"column":41}},"13":{"start":{"line":108,"column":8},"end":{"line":108,"column":41}},"14":{"start":{"line":110,"column":8},"end":{"line":110,"column":43}},"15":{"start":{"line":111,"column":8},"end":{"line":111,"column":77}},"16":{"start":{"line":113,"column":8},"end":{"line":113,"column":37}},"17":{"start":{"line":114,"column":8},"end":{"line":114,"column":42}},"18":{"start":{"line":120,"column":8},"end":{"line":120,"column":45}},"19":{"start":{"line":121,"column":8},"end":{"line":121,"column":64}},"20":{"start":{"line":122,"column":8},"end":{"line":122,"column":56}},"21":{"start":{"line":125,"column":8},"end":{"line":125,"column":123}},"22":{"start":{"line":128,"column":8},"end":{"line":128,"column":31}},"23":{"start":{"line":150,"column":8},"end":{"line":150,"column":41}},"24":{"start":{"line":163,"column":8},"end":{"line":163,"column":70}},"25":{"start":{"line":178,"column":8},"end":{"line":178,"column":39}},"26":{"start":{"line":179,"column":8},"end":{"line":179,"column":29}},"27":{"start":{"line":194,"column":8},"end":{"line":194,"column":6702}},"28":{"start":{"line":202,"column":8},"end":{"line":202,"column":60}},"29":{"start":{"line":203,"column":8},"end":{"line":203,"column":49}},"30":{"start":{"line":217,"column":8},"end":{"line":217,"column":53}},"31":{"start":{"line":226,"column":9},"end":{"line":226,"column":64}},"32":{"start":{"line":238,"column":8},"end":{"line":238,"column":51}}},"branchMap":{"1":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":21},"end":{"line":64,"column":21}},{"start":{"line":64,"column":21},"end":{"line":64,"column":21}}]},"2":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":15},"end":{"line":82,"column":15}},{"start":{"line":82,"column":15},"end":{"line":82,"column":15}}]},"3":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":47},"end":{"line":131,"column":47}},{"start":{"line":131,"column":47},"end":{"line":131,"column":47}}]},"4":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":8},"end":{"line":194,"column":8}},{"start":{"line":194,"column":8},"end":{"line":194,"column":8}}]}}},
+"contracts/modules/internal/base/SnapshotModuleBase.sol":{"l":{"83":2,"84":2,"92":76,"93":76,"95":76,"96":68,"101":68,"102":48,"105":20,"107":8,"110":8,"112":8,"113":8,"120":28,"132":170,"134":170,"136":168,"138":94,"141":94,"142":2,"148":2,"151":164,"152":164,"159":12,"160":12,"161":10,"163":10,"164":2,"167":8,"168":2,"170":6,"173":6,"174":10,"175":10,"176":10,"179":6,"181":8,"188":22,"190":22,"191":20,"192":18,"193":2,"195":16,"196":12,"197":8,"198":8,"199":2,"205":2,"208":8,"209":4,"210":2,"216":6,"218":6,"225":14,"227":14,"228":10,"229":2,"232":8,"233":2,"235":6,"236":6,"246":10,"247":10,"249":10,"251":8,"252":6,"254":8,"282":1920,"284":1920,"285":1484,"287":436,"301":844,"302":844,"303":844,"304":36,"305":36,"315":422,"316":422,"320":422,"321":18,"322":18,"332":844,"333":836,"335":8,"346":36,"347":36,"348":36,"350":36,"354":22,"358":8,"362":6,"375":490,"376":490,"378":490,"382":404,"385":86,"386":86,"388":86,"389":116,"390":52,"391":52,"394":64,"397":86,"406":26,"407":26,"408":6,"410":20,"413":202,"414":6,"421":46,"422":6,"428":4862},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/base/SnapshotModuleBase.sol","s":{"1":2,"2":2,"3":76,"4":76,"5":76,"6":68,"7":68,"8":48,"9":20,"10":8,"11":8,"12":28,"13":170,"14":170,"15":168,"16":94,"17":94,"18":92,"19":164,"20":164,"21":12,"22":12,"23":10,"24":10,"25":8,"26":2,"27":6,"28":6,"29":8,"30":22,"31":22,"32":20,"33":18,"34":16,"35":12,"36":8,"37":8,"38":6,"39":8,"40":4,"41":6,"42":14,"43":14,"44":10,"45":8,"46":6,"47":6,"48":10,"49":10,"50":10,"51":8,"52":8,"53":1920,"54":1920,"55":1484,"56":436,"57":844,"58":844,"59":844,"60":36,"61":36,"62":422,"63":422,"64":422,"65":844,"66":836,"67":8,"68":36,"69":36,"70":36,"71":36,"72":22,"73":14,"74":8,"75":6,"76":490,"77":490,"78":490,"79":404,"80":86,"81":86,"82":116,"83":86,"84":26,"85":26,"86":20,"87":202,"88":46},"b":{"1":[385,0],"2":[68,8],"3":[48,20],"4":[8,12],"5":[94,74],"6":[2,92],"7":[2,90],"8":[2,8],"9":[2,6],"10":[2,16],"11":[8,4],"12":[2,6],"13":[2,4],"14":[4,4],"15":[2,2],"16":[2,8],"17":[2,6],"18":[1484,436],"19":[36,808],"20":[18,404],"21":[836,8],"22":[22,14],"23":[8,6],"24":[404,86],"25":[404,0],"26":[52,64],"27":[6,20],"28":[6,196],"29":[6,40]},"f":{"1":385,"2":2,"3":76,"4":170,"5":12,"6":22,"7":14,"8":10,"9":1920,"10":844,"11":422,"12":844,"13":36,"14":490,"15":26,"16":202,"17":46,"18":4862},"fnMap":{"1":{"name":"__SnapshotModuleBase_init_unchained","line":70,"loc":{"start":{"line":70,"column":4},"end":{"line":73,"column":4}}},"2":{"name":"getAllSnapshots","line":82,"loc":{"start":{"line":82,"column":4},"end":{"line":85,"column":4}}},"3":{"name":"getNextSnapshots","line":91,"loc":{"start":{"line":91,"column":4},"end":{"line":121,"column":4}}},"4":{"name":"_scheduleSnapshot","line":131,"loc":{"start":{"line":131,"column":4},"end":{"line":153,"column":4}}},"5":{"name":"_scheduleSnapshotNotOptimized","line":158,"loc":{"start":{"line":158,"column":4},"end":{"line":182,"column":4}}},"6":{"name":"_rescheduleSnapshot","line":187,"loc":{"start":{"line":187,"column":4},"end":{"line":219,"column":4}}},"7":{"name":"_unscheduleLastSnapshot","line":224,"loc":{"start":{"line":224,"column":4},"end":{"line":237,"column":4}}},"8":{"name":"_unscheduleSnapshotNotOptimized","line":245,"loc":{"start":{"line":245,"column":4},"end":{"line":255,"column":4}}},"9":{"name":"_valueAt","line":264,"loc":{"start":{"line":264,"column":4},"end":{"line":289,"column":4}}},"10":{"name":"_updateSnapshot","line":297,"loc":{"start":{"line":297,"column":4},"end":{"line":307,"column":4}}},"11":{"name":"_setCurrentSnapshot","line":314,"loc":{"start":{"line":314,"column":4},"end":{"line":324,"column":4}}},"12":{"name":"_lastSnapshot","line":329,"loc":{"start":{"line":329,"column":4},"end":{"line":337,"column":4}}},"13":{"name":"_findScheduledSnapshotIndex","line":343,"loc":{"start":{"line":343,"column":4},"end":{"line":364,"column":4}}},"14":{"name":"_findScheduledMostRecentPastSnapshot","line":370,"loc":{"start":{"line":370,"column":4},"end":{"line":398,"column":4}}},"15":{"name":"_findAndRevertScheduledSnapshotIndex","line":403,"loc":{"start":{"line":403,"column":4},"end":{"line":411,"column":4}}},"16":{"name":"_checkTimeInThePast","line":412,"loc":{"start":{"line":412,"column":4},"end":{"line":419,"column":4}}},"17":{"name":"_checkTimeSnapshotAlreadyDone","line":420,"loc":{"start":{"line":420,"column":4},"end":{"line":424,"column":4}}},"18":{"name":"_getSnapshotModuleBaseStorage","line":427,"loc":{"start":{"line":427,"column":4},"end":{"line":431,"column":4}}}},"statementMap":{"1":{"start":{"line":83,"column":8},"end":{"line":83,"column":77}},"2":{"start":{"line":84,"column":8},"end":{"line":84,"column":36}},"3":{"start":{"line":92,"column":8},"end":{"line":92,"column":77}},"4":{"start":{"line":93,"column":8},"end":{"line":93,"column":65}},"5":{"start":{"line":95,"column":8},"end":{"line":95,"column":3657}},"6":{"start":{"line":96,"column":12},"end":{"line":96,"column":3755}},"7":{"start":{"line":101,"column":12},"end":{"line":101,"column":3918}},"8":{"start":{"line":102,"column":16},"end":{"line":102,"column":44}},"9":{"start":{"line":105,"column":16},"end":{"line":105,"column":4128}},"10":{"start":{"line":107,"column":20},"end":{"line":107,"column":4318}},"11":{"start":{"line":112,"column":20},"end":{"line":112,"column":4596}},"12":{"start":{"line":120,"column":8},"end":{"line":120,"column":36}},"13":{"start":{"line":132,"column":8},"end":{"line":132,"column":77}},"14":{"start":{"line":134,"column":7},"end":{"line":134,"column":31}},"15":{"start":{"line":136,"column":8},"end":{"line":136,"column":5453}},"16":{"start":{"line":138,"column":12},"end":{"line":138,"column":5564}},"17":{"start":{"line":141,"column":12},"end":{"line":141,"column":5689}},"18":{"start":{"line":147,"column":19},"end":{"line":147,"column":5942}},"19":{"start":{"line":151,"column":8},"end":{"line":151,"column":39}},"20":{"start":{"line":152,"column":8},"end":{"line":152,"column":38}},"21":{"start":{"line":159,"column":8},"end":{"line":159,"column":77}},"22":{"start":{"line":160,"column":8},"end":{"line":160,"column":32}},"23":{"start":{"line":161,"column":8},"end":{"line":161,"column":73}},"24":{"start":{"line":163,"column":8},"end":{"line":163,"column":6518}},"25":{"start":{"line":167,"column":8},"end":{"line":167,"column":6709}},"26":{"start":{"line":168,"column":12},"end":{"line":168,"column":43}},"27":{"start":{"line":170,"column":12},"end":{"line":170,"column":6833}},"28":{"start":{"line":173,"column":12},"end":{"line":173,"column":6960}},"29":{"start":{"line":181,"column":8},"end":{"line":181,"column":38}},"30":{"start":{"line":188,"column":8},"end":{"line":188,"column":77}},"31":{"start":{"line":190,"column":8},"end":{"line":190,"column":45}},"32":{"start":{"line":191,"column":8},"end":{"line":191,"column":35}},"33":{"start":{"line":192,"column":8},"end":{"line":192,"column":7691}},"34":{"start":{"line":195,"column":8},"end":{"line":195,"column":69}},"35":{"start":{"line":196,"column":8},"end":{"line":196,"column":7891}},"36":{"start":{"line":197,"column":12},"end":{"line":197,"column":71}},"37":{"start":{"line":198,"column":12},"end":{"line":198,"column":8028}},"38":{"start":{"line":204,"column":19},"end":{"line":204,"column":8286}},"39":{"start":{"line":208,"column":8},"end":{"line":208,"column":8425}},"40":{"start":{"line":209,"column":12},"end":{"line":209,"column":8467}},"41":{"start":{"line":218,"column":8},"end":{"line":218,"column":47}},"42":{"start":{"line":225,"column":8},"end":{"line":225,"column":77}},"43":{"start":{"line":227,"column":8},"end":{"line":227,"column":42}},"44":{"start":{"line":228,"column":8},"end":{"line":228,"column":9173}},"45":{"start":{"line":232,"column":8},"end":{"line":232,"column":9373}},"46":{"start":{"line":235,"column":8},"end":{"line":235,"column":34}},"47":{"start":{"line":236,"column":8},"end":{"line":236,"column":37}},"48":{"start":{"line":246,"column":8},"end":{"line":246,"column":77}},"49":{"start":{"line":247,"column":8},"end":{"line":247,"column":42}},"50":{"start":{"line":249,"column":8},"end":{"line":249,"column":66}},"51":{"start":{"line":251,"column":8},"end":{"line":251,"column":10194}},"52":{"start":{"line":254,"column":8},"end":{"line":254,"column":34}},"53":{"start":{"line":282,"column":8},"end":{"line":282,"column":58}},"54":{"start":{"line":284,"column":8},"end":{"line":284,"column":12023}},"55":{"start":{"line":285,"column":12},"end":{"line":285,"column":29}},"56":{"start":{"line":287,"column":12},"end":{"line":287,"column":50}},"57":{"start":{"line":301,"column":8},"end":{"line":301,"column":77}},"58":{"start":{"line":302,"column":8},"end":{"line":302,"column":48}},"59":{"start":{"line":303,"column":8},"end":{"line":303,"column":12661}},"60":{"start":{"line":304,"column":12},"end":{"line":304,"column":38}},"61":{"start":{"line":305,"column":12},"end":{"line":305,"column":46}},"62":{"start":{"line":315,"column":8},"end":{"line":315,"column":77}},"63":{"start":{"line":316,"column":8},"end":{"line":316,"column":13151}},"64":{"start":{"line":320,"column":8},"end":{"line":320,"column":13255}},"65":{"start":{"line":332,"column":8},"end":{"line":332,"column":13609}},"66":{"start":{"line":333,"column":12},"end":{"line":333,"column":20}},"67":{"start":{"line":335,"column":12},"end":{"line":335,"column":38}},"68":{"start":{"line":346,"column":8},"end":{"line":346,"column":77}},"69":{"start":{"line":347,"column":8},"end":{"line":347,"column":71}},"70":{"start":{"line":348,"column":8},"end":{"line":348,"column":72}},"71":{"start":{"line":350,"column":8},"end":{"line":350,"column":14239}},"72":{"start":{"line":354,"column":12},"end":{"line":354,"column":37}},"73":{"start":{"line":357,"column":13},"end":{"line":357,"column":14456}},"74":{"start":{"line":358,"column":12},"end":{"line":358,"column":38}},"75":{"start":{"line":362,"column":12},"end":{"line":362,"column":53}},"76":{"start":{"line":375,"column":8},"end":{"line":375,"column":77}},"77":{"start":{"line":376,"column":8},"end":{"line":376,"column":63}},"78":{"start":{"line":378,"column":8},"end":{"line":378,"column":15173}},"79":{"start":{"line":382,"column":12},"end":{"line":382,"column":40}},"80":{"start":{"line":385,"column":8},"end":{"line":385,"column":26}},"81":{"start":{"line":388,"column":8},"end":{"line":388,"column":15538}},"82":{"start":{"line":389,"column":12},"end":{"line":389,"column":15626}},"83":{"start":{"line":397,"column":8},"end":{"line":397,"column":34}},"84":{"start":{"line":406,"column":8},"end":{"line":406,"column":73}},"85":{"start":{"line":407,"column":8},"end":{"line":407,"column":16172}},"86":{"start":{"line":410,"column":8},"end":{"line":410,"column":20}},"87":{"start":{"line":413,"column":8},"end":{"line":413,"column":16371}},"88":{"start":{"line":421,"column":8},"end":{"line":421,"column":16674}}},"branchMap":{"1":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":60},"end":{"line":70,"column":60}},{"start":{"line":70,"column":60},"end":{"line":70,"column":60}}]},"2":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":8},"end":{"line":95,"column":8}},{"start":{"line":95,"column":8},"end":{"line":95,"column":8}}]},"3":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":12},"end":{"line":101,"column":12}},{"start":{"line":101,"column":12},"end":{"line":101,"column":12}}]},"4":{"line":105,"type":"if","locations":[{"start":{"line":105,"column":16},"end":{"line":105,"column":16}},{"start":{"line":105,"column":16},"end":{"line":105,"column":16}}]},"5":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":8},"end":{"line":136,"column":8}},{"start":{"line":136,"column":8},"end":{"line":136,"column":8}}]},"6":{"line":141,"type":"if","locations":[{"start":{"line":141,"column":12},"end":{"line":141,"column":12}},{"start":{"line":141,"column":12},"end":{"line":141,"column":12}}]},"7":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":19},"end":{"line":147,"column":19}},{"start":{"line":147,"column":19},"end":{"line":147,"column":19}}]},"8":{"line":163,"type":"if","locations":[{"start":{"line":163,"column":8},"end":{"line":163,"column":8}},{"start":{"line":163,"column":8},"end":{"line":163,"column":8}}]},"9":{"line":167,"type":"if","locations":[{"start":{"line":167,"column":8},"end":{"line":167,"column":8}},{"start":{"line":167,"column":8},"end":{"line":167,"column":8}}]},"10":{"line":192,"type":"if","locations":[{"start":{"line":192,"column":8},"end":{"line":192,"column":8}},{"start":{"line":192,"column":8},"end":{"line":192,"column":8}}]},"11":{"line":196,"type":"if","locations":[{"start":{"line":196,"column":8},"end":{"line":196,"column":8}},{"start":{"line":196,"column":8},"end":{"line":196,"column":8}}]},"12":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":12},"end":{"line":198,"column":12}},{"start":{"line":198,"column":12},"end":{"line":198,"column":12}}]},"13":{"line":204,"type":"if","locations":[{"start":{"line":204,"column":19},"end":{"line":204,"column":19}},{"start":{"line":204,"column":19},"end":{"line":204,"column":19}}]},"14":{"line":208,"type":"if","locations":[{"start":{"line":208,"column":8},"end":{"line":208,"column":8}},{"start":{"line":208,"column":8},"end":{"line":208,"column":8}}]},"15":{"line":209,"type":"if","locations":[{"start":{"line":209,"column":12},"end":{"line":209,"column":12}},{"start":{"line":209,"column":12},"end":{"line":209,"column":12}}]},"16":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":8},"end":{"line":228,"column":8}},{"start":{"line":228,"column":8},"end":{"line":228,"column":8}}]},"17":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":8},"end":{"line":232,"column":8}},{"start":{"line":232,"column":8},"end":{"line":232,"column":8}}]},"18":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":8},"end":{"line":284,"column":8}},{"start":{"line":284,"column":8},"end":{"line":284,"column":8}}]},"19":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":8},"end":{"line":303,"column":8}},{"start":{"line":303,"column":8},"end":{"line":303,"column":8}}]},"20":{"line":320,"type":"if","locations":[{"start":{"line":320,"column":8},"end":{"line":320,"column":8}},{"start":{"line":320,"column":8},"end":{"line":320,"column":8}}]},"21":{"line":332,"type":"if","locations":[{"start":{"line":332,"column":8},"end":{"line":332,"column":8}},{"start":{"line":332,"column":8},"end":{"line":332,"column":8}}]},"22":{"line":350,"type":"if","locations":[{"start":{"line":350,"column":8},"end":{"line":350,"column":8}},{"start":{"line":350,"column":8},"end":{"line":350,"column":8}}]},"23":{"line":357,"type":"if","locations":[{"start":{"line":357,"column":13},"end":{"line":357,"column":13}},{"start":{"line":357,"column":13},"end":{"line":357,"column":13}}]},"24":{"line":378,"type":"if","locations":[{"start":{"line":378,"column":8},"end":{"line":378,"column":8}},{"start":{"line":378,"column":8},"end":{"line":378,"column":8}}]},"25":{"line":379,"type":"cond-expr","locations":[{"start":{"line":379,"column":12},"end":{"line":379,"column":32}},{"start":{"line":380,"column":12},"end":{"line":380,"column":77}}]},"26":{"line":389,"type":"if","locations":[{"start":{"line":389,"column":12},"end":{"line":389,"column":12}},{"start":{"line":389,"column":12},"end":{"line":389,"column":12}}]},"27":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":8},"end":{"line":407,"column":8}},{"start":{"line":407,"column":8},"end":{"line":407,"column":8}}]},"28":{"line":413,"type":"if","locations":[{"start":{"line":413,"column":8},"end":{"line":413,"column":8}},{"start":{"line":413,"column":8},"end":{"line":413,"column":8}}]},"29":{"line":421,"type":"if","locations":[{"start":{"line":421,"column":8},"end":{"line":421,"column":8}},{"start":{"line":421,"column":8},"end":{"line":421,"column":8}}]}}},
+"contracts/modules/internal/EnforcementModuleInternal.sol":{"l":{"65":946,"66":946,"83":22,"84":22,"85":2,"87":20,"88":20,"89":20,"101":8,"102":8,"103":2,"105":6,"106":6,"108":6,"113":976},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/EnforcementModuleInternal.sol","s":{"1":946,"2":946,"3":22,"4":22,"5":2,"6":20,"7":20,"8":8,"9":8,"10":2,"11":6,"12":6},"b":{"1":[385,0],"2":[2,20],"3":[2,6]},"f":{"1":385,"2":946,"3":22,"4":8,"5":976},"fnMap":{"1":{"name":"__Enforcement_init_unchained","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":55,"column":4}}},"2":{"name":"frozen","line":64,"loc":{"start":{"line":64,"column":4},"end":{"line":67,"column":4}}},"3":{"name":"_freeze","line":79,"loc":{"start":{"line":79,"column":4},"end":{"line":90,"column":4}}},"4":{"name":"_unfreeze","line":97,"loc":{"start":{"line":97,"column":4},"end":{"line":109,"column":4}}},"5":{"name":"_getEnforcementModuleInternalStorage","line":112,"loc":{"start":{"line":112,"column":4},"end":{"line":116,"column":4}}}},"statementMap":{"1":{"start":{"line":65,"column":8},"end":{"line":65,"column":91}},"2":{"start":{"line":66,"column":8},"end":{"line":66,"column":33}},"3":{"start":{"line":83,"column":8},"end":{"line":83,"column":91}},"4":{"start":{"line":84,"column":8},"end":{"line":84,"column":2789}},"5":{"start":{"line":85,"column":12},"end":{"line":85,"column":24}},"6":{"start":{"line":88,"column":8},"end":{"line":88,"column":58}},"7":{"start":{"line":89,"column":8},"end":{"line":89,"column":19}},"8":{"start":{"line":101,"column":8},"end":{"line":101,"column":91}},"9":{"start":{"line":102,"column":8},"end":{"line":102,"column":3351}},"10":{"start":{"line":103,"column":12},"end":{"line":103,"column":24}},"11":{"start":{"line":106,"column":8},"end":{"line":106,"column":60}},"12":{"start":{"line":108,"column":8},"end":{"line":108,"column":19}}},"branchMap":{"1":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":53},"end":{"line":53,"column":53}},{"start":{"line":53,"column":53},"end":{"line":53,"column":53}}]},"2":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":8},"end":{"line":84,"column":8}},{"start":{"line":84,"column":8},"end":{"line":84,"column":8}}]},"3":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":8},"end":{"line":102,"column":8}},{"start":{"line":102,"column":8},"end":{"line":102,"column":8}}]}}},
+"contracts/modules/internal/ERC20SnapshotModuleInternal.sol":{"l":{"35":480,"36":480,"44":160,"45":160,"46":480,"48":160,"56":80,"57":80,"58":80,"59":80,"71":1200,"72":1200,"77":1200,"86":720,"87":720,"91":720,"106":422,"107":422,"109":77,"110":77,"112":43,"115":34,"119":345,"120":345,"128":465,"129":465,"136":379,"137":379},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/ERC20SnapshotModuleInternal.sol","s":{"1":160,"2":80,"3":1200,"4":1200,"5":1200,"6":720,"7":720,"8":720,"9":422,"10":422,"11":77,"12":77,"13":43,"14":34,"15":345,"16":345,"17":465,"18":465,"19":379,"20":379},"b":{"1":[385,0],"2":[400,800],"3":[36,684],"4":[77,345],"5":[43,34]},"f":{"1":385,"2":480,"3":160,"4":80,"5":1200,"6":720,"7":422,"8":465,"9":379},"fnMap":{"1":{"name":"__ERC20Snapshot_init_unchained","line":21,"loc":{"start":{"line":21,"column":4},"end":{"line":24,"column":4}}},"2":{"name":"snapshotInfo","line":34,"loc":{"start":{"line":34,"column":4},"end":{"line":37,"column":4}}},"3":{"name":"snapshotInfoBatch","line":43,"loc":{"start":{"line":43,"column":4},"end":{"line":49,"column":4}}},"4":{"name":"snapshotInfoBatch","line":55,"loc":{"start":{"line":55,"column":4},"end":{"line":61,"column":4}}},"5":{"name":"snapshotBalanceOf","line":67,"loc":{"start":{"line":67,"column":4},"end":{"line":78,"column":4}}},"6":{"name":"snapshotTotalSupply","line":85,"loc":{"start":{"line":85,"column":4},"end":{"line":92,"column":4}}},"7":{"name":"_snapshotUpdate","line":102,"loc":{"start":{"line":102,"column":4},"end":{"line":122,"column":4}}},"8":{"name":"_updateAccountSnapshot","line":127,"loc":{"start":{"line":127,"column":4},"end":{"line":130,"column":4}}},"9":{"name":"_updateTotalSupplySnapshot","line":135,"loc":{"start":{"line":135,"column":4},"end":{"line":138,"column":4}}}},"statementMap":{"1":{"start":{"line":45,"column":8},"end":{"line":45,"column":2070}},"2":{"start":{"line":58,"column":8},"end":{"line":58,"column":2733}},"3":{"start":{"line":71,"column":8},"end":{"line":71,"column":77}},"4":{"start":{"line":72,"column":8},"end":{"line":72,"column":3316}},"5":{"start":{"line":77,"column":8},"end":{"line":77,"column":53}},"6":{"start":{"line":86,"column":8},"end":{"line":86,"column":77}},"7":{"start":{"line":87,"column":8},"end":{"line":87,"column":3868}},"8":{"start":{"line":91,"column":8},"end":{"line":91,"column":50}},"9":{"start":{"line":106,"column":8},"end":{"line":106,"column":28}},"10":{"start":{"line":107,"column":8},"end":{"line":107,"column":4593}},"11":{"start":{"line":109,"column":12},"end":{"line":109,"column":39}},"12":{"start":{"line":110,"column":12},"end":{"line":110,"column":4719}},"13":{"start":{"line":112,"column":16},"end":{"line":112,"column":41}},"14":{"start":{"line":115,"column":16},"end":{"line":115,"column":43}},"15":{"start":{"line":119,"column":12},"end":{"line":119,"column":37}},"16":{"start":{"line":120,"column":12},"end":{"line":120,"column":39}},"17":{"start":{"line":128,"column":8},"end":{"line":128,"column":77}},"18":{"start":{"line":129,"column":8},"end":{"line":129,"column":79}},"19":{"start":{"line":136,"column":8},"end":{"line":136,"column":77}},"20":{"start":{"line":137,"column":8},"end":{"line":137,"column":62}}},"branchMap":{"1":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":55},"end":{"line":21,"column":55}},{"start":{"line":21,"column":55},"end":{"line":21,"column":55}}]},"2":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":29},"end":{"line":77,"column":33}},{"start":{"line":77,"column":37},"end":{"line":77,"column":52}}]},"3":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":29},"end":{"line":91,"column":33}},{"start":{"line":91,"column":37},"end":{"line":91,"column":49}}]},"4":{"line":107,"type":"if","locations":[{"start":{"line":107,"column":8},"end":{"line":107,"column":8}},{"start":{"line":107,"column":8},"end":{"line":107,"column":8}}]},"5":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":12},"end":{"line":110,"column":12}},{"start":{"line":110,"column":12},"end":{"line":110,"column":12}}]}}},
+"contracts/modules/internal/ValidationModuleInternal.sol":{"l":{"33":385,"34":18,"35":18,"36":18,"46":32,"47":32,"63":12,"64":12,"73":6,"74":6,"85":6,"86":6,"90":60,"91":60,"97":629},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/ValidationModuleInternal.sol","s":{"1":385,"2":18,"3":18,"4":32,"5":32,"6":12,"7":12,"8":6,"9":6,"10":6,"11":6,"12":60,"13":60},"b":{"1":[385,0],"2":[18,367]},"f":{"1":385,"2":32,"3":12,"4":6,"5":6,"6":60,"7":629},"fnMap":{"1":{"name":"__Validation_init_unchained","line":32,"loc":{"start":{"line":30,"column":4},"end":{"line":38,"column":4}}},"2":{"name":"ruleEngine","line":45,"loc":{"start":{"line":45,"column":4},"end":{"line":48,"column":4}}},"3":{"name":"_validateTransfer","line":58,"loc":{"start":{"line":58,"column":4},"end":{"line":65,"column":4}}},"4":{"name":"_messageForTransferRestriction","line":70,"loc":{"start":{"line":70,"column":4},"end":{"line":75,"column":4}}},"5":{"name":"_detectTransferRestriction","line":80,"loc":{"start":{"line":80,"column":4},"end":{"line":87,"column":4}}},"6":{"name":"_operateOnTransfer","line":89,"loc":{"start":{"line":89,"column":4},"end":{"line":92,"column":4}}},"7":{"name":"_getValidationModuleInternalStorage","line":96,"loc":{"start":{"line":96,"column":4},"end":{"line":100,"column":4}}}},"statementMap":{"1":{"start":{"line":33,"column":8},"end":{"line":33,"column":1219}},"2":{"start":{"line":34,"column":12},"end":{"line":34,"column":93}},"3":{"start":{"line":36,"column":12},"end":{"line":36,"column":40}},"4":{"start":{"line":46,"column":8},"end":{"line":46,"column":89}},"5":{"start":{"line":47,"column":8},"end":{"line":47,"column":28}},"6":{"start":{"line":63,"column":8},"end":{"line":63,"column":89}},"7":{"start":{"line":64,"column":8},"end":{"line":64,"column":63}},"8":{"start":{"line":73,"column":8},"end":{"line":73,"column":89}},"9":{"start":{"line":74,"column":8},"end":{"line":74,"column":75}},"10":{"start":{"line":85,"column":8},"end":{"line":85,"column":89}},"11":{"start":{"line":86,"column":8},"end":{"line":86,"column":72}},"12":{"start":{"line":90,"column":8},"end":{"line":90,"column":89}},"13":{"start":{"line":91,"column":8},"end":{"line":91,"column":64}}},"branchMap":{"1":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":15},"end":{"line":32,"column":15}},{"start":{"line":32,"column":15},"end":{"line":32,"column":15}}]},"2":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":8},"end":{"line":33,"column":8}},{"start":{"line":33,"column":8},"end":{"line":33,"column":8}}]}}},
+"contracts/modules/security/AuthorizationModule.sol":{"l":{"32":385,"33":2,"35":383,"36":383,"37":16,"38":16,"39":16,"49":2,"50":2,"61":16,"62":16,"63":4,"65":12,"66":12,"70":40,"71":40,"72":8,"73":8,"75":4,"78":36,"82":10,"83":10,"84":8,"85":8,"87":4,"90":6,"101":1285,"102":760,"104":525,"115":84},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/security/AuthorizationModule.sol","s":{"1":385,"2":383,"3":383,"4":16,"5":16,"6":2,"7":2,"8":16,"9":16,"10":12,"11":40,"12":40,"13":8,"14":8,"15":36,"16":10,"17":10,"18":8,"19":8,"20":6,"21":1285,"22":760,"23":525},"b":{"1":[385,0],"2":[2,383],"3":[16,367],"4":[16,4],"5":[4,12],"6":[40,2],"7":[8,32],"8":[4,4],"9":[10,2],"10":[8,2],"11":[4,4],"12":[760,525]},"f":{"1":385,"2":2,"3":16,"4":40,"5":10,"6":1285,"7":84},"fnMap":{"1":{"name":"__AuthorizationModule_init_unchained","line":31,"loc":{"start":{"line":30,"column":4},"end":{"line":41,"column":4}}},"2":{"name":"authorizationEngine","line":48,"loc":{"start":{"line":48,"column":4},"end":{"line":51,"column":4}}},"3":{"name":"setAuthorizationEngine","line":60,"loc":{"start":{"line":58,"column":4},"end":{"line":67,"column":4}}},"4":{"name":"grantRole","line":69,"loc":{"start":{"line":69,"column":4},"end":{"line":79,"column":4}}},"5":{"name":"revokeRole","line":81,"loc":{"start":{"line":81,"column":4},"end":{"line":91,"column":4}}},"6":{"name":"hasRole","line":96,"loc":{"start":{"line":96,"column":4},"end":{"line":105,"column":4}}},"7":{"name":"_getAuthorizationModuleStorage","line":114,"loc":{"start":{"line":114,"column":4},"end":{"line":118,"column":4}}}},"statementMap":{"1":{"start":{"line":32,"column":8},"end":{"line":32,"column":1354}},"2":{"start":{"line":35,"column":8},"end":{"line":35,"column":44}},"3":{"start":{"line":36,"column":8},"end":{"line":36,"column":1521}},"4":{"start":{"line":37,"column":12},"end":{"line":37,"column":83}},"5":{"start":{"line":39,"column":12},"end":{"line":39,"column":58}},"6":{"start":{"line":49,"column":8},"end":{"line":49,"column":79}},"7":{"start":{"line":50,"column":8},"end":{"line":50,"column":37}},"8":{"start":{"line":61,"column":8},"end":{"line":61,"column":79}},"9":{"start":{"line":62,"column":8},"end":{"line":62,"column":2578}},"10":{"start":{"line":66,"column":8},"end":{"line":66,"column":54}},"11":{"start":{"line":70,"column":8},"end":{"line":70,"column":79}},"12":{"start":{"line":71,"column":8},"end":{"line":71,"column":3034}},"13":{"start":{"line":72,"column":12},"end":{"line":72,"column":82}},"14":{"start":{"line":73,"column":12},"end":{"line":73,"column":3188}},"15":{"start":{"line":78,"column":8},"end":{"line":78,"column":64}},"16":{"start":{"line":82,"column":8},"end":{"line":82,"column":79}},"17":{"start":{"line":83,"column":8},"end":{"line":83,"column":3630}},"18":{"start":{"line":84,"column":12},"end":{"line":84,"column":83}},"19":{"start":{"line":85,"column":12},"end":{"line":85,"column":3785}},"20":{"start":{"line":90,"column":8},"end":{"line":90,"column":65}},"21":{"start":{"line":101,"column":8},"end":{"line":101,"column":4316}},"22":{"start":{"line":102,"column":12},"end":{"line":102,"column":23}},"23":{"start":{"line":104,"column":8},"end":{"line":104,"column":62}}},"branchMap":{"1":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":13},"end":{"line":31,"column":13}},{"start":{"line":31,"column":13},"end":{"line":31,"column":13}}]},"2":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":8},"end":{"line":32,"column":8}},{"start":{"line":32,"column":8},"end":{"line":32,"column":8}}]},"3":{"line":36,"type":"if","locations":[{"start":{"line":36,"column":8},"end":{"line":36,"column":8}},{"start":{"line":36,"column":8},"end":{"line":36,"column":8}}]},"4":{"line":60,"type":"if","locations":[{"start":{"line":60,"column":15},"end":{"line":60,"column":15}},{"start":{"line":60,"column":15},"end":{"line":60,"column":15}}]},"5":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":8},"end":{"line":62,"column":8}},{"start":{"line":62,"column":8},"end":{"line":62,"column":8}}]},"6":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":70},"end":{"line":69,"column":70}},{"start":{"line":69,"column":70},"end":{"line":69,"column":70}}]},"7":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":8},"end":{"line":71,"column":8}},{"start":{"line":71,"column":8},"end":{"line":71,"column":8}}]},"8":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":12},"end":{"line":73,"column":12}},{"start":{"line":73,"column":12},"end":{"line":73,"column":12}}]},"9":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":71},"end":{"line":81,"column":71}},{"start":{"line":81,"column":71},"end":{"line":81,"column":71}}]},"10":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]},"11":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":12},"end":{"line":85,"column":12}},{"start":{"line":85,"column":12},"end":{"line":85,"column":12}}]},"12":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":8},"end":{"line":101,"column":8}},{"start":{"line":101,"column":8},"end":{"line":101,"column":8}}]}}},
+"contracts/modules/wrapper/controllers/ValidationModule.sol":{"l":{"44":18,"45":18,"46":3,"48":15,"49":15,"60":20,"61":20,"62":3,"67":4,"72":2,"77":2,"79":6,"81":3,"97":17,"98":17,"99":4,"101":2,"103":2,"105":6,"107":3,"116":19,"117":4,"119":15,"120":15,"121":12,"123":3,"135":458,"136":18,"138":440,"142":439,"143":14,"145":425,"146":425,"147":60,"149":365},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/controllers/ValidationModule.sol","s":{"1":18,"2":18,"3":15,"4":20,"5":20,"6":3,"7":17,"8":4,"9":13,"10":2,"11":11,"12":2,"13":9,"14":6,"15":3,"16":17,"17":17,"18":4,"19":13,"20":2,"21":11,"22":2,"23":9,"24":6,"25":3,"26":19,"27":4,"28":15,"29":15,"30":12,"31":3,"32":458,"33":18,"34":440,"35":439,"36":14,"37":425,"38":425,"39":60,"40":365},"b":{"1":[383,0],"2":[18,3],"3":[3,15],"4":[3,17],"5":[4,13],"6":[2,11],"7":[2,9],"8":[6,3],"9":[4,13],"10":[2,11],"11":[2,9],"12":[6,3],"13":[4,15],"14":[12,3],"15":[18,440],"16":[12,4],"17":[4,2],"18":[14,425],"19":[60,365]},"f":{"1":383,"2":18,"3":20,"4":17,"5":19,"6":458,"7":439},"fnMap":{"1":{"name":"__ValidationModule_init_unchained","line":28,"loc":{"start":{"line":28,"column":4},"end":{"line":30,"column":4}}},"2":{"name":"setRuleEngine","line":43,"loc":{"start":{"line":41,"column":4},"end":{"line":50,"column":4}}},"3":{"name":"messageForTransferRestriction","line":57,"loc":{"start":{"line":57,"column":4},"end":{"line":83,"column":4}}},"4":{"name":"detectTransferRestriction","line":92,"loc":{"start":{"line":92,"column":4},"end":{"line":109,"column":4}}},"5":{"name":"validateTransfer","line":111,"loc":{"start":{"line":111,"column":4},"end":{"line":124,"column":4}}},"6":{"name":"_validateTransferByModule","line":130,"loc":{"start":{"line":130,"column":4},"end":{"line":139,"column":4}}},"7":{"name":"_operateOnTransfer","line":141,"loc":{"start":{"line":141,"column":4},"end":{"line":150,"column":4}}}},"statementMap":{"1":{"start":{"line":44,"column":8},"end":{"line":44,"column":89}},"2":{"start":{"line":45,"column":8},"end":{"line":45,"column":1409}},"3":{"start":{"line":49,"column":8},"end":{"line":49,"column":36}},"4":{"start":{"line":60,"column":10},"end":{"line":60,"column":91}},"5":{"start":{"line":61,"column":8},"end":{"line":61,"column":2191}},"6":{"start":{"line":62,"column":12},"end":{"line":62,"column":35}},"7":{"start":{"line":63,"column":15},"end":{"line":63,"column":2307}},"8":{"start":{"line":67,"column":12},"end":{"line":67,"column":48}},"9":{"start":{"line":68,"column":15},"end":{"line":68,"column":2483}},"10":{"start":{"line":72,"column":12},"end":{"line":72,"column":53}},"11":{"start":{"line":73,"column":15},"end":{"line":73,"column":2669}},"12":{"start":{"line":77,"column":12},"end":{"line":77,"column":51}},"13":{"start":{"line":78,"column":15},"end":{"line":78,"column":2851}},"14":{"start":{"line":79,"column":12},"end":{"line":79,"column":66}},"15":{"start":{"line":81,"column":12},"end":{"line":81,"column":36}},"16":{"start":{"line":97,"column":8},"end":{"line":97,"column":89}},"17":{"start":{"line":98,"column":8},"end":{"line":98,"column":3641}},"18":{"start":{"line":99,"column":12},"end":{"line":99,"column":69}},"19":{"start":{"line":100,"column":15},"end":{"line":100,"column":3743}},"20":{"start":{"line":101,"column":12},"end":{"line":101,"column":74}},"21":{"start":{"line":102,"column":15},"end":{"line":102,"column":3854}},"22":{"start":{"line":103,"column":12},"end":{"line":103,"column":72}},"23":{"start":{"line":104,"column":15},"end":{"line":104,"column":3961}},"24":{"start":{"line":105,"column":12},"end":{"line":105,"column":63}},"25":{"start":{"line":107,"column":12},"end":{"line":107,"column":56}},"26":{"start":{"line":116,"column":8},"end":{"line":116,"column":4310}},"27":{"start":{"line":117,"column":12},"end":{"line":117,"column":24}},"28":{"start":{"line":119,"column":8},"end":{"line":119,"column":89}},"29":{"start":{"line":120,"column":8},"end":{"line":120,"column":4497}},"30":{"start":{"line":121,"column":12},"end":{"line":121,"column":54}},"31":{"start":{"line":123,"column":8},"end":{"line":123,"column":19}},"32":{"start":{"line":135,"column":8},"end":{"line":135,"column":4983}},"33":{"start":{"line":136,"column":12},"end":{"line":136,"column":24}},"34":{"start":{"line":138,"column":8},"end":{"line":138,"column":19}},"35":{"start":{"line":142,"column":8},"end":{"line":142,"column":5209}},"36":{"start":{"line":143,"column":12},"end":{"line":143,"column":24}},"37":{"start":{"line":145,"column":8},"end":{"line":145,"column":89}},"38":{"start":{"line":146,"column":8},"end":{"line":146,"column":5395}},"39":{"start":{"line":147,"column":12},"end":{"line":147,"column":80}},"40":{"start":{"line":149,"column":8},"end":{"line":149,"column":19}}},"branchMap":{"1":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":58},"end":{"line":28,"column":58}},{"start":{"line":28,"column":58},"end":{"line":28,"column":58}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":15},"end":{"line":43,"column":15}},{"start":{"line":43,"column":15},"end":{"line":43,"column":15}}]},"3":{"line":45,"type":"if","locations":[{"start":{"line":45,"column":8},"end":{"line":45,"column":8}},{"start":{"line":45,"column":8},"end":{"line":45,"column":8}}]},"4":{"line":61,"type":"if","locations":[{"start":{"line":61,"column":8},"end":{"line":61,"column":8}},{"start":{"line":61,"column":8},"end":{"line":61,"column":8}}]},"5":{"line":63,"type":"if","locations":[{"start":{"line":63,"column":15},"end":{"line":63,"column":15}},{"start":{"line":63,"column":15},"end":{"line":63,"column":15}}]},"6":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":15},"end":{"line":68,"column":15}},{"start":{"line":68,"column":15},"end":{"line":68,"column":15}}]},"7":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":15},"end":{"line":73,"column":15}},{"start":{"line":73,"column":15},"end":{"line":73,"column":15}}]},"8":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":15},"end":{"line":78,"column":15}},{"start":{"line":78,"column":15},"end":{"line":78,"column":15}}]},"9":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":8},"end":{"line":98,"column":8}},{"start":{"line":98,"column":8},"end":{"line":98,"column":8}}]},"10":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":15},"end":{"line":100,"column":15}},{"start":{"line":100,"column":15},"end":{"line":100,"column":15}}]},"11":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":15},"end":{"line":102,"column":15}},{"start":{"line":102,"column":15},"end":{"line":102,"column":15}}]},"12":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":15},"end":{"line":104,"column":15}},{"start":{"line":104,"column":15},"end":{"line":104,"column":15}}]},"13":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":8},"end":{"line":116,"column":8}},{"start":{"line":116,"column":8},"end":{"line":116,"column":8}}]},"14":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":8},"end":{"line":120,"column":8}},{"start":{"line":120,"column":8},"end":{"line":120,"column":8}}]},"15":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]},"16":{"line":135,"type":"cond-expr","locations":[{"start":{"line":135,"column":12},"end":{"line":135,"column":19}},{"start":{"line":135,"column":24},"end":{"line":135,"column":35}}]},"17":{"line":135,"type":"cond-expr","locations":[{"start":{"line":135,"column":12},"end":{"line":135,"column":35}},{"start":{"line":135,"column":40},"end":{"line":135,"column":49}}]},"18":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":8},"end":{"line":142,"column":8}},{"start":{"line":142,"column":8},"end":{"line":142,"column":8}}]},"19":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":8},"end":{"line":146,"column":8}},{"start":{"line":146,"column":8},"end":{"line":146,"column":8}}]}}},
+"contracts/modules/wrapper/core/BaseModule.sol":{"l":{"45":383,"46":383,"47":383,"48":383,"56":10,"57":10,"61":10,"62":10,"65":8,"66":8,"75":2,"76":2,"77":2,"86":2,"87":2,"88":2,"97":2,"98":2,"99":2,"109":417},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/BaseModule.sol","s":{"1":383,"2":10,"3":10,"4":10,"5":10,"6":8,"7":8,"8":2,"9":2,"10":2,"11":2,"12":2,"13":2},"b":{"1":[383,0],"2":[2,2],"3":[2,2],"4":[2,2]},"f":{"1":383,"2":10,"3":10,"4":8,"5":2,"6":2,"7":2,"8":417},"fnMap":{"1":{"name":"__Base_init_unchained","line":44,"loc":{"start":{"line":40,"column":4},"end":{"line":49,"column":4}}},"2":{"name":"tokenId","line":55,"loc":{"start":{"line":55,"column":4},"end":{"line":58,"column":4}}},"3":{"name":"terms","line":60,"loc":{"start":{"line":60,"column":4},"end":{"line":63,"column":4}}},"4":{"name":"information","line":64,"loc":{"start":{"line":64,"column":4},"end":{"line":67,"column":4}}},"5":{"name":"setTokenId","line":74,"loc":{"start":{"line":72,"column":4},"end":{"line":78,"column":4}}},"6":{"name":"setTerms","line":85,"loc":{"start":{"line":83,"column":4},"end":{"line":89,"column":4}}},"7":{"name":"setInformation","line":96,"loc":{"start":{"line":94,"column":4},"end":{"line":100,"column":4}}},"8":{"name":"_getBaseModuleStorage","line":108,"loc":{"start":{"line":108,"column":4},"end":{"line":112,"column":4}}}},"statementMap":{"1":{"start":{"line":45,"column":8},"end":{"line":45,"column":61}},"2":{"start":{"line":56,"column":8},"end":{"line":56,"column":61}},"3":{"start":{"line":57,"column":8},"end":{"line":57,"column":25}},"4":{"start":{"line":61,"column":8},"end":{"line":61,"column":61}},"5":{"start":{"line":62,"column":8},"end":{"line":62,"column":23}},"6":{"start":{"line":65,"column":8},"end":{"line":65,"column":61}},"7":{"start":{"line":66,"column":8},"end":{"line":66,"column":29}},"8":{"start":{"line":75,"column":8},"end":{"line":75,"column":61}},"9":{"start":{"line":77,"column":8},"end":{"line":77,"column":40}},"10":{"start":{"line":86,"column":8},"end":{"line":86,"column":61}},"11":{"start":{"line":88,"column":8},"end":{"line":88,"column":33}},"12":{"start":{"line":97,"column":8},"end":{"line":97,"column":61}},"13":{"start":{"line":99,"column":8},"end":{"line":99,"column":52}}},"branchMap":{"1":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":15},"end":{"line":44,"column":15}},{"start":{"line":44,"column":15},"end":{"line":44,"column":15}}]},"2":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":13},"end":{"line":74,"column":13}},{"start":{"line":74,"column":13},"end":{"line":74,"column":13}}]},"3":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":13},"end":{"line":85,"column":13}},{"start":{"line":85,"column":13},"end":{"line":85,"column":13}}]},"4":{"line":96,"type":"if","locations":[{"start":{"line":96,"column":13},"end":{"line":96,"column":13}},{"start":{"line":96,"column":13},"end":{"line":96,"column":13}}]}}},
+"contracts/modules/wrapper/core/EnforcementModule.sol":{"l":{"43":22,"57":8},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/EnforcementModule.sol","s":{"1":22,"2":8},"b":{"1":[383,0],"2":[22,2],"3":[8,2]},"f":{"1":383,"2":22,"3":8},"fnMap":{"1":{"name":"__EnforcementModule_init_unchained","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":29,"column":4}}},"2":{"name":"freeze","line":42,"loc":{"start":{"line":39,"column":4},"end":{"line":44,"column":4}}},"3":{"name":"unfreeze","line":56,"loc":{"start":{"line":53,"column":4},"end":{"line":58,"column":4}}}},"statementMap":{"1":{"start":{"line":43,"column":8},"end":{"line":43,"column":39}},"2":{"start":{"line":57,"column":8},"end":{"line":57,"column":41}}},"branchMap":{"1":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":59},"end":{"line":27,"column":59}},{"start":{"line":27,"column":59},"end":{"line":27,"column":59}}]},"2":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":13},"end":{"line":42,"column":13}},{"start":{"line":42,"column":13},"end":{"line":42,"column":13}}]},"3":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":13},"end":{"line":56,"column":13}},{"start":{"line":56,"column":13},"end":{"line":56,"column":13}}]}}},
+"contracts/modules/wrapper/core/ERC20BaseModule.sol":{"l":{"42":383,"43":383,"54":2,"55":2,"74":10,"75":2,"79":8,"80":4,"83":4,"86":10,"90":2,"105":10,"107":2,"108":2,"111":2,"120":4,"121":4,"122":2,"124":4,"135":385},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/ERC20BaseModule.sol","s":{"1":383,"2":2,"3":2,"4":10,"5":8,"6":4,"7":10,"8":2,"9":10,"10":2,"11":2,"12":2,"13":4},"b":{"1":[383,0],"2":[2,8],"3":[4,4],"4":[2,0]},"f":{"1":383,"2":2,"3":10,"4":10,"5":4,"6":385},"fnMap":{"1":{"name":"__ERC20BaseModule_init_unchained","line":41,"loc":{"start":{"line":39,"column":4},"end":{"line":44,"column":4}}},"2":{"name":"decimals","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":56,"column":4}}},"3":{"name":"transferBatch","line":70,"loc":{"start":{"line":70,"column":4},"end":{"line":91,"column":4}}},"4":{"name":"transferFrom","line":100,"loc":{"start":{"line":100,"column":4},"end":{"line":112,"column":4}}},"5":{"name":"balanceInfo","line":119,"loc":{"start":{"line":119,"column":4},"end":{"line":125,"column":4}}},"6":{"name":"_getERC20BaseModuleStorage","line":134,"loc":{"start":{"line":134,"column":4},"end":{"line":138,"column":4}}}},"statementMap":{"1":{"start":{"line":42,"column":8},"end":{"line":42,"column":71}},"2":{"start":{"line":54,"column":8},"end":{"line":54,"column":71}},"3":{"start":{"line":55,"column":8},"end":{"line":55,"column":26}},"4":{"start":{"line":74,"column":8},"end":{"line":74,"column":2789}},"5":{"start":{"line":79,"column":8},"end":{"line":79,"column":3006}},"6":{"start":{"line":83,"column":8},"end":{"line":83,"column":3201}},"7":{"start":{"line":86,"column":12},"end":{"line":86,"column":70}},"8":{"start":{"line":90,"column":8},"end":{"line":90,"column":19}},"9":{"start":{"line":105,"column":8},"end":{"line":105,"column":68}},"10":{"start":{"line":107,"column":8},"end":{"line":107,"column":4151}},"11":{"start":{"line":108,"column":12},"end":{"line":108,"column":49}},"12":{"start":{"line":111,"column":8},"end":{"line":111,"column":21}},"13":{"start":{"line":121,"column":8},"end":{"line":121,"column":4644}}},"branchMap":{"1":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":15},"end":{"line":41,"column":15}},{"start":{"line":41,"column":15},"end":{"line":41,"column":15}}]},"2":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":8},"end":{"line":74,"column":8}},{"start":{"line":74,"column":8},"end":{"line":74,"column":8}}]},"3":{"line":79,"type":"if","locations":[{"start":{"line":79,"column":8},"end":{"line":79,"column":8}},{"start":{"line":79,"column":8},"end":{"line":79,"column":8}}]},"4":{"line":107,"type":"if","locations":[{"start":{"line":107,"column":8},"end":{"line":107,"column":8}},{"start":{"line":107,"column":8},"end":{"line":107,"column":8}}]}}},
+"contracts/modules/wrapper/core/ERC20BurnModule.sol":{"l":{"54":14,"55":12,"78":12,"79":2,"83":10,"84":4,"87":6,"88":18,"89":16,"112":4,"113":4,"114":4,"116":2,"119":2,"120":2,"123":2,"125":2,"127":2},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/ERC20BurnModule.sol","s":{"1":14,"2":12,"3":12,"4":10,"5":6,"6":18,"7":16,"8":4,"9":4,"10":4,"11":2,"12":2,"13":2,"14":2},"b":{"1":[383,0],"2":[14,4],"3":[12,2],"4":[2,10],"5":[4,6],"6":[4,2],"7":[2,2]},"f":{"1":383,"2":14,"3":12,"4":4},"fnMap":{"1":{"name":"__ERC20BurnModule_init_unchained","line":32,"loc":{"start":{"line":32,"column":4},"end":{"line":34,"column":4}}},"2":{"name":"burn","line":53,"loc":{"start":{"line":49,"column":4},"end":{"line":56,"column":4}}},"3":{"name":"burnBatch","line":77,"loc":{"start":{"line":73,"column":4},"end":{"line":91,"column":4}}},"4":{"name":"burnFrom","line":109,"loc":{"start":{"line":107,"column":4},"end":{"line":128,"column":4}}}},"statementMap":{"1":{"start":{"line":54,"column":8},"end":{"line":54,"column":28}},"2":{"start":{"line":55,"column":8},"end":{"line":55,"column":41}},"3":{"start":{"line":78,"column":8},"end":{"line":78,"column":2750}},"4":{"start":{"line":83,"column":8},"end":{"line":83,"column":2972}},"5":{"start":{"line":87,"column":8},"end":{"line":87,"column":3172}},"6":{"start":{"line":88,"column":12},"end":{"line":88,"column":40}},"7":{"start":{"line":89,"column":12},"end":{"line":89,"column":53}},"8":{"start":{"line":112,"column":8},"end":{"line":112,"column":38}},"9":{"start":{"line":113,"column":8},"end":{"line":113,"column":61}},"10":{"start":{"line":114,"column":8},"end":{"line":114,"column":4061}},"11":{"start":{"line":120,"column":12},"end":{"line":120,"column":62}},"12":{"start":{"line":123,"column":8},"end":{"line":123,"column":28}},"13":{"start":{"line":125,"column":8},"end":{"line":125,"column":45}},"14":{"start":{"line":127,"column":8},"end":{"line":127,"column":45}}},"branchMap":{"1":{"line":32,"type":"if","locations":[{"start":{"line":32,"column":57},"end":{"line":32,"column":57}},{"start":{"line":32,"column":57},"end":{"line":32,"column":57}}]},"2":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":13},"end":{"line":53,"column":13}},{"start":{"line":53,"column":13},"end":{"line":53,"column":13}}]},"3":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":13},"end":{"line":77,"column":13}},{"start":{"line":77,"column":13},"end":{"line":77,"column":13}}]},"4":{"line":78,"type":"if","locations":[{"start":{"line":78,"column":8},"end":{"line":78,"column":8}},{"start":{"line":78,"column":8},"end":{"line":78,"column":8}}]},"5":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]},"6":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":8},"end":{"line":109,"column":8}},{"start":{"line":109,"column":8},"end":{"line":109,"column":8}}]},"7":{"line":114,"type":"if","locations":[{"start":{"line":114,"column":8},"end":{"line":114,"column":8}},{"start":{"line":114,"column":8},"end":{"line":114,"column":8}}]}}},
+"contracts/modules/wrapper/core/ERC20MintModule.sol":{"l":{"48":291,"49":291,"71":24,"72":2,"76":22,"77":4,"80":18,"81":54,"82":54},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/ERC20MintModule.sol","s":{"1":291,"2":291,"3":24,"4":22,"5":18,"6":54,"7":54},"b":{"1":[383,0],"2":[291,4],"3":[24,2],"4":[2,22],"5":[4,18]},"f":{"1":383,"2":291,"3":24},"fnMap":{"1":{"name":"__ERC20MintModule_init_unchained","line":27,"loc":{"start":{"line":27,"column":4},"end":{"line":29,"column":4}}},"2":{"name":"mint","line":47,"loc":{"start":{"line":47,"column":4},"end":{"line":50,"column":4}}},"3":{"name":"mintBatch","line":70,"loc":{"start":{"line":67,"column":4},"end":{"line":84,"column":4}}}},"statementMap":{"1":{"start":{"line":48,"column":8},"end":{"line":48,"column":28}},"2":{"start":{"line":49,"column":8},"end":{"line":49,"column":33}},"3":{"start":{"line":71,"column":8},"end":{"line":71,"column":2514}},"4":{"start":{"line":76,"column":8},"end":{"line":76,"column":2736}},"5":{"start":{"line":80,"column":8},"end":{"line":80,"column":2936}},"6":{"start":{"line":81,"column":12},"end":{"line":81,"column":40}},"7":{"start":{"line":82,"column":12},"end":{"line":82,"column":45}}},"branchMap":{"1":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":57},"end":{"line":27,"column":57}},{"start":{"line":27,"column":57},"end":{"line":27,"column":57}}]},"2":{"line":47,"type":"if","locations":[{"start":{"line":47,"column":57},"end":{"line":47,"column":57}},{"start":{"line":47,"column":57},"end":{"line":47,"column":57}}]},"3":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":13},"end":{"line":70,"column":13}},{"start":{"line":70,"column":13},"end":{"line":70,"column":13}}]},"4":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":8},"end":{"line":71,"column":8}},{"start":{"line":71,"column":8},"end":{"line":71,"column":8}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]}}},
+"contracts/modules/wrapper/core/PauseModule.sol":{"l":{"51":14,"63":6,"64":6,"65":2,"67":4,"83":2,"84":2,"85":2,"86":2,"93":4,"94":4,"105":12},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/PauseModule.sol","s":{"1":14,"2":6,"3":6,"4":4,"5":2,"6":2,"7":2,"8":4,"9":4},"b":{"1":[383,0],"2":[14,3],"3":[6,2],"4":[2,4],"5":[2,2]},"f":{"1":383,"2":14,"3":6,"4":2,"5":4,"6":12},"fnMap":{"1":{"name":"__PauseModule_init_unchained","line":34,"loc":{"start":{"line":34,"column":4},"end":{"line":36,"column":4}}},"2":{"name":"pause","line":50,"loc":{"start":{"line":50,"column":4},"end":{"line":52,"column":4}}},"3":{"name":"unpause","line":62,"loc":{"start":{"line":62,"column":4},"end":{"line":68,"column":4}}},"4":{"name":"deactivateContract","line":81,"loc":{"start":{"line":79,"column":4},"end":{"line":87,"column":4}}},"5":{"name":"deactivated","line":92,"loc":{"start":{"line":92,"column":4},"end":{"line":95,"column":4}}},"6":{"name":"_getPauseModuleStorage","line":104,"loc":{"start":{"line":104,"column":4},"end":{"line":108,"column":4}}}},"statementMap":{"1":{"start":{"line":51,"column":8},"end":{"line":51,"column":15}},"2":{"start":{"line":63,"column":8},"end":{"line":63,"column":63}},"3":{"start":{"line":64,"column":8},"end":{"line":64,"column":2386}},"4":{"start":{"line":67,"column":8},"end":{"line":67,"column":17}},"5":{"start":{"line":83,"column":8},"end":{"line":83,"column":63}},"6":{"start":{"line":85,"column":7},"end":{"line":85,"column":14}},"7":{"start":{"line":86,"column":7},"end":{"line":86,"column":37}},"8":{"start":{"line":93,"column":8},"end":{"line":93,"column":63}},"9":{"start":{"line":94,"column":8},"end":{"line":94,"column":31}}},"branchMap":{"1":{"line":34,"type":"if","locations":[{"start":{"line":34,"column":53},"end":{"line":34,"column":53}},{"start":{"line":34,"column":53},"end":{"line":34,"column":53}}]},"2":{"line":50,"type":"if","locations":[{"start":{"line":50,"column":28},"end":{"line":50,"column":28}},{"start":{"line":50,"column":28},"end":{"line":50,"column":28}}]},"3":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":30},"end":{"line":62,"column":30}},{"start":{"line":62,"column":30},"end":{"line":62,"column":30}}]},"4":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":8},"end":{"line":64,"column":8}},{"start":{"line":64,"column":8},"end":{"line":64,"column":8}}]},"5":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":8},"end":{"line":81,"column":8}},{"start":{"line":81,"column":8},"end":{"line":81,"column":8}}]}}},
+"contracts/modules/wrapper/extensions/DebtModule.sol":{"l":{"43":383,"44":3,"45":3,"46":3,"55":8,"56":8,"66":5,"67":5,"68":1,"70":4,"71":4,"75":3,"76":3,"77":2,"82":3,"83":3,"84":2,"95":22},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/DebtModule.sol","s":{"1":383,"2":3,"3":3,"4":8,"5":8,"6":5,"7":5,"8":4,"9":3,"10":3,"11":3,"12":3},"b":{"1":[383,0],"2":[3,380],"3":[5,1],"4":[1,4],"5":[2,1],"6":[2,1]},"f":{"1":383,"2":8,"3":5,"4":3,"5":3,"6":22},"fnMap":{"1":{"name":"__DebtModule_init_unchained","line":42,"loc":{"start":{"line":41,"column":4},"end":{"line":50,"column":4}}},"2":{"name":"debtEngine","line":54,"loc":{"start":{"line":54,"column":4},"end":{"line":57,"column":4}}},"3":{"name":"setDebtEngine","line":65,"loc":{"start":{"line":63,"column":4},"end":{"line":72,"column":4}}},"4":{"name":"debt","line":74,"loc":{"start":{"line":74,"column":4},"end":{"line":79,"column":4}}},"5":{"name":"creditEvents","line":81,"loc":{"start":{"line":81,"column":4},"end":{"line":86,"column":4}}},"6":{"name":"_getDebtModuleStorage","line":94,"loc":{"start":{"line":94,"column":4},"end":{"line":98,"column":4}}}},"statementMap":{"1":{"start":{"line":43,"column":8},"end":{"line":43,"column":1427}},"2":{"start":{"line":44,"column":12},"end":{"line":44,"column":65}},"3":{"start":{"line":46,"column":12},"end":{"line":46,"column":40}},"4":{"start":{"line":55,"column":8},"end":{"line":55,"column":61}},"5":{"start":{"line":56,"column":8},"end":{"line":56,"column":28}},"6":{"start":{"line":66,"column":8},"end":{"line":66,"column":61}},"7":{"start":{"line":67,"column":8},"end":{"line":67,"column":2257}},"8":{"start":{"line":71,"column":8},"end":{"line":71,"column":36}},"9":{"start":{"line":75,"column":8},"end":{"line":75,"column":61}},"10":{"start":{"line":76,"column":8},"end":{"line":76,"column":2584}},"11":{"start":{"line":82,"column":8},"end":{"line":82,"column":61}},"12":{"start":{"line":83,"column":8},"end":{"line":83,"column":2855}}},"branchMap":{"1":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":13},"end":{"line":42,"column":13}},{"start":{"line":42,"column":13},"end":{"line":42,"column":13}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":8},"end":{"line":43,"column":8}},{"start":{"line":43,"column":8},"end":{"line":43,"column":8}}]},"3":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":15},"end":{"line":65,"column":15}},{"start":{"line":65,"column":15},"end":{"line":65,"column":15}}]},"4":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":8},"end":{"line":67,"column":8}},{"start":{"line":67,"column":8},"end":{"line":67,"column":8}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]},"6":{"line":83,"type":"if","locations":[{"start":{"line":83,"column":8},"end":{"line":83,"column":8}},{"start":{"line":83,"column":8},"end":{"line":83,"column":8}}]}}},
+"contracts/modules/wrapper/extensions/DocumentModule.sol":{"l":{"43":383,"44":12,"45":12,"46":12,"54":28,"55":28,"65":16,"66":16,"67":2,"69":14,"70":14,"75":18,"76":18,"77":16,"79":2,"84":6,"85":6,"86":4,"97":80},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/DocumentModule.sol","s":{"1":383,"2":12,"3":12,"4":28,"5":28,"6":16,"7":16,"8":14,"9":18,"10":18,"11":16,"12":2,"13":6,"14":6},"b":{"1":[383,0],"2":[12,371],"3":[16,2],"4":[2,14],"5":[16,2],"6":[4,2]},"f":{"1":383,"2":28,"3":16,"4":18,"5":6,"6":80},"fnMap":{"1":{"name":"__DocumentModule_init_unchained","line":42,"loc":{"start":{"line":41,"column":4},"end":{"line":48,"column":4}}},"2":{"name":"documentEngine","line":53,"loc":{"start":{"line":53,"column":4},"end":{"line":56,"column":4}}},"3":{"name":"setDocumentEngine","line":64,"loc":{"start":{"line":62,"column":4},"end":{"line":71,"column":4}}},"4":{"name":"getDocument","line":74,"loc":{"start":{"line":74,"column":4},"end":{"line":81,"column":4}}},"5":{"name":"getAllDocuments","line":83,"loc":{"start":{"line":83,"column":4},"end":{"line":88,"column":4}}},"6":{"name":"_getDocumentModuleStorage","line":96,"loc":{"start":{"line":96,"column":4},"end":{"line":100,"column":4}}}},"statementMap":{"1":{"start":{"line":43,"column":8},"end":{"line":43,"column":1401}},"2":{"start":{"line":44,"column":12},"end":{"line":44,"column":73}},"3":{"start":{"line":46,"column":12},"end":{"line":46,"column":48}},"4":{"start":{"line":54,"column":8},"end":{"line":54,"column":69}},"5":{"start":{"line":55,"column":8},"end":{"line":55,"column":32}},"6":{"start":{"line":65,"column":8},"end":{"line":65,"column":69}},"7":{"start":{"line":66,"column":8},"end":{"line":66,"column":2280}},"8":{"start":{"line":70,"column":8},"end":{"line":70,"column":44}},"9":{"start":{"line":75,"column":8},"end":{"line":75,"column":69}},"10":{"start":{"line":76,"column":8},"end":{"line":76,"column":2667}},"11":{"start":{"line":77,"column":12},"end":{"line":77,"column":56}},"12":{"start":{"line":79,"column":12},"end":{"line":79,"column":30}},"13":{"start":{"line":84,"column":8},"end":{"line":84,"column":69}},"14":{"start":{"line":85,"column":8},"end":{"line":85,"column":2996}}},"branchMap":{"1":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":13},"end":{"line":42,"column":13}},{"start":{"line":42,"column":13},"end":{"line":42,"column":13}}]},"2":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":8},"end":{"line":43,"column":8}},{"start":{"line":43,"column":8},"end":{"line":43,"column":8}}]},"3":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":15},"end":{"line":64,"column":15}},{"start":{"line":64,"column":15},"end":{"line":64,"column":15}}]},"4":{"line":66,"type":"if","locations":[{"start":{"line":66,"column":8},"end":{"line":66,"column":8}},{"start":{"line":66,"column":8},"end":{"line":66,"column":8}}]},"5":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]},"6":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":8},"end":{"line":85,"column":8}},{"start":{"line":85,"column":8},"end":{"line":85,"column":8}}]}}},
+"contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol":{"l":{"34":170,"45":12,"57":22,"68":14,"78":10},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol","s":{"1":170,"2":12,"3":22,"4":14,"5":10},"b":{"1":[383,0],"2":[170,2],"3":[12,2],"4":[22,2],"5":[14,2],"6":[10,2]},"f":{"1":383,"2":170,"3":12,"4":22,"5":14,"6":10},"fnMap":{"1":{"name":"__ERC20SnasphotModule_init_unchained","line":22,"loc":{"start":{"line":22,"column":4},"end":{"line":24,"column":4}}},"2":{"name":"scheduleSnapshot","line":33,"loc":{"start":{"line":33,"column":4},"end":{"line":35,"column":4}}},"3":{"name":"scheduleSnapshotNotOptimized","line":44,"loc":{"start":{"line":42,"column":4},"end":{"line":46,"column":4}}},"4":{"name":"rescheduleSnapshot","line":56,"loc":{"start":{"line":53,"column":4},"end":{"line":58,"column":4}}},"5":{"name":"unscheduleLastSnapshot","line":67,"loc":{"start":{"line":65,"column":4},"end":{"line":69,"column":4}}},"6":{"name":"unscheduleSnapshotNotOptimized","line":77,"loc":{"start":{"line":75,"column":4},"end":{"line":79,"column":4}}}},"statementMap":{"1":{"start":{"line":34,"column":8},"end":{"line":34,"column":30}},"2":{"start":{"line":45,"column":8},"end":{"line":45,"column":42}},"3":{"start":{"line":57,"column":8},"end":{"line":57,"column":44}},"4":{"start":{"line":68,"column":8},"end":{"line":68,"column":36}},"5":{"start":{"line":78,"column":8},"end":{"line":78,"column":44}}},"branchMap":{"1":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":61},"end":{"line":22,"column":61}},{"start":{"line":22,"column":61},"end":{"line":22,"column":61}}]},"2":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":51},"end":{"line":33,"column":51}},{"start":{"line":33,"column":51},"end":{"line":33,"column":51}}]},"3":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":13},"end":{"line":44,"column":13}},{"start":{"line":44,"column":13},"end":{"line":44,"column":13}}]},"4":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":13},"end":{"line":56,"column":13}},{"start":{"line":56,"column":13},"end":{"line":56,"column":13}}]},"5":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":13},"end":{"line":67,"column":13}},{"start":{"line":67,"column":13},"end":{"line":67,"column":13}}]},"6":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":13},"end":{"line":77,"column":13}},{"start":{"line":77,"column":13},"end":{"line":77,"column":13}}]}}},
+"contracts/modules/wrapper/extensions/MetaTxModule.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/MetaTxModule.sol","s":{},"b":{},"f":{"1":398},"fnMap":{"1":{"name":"constructor","line":19,"loc":{"start":{"line":17,"column":4},"end":{"line":21,"column":4}}}},"statementMap":{},"branchMap":{}},
+"contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol","s":{},"b":{},"f":{"1":3},"fnMap":{"1":{"name":"constructor","line":19,"loc":{"start":{"line":17,"column":4},"end":{"line":21,"column":4}}}},"statementMap":{},"branchMap":{}},
+"contracts/test/proxy/CMTAT_PROXY_TEST.sol":{"l":{},"path":"/home/ryan/Downloads/CM/CMTAT/contracts/test/proxy/CMTAT_PROXY_TEST.sol","s":{},"b":{},"f":{"1":1},"fnMap":{"1":{"name":"constructor","line":19,"loc":{"start":{"line":17,"column":4},"end":{"line":21,"column":4}}}},"statementMap":{},"branchMap":{}}}
diff --git a/doc/general/test/coverage/index.html b/doc/general/test/coverage/index.html
index 1f7b85a2..f002f99b 100644
--- a/doc/general/test/coverage/index.html
+++ b/doc/general/test/coverage/index.html
@@ -259,7 +259,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY.sol.html b/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY.sol.html
index c1f44cd5..9ed16b05 100644
--- a/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY.sol.html
@@ -65,7 +65,9 @@
20
21
22
-23 |
+23
+24 |
+
@@ -93,6 +95,7 @@
import "./modules/CMTAT_BASE.sol";
+
/**
* @title CMTAT version for a proxy deployment (Transparent or Beacon proxy)
*/
@@ -115,7 +118,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY_UUPS.sol.html b/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY_UUPS.sol.html
index 215b7b65..fdef59e1 100644
--- a/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY_UUPS.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/CMTAT_PROXY_UUPS.sol.html
@@ -96,7 +96,9 @@
51
52
53
-54 |
+54
+55 |
+
@@ -155,6 +157,7 @@
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "./modules/CMTAT_BASE.sol";
+
/**
* @title CMTAT version for a proxy deployment with UUPS proxy
*/
@@ -208,7 +211,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/CMTAT_STANDALONE.sol.html b/doc/general/test/coverage/lcov-report/contracts/CMTAT_STANDALONE.sol.html
index 8ba53413..a2fdbad4 100644
--- a/doc/general/test/coverage/lcov-report/contracts/CMTAT_STANDALONE.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/CMTAT_STANDALONE.sol.html
@@ -79,7 +79,9 @@
34
35
36
-37 |
+37
+38 |
+
@@ -121,6 +123,7 @@
import "./modules/CMTAT_BASE.sol";
+
/**
* @title CMTAT version for a standalone deployment (without proxy)
*/
@@ -157,7 +160,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html b/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html
index 8258d70f..c1c3d8e0 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_BEACON_FACTORY.sol.html
@@ -173,11 +173,11 @@
-
-8×
+7×
1×
-7×
+6×
+
1×
6×
@@ -195,12 +195,12 @@
-2×
-2×
+3×
+3×
-2×
-2×
+3×
+3×
@@ -234,13 +234,13 @@
-2×
-2×
-2×
-2×
-2×
-2×
-2×
+3×
+3×
+3×
+3×
+3×
+3×
+3×
@@ -250,14 +250,14 @@
-4×
+5×
-4×
+5×
| //SPDX-License-Identifier: MPL-2.0
pragma solidity ^0.8.20;
@@ -274,7 +274,6 @@
*
*/
contract CMTAT_BEACON_FACTORY is AccessControl, CMTATFactoryRoot {
- // public
UpgradeableBeacon public immutable beacon;
/**
* @param implementation_ contract implementation
@@ -286,7 +285,8 @@
revert FactoryErrors.CMTAT_Factory_AddressZeroNotAllowedForBeaconOwner();
}
if(implementation_ == address(0)){
- revert FactoryErrors.CMTAT_Factory_AddressZeroNotAllowedForLogicContract();
+ // Forwarder is the zero address if no implementation provided
+ implementation_ = address(new CMTAT_PROXY(address(0)));
}
beacon = new UpgradeableBeacon(implementation_, beaconOwner);
}
@@ -373,7 +373,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_TP_FACTORY.sol.html b/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_TP_FACTORY.sol.html
index f5293bd9..e50cd33c 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_TP_FACTORY.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_TP_FACTORY.sol.html
@@ -132,7 +132,21 @@
87
88
89
-90 |
+90
+91
+92
+93
+94
+95
+96
+97 |
+
+
+
+
+
+
+
@@ -226,15 +240,22 @@
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "../CMTAT_PROXY.sol";
-import '@openzeppelin/contracts/utils/Create2.sol';
+import "@openzeppelin/contracts/utils/Create2.sol";
import "./libraries/CMTATFactoryInvariant.sol";
import "./libraries/CMTATFactoryBase.sol";
+
+
/**
* @notice Factory to deploy CMTAT with a transparent proxy
*
*/
contract CMTAT_TP_FACTORY is CMTATFactoryBase {
+ /**
+ * @param logic_ contract implementation, cannot be zero
+ * @param factoryAdmin admin
+ * @param useCustomSalt_ custom salt with create2 or not
+ */
constructor(address logic_, address factoryAdmin, bool useCustomSalt_) CMTATFactoryBase(logic_, factoryAdmin,useCustomSalt_){}
/*//////////////////////////////////////////////////////////////
@@ -316,7 +337,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html b/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html
index 68ec547c..d265e30a 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/CMTAT_UUPS_FACTORY.sol.html
@@ -131,7 +131,13 @@
86
87
88
-89 |
+89
+90
+91
+92 |
+
+
+
@@ -224,17 +230,20 @@
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import "../CMTAT_PROXY_UUPS.sol";
-import '@openzeppelin/contracts/utils/Create2.sol';
+import "@openzeppelin/contracts/utils/Create2.sol";
import "./libraries/CMTATFactoryInvariant.sol";
import "./libraries/CMTATFactoryBase.sol";
+
+
/**
* @notice Factory to deploy CMTAT with a UUPS proxy
*
*/
contract CMTAT_UUPS_FACTORY is CMTATFactoryBase {
/**
- * @param logic_ contract implementation
+ * @param logic_ contract implementation, cannot be zero
* @param factoryAdmin admin
+ * @param useCustomSalt_ custom salt with create2 or not
*/
constructor(address logic_, address factoryAdmin, bool useCustomSalt_) CMTATFactoryBase(logic_, factoryAdmin,useCustomSalt_){}
@@ -313,7 +322,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/index.html b/doc/general/test/coverage/lcov-report/contracts/deployment/index.html
index fe5266d0..ec2b356f 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryBase.sol.html b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryBase.sol.html
index af7247ce..47dd6ba7 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryBase.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryBase.sol.html
@@ -118,7 +118,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html
index 87c19507..9bf8bb27 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryInvariant.sol.html
@@ -118,7 +118,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryRoot.sol.html b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryRoot.sol.html
index 9b9b198c..c0528424 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryRoot.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/CMTATFactoryRoot.sol.html
@@ -137,14 +137,14 @@
-27×
-3×
+25×
+2×
-24×
-15×
+23×
+13×
-24×
-24×
+23×
+23×
@@ -157,7 +157,7 @@
-13×
+14×
@@ -170,7 +170,7 @@
-11×
+12×
5×
2×
@@ -178,7 +178,7 @@
3×
-6×
+7×
| //SPDX-License-Identifier: MPL-2.0
@@ -256,7 +256,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/index.html b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/index.html
index 8490a669..f46787fe 100644
--- a/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/deployment/libraries/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/index.html b/doc/general/test/coverage/lcov-report/contracts/index.html
index 9ce29ff8..6585f11a 100644
--- a/doc/general/test/coverage/lcov-report/contracts/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/ICCIPToken.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/ICCIPToken.sol.html
index b526f339..46226201 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/ICCIPToken.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/ICCIPToken.sol.html
@@ -121,7 +121,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATConstructor.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATConstructor.sol.html
index aae2f6ee..6643f881 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATConstructor.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATConstructor.sol.html
@@ -78,7 +78,9 @@
33
34
35
-36 |
+36
+37 |
+
@@ -114,12 +116,13 @@
| //SPDX-License-Identifier: MPL-2.0
+pragma solidity ^0.8.20;
import "./engine/IDebtEngine.sol";
import "./engine/IRuleEngine.sol";
import "./engine/IAuthorizationEngine.sol";
import "./engine/draft-IERC1643.sol";
-pragma solidity ^0.8.20;
+
/**
* @notice interface to represent arguments used for CMTAT constructor / initialize
@@ -154,7 +157,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATSnapshot.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATSnapshot.sol.html
index 904f4196..1395b22e 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATSnapshot.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/ICMTATSnapshot.sol.html
@@ -163,7 +163,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html
index 082e383c..f02bbeca 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol.html
@@ -127,7 +127,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html
index e8b5ea44..89805afc 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol.html
@@ -94,7 +94,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html
index 66534533..109ee153 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/index.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/index.html
index c3b92b57..a5b41084 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/draft-IERC1404/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IAuthorizationEngine.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IAuthorizationEngine.sol.html
index 3c637833..14799def 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IAuthorizationEngine.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IAuthorizationEngine.sol.html
@@ -118,7 +118,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtEngine.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtEngine.sol.html
index 81a7c34a..e9679c05 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtEngine.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtEngine.sol.html
@@ -106,7 +106,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtGlobal.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtGlobal.sol.html
index 9b5e6243..ef54cf40 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtGlobal.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IDebtGlobal.sol.html
@@ -136,7 +136,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IRuleEngine.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IRuleEngine.sol.html
index 5c20a1d7..6193844d 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IRuleEngine.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/IRuleEngine.sol.html
@@ -109,7 +109,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/draft-IERC1643.sol.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/draft-IERC1643.sol.html
index de24c346..0c21387c 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/draft-IERC1643.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/draft-IERC1643.sol.html
@@ -79,7 +79,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/index.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/index.html
index 68e5bddc..9192c698 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/engine/index.html
@@ -129,7 +129,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/interfaces/index.html b/doc/general/test/coverage/lcov-report/contracts/interfaces/index.html
index 632bd98d..36e947e6 100644
--- a/doc/general/test/coverage/lcov-report/contracts/interfaces/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/interfaces/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/libraries/Errors.sol.html b/doc/general/test/coverage/lcov-report/contracts/libraries/Errors.sol.html
index f24beaf0..8ce419b5 100644
--- a/doc/general/test/coverage/lcov-report/contracts/libraries/Errors.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/libraries/Errors.sol.html
@@ -256,7 +256,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/libraries/FactoryErrors.sol.html b/doc/general/test/coverage/lcov-report/contracts/libraries/FactoryErrors.sol.html
index c608b4a9..23707973 100644
--- a/doc/general/test/coverage/lcov-report/contracts/libraries/FactoryErrors.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/libraries/FactoryErrors.sol.html
@@ -88,7 +88,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/libraries/index.html b/doc/general/test/coverage/lcov-report/contracts/libraries/index.html
index e3e50a9e..d8d79f13 100644
--- a/doc/general/test/coverage/lcov-report/contracts/libraries/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/libraries/index.html
@@ -90,7 +90,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/CMTAT_BASE.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/CMTAT_BASE.sol.html
index c18f34a8..04d9627e 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/CMTAT_BASE.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/CMTAT_BASE.sol.html
@@ -347,7 +347,7 @@
-384×
+385×
@@ -367,50 +367,50 @@
-384×
-384×
+385×
+385×
-384×
+385×
-384×
-384×
+385×
+385×
-384×
+385×
-384×
-384×
+385×
+385×
-384×
+385×
-384×
-382×
-382×
+385×
+383×
+383×
-382×
-382×
+383×
+383×
-382×
-382×
+383×
+383×
-382×
-382×
-382×
+383×
+383×
+383×
-382×
+383×
-382×
+383×
@@ -476,7 +476,7 @@
-438×
+439×
17×
@@ -484,8 +484,8 @@
-421×
-421×
+422×
+422×
@@ -499,7 +499,7 @@
-1389×
+1391×
@@ -508,7 +508,7 @@
-1389×
+1391×
@@ -769,7 +769,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/index.html
index f16eff78..bd35beff 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html
index 7fd178e9..3b52a76d 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/internal/ERC20SnapshotModuleInternal.sol.html
@@ -287,8 +287,8 @@
-421×
-421×
+422×
+422×
77×
77×
@@ -300,8 +300,8 @@
-344×
-344×
+345×
+345×
@@ -309,16 +309,16 @@
-464×
-464×
+465×
+465×
-378×
-378×
+379×
+379×
| //SPDX-License-Identifier: MPL-2.0
@@ -466,7 +466,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/internal/EnforcementModuleInternal.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/internal/EnforcementModuleInternal.sol.html
index a04d6a48..77e63443 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/internal/EnforcementModuleInternal.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/internal/EnforcementModuleInternal.sol.html
@@ -224,8 +224,8 @@
-944×
-944×
+946×
+946×
@@ -272,7 +272,7 @@
-974×
+976×
@@ -400,7 +400,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/internal/ValidationModuleInternal.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/internal/ValidationModuleInternal.sol.html
index 8a9dd3c7..71d93b5c 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/internal/ValidationModuleInternal.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/internal/ValidationModuleInternal.sol.html
@@ -176,7 +176,7 @@
-384×
+385×
18×
18×
18×
@@ -240,7 +240,7 @@
-628×
+629×
@@ -352,7 +352,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/SnapshotModuleBase.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/SnapshotModuleBase.sol.html
index f2cf0053..e7f0ea38 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/SnapshotModuleBase.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/SnapshotModuleBase.sol.html
@@ -775,9 +775,9 @@
-842×
-842×
-842×
+844×
+844×
+844×
36×
36×
@@ -789,12 +789,12 @@
-421×
-421×
+422×
+422×
-421×
+422×
18×
18×
@@ -806,8 +806,8 @@
-842×
-834×
+844×
+836×
8×
@@ -849,14 +849,14 @@
-489×
-489×
+490×
+490×
-489×
+490×
-403×
+404×
86×
@@ -902,7 +902,7 @@
-4856×
+4862×
@@ -1345,7 +1345,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/index.html
index 6d5f9ab3..6b2ce4d7 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/internal/base/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/internal/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/internal/index.html
index 25d642d7..53c42414 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/internal/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/internal/index.html
@@ -103,7 +103,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/security/AuthorizationModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/security/AuthorizationModule.sol.html
index ad289c2e..bc716af6 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/security/AuthorizationModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/security/AuthorizationModule.sol.html
@@ -193,11 +193,11 @@
-384×
+385×
2×
-382×
-382×
+383×
+383×
16×
16×
16×
@@ -262,10 +262,10 @@
-1283×
-759×
+1285×
+760×
-524×
+525×
@@ -406,7 +406,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/security/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/security/index.html
index f42cc844..b0be96c4 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/security/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/security/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/ValidationModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/ValidationModule.sol.html
index 380bcb96..ef51ee6d 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/ValidationModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/ValidationModule.sol.html
@@ -328,21 +328,21 @@
-457×
+458×
18×
-439×
+440×
-438×
+439×
14×
-424×
-424×
+425×
+425×
60×
-364×
+365×
| //SPDX-License-Identifier: MPL-2.0
@@ -502,7 +502,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/index.html
index 6b3304d3..ca23daa8 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/controllers/index.html
@@ -77,7 +77,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/BaseModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/BaseModule.sol.html
index b07d3d33..964e3579 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/BaseModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/BaseModule.sol.html
@@ -201,10 +201,10 @@
-382×
-382×
-382×
-382×
+383×
+383×
+383×
+383×
@@ -265,7 +265,7 @@
-416×
+417×
@@ -391,7 +391,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BaseModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BaseModule.sol.html
index ec809312..ee11870a 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BaseModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BaseModule.sol.html
@@ -223,8 +223,8 @@
-382×
-382×
+383×
+383×
@@ -316,7 +316,7 @@
-384×
+385×
@@ -466,7 +466,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BurnModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BurnModule.sol.html
index 4d20e959..5af9fc26 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BurnModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20BurnModule.sol.html
@@ -436,7 +436,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20MintModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20MintModule.sol.html
index eae1319c..ec866ec8 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20MintModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/ERC20MintModule.sol.html
@@ -175,8 +175,8 @@
-290×
-290×
+291×
+291×
@@ -304,7 +304,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/EnforcementModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/EnforcementModule.sol.html
index bdd8dc50..94408cc1 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/EnforcementModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/EnforcementModule.sol.html
@@ -226,7 +226,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/PauseModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/PauseModule.sol.html
index 09614f07..6d02c4f3 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/PauseModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/PauseModule.sol.html
@@ -376,7 +376,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/index.html
index c78c57db..b00ff654 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/core/index.html
@@ -142,7 +142,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DebtModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DebtModule.sol.html
index 25046249..4156c3c8 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DebtModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DebtModule.sol.html
@@ -185,7 +185,7 @@
-382×
+383×
3×
3×
3×
@@ -349,7 +349,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DocumentModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DocumentModule.sol.html
index 01963048..d91a9797 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DocumentModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/DocumentModule.sol.html
@@ -186,7 +186,7 @@
-382×
+383×
12×
12×
12×
@@ -352,7 +352,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html
index f0c7c091..405ba87a 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol.html
@@ -289,7 +289,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/MetaTxModule.sol.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/MetaTxModule.sol.html
index 8a138cb0..a204efaa 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/MetaTxModule.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/MetaTxModule.sol.html
@@ -115,7 +115,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/index.html b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/index.html
index decf28ce..4d80eba3 100644
--- a/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/modules/wrapper/extensions/index.html
@@ -116,7 +116,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html b/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html
index 5bc6f0c8..f951aa06 100644
--- a/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST.sol.html
@@ -64,7 +64,9 @@
19
20
21
-22 |
+22
+23 |
+
@@ -91,6 +93,7 @@
import "../../CMTAT_PROXY.sol";
+
/**
* @title a contrat used to test the proxy upgrade functionality
*/
@@ -112,7 +115,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html b/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html
index 6a50bb09..aa1985b7 100644
--- a/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html
+++ b/doc/general/test/coverage/lcov-report/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol.html
@@ -64,7 +64,9 @@
19
20
21
-22 |
+22
+23 |
+
@@ -91,6 +93,7 @@
import "../../CMTAT_PROXY_UUPS.sol";
+
/**
* @title a contrat used to test the proxy upgrade functionality
*/
@@ -112,7 +115,7 @@
diff --git a/doc/general/test/coverage/lcov-report/contracts/test/proxy/index.html b/doc/general/test/coverage/lcov-report/contracts/test/proxy/index.html
index 45758912..0e09264a 100644
--- a/doc/general/test/coverage/lcov-report/contracts/test/proxy/index.html
+++ b/doc/general/test/coverage/lcov-report/contracts/test/proxy/index.html
@@ -90,7 +90,7 @@
diff --git a/doc/general/test/coverage/lcov-report/index.html b/doc/general/test/coverage/lcov-report/index.html
index 1f7b85a2..f002f99b 100644
--- a/doc/general/test/coverage/lcov-report/index.html
+++ b/doc/general/test/coverage/lcov-report/index.html
@@ -259,7 +259,7 @@
diff --git a/doc/general/test/coverage/lcov.info b/doc/general/test/coverage/lcov.info
index 139c48ec..3e6109f2 100644
--- a/doc/general/test/coverage/lcov.info
+++ b/doc/general/test/coverage/lcov.info
@@ -1,52 +1,52 @@
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/CMTAT_PROXY_UUPS.sol
-FN:19,constructor
-FN:40,initialize
-FN:52,_authorizeUpgrade
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/CMTAT_PROXY_UUPS.sol
+FN:20,constructor
+FN:41,initialize
+FN:53,_authorizeUpgrade
FNF:3
FNH:3
FNDA:9,constructor
FNDA:5,initialize
FNDA:2,_authorizeUpgrade
-DA:21,9
-DA:41,5
-DA:45,5
+DA:22,9
+DA:42,5
+DA:46,5
LF:3
LH:3
-BRDA:40,1,0,5
-BRDA:40,1,1,0
-BRDA:52,2,0,2
-BRDA:52,2,1,1
+BRDA:41,1,0,5
+BRDA:41,1,1,0
+BRDA:53,2,0,2
+BRDA:53,2,1,1
BRF:4
BRH:3
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/CMTAT_PROXY.sol
-FN:18,constructor
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/CMTAT_PROXY.sol
+FN:19,constructor
FNF:1
FNH:1
FNDA:198,constructor
-DA:20,198
+DA:21,198
LF:1
LH:1
BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/CMTAT_STANDALONE.sol
-FN:26,constructor
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/CMTAT_STANDALONE.sol
+FN:27,constructor
FNF:1
FNH:1
FNDA:191,constructor
-DA:29,191
+DA:30,191
LF:1
LH:1
BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/CMTAT_BEACON_FACTORY.sol
-FN:23,constructor
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/deployment/CMTAT_BEACON_FACTORY.sol
+FN:22,constructor
FN:44,deployCMTAT
FN:58,computedProxyAddress
FN:72,implementation
@@ -54,51 +54,51 @@ FN:83,_deployBytecode
FN:97,_getBytecode
FNF:6
FNH:6
-FNDA:8,constructor
-FNDA:2,deployCMTAT
+FNDA:7,constructor
+FNDA:3,deployCMTAT
FNDA:2,computedProxyAddress
FNDA:1,implementation
-FNDA:2,_deployBytecode
-FNDA:4,_getBytecode
-DA:24,8
-DA:25,1
-DA:27,7
+FNDA:3,_deployBytecode
+FNDA:5,_getBytecode
+DA:23,7
+DA:24,1
+DA:26,6
DA:28,1
DA:30,6
-DA:45,2
-DA:46,2
-DA:49,2
-DA:50,2
+DA:45,3
+DA:46,3
+DA:49,3
+DA:50,3
DA:62,2
DA:65,2
DA:73,1
-DA:84,2
-DA:85,2
-DA:86,2
-DA:87,2
-DA:88,2
-DA:89,2
-DA:90,2
-DA:100,4
-DA:107,4
+DA:84,3
+DA:85,3
+DA:86,3
+DA:87,3
+DA:88,3
+DA:89,3
+DA:90,3
+DA:100,5
+DA:107,5
LF:21
LH:21
-BRDA:24,1,0,1
-BRDA:24,1,1,7
-BRDA:27,2,0,1
-BRDA:27,2,1,6
-BRDA:44,3,0,2
+BRDA:23,1,0,1
+BRDA:23,1,1,6
+BRDA:26,2,0,1
+BRDA:26,2,1,5
+BRDA:44,3,0,3
BRDA:44,3,1,1
BRF:6
BRH:6
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/CMTAT_TP_FACTORY.sol
-FN:15,constructor
-FN:28,deployCMTAT
-FN:44,computedProxyAddress
-FN:64,_deployBytecode
-FN:78,_getBytecode
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/deployment/CMTAT_TP_FACTORY.sol
+FN:22,constructor
+FN:35,deployCMTAT
+FN:51,computedProxyAddress
+FN:71,_deployBytecode
+FN:85,_getBytecode
FNF:5
FNH:5
FNDA:9,constructor
@@ -106,35 +106,35 @@ FNDA:7,deployCMTAT
FNDA:2,computedProxyAddress
FNDA:5,_deployBytecode
FNDA:7,_getBytecode
-DA:29,7
-DA:30,5
-DA:33,5
-DA:35,5
-DA:49,2
-DA:52,2
-DA:65,5
-DA:66,5
-DA:67,5
-DA:68,5
-DA:69,5
-DA:70,5
-DA:71,5
-DA:81,7
+DA:36,7
+DA:37,5
+DA:40,5
+DA:42,5
+DA:56,2
+DA:59,2
+DA:72,5
+DA:73,5
+DA:74,5
+DA:75,5
+DA:76,5
+DA:77,5
+DA:78,5
DA:88,7
+DA:95,7
LF:15
LH:15
-BRDA:28,1,0,7
-BRDA:28,1,1,2
+BRDA:35,1,0,7
+BRDA:35,1,1,2
BRF:2
BRH:2
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/CMTAT_UUPS_FACTORY.sol
-FN:18,constructor
-FN:31,deployCMTAT
-FN:46,computedProxyAddress
-FN:63,_deployBytecode
-FN:77,_getBytecode
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/deployment/CMTAT_UUPS_FACTORY.sol
+FN:21,constructor
+FN:34,deployCMTAT
+FN:49,computedProxyAddress
+FN:66,_deployBytecode
+FN:80,_getBytecode
FNF:5
FNH:5
FNDA:5,constructor
@@ -142,30 +142,30 @@ FNDA:2,deployCMTAT
FNDA:2,computedProxyAddress
FNDA:2,_deployBytecode
FNDA:4,_getBytecode
-DA:32,2
-DA:33,2
+DA:35,2
DA:36,2
-DA:38,2
-DA:50,2
+DA:39,2
+DA:41,2
DA:53,2
-DA:64,2
-DA:65,2
-DA:66,2
+DA:56,2
DA:67,2
DA:68,2
DA:69,2
DA:70,2
-DA:80,4
-DA:87,4
+DA:71,2
+DA:72,2
+DA:73,2
+DA:83,4
+DA:90,4
LF:15
LH:15
-BRDA:31,1,0,2
-BRDA:31,1,1,1
+BRDA:34,1,0,2
+BRDA:34,1,1,1
BRF:2
BRH:2
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/libraries/CMTATFactoryBase.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/deployment/libraries/CMTATFactoryBase.sol
FN:18,constructor
FNF:1
FNH:1
@@ -181,7 +181,7 @@ BRF:2
BRH:2
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/libraries/CMTATFactoryInvariant.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/deployment/libraries/CMTATFactoryInvariant.sol
FNF:0
FNH:0
LF:0
@@ -190,43 +190,43 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/deployment/libraries/CMTATFactoryRoot.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/deployment/libraries/CMTATFactoryRoot.sol
FN:25,constructor
FN:45,CMTATProxyAddress
FN:58,_checkAndDetermineDeploymentSalt
FNF:3
FNH:3
-FNDA:27,constructor
-FNDA:13,CMTATProxyAddress
-FNDA:11,_checkAndDetermineDeploymentSalt
-DA:26,27
-DA:27,3
-DA:29,24
-DA:30,15
-DA:32,24
-DA:33,24
-DA:46,13
-DA:59,11
+FNDA:25,constructor
+FNDA:14,CMTATProxyAddress
+FNDA:12,_checkAndDetermineDeploymentSalt
+DA:26,25
+DA:27,2
+DA:29,23
+DA:30,13
+DA:32,23
+DA:33,23
+DA:46,14
+DA:59,12
DA:60,5
DA:61,2
DA:63,3
DA:64,3
-DA:67,6
+DA:67,7
LF:13
LH:13
-BRDA:26,1,0,3
-BRDA:26,1,1,24
-BRDA:29,2,0,15
-BRDA:29,2,1,9
+BRDA:26,1,0,2
+BRDA:26,1,1,23
+BRDA:29,2,0,13
+BRDA:29,2,1,10
BRDA:59,3,0,5
-BRDA:59,3,1,6
+BRDA:59,3,1,7
BRDA:60,4,0,2
BRDA:60,4,1,3
BRF:8
BRH:8
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404.sol
FNF:0
FNH:0
LF:0
@@ -235,7 +235,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404EnumCode.sol
FNF:0
FNH:0
LF:0
@@ -244,7 +244,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/draft-IERC1404/draft-IERC1404Wrapper.sol
FNF:0
FNH:0
LF:0
@@ -253,7 +253,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/draft-IERC1643.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/draft-IERC1643.sol
FNF:0
FNH:0
LF:0
@@ -262,7 +262,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IAuthorizationEngine.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IAuthorizationEngine.sol
FNF:0
FNH:0
LF:0
@@ -271,7 +271,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IDebtEngine.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IDebtEngine.sol
FNF:0
FNH:0
LF:0
@@ -280,7 +280,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IDebtGlobal.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IDebtGlobal.sol
FNF:0
FNH:0
LF:0
@@ -289,7 +289,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/engine/IRuleEngine.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/engine/IRuleEngine.sol
FNF:0
FNH:0
LF:0
@@ -298,7 +298,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/ICCIPToken.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/ICCIPToken.sol
FNF:0
FNH:0
LF:0
@@ -307,7 +307,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/ICMTATConstructor.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/ICMTATConstructor.sol
FNF:0
FNH:0
LF:0
@@ -316,7 +316,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/interfaces/ICMTATSnapshot.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/interfaces/ICMTATSnapshot.sol
FNF:0
FNH:0
LF:0
@@ -325,7 +325,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/libraries/Errors.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/libraries/Errors.sol
FNF:0
FNH:0
LF:0
@@ -334,7 +334,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/libraries/FactoryErrors.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/libraries/FactoryErrors.sol
FNF:0
FNH:0
LF:0
@@ -343,7 +343,7 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/CMTAT_BASE.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/CMTAT_BASE.sol
FN:64,initialize
FN:82,__CMTAT_init
FN:131,__CMTAT_init_unchained
@@ -356,64 +356,64 @@ FN:223,_contextSuffixLength
FN:232,_msgData
FNF:10
FNH:9
-FNDA:384,initialize
-FNDA:384,__CMTAT_init
-FNDA:382,__CMTAT_init_unchained
+FNDA:385,initialize
+FNDA:385,__CMTAT_init
+FNDA:383,__CMTAT_init_unchained
FNDA:2,decimals
FNDA:10,transferFrom
FNDA:6,burnAndMint
-FNDA:438,_update
-FNDA:1389,_msgSender
-FNDA:1389,_contextSuffixLength
+FNDA:439,_update
+FNDA:1391,_msgSender
+FNDA:1391,_contextSuffixLength
FNDA:0,_msgData
-DA:65,384
-DA:85,384
-DA:86,384
-DA:88,384
-DA:90,384
-DA:91,384
-DA:94,384
-DA:99,384
-DA:100,384
-DA:102,384
-DA:106,384
-DA:107,382
-DA:108,382
-DA:110,382
-DA:111,382
-DA:113,382
-DA:114,382
-DA:120,382
-DA:121,382
-DA:122,382
-DA:125,382
-DA:128,382
+DA:65,385
+DA:85,385
+DA:86,385
+DA:88,385
+DA:90,385
+DA:91,385
+DA:94,385
+DA:99,385
+DA:100,385
+DA:102,385
+DA:106,385
+DA:107,383
+DA:108,383
+DA:110,383
+DA:111,383
+DA:113,383
+DA:114,383
+DA:120,383
+DA:121,383
+DA:122,383
+DA:125,383
+DA:128,383
DA:150,2
DA:163,10
DA:178,6
DA:179,4
-DA:194,438
+DA:194,439
DA:195,17
-DA:202,421
-DA:203,421
-DA:217,1389
-DA:226,1389
+DA:202,422
+DA:203,422
+DA:217,1391
+DA:226,1391
DA:238,0
LF:33
LH:32
-BRDA:64,1,0,384
+BRDA:64,1,0,385
BRDA:64,1,1,1
-BRDA:82,2,0,384
+BRDA:82,2,0,385
BRDA:82,2,1,0
-BRDA:131,3,0,382
+BRDA:131,3,0,383
BRDA:131,3,1,0
BRDA:194,4,0,17
-BRDA:194,4,1,421
+BRDA:194,4,1,422
BRF:8
BRH:6
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/base/SnapshotModuleBase.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/base/SnapshotModuleBase.sol
FN:70,__SnapshotModuleBase_init_unchained
FN:82,getAllSnapshots
FN:91,getNextSnapshots
@@ -434,7 +434,7 @@ FN:420,_checkTimeSnapshotAlreadyDone
FN:427,_getSnapshotModuleBaseStorage
FNF:18
FNH:18
-FNDA:384,__SnapshotModuleBase_init_unchained
+FNDA:385,__SnapshotModuleBase_init_unchained
FNDA:2,getAllSnapshots
FNDA:76,getNextSnapshots
FNDA:170,_scheduleSnapshot
@@ -443,15 +443,15 @@ FNDA:22,_rescheduleSnapshot
FNDA:14,_unscheduleLastSnapshot
FNDA:10,_unscheduleSnapshotNotOptimized
FNDA:1920,_valueAt
-FNDA:842,_updateSnapshot
-FNDA:421,_setCurrentSnapshot
-FNDA:842,_lastSnapshot
+FNDA:844,_updateSnapshot
+FNDA:422,_setCurrentSnapshot
+FNDA:844,_lastSnapshot
FNDA:36,_findScheduledSnapshotIndex
-FNDA:489,_findScheduledMostRecentPastSnapshot
+FNDA:490,_findScheduledMostRecentPastSnapshot
FNDA:26,_findAndRevertScheduledSnapshotIndex
FNDA:202,_checkTimeInThePast
FNDA:46,_checkTimeSnapshotAlreadyDone
-FNDA:4856,_getSnapshotModuleBaseStorage
+FNDA:4862,_getSnapshotModuleBaseStorage
DA:83,2
DA:84,2
DA:92,76
@@ -523,18 +523,18 @@ DA:282,1920
DA:284,1920
DA:285,1484
DA:287,436
-DA:301,842
-DA:302,842
-DA:303,842
+DA:301,844
+DA:302,844
+DA:303,844
DA:304,36
DA:305,36
-DA:315,421
-DA:316,421
-DA:320,421
+DA:315,422
+DA:316,422
+DA:320,422
DA:321,18
DA:322,18
-DA:332,842
-DA:333,834
+DA:332,844
+DA:333,836
DA:335,8
DA:346,36
DA:347,36
@@ -543,10 +543,10 @@ DA:350,36
DA:354,22
DA:358,8
DA:362,6
-DA:375,489
-DA:376,489
-DA:378,489
-DA:382,403
+DA:375,490
+DA:376,490
+DA:378,490
+DA:382,404
DA:385,86
DA:386,86
DA:388,86
@@ -563,10 +563,10 @@ DA:413,202
DA:414,6
DA:421,46
DA:422,6
-DA:428,4856
+DA:428,4862
LF:112
LH:112
-BRDA:70,1,0,384
+BRDA:70,1,0,385
BRDA:70,1,1,0
BRDA:95,2,0,68
BRDA:95,2,1,8
@@ -603,18 +603,18 @@ BRDA:232,17,1,6
BRDA:284,18,0,1484
BRDA:284,18,1,436
BRDA:303,19,0,36
-BRDA:303,19,1,806
+BRDA:303,19,1,808
BRDA:320,20,0,18
-BRDA:320,20,1,403
-BRDA:332,21,0,834
+BRDA:320,20,1,404
+BRDA:332,21,0,836
BRDA:332,21,1,8
BRDA:350,22,0,22
BRDA:350,22,1,14
BRDA:357,23,0,8
BRDA:357,23,1,6
-BRDA:378,24,0,403
+BRDA:378,24,0,404
BRDA:378,24,1,86
-BRDA:379,25,0,403
+BRDA:379,25,0,404
BRDA:379,25,1,0
BRDA:389,26,0,52
BRDA:389,26,1,64
@@ -628,7 +628,7 @@ BRF:58
BRH:56
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/EnforcementModuleInternal.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/EnforcementModuleInternal.sol
FN:53,__Enforcement_init_unchained
FN:64,frozen
FN:79,_freeze
@@ -636,13 +636,13 @@ FN:97,_unfreeze
FN:112,_getEnforcementModuleInternalStorage
FNF:5
FNH:5
-FNDA:384,__Enforcement_init_unchained
-FNDA:944,frozen
+FNDA:385,__Enforcement_init_unchained
+FNDA:946,frozen
FNDA:22,_freeze
FNDA:8,_unfreeze
-FNDA:974,_getEnforcementModuleInternalStorage
-DA:65,944
-DA:66,944
+FNDA:976,_getEnforcementModuleInternalStorage
+DA:65,946
+DA:66,946
DA:83,22
DA:84,22
DA:85,2
@@ -655,10 +655,10 @@ DA:103,2
DA:105,6
DA:106,6
DA:108,6
-DA:113,974
+DA:113,976
LF:15
LH:15
-BRDA:53,1,0,384
+BRDA:53,1,0,385
BRDA:53,1,1,0
BRDA:84,2,0,2
BRDA:84,2,1,20
@@ -668,7 +668,7 @@ BRF:6
BRH:5
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/ERC20SnapshotModuleInternal.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/ERC20SnapshotModuleInternal.sol
FN:21,__ERC20Snapshot_init_unchained
FN:34,snapshotInfo
FN:43,snapshotInfoBatch
@@ -680,15 +680,15 @@ FN:127,_updateAccountSnapshot
FN:135,_updateTotalSupplySnapshot
FNF:9
FNH:9
-FNDA:384,__ERC20Snapshot_init_unchained
+FNDA:385,__ERC20Snapshot_init_unchained
FNDA:480,snapshotInfo
FNDA:160,snapshotInfoBatch
FNDA:80,snapshotInfoBatch
FNDA:1200,snapshotBalanceOf
FNDA:720,snapshotTotalSupply
-FNDA:421,_snapshotUpdate
-FNDA:464,_updateAccountSnapshot
-FNDA:378,_updateTotalSupplySnapshot
+FNDA:422,_snapshotUpdate
+FNDA:465,_updateAccountSnapshot
+FNDA:379,_updateTotalSupplySnapshot
DA:35,480
DA:36,480
DA:44,160
@@ -705,35 +705,35 @@ DA:77,1200
DA:86,720
DA:87,720
DA:91,720
-DA:106,421
-DA:107,421
+DA:106,422
+DA:107,422
DA:109,77
DA:110,77
DA:112,43
DA:115,34
-DA:119,344
-DA:120,344
-DA:128,464
-DA:129,464
-DA:136,378
-DA:137,378
+DA:119,345
+DA:120,345
+DA:128,465
+DA:129,465
+DA:136,379
+DA:137,379
LF:28
LH:28
-BRDA:21,1,0,384
+BRDA:21,1,0,385
BRDA:21,1,1,0
BRDA:77,2,0,400
BRDA:77,2,1,800
BRDA:91,3,0,36
BRDA:91,3,1,684
BRDA:107,4,0,77
-BRDA:107,4,1,344
+BRDA:107,4,1,345
BRDA:110,5,0,43
BRDA:110,5,1,34
BRF:10
BRH:9
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/internal/ValidationModuleInternal.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/internal/ValidationModuleInternal.sol
FN:32,__Validation_init_unchained
FN:45,ruleEngine
FN:58,_validateTransfer
@@ -743,14 +743,14 @@ FN:89,_operateOnTransfer
FN:96,_getValidationModuleInternalStorage
FNF:7
FNH:7
-FNDA:384,__Validation_init_unchained
+FNDA:385,__Validation_init_unchained
FNDA:32,ruleEngine
FNDA:12,_validateTransfer
FNDA:6,_messageForTransferRestriction
FNDA:6,_detectTransferRestriction
FNDA:60,_operateOnTransfer
-FNDA:628,_getValidationModuleInternalStorage
-DA:33,384
+FNDA:629,_getValidationModuleInternalStorage
+DA:33,385
DA:34,18
DA:35,18
DA:36,18
@@ -764,18 +764,18 @@ DA:85,6
DA:86,6
DA:90,60
DA:91,60
-DA:97,628
+DA:97,629
LF:15
LH:15
-BRDA:32,1,0,384
+BRDA:32,1,0,385
BRDA:32,1,1,0
BRDA:33,2,0,18
-BRDA:33,2,1,366
+BRDA:33,2,1,367
BRF:4
BRH:3
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/security/AuthorizationModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/security/AuthorizationModule.sol
FN:31,__AuthorizationModule_init_unchained
FN:48,authorizationEngine
FN:60,setAuthorizationEngine
@@ -785,17 +785,17 @@ FN:96,hasRole
FN:114,_getAuthorizationModuleStorage
FNF:7
FNH:7
-FNDA:384,__AuthorizationModule_init_unchained
+FNDA:385,__AuthorizationModule_init_unchained
FNDA:2,authorizationEngine
FNDA:16,setAuthorizationEngine
FNDA:40,grantRole
FNDA:10,revokeRole
-FNDA:1283,hasRole
+FNDA:1285,hasRole
FNDA:84,_getAuthorizationModuleStorage
-DA:32,384
+DA:32,385
DA:33,2
-DA:35,382
-DA:36,382
+DA:35,383
+DA:36,383
DA:37,16
DA:38,16
DA:39,16
@@ -818,18 +818,18 @@ DA:84,8
DA:85,8
DA:87,4
DA:90,6
-DA:101,1283
-DA:102,759
-DA:104,524
+DA:101,1285
+DA:102,760
+DA:104,525
DA:115,84
LF:30
LH:30
-BRDA:31,1,0,384
+BRDA:31,1,0,385
BRDA:31,1,1,0
BRDA:32,2,0,2
-BRDA:32,2,1,382
+BRDA:32,2,1,383
BRDA:36,3,0,16
-BRDA:36,3,1,366
+BRDA:36,3,1,367
BRDA:60,4,0,16
BRDA:60,4,1,4
BRDA:62,5,0,4
@@ -846,13 +846,13 @@ BRDA:83,10,0,8
BRDA:83,10,1,2
BRDA:85,11,0,4
BRDA:85,11,1,4
-BRDA:101,12,0,759
-BRDA:101,12,1,524
+BRDA:101,12,0,760
+BRDA:101,12,1,525
BRF:24
BRH:23
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/controllers/ValidationModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/controllers/ValidationModule.sol
FN:28,__ValidationModule_init_unchained
FN:43,setRuleEngine
FN:57,messageForTransferRestriction
@@ -862,13 +862,13 @@ FN:130,_validateTransferByModule
FN:141,_operateOnTransfer
FNF:7
FNH:7
-FNDA:382,__ValidationModule_init_unchained
+FNDA:383,__ValidationModule_init_unchained
FNDA:18,setRuleEngine
FNDA:20,messageForTransferRestriction
FNDA:17,detectTransferRestriction
FNDA:19,validateTransfer
-FNDA:457,_validateTransferByModule
-FNDA:438,_operateOnTransfer
+FNDA:458,_validateTransferByModule
+FNDA:439,_operateOnTransfer
DA:44,18
DA:45,18
DA:46,3
@@ -895,18 +895,18 @@ DA:119,15
DA:120,15
DA:121,12
DA:123,3
-DA:135,457
+DA:135,458
DA:136,18
-DA:138,439
-DA:142,438
+DA:138,440
+DA:142,439
DA:143,14
-DA:145,424
-DA:146,424
+DA:145,425
+DA:146,425
DA:147,60
-DA:149,364
+DA:149,365
LF:35
LH:35
-BRDA:28,1,0,382
+BRDA:28,1,0,383
BRDA:28,1,1,0
BRDA:43,2,0,18
BRDA:43,2,1,3
@@ -935,20 +935,20 @@ BRDA:116,13,1,15
BRDA:120,14,0,12
BRDA:120,14,1,3
BRDA:135,15,0,18
-BRDA:135,15,1,439
+BRDA:135,15,1,440
BRDA:135,16,0,12
BRDA:135,16,1,4
BRDA:135,17,0,4
BRDA:135,17,1,2
BRDA:142,18,0,14
-BRDA:142,18,1,424
+BRDA:142,18,1,425
BRDA:146,19,0,60
-BRDA:146,19,1,364
+BRDA:146,19,1,365
BRF:38
BRH:37
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/BaseModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/BaseModule.sol
FN:44,__Base_init_unchained
FN:55,tokenId
FN:60,terms
@@ -959,18 +959,18 @@ FN:96,setInformation
FN:108,_getBaseModuleStorage
FNF:8
FNH:8
-FNDA:382,__Base_init_unchained
+FNDA:383,__Base_init_unchained
FNDA:10,tokenId
FNDA:10,terms
FNDA:8,information
FNDA:2,setTokenId
FNDA:2,setTerms
FNDA:2,setInformation
-FNDA:416,_getBaseModuleStorage
-DA:45,382
-DA:46,382
-DA:47,382
-DA:48,382
+FNDA:417,_getBaseModuleStorage
+DA:45,383
+DA:46,383
+DA:47,383
+DA:48,383
DA:56,10
DA:57,10
DA:61,10
@@ -986,10 +986,10 @@ DA:88,2
DA:97,2
DA:98,2
DA:99,2
-DA:109,416
+DA:109,417
LF:20
LH:20
-BRDA:44,1,0,382
+BRDA:44,1,0,383
BRDA:44,1,1,0
BRDA:74,2,0,2
BRDA:74,2,1,2
@@ -1001,20 +1001,20 @@ BRF:8
BRH:7
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/EnforcementModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/EnforcementModule.sol
FN:27,__EnforcementModule_init_unchained
FN:42,freeze
FN:56,unfreeze
FNF:3
FNH:3
-FNDA:382,__EnforcementModule_init_unchained
+FNDA:383,__EnforcementModule_init_unchained
FNDA:22,freeze
FNDA:8,unfreeze
DA:43,22
DA:57,8
LF:2
LH:2
-BRDA:27,1,0,382
+BRDA:27,1,0,383
BRDA:27,1,1,0
BRDA:42,2,0,22
BRDA:42,2,1,2
@@ -1024,7 +1024,7 @@ BRF:6
BRH:5
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/ERC20BaseModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/ERC20BaseModule.sol
FN:41,__ERC20BaseModule_init_unchained
FN:53,decimals
FN:70,transferBatch
@@ -1033,14 +1033,14 @@ FN:119,balanceInfo
FN:134,_getERC20BaseModuleStorage
FNF:6
FNH:6
-FNDA:382,__ERC20BaseModule_init_unchained
+FNDA:383,__ERC20BaseModule_init_unchained
FNDA:2,decimals
FNDA:10,transferBatch
FNDA:10,transferFrom
FNDA:4,balanceInfo
-FNDA:384,_getERC20BaseModuleStorage
-DA:42,382
-DA:43,382
+FNDA:385,_getERC20BaseModuleStorage
+DA:42,383
+DA:43,383
DA:54,2
DA:55,2
DA:74,10
@@ -1058,10 +1058,10 @@ DA:120,4
DA:121,4
DA:122,2
DA:124,4
-DA:135,384
+DA:135,385
LF:20
LH:20
-BRDA:41,1,0,382
+BRDA:41,1,0,383
BRDA:41,1,1,0
BRDA:74,2,0,2
BRDA:74,2,1,8
@@ -1073,14 +1073,14 @@ BRF:8
BRH:6
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/ERC20BurnModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/ERC20BurnModule.sol
FN:32,__ERC20BurnModule_init_unchained
FN:53,burn
FN:77,burnBatch
FN:109,burnFrom
FNF:4
FNH:4
-FNDA:382,__ERC20BurnModule_init_unchained
+FNDA:383,__ERC20BurnModule_init_unchained
FNDA:14,burn
FNDA:12,burnBatch
FNDA:4,burnFrom
@@ -1104,7 +1104,7 @@ DA:125,2
DA:127,2
LF:18
LH:18
-BRDA:32,1,0,382
+BRDA:32,1,0,383
BRDA:32,1,1,0
BRDA:53,2,0,14
BRDA:53,2,1,4
@@ -1122,17 +1122,17 @@ BRF:14
BRH:13
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/ERC20MintModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/ERC20MintModule.sol
FN:27,__ERC20MintModule_init_unchained
FN:47,mint
FN:70,mintBatch
FNF:3
FNH:3
-FNDA:382,__ERC20MintModule_init_unchained
-FNDA:290,mint
+FNDA:383,__ERC20MintModule_init_unchained
+FNDA:291,mint
FNDA:24,mintBatch
-DA:48,290
-DA:49,290
+DA:48,291
+DA:49,291
DA:71,24
DA:72,2
DA:76,22
@@ -1142,9 +1142,9 @@ DA:81,54
DA:82,54
LF:9
LH:9
-BRDA:27,1,0,382
+BRDA:27,1,0,383
BRDA:27,1,1,0
-BRDA:47,2,0,290
+BRDA:47,2,0,291
BRDA:47,2,1,4
BRDA:70,3,0,24
BRDA:70,3,1,2
@@ -1156,7 +1156,7 @@ BRF:10
BRH:9
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/core/PauseModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/core/PauseModule.sol
FN:34,__PauseModule_init_unchained
FN:50,pause
FN:62,unpause
@@ -1165,7 +1165,7 @@ FN:92,deactivated
FN:104,_getPauseModuleStorage
FNF:6
FNH:6
-FNDA:382,__PauseModule_init_unchained
+FNDA:383,__PauseModule_init_unchained
FNDA:14,pause
FNDA:6,unpause
FNDA:2,deactivateContract
@@ -1185,7 +1185,7 @@ DA:94,4
DA:105,12
LF:12
LH:12
-BRDA:34,1,0,382
+BRDA:34,1,0,383
BRDA:34,1,1,0
BRDA:50,2,0,14
BRDA:50,2,1,3
@@ -1199,7 +1199,7 @@ BRF:10
BRH:9
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/DebtModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/DebtModule.sol
FN:42,__DebtModule_init_unchained
FN:54,debtEngine
FN:65,setDebtEngine
@@ -1208,13 +1208,13 @@ FN:81,creditEvents
FN:94,_getDebtModuleStorage
FNF:6
FNH:6
-FNDA:382,__DebtModule_init_unchained
+FNDA:383,__DebtModule_init_unchained
FNDA:8,debtEngine
FNDA:5,setDebtEngine
FNDA:3,debt
FNDA:3,creditEvents
FNDA:22,_getDebtModuleStorage
-DA:43,382
+DA:43,383
DA:44,3
DA:45,3
DA:46,3
@@ -1234,10 +1234,10 @@ DA:84,2
DA:95,22
LF:18
LH:18
-BRDA:42,1,0,382
+BRDA:42,1,0,383
BRDA:42,1,1,0
BRDA:43,2,0,3
-BRDA:43,2,1,379
+BRDA:43,2,1,380
BRDA:65,3,0,5
BRDA:65,3,1,1
BRDA:67,4,0,1
@@ -1250,7 +1250,7 @@ BRF:12
BRH:11
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/DocumentModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/DocumentModule.sol
FN:42,__DocumentModule_init_unchained
FN:53,documentEngine
FN:64,setDocumentEngine
@@ -1259,13 +1259,13 @@ FN:83,getAllDocuments
FN:96,_getDocumentModuleStorage
FNF:6
FNH:6
-FNDA:382,__DocumentModule_init_unchained
+FNDA:383,__DocumentModule_init_unchained
FNDA:28,documentEngine
FNDA:16,setDocumentEngine
FNDA:18,getDocument
FNDA:6,getAllDocuments
FNDA:80,_getDocumentModuleStorage
-DA:43,382
+DA:43,383
DA:44,12
DA:45,12
DA:46,12
@@ -1286,10 +1286,10 @@ DA:86,4
DA:97,80
LF:19
LH:19
-BRDA:42,1,0,382
+BRDA:42,1,0,383
BRDA:42,1,1,0
BRDA:43,2,0,12
-BRDA:43,2,1,370
+BRDA:43,2,1,371
BRDA:64,3,0,16
BRDA:64,3,1,2
BRDA:66,4,0,2
@@ -1302,7 +1302,7 @@ BRF:12
BRH:11
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol
FN:22,__ERC20SnasphotModule_init_unchained
FN:33,scheduleSnapshot
FN:44,scheduleSnapshotNotOptimized
@@ -1311,7 +1311,7 @@ FN:67,unscheduleLastSnapshot
FN:77,unscheduleSnapshotNotOptimized
FNF:6
FNH:6
-FNDA:382,__ERC20SnasphotModule_init_unchained
+FNDA:383,__ERC20SnasphotModule_init_unchained
FNDA:170,scheduleSnapshot
FNDA:12,scheduleSnapshotNotOptimized
FNDA:22,rescheduleSnapshot
@@ -1324,7 +1324,7 @@ DA:68,14
DA:78,10
LF:5
LH:5
-BRDA:22,1,0,382
+BRDA:22,1,0,383
BRDA:22,1,1,0
BRDA:33,2,0,170
BRDA:33,2,1,2
@@ -1340,7 +1340,7 @@ BRF:12
BRH:11
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/modules/wrapper/extensions/MetaTxModule.sol
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/modules/wrapper/extensions/MetaTxModule.sol
FN:19,constructor
FNF:1
FNH:1
@@ -1351,8 +1351,8 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol
-FN:18,constructor
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/test/proxy/CMTAT_PROXY_TEST_UUPS.sol
+FN:19,constructor
FNF:1
FNH:1
FNDA:3,constructor
@@ -1362,8 +1362,8 @@ BRF:0
BRH:0
end_of_record
TN:
-SF:/home/ryan/Downloads/CM/CMTAT_old2/contracts/test/proxy/CMTAT_PROXY_TEST.sol
-FN:18,constructor
+SF:/home/ryan/Downloads/CM/CMTAT/contracts/test/proxy/CMTAT_PROXY_TEST.sol
+FN:19,constructor
FNF:1
FNH:1
FNDA:1,constructor
diff --git a/doc/schema/surya_graph/surya_graph_CMTAT_BEACON_FACTORY.sol.png b/doc/schema/surya_graph/surya_graph_CMTAT_BEACON_FACTORY.sol.png
index c965fcfe..a813914a 100644
Binary files a/doc/schema/surya_graph/surya_graph_CMTAT_BEACON_FACTORY.sol.png and b/doc/schema/surya_graph/surya_graph_CMTAT_BEACON_FACTORY.sol.png differ
diff --git a/solc_setting.json b/solc_setting.json
new file mode 100644
index 00000000..4e363fa1
--- /dev/null
+++ b/solc_setting.json
@@ -0,0 +1,9 @@
+{
+ "remappings": [
+ "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
+ "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/"
+ ], "optimizer":{
+ "enabled": true,
+ "runs": 200
+ }
+}
\ No newline at end of file
diff --git a/test/common/AuthorizationModule/AuthorizationModuleCommon.js b/test/common/AuthorizationModule/AuthorizationModuleCommon.js
index 70845c05..b5edbdd8 100644
--- a/test/common/AuthorizationModule/AuthorizationModuleCommon.js
+++ b/test/common/AuthorizationModule/AuthorizationModuleCommon.js
@@ -1,4 +1,4 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const {
PAUSER_ROLE,
DEFAULT_ADMIN_ROLE,
@@ -8,55 +8,93 @@ function AuthorizationModuleCommon () {
context('Authorization', function () {
it('testAdminCanGrantRole', async function () {
// Act
- this.logs = await this.cmtat.connect(this.admin).grantRole(PAUSER_ROLE, this.address1);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .grantRole(PAUSER_ROLE, this.address1)
// Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(true)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ true
+ )
// emits a RoleGranted event
- await expect(this.logs).to.emit(this.cmtat, 'RoleGranted').withArgs( PAUSER_ROLE, this.address1, this.admin);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'RoleGranted')
+ .withArgs(PAUSER_ROLE, this.address1, this.admin)
})
it('testAdminCanRevokeRole', async function () {
// Arrange
- await this.cmtat.connect(this.admin).grantRole(PAUSER_ROLE, this.address1);
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(PAUSER_ROLE, this.address1)
// Arrange - Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(true)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ true
+ )
// Act
- this.logs = await this.cmtat.connect(this.admin).revokeRole(PAUSER_ROLE, this.address1);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .revokeRole(PAUSER_ROLE, this.address1)
// Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(false)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ false
+ )
// emits a RoleRevoked event
- await expect(this.logs).to.emit(this.cmtat, 'RoleRevoked').withArgs( PAUSER_ROLE, this.address1, this.admin);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'RoleRevoked')
+ .withArgs(PAUSER_ROLE, this.address1, this.admin)
})
/*
- * Already tested by OpenZeppelin library
- */
+ * Already tested by OpenZeppelin library
+ */
it('testCannotNonAdminGrantRole', async function () {
// Arrange - Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(false)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ false
+ )
// Act
- await expect(this.cmtat.connect(this.address2).grantRole(PAUSER_ROLE, this.address1))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, DEFAULT_ADMIN_ROLE);
+ await expect(
+ this.cmtat.connect(this.address2).grantRole(PAUSER_ROLE, this.address1)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, DEFAULT_ADMIN_ROLE)
// Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(false)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ false
+ )
})
/*
- * Already tested by OpenZeppelin library
- */
+ * Already tested by OpenZeppelin library
+ */
it('testCannotNonAdminRevokeRole', async function () {
// Arrange
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(false)
- await this.cmtat.connect(this.admin).grantRole(PAUSER_ROLE, this.address1);
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ false
+ )
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(PAUSER_ROLE, this.address1)
// Arrange - Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(true)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ true
+ )
// Act
- await expect( this.cmtat.connect(this.address2).revokeRole(PAUSER_ROLE, this.address1))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, DEFAULT_ADMIN_ROLE)
+ await expect(
+ this.cmtat.connect(this.address2).revokeRole(PAUSER_ROLE, this.address1)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, DEFAULT_ADMIN_ROLE)
// Assert
- expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(true)
+ expect(await this.cmtat.hasRole(PAUSER_ROLE, this.address1)).to.equal(
+ true
+ )
})
})
}
diff --git a/test/common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon.js b/test/common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon.js
index 942a3dc2..646bacff 100644
--- a/test/common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon.js
+++ b/test/common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon.js
@@ -1,115 +1,140 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { DEFAULT_ADMIN_ROLE } = require('../../utils.js')
function AuthorizationModuleSetAuthorizationEngineCommon () {
context('AuthorizationEngineSetTest', function () {
it('testCanBeSetByAdminIfNotAlreadySet', async function () {
- if(!this.definedAtDeployment){
- // Act
- this.logs = await this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- )
+ if (!this.definedAtDeployment) {
+ // Act
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
// Assert
// emits a AuthorizationEngin event
- await expect(this.logs).to.emit(this.cmtat, 'AuthorizationEngine').withArgs(
- this.authorizationEngineMock);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'AuthorizationEngine')
+ .withArgs(this.authorizationEngineMock)
}
-
})
- it("testCanReturnTheRightAddressIfSet", async function (){
- if(this.definedAtDeployment){
- expect(this.authorizationEngineMock.target).to.equal(await this.cmtat.authorizationEngine());
+ it('testCanReturnTheRightAddressIfSet', async function () {
+ if (this.definedAtDeployment) {
+ expect(this.authorizationEngineMock.target).to.equal(
+ await this.cmtat.authorizationEngine()
+ )
}
- });
+ })
it('testCannotBeSetByAdminIfAlreadySet', async function () {
// Arrange
- if(!this.definedAtDeployment){
- await this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- )
+ if (!this.definedAtDeployment) {
+ await this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
}
// Act
- await expect( this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_AuthorizationModule_AuthorizationEngineAlreadySet')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_AuthorizationModule_AuthorizationEngineAlreadySet'
+ )
})
it('testCannotNonAdminSetAuthorizationEngine', async function () {
// Act
- await expect( this.cmtat.connect(this.address1).setAuthorizationEngine(
- this.authorizationEngineMock.target
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount').withArgs(
- this.address1.address, DEFAULT_ADMIN_ROLE
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
)
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
})
// Mock
it('testCanTransferAdminIfAuthorizedByTheEngine', async function () {
-
// Arrange
await this.authorizationEngineMock.authorizeAdminChange(this.address1)
// Arrange
- if(!this.definedAtDeployment){
- await this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- )
+ if (!this.definedAtDeployment) {
+ await this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
}
// Act + Assert
- this.logs = await this.cmtat.connect(this.admin).grantRole(DEFAULT_ADMIN_ROLE, this.address1);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .grantRole(DEFAULT_ADMIN_ROLE, this.address1)
// Assert
- expect(await this.cmtat.hasRole(DEFAULT_ADMIN_ROLE, this.address1)).to.equal(
- true
- )
+ expect(
+ await this.cmtat.hasRole(DEFAULT_ADMIN_ROLE, this.address1)
+ ).to.equal(true)
})
// Mock
it('testCannotTransferAdminIfNotAuthorizedByTheEngine', async function () {
// Arrange
- if(!this.definedAtDeployment){
- await this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- )
+ if (!this.definedAtDeployment) {
+ await this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
}
// Act
- await expect( this.cmtat.connect(this.admin).grantRole(DEFAULT_ADMIN_ROLE, this.address1))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_AuthorizationModule_InvalidAuthorization')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .grantRole(DEFAULT_ADMIN_ROLE, this.address1)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_AuthorizationModule_InvalidAuthorization'
+ )
})
it('testCanRevokeAdminIfAuthorizedByTheEngine', async function () {
// Arrange
await this.authorizationEngineMock.authorizeAdminChange(this.address1)
// Arrange
- if(!this.definedAtDeployment){
- await this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- )
+ if (!this.definedAtDeployment) {
+ await this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
}
// Assert
- this.logs = await this.cmtat.connect(this.admin).revokeRole(DEFAULT_ADMIN_ROLE, this.address1);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .revokeRole(DEFAULT_ADMIN_ROLE, this.address1)
// Assert
- expect(await this.cmtat.hasRole(DEFAULT_ADMIN_ROLE, this.address1)).to.equal(
- false
- )
+ expect(
+ await this.cmtat.hasRole(DEFAULT_ADMIN_ROLE, this.address1)
+ ).to.equal(false)
})
// Mock
it('testCannotRevokeAdminIfNotAuthorizedByTheEngine', async function () {
// Arrange
- if(!this.definedAtDeployment){
- await this.cmtat.connect(this.admin).setAuthorizationEngine(
- this.authorizationEngineMock.target
- )
+ if (!this.definedAtDeployment) {
+ await this.cmtat
+ .connect(this.admin)
+ .setAuthorizationEngine(this.authorizationEngineMock.target)
}
await this.authorizationEngineMock.setRevokeAdminRoleAuthorized(false)
// Act
- await expect( this.cmtat.connect(this.admin).revokeRole(DEFAULT_ADMIN_ROLE, this.address1))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_AuthorizationModule_InvalidAuthorization')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .revokeRole(DEFAULT_ADMIN_ROLE, this.address1)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_AuthorizationModule_InvalidAuthorization'
+ )
})
})
}
diff --git a/test/common/BaseModuleCommon.js b/test/common/BaseModuleCommon.js
index 14c3cef3..2d36270c 100644
--- a/test/common/BaseModuleCommon.js
+++ b/test/common/BaseModuleCommon.js
@@ -1,11 +1,11 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { DEFAULT_ADMIN_ROLE } = require('../utils')
function BaseModuleCommon () {
context('Token structure', function () {
it('testHasTheDefinedVersion', async function () {
// Act + Assert
- expect(await this.cmtat.VERSION()).to.equal('2.5.0')
+ expect(await this.cmtat.VERSION()).to.equal('2.5.1')
})
it('testHasTheDefinedTokenId', async function () {
// Act + Assert
@@ -19,18 +19,27 @@ function BaseModuleCommon () {
// Arrange
expect(await this.cmtat.tokenId()).to.equal('CMTAT_ISIN')
// Act
- this.logs = await this.cmtat.connect(this.admin).setTokenId('CMTAT_TOKENID');
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setTokenId('CMTAT_TOKENID')
// Assert
expect(await this.cmtat.tokenId()).to.equal('CMTAT_TOKENID')
- await expect(this.logs).to.emit(this.cmtat, 'TokenId').withArgs('CMTAT_TOKENID', 'CMTAT_TOKENID');
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'TokenId')
+ .withArgs('CMTAT_TOKENID', 'CMTAT_TOKENID')
})
it('testCannotNonAdminChangeTokenId', async function () {
// Arrange - Assert
expect(await this.cmtat.tokenId()).to.equal('CMTAT_ISIN')
// Act
- await expect( this.cmtat.connect(this.address1).setTokenId('CMTAT_TOKENID'))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE);
+ await expect(
+ this.cmtat.connect(this.address1).setTokenId('CMTAT_TOKENID')
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
// Assert
expect(await this.cmtat.tokenId()).to.equal('CMTAT_ISIN')
})
@@ -38,18 +47,27 @@ function BaseModuleCommon () {
// Arrange - Assert
expect(await this.cmtat.terms()).to.equal('https://cmta.ch')
// Act
- this.logs = await this.cmtat.connect(this.admin).setTerms('https://cmta.ch/terms');
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setTerms('https://cmta.ch/terms')
// Assert
expect(await this.cmtat.terms()).to.equal('https://cmta.ch/terms')
- await expect(this.logs).to.emit(this.cmtat, 'Term').withArgs('https://cmta.ch/terms', 'https://cmta.ch/terms');
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Term')
+ .withArgs('https://cmta.ch/terms', 'https://cmta.ch/terms')
})
it('testCannotNonAdminUpdateTerms', async function () {
// Arrange - Assert
expect(await this.cmtat.terms()).to.equal('https://cmta.ch')
// Act
- await expect( this.cmtat.connect(this.address1).setTerms('https://cmta.ch/terms'))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
+ await expect(
+ this.cmtat.connect(this.address1).setTerms('https://cmta.ch/terms')
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
// Assert
expect(await this.cmtat.terms()).to.equal('https://cmta.ch')
})
@@ -57,18 +75,27 @@ function BaseModuleCommon () {
// Arrange - Assert
expect(await this.cmtat.information()).to.equal('CMTAT_info')
// Act
- this.logs = await this.cmtat.connect(this.admin).setInformation('new info available');
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setInformation('new info available')
// Assert
expect(await this.cmtat.information()).to.equal('new info available')
- await expect(this.logs).to.emit(this.cmtat, 'Information').withArgs( 'new info available', 'new info available');
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Information')
+ .withArgs('new info available', 'new info available')
})
it('testCannotNonAdminUpdateInformation', async function () {
// Arrange - Assert
expect(await this.cmtat.information()).to.equal('CMTAT_info')
// Act
- await expect( this.cmtat.connect(this.address1).setInformation('new info available'))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE);
+ await expect(
+ this.cmtat.connect(this.address1).setInformation('new info available')
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
// Assert
expect(await this.cmtat.information()).to.equal('CMTAT_info')
})
diff --git a/test/common/DebtModule/DebtModuleCommon.js b/test/common/DebtModule/DebtModuleCommon.js
index a3659bad..c3f3bc77 100644
--- a/test/common/DebtModule/DebtModuleCommon.js
+++ b/test/common/DebtModule/DebtModuleCommon.js
@@ -1,72 +1,80 @@
-const { expect } = require('chai');
-const { ZERO_ADDRESS } = require('../../utils')
+const { expect } = require('chai')
+const { ZERO_ADDRESS } = require('../../utils')
function DebtModuleCommon () {
context('Debt Engine test', function () {
- let debtBase, creditEvents;
-
+ let debtBase, creditEvents
+
beforeEach(async function () {
if ((await this.cmtat.debtEngine()) === ZERO_ADDRESS) {
- this.debtEngineMock = await ethers.deployContract("DebtEngineMock")
- await this.cmtat.connect(this.admin).setDebtEngine(this.debtEngineMock.target)
+ this.debtEngineMock = await ethers.deployContract('DebtEngineMock')
+ await this.cmtat
+ .connect(this.admin)
+ .setDebtEngine(this.debtEngineMock.target)
}
debtBase = {
interestRate: 500, // Example: 5.00%
parValue: 1000000, // Example: 1,000,000
- guarantor: "Guarantor A",
- bondHolder: "BondHolder A",
- maturityDate: "2025-12-31",
- interestScheduleFormat: "Semi-Annual",
- interestPaymentDate: "2024-06-30",
- dayCountConvention: "30/360",
- businessDayConvention: "Following",
- publicHolidaysCalendar: "US",
- issuanceDate: "2024-01-01",
- couponFrequency: "Semi-Annual",
- };
-
+ guarantor: 'Guarantor A',
+ bondHolder: 'BondHolder A',
+ maturityDate: '2025-12-31',
+ interestScheduleFormat: 'Semi-Annual',
+ interestPaymentDate: '2024-06-30',
+ dayCountConvention: '30/360',
+ businessDayConvention: 'Following',
+ publicHolidaysCalendar: 'US',
+ issuanceDate: '2024-01-01',
+ couponFrequency: 'Semi-Annual'
+ }
+
creditEvents = {
flagDefault: false,
flagRedeemed: false,
- rating: "AAA",
- };
+ rating: 'AAA'
+ }
})
- it("testCanReturnTheRightAddressIfSet", async function (){
- if(this.definedAtDeployment){
- expect(this.debtEngineMock.target).to.equal(await this.cmtat.debtEngine());
+ it('testCanReturnTheRightAddressIfSet', async function () {
+ if (this.definedAtDeployment) {
+ expect(this.debtEngineMock.target).to.equal(
+ await this.cmtat.debtEngine()
+ )
}
- });
+ })
+
+ it('testCanSetAndGetDebtCorrectly', async function () {
+ await this.debtEngineMock.setDebt(debtBase)
+ const debt = await this.cmtat.debt()
+
+ expect(debt.interestRate).to.equal(debtBase.interestRate)
+ expect(debt.parValue).to.equal(debtBase.parValue)
+ expect(debt.guarantor).to.equal(debtBase.guarantor)
+ expect(debt.bondHolder).to.equal(debtBase.bondHolder)
+ expect(debt.maturityDate).to.equal(debtBase.maturityDate)
+ expect(debt.interestScheduleFormat).to.equal(
+ debtBase.interestScheduleFormat
+ )
+ expect(debt.interestPaymentDate).to.equal(debtBase.interestPaymentDate)
+ expect(debt.dayCountConvention).to.equal(debtBase.dayCountConvention)
+ expect(debt.businessDayConvention).to.equal(
+ debtBase.businessDayConvention
+ )
+ expect(debt.publicHolidaysCalendar).to.equal(
+ debtBase.publicHolidaysCalendar
+ )
+ expect(debt.issuanceDate).to.equal(debtBase.issuanceDate)
+ expect(debt.couponFrequency).to.equal(debtBase.couponFrequency)
+ })
+
+ it('testCanSetAndGetCreditEventsCorrectly', async function () {
+ await this.debtEngineMock.setCreditEvents(creditEvents)
+
+ const events = await this.cmtat.creditEvents()
- it("testCanSetAndGetDebtCorrectly", async function () {
- await this.debtEngineMock.setDebt(debtBase);
- const debt = await this.cmtat.debt();
-
- expect(debt.interestRate).to.equal(debtBase.interestRate);
- expect(debt.parValue).to.equal(debtBase.parValue);
- expect(debt.guarantor).to.equal(debtBase.guarantor);
- expect(debt.bondHolder).to.equal(debtBase.bondHolder);
- expect(debt.maturityDate).to.equal(debtBase.maturityDate);
- expect(debt.interestScheduleFormat).to.equal(debtBase.interestScheduleFormat);
- expect(debt.interestPaymentDate).to.equal(debtBase.interestPaymentDate);
- expect(debt.dayCountConvention).to.equal(debtBase.dayCountConvention);
- expect(debt.businessDayConvention).to.equal(debtBase.businessDayConvention);
- expect(debt.publicHolidaysCalendar).to.equal(debtBase.publicHolidaysCalendar);
- expect(debt.issuanceDate).to.equal(debtBase.issuanceDate);
- expect(debt.couponFrequency).to.equal(debtBase.couponFrequency);
- });
-
-
- it("testCanSetAndGetCreditEventsCorrectly", async function () {
- await this.debtEngineMock.setCreditEvents(creditEvents);
-
- const events = await this.cmtat.creditEvents();
-
- expect(events.flagDefault).to.equal(creditEvents.flagDefault);
- expect(events.flagRedeemed).to.equal(creditEvents.flagRedeemed);
- expect(events.rating).to.equal(creditEvents.rating);
+ expect(events.flagDefault).to.equal(creditEvents.flagDefault)
+ expect(events.flagRedeemed).to.equal(creditEvents.flagRedeemed)
+ expect(events.rating).to.equal(creditEvents.rating)
})
-
})
}
module.exports = DebtModuleCommon
diff --git a/test/common/DebtModule/DebtModuleSetDebtEngineCommon.js b/test/common/DebtModule/DebtModuleSetDebtEngineCommon.js
index 9ab8a2dc..9d1e3d06 100644
--- a/test/common/DebtModule/DebtModuleSetDebtEngineCommon.js
+++ b/test/common/DebtModule/DebtModuleSetDebtEngineCommon.js
@@ -1,38 +1,50 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { DEBT_ROLE } = require('../../utils.js')
function DebtModuleSetDebtEngineCommon () {
context('DebtEngineSetTest', function () {
it('testCanBeSetByAdmin', async function () {
// Act
- this.logs = await this.cmtat.connect(this.admin).setDebtEngine(this.debtEngineMock.target)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setDebtEngine(this.debtEngineMock.target)
// Assert
// emits a DebtEngineSet event
await expect(this.logs)
- .to.emit(this.cmtat, "DebtEngine")
- .withArgs(this.debtEngineMock.target);
+ .to.emit(this.cmtat, 'DebtEngine')
+ .withArgs(this.debtEngineMock.target)
})
it('testCanNotBeSetByAdminWithTheSameValue', async function () {
// Act
- await expect(this.cmtat.connect(this.admin).setDebtEngine(await this.cmtat.debtEngine()))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_DebtModule_SameValue')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .setDebtEngine(await this.cmtat.debtEngine())
+ ).to.be.revertedWithCustomError(this.cmtat, 'CMTAT_DebtModule_SameValue')
})
it('testCannotBeSetByNonAdmin', async function () {
// Act
- await expect( this.cmtat.connect(this.address1).setDebtEngine(this.debtEngineMock.target))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DEBT_ROLE)
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .setDebtEngine(this.debtEngineMock.target)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEBT_ROLE)
})
- it("testGetEmptyDebtIfNoDebtEngine", async function () {
- const debt = await this.cmtat.debt();
- const events = await this.cmtat.creditEvents();
-
- expect(events.flagDefault).to.equal(false);
- expect(debt.interestRate).to.equal(0);
- });
+ it('testGetEmptyDebtIfNoDebtEngine', async function () {
+ const debt = await this.cmtat.debt()
+ const events = await this.cmtat.creditEvents()
+
+ expect(events.flagDefault).to.equal(false)
+ expect(debt.interestRate).to.equal(0)
+ })
})
}
module.exports = DebtModuleSetDebtEngineCommon
diff --git a/test/common/DocumentModule/DocumentModuleCommon.js b/test/common/DocumentModule/DocumentModuleCommon.js
index f42cd9d9..ea26021e 100644
--- a/test/common/DocumentModule/DocumentModuleCommon.js
+++ b/test/common/DocumentModule/DocumentModuleCommon.js
@@ -1,90 +1,97 @@
-const { expect } = require('chai');
-const { ZERO_ADDRESS } = require('../../utils')
+const { expect } = require('chai')
+const { ZERO_ADDRESS } = require('../../utils')
function DocumentModuleCommon () {
context('Document Module Test', function () {
beforeEach(async function () {
if ((await this.cmtat.documentEngine()) === ZERO_ADDRESS) {
- this.documentEngineMock = await ethers.deployContract("DocumentEngineMock")
- await this.cmtat.connect(this.admin).setDocumentEngine(this.documentEngineMock.target)
+ this.documentEngineMock = await ethers.deployContract(
+ 'DocumentEngineMock'
+ )
+ await this.cmtat
+ .connect(this.admin)
+ .setDocumentEngine(this.documentEngineMock.target)
}
})
- it("testCanReturnTheRightAddressIfSet", async function (){
- if(this.definedAtDeployment){
- let documentEngine = await this.cmtat.documentEngine()
- expect(this.documentEngineMock.target).to.equal(documentEngine);
+ it('testCanReturnTheRightAddressIfSet', async function () {
+ if (this.definedAtDeployment) {
+ const documentEngine = await this.cmtat.documentEngine()
+ expect(this.documentEngineMock.target).to.equal(documentEngine)
}
- });
- it("testCanSetAndGetADocument", async function () {
- const name = ethers.encodeBytes32String("doc1");
- const uri = "https://github.com/CMTA/CMTAT";
- const documentHash = ethers.encodeBytes32String("hash1");
-
- await this.documentEngineMock.setDocument(name, uri, documentHash);
-
- const [storedUri, storedHash, lastModified] = await this.cmtat.getDocument(name);
- expect(storedUri).to.equal(uri);
- expect(storedHash).to.equal(documentHash);
- expect(lastModified).to.be.gt(0);
- });
-
- it("testCanUpdateADocument", async function () {
- const name = ethers.encodeBytes32String("doc1");
- const uri1 = "https://github.com/CMTA/CMTAT";
- const documentHash1 = ethers.encodeBytes32String("hash1");
-
- const uri2 = "https://github.com/CMTA/CMTAT/V2";
- const documentHash2 = ethers.encodeBytes32String("hash2");
-
- await this.documentEngineMock.setDocument(name, uri1, documentHash1);
- await this.documentEngineMock.setDocument(name, uri2, documentHash2);
-
- const [storedUri, storedHash, lastModified] = await this.cmtat.getDocument(name);
- expect(storedUri).to.equal(uri2);
- expect(storedHash).to.equal(documentHash2);
- expect(lastModified).to.be.gt(0);
- });
+ })
+ it('testCanSetAndGetADocument', async function () {
+ const name = ethers.encodeBytes32String('doc1')
+ const uri = 'https://github.com/CMTA/CMTAT'
+ const documentHash = ethers.encodeBytes32String('hash1')
+
+ await this.documentEngineMock.setDocument(name, uri, documentHash)
+
+ const [storedUri, storedHash, lastModified] =
+ await this.cmtat.getDocument(name)
+ expect(storedUri).to.equal(uri)
+ expect(storedHash).to.equal(documentHash)
+ expect(lastModified).to.be.gt(0)
+ })
+
+ it('testCanUpdateADocument', async function () {
+ const name = ethers.encodeBytes32String('doc1')
+ const uri1 = 'https://github.com/CMTA/CMTAT'
+ const documentHash1 = ethers.encodeBytes32String('hash1')
- it("testCanGetNullValueIfNoDocument", async function () {
- const name = ethers.encodeBytes32String("doc1");
- const [storedUri, storedHash, lastModified] = await this.cmtat.getDocument(name);
- expect(storedUri).to.equal("");
- expect(storedHash).to.equal(ethers.encodeBytes32String(""));
- expect(lastModified).to.equal(0);
- });
-
- it("testCanRemoveADocument", async function () {
- const name = ethers.encodeBytes32String("doc1");
- const uri = "https://github.com/CMTA/CMTAT";
- const documentHash = ethers.encodeBytes32String("hash1");
-
- await this.documentEngineMock.setDocument(name, uri, documentHash);
- await this.documentEngineMock.removeDocument(name);
-
- const [storedUri, storedHash, lastModified] = await this.cmtat.getDocument(name);
- expect(storedUri).to.equal("");
- expect(storedHash).to.equal(ethers.encodeBytes32String(""));
- expect(lastModified).to.equal(0);
- });
-
- it("testCanReturnAllDocumentNames", async function () {
- const name1 = ethers.encodeBytes32String("doc1");
- const uri1 = "https://github.com/CMTA/CMTAT";
- const documentHash1 = ethers.encodeBytes32String("hash1");
-
- const name2 = ethers.encodeBytes32String("doc2");
- const uri2 = "https://github.com/CMTA/CMTAT/V2";
- const documentHash2 = ethers.encodeBytes32String("hash2");
-
- await this.documentEngineMock.setDocument(name1, uri1, documentHash1);
- await this.documentEngineMock.setDocument(name2, uri2, documentHash2);
-
- const documentNames = await this.cmtat.getAllDocuments();
- expect(documentNames.length).to.equal(2);
- expect(documentNames).to.include(name1);
- expect(documentNames).to.include(name2);
- });
-
+ const uri2 = 'https://github.com/CMTA/CMTAT/V2'
+ const documentHash2 = ethers.encodeBytes32String('hash2')
+
+ await this.documentEngineMock.setDocument(name, uri1, documentHash1)
+ await this.documentEngineMock.setDocument(name, uri2, documentHash2)
+
+ const [storedUri, storedHash, lastModified] =
+ await this.cmtat.getDocument(name)
+ expect(storedUri).to.equal(uri2)
+ expect(storedHash).to.equal(documentHash2)
+ expect(lastModified).to.be.gt(0)
+ })
+
+ it('testCanGetNullValueIfNoDocument', async function () {
+ const name = ethers.encodeBytes32String('doc1')
+ const [storedUri, storedHash, lastModified] =
+ await this.cmtat.getDocument(name)
+ expect(storedUri).to.equal('')
+ expect(storedHash).to.equal(ethers.encodeBytes32String(''))
+ expect(lastModified).to.equal(0)
+ })
+
+ it('testCanRemoveADocument', async function () {
+ const name = ethers.encodeBytes32String('doc1')
+ const uri = 'https://github.com/CMTA/CMTAT'
+ const documentHash = ethers.encodeBytes32String('hash1')
+
+ await this.documentEngineMock.setDocument(name, uri, documentHash)
+ await this.documentEngineMock.removeDocument(name)
+
+ const [storedUri, storedHash, lastModified] =
+ await this.cmtat.getDocument(name)
+ expect(storedUri).to.equal('')
+ expect(storedHash).to.equal(ethers.encodeBytes32String(''))
+ expect(lastModified).to.equal(0)
+ })
+
+ it('testCanReturnAllDocumentNames', async function () {
+ const name1 = ethers.encodeBytes32String('doc1')
+ const uri1 = 'https://github.com/CMTA/CMTAT'
+ const documentHash1 = ethers.encodeBytes32String('hash1')
+
+ const name2 = ethers.encodeBytes32String('doc2')
+ const uri2 = 'https://github.com/CMTA/CMTAT/V2'
+ const documentHash2 = ethers.encodeBytes32String('hash2')
+
+ await this.documentEngineMock.setDocument(name1, uri1, documentHash1)
+ await this.documentEngineMock.setDocument(name2, uri2, documentHash2)
+
+ const documentNames = await this.cmtat.getAllDocuments()
+ expect(documentNames.length).to.equal(2)
+ expect(documentNames).to.include(name1)
+ expect(documentNames).to.include(name2)
+ })
})
}
module.exports = DocumentModuleCommon
diff --git a/test/common/DocumentModule/DocumentModuleSetDocumentEngineCommon.js b/test/common/DocumentModule/DocumentModuleSetDocumentEngineCommon.js
index b178edc2..4877fba6 100644
--- a/test/common/DocumentModule/DocumentModuleSetDocumentEngineCommon.js
+++ b/test/common/DocumentModule/DocumentModuleSetDocumentEngineCommon.js
@@ -1,45 +1,61 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { DOCUMENT_ROLE } = require('../../utils.js')
function DocumentModuleSetDocumentEngineCommon () {
context('DocumentEngineSetTest', function () {
it('testCanBeSetByAdmin', async function () {
// Act
- this.logs = await this.cmtat.connect(this.admin).setDocumentEngine(this.documentEngineMock.target)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setDocumentEngine(this.documentEngineMock.target)
// Assert
// emits a DocumentEngineSet event
await expect(this.logs)
- .to.emit(this.cmtat, "DocumentEngine")
- .withArgs(this.documentEngineMock.target);
+ .to.emit(this.cmtat, 'DocumentEngine')
+ .withArgs(this.documentEngineMock.target)
})
it('testCanNotBeSetByAdminWithTheSameValue', async function () {
// Act
- await expect(this.cmtat.connect(this.admin).setDocumentEngine(await this.cmtat.documentEngine()))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_DocumentModule_SameValue')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .setDocumentEngine(await this.cmtat.documentEngine())
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_DocumentModule_SameValue'
+ )
})
it('testCannotBeSetByNonAdmin', async function () {
// Act
- await expect( this.cmtat.connect(this.address1).setDocumentEngine(this.documentEngineMock.target))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DOCUMENT_ROLE)
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .setDocumentEngine(this.documentEngineMock.target)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DOCUMENT_ROLE)
})
- it("testGetEmptyDocumentsIfNoDocumentEngine", async function () {
- const name = ethers.encodeBytes32String("doc1");
+ it('testGetEmptyDocumentsIfNoDocumentEngine', async function () {
+ const name = ethers.encodeBytes32String('doc1')
// act
- const [storedUri, storedHash, lastModified] = await this.cmtat.getDocument(name);
+ const [storedUri, storedHash, lastModified] =
+ await this.cmtat.getDocument(name)
// Assert
- expect(storedUri).to.equal("");
- expect(storedHash).to.equal(ethers.encodeBytes32String(""));
- expect(lastModified).to.equal(0);
+ expect(storedUri).to.equal('')
+ expect(storedHash).to.equal(ethers.encodeBytes32String(''))
+ expect(lastModified).to.equal(0)
// Act
- const documentNames = await this.cmtat.getAllDocuments();
+ const documentNames = await this.cmtat.getAllDocuments()
// Assert
- expect(documentNames.length).to.equal(0);
- });
+ expect(documentNames.length).to.equal(0)
+ })
})
}
module.exports = DocumentModuleSetDocumentEngineCommon
diff --git a/test/common/ERC20BaseModuleCommon.js b/test/common/ERC20BaseModuleCommon.js
index 8e5aa3bd..a037cdef 100644
--- a/test/common/ERC20BaseModuleCommon.js
+++ b/test/common/ERC20BaseModuleCommon.js
@@ -1,350 +1,399 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
-function ERC20BaseModuleCommon() {
- context("Token structure", function () {
- it("testHasTheDefinedName", async function () {
+function ERC20BaseModuleCommon () {
+ context('Token structure', function () {
+ it('testHasTheDefinedName', async function () {
// Act + Assert
- expect(await this.cmtat.name()).to.equal("CMTA Token");
- });
- it("testHasTheDefinedSymbol", async function () {
+ expect(await this.cmtat.name()).to.equal('CMTA Token')
+ })
+ it('testHasTheDefinedSymbol', async function () {
// Act + Assert
- expect(await this.cmtat.symbol()).to.equal("CMTAT");
- });
- it("testDecimalsEqual0", async function () {
+ expect(await this.cmtat.symbol()).to.equal('CMTAT')
+ })
+ it('testDecimalsEqual0', async function () {
// Act + Assert
- expect(await this.cmtat.decimals()).to.equal("0");
- });
- });
+ expect(await this.cmtat.decimals()).to.equal('0')
+ })
+ })
- context("Balance", function () {
- const TOKEN_AMOUNTS = [31n, 32n, 33n];
+ context('Balance', function () {
+ const TOKEN_AMOUNTS = [31n, 32n, 33n]
const TOKEN_INITIAL_SUPPLY = TOKEN_AMOUNTS.reduce((a, b) => {
- return a + b;
- });
+ return a + b
+ })
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, TOKEN_AMOUNTS[0]);
await this.cmtat
.connect(this.admin)
- .mint(this.address2, TOKEN_AMOUNTS[1]);
- await this.cmtat.connect(this.admin).mint(this.address3, TOKEN_AMOUNTS[2]);
- });
- it("testHasTheCorrectBalanceInfo", async function () {
+ .mint(this.address1, TOKEN_AMOUNTS[0])
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, TOKEN_AMOUNTS[1])
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, TOKEN_AMOUNTS[2])
+ })
+ it('testHasTheCorrectBalanceInfo', async function () {
// Act + Assert
// Assert
- const ADDRESSES = [this.address1, this.address2, this.address3];
- let result = await this.cmtat.balanceInfo(ADDRESSES);
- expect(result[0][0]).to.equal(TOKEN_AMOUNTS[0]);
- expect(result[0][1]).to.equal(TOKEN_AMOUNTS[1]);
- expect(result[1]).to.equal(TOKEN_INITIAL_SUPPLY);
+ const ADDRESSES = [this.address1, this.address2, this.address3]
+ let result = await this.cmtat.balanceInfo(ADDRESSES)
+ expect(result[0][0]).to.equal(TOKEN_AMOUNTS[0])
+ expect(result[0][1]).to.equal(TOKEN_AMOUNTS[1])
+ expect(result[1]).to.equal(TOKEN_INITIAL_SUPPLY)
- const ADDRESSES2 = [];
- result = await this.cmtat.balanceInfo(ADDRESSES2);
- expect(result[0].length).to.equal(0n);
- expect(result[1]).to.equal(TOKEN_INITIAL_SUPPLY);
- });
- });
+ const ADDRESSES2 = []
+ result = await this.cmtat.balanceInfo(ADDRESSES2)
+ expect(result[0].length).to.equal(0n)
+ expect(result[1]).to.equal(TOKEN_INITIAL_SUPPLY)
+ })
+ })
- context("Allowance", function () {
+ context('Allowance', function () {
// address1 -> address3
- it("testApproveAllowance", async function () {
- const AMOUNT_TO_APPROVE = 20n;
+ it('testApproveAllowance', async function () {
+ const AMOUNT_TO_APPROVE = 20n
// Arrange - Assert
expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
- "0"
- );
+ '0'
+ )
// Act
this.logs = await this.cmtat
.connect(this.address1)
- .approve(this.address3, AMOUNT_TO_APPROVE);
+ .approve(this.address3, AMOUNT_TO_APPROVE)
// Assert
expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
AMOUNT_TO_APPROVE
- );
+ )
// emits an Approval event
- await expect(this.logs).to.emit(this.cmtat, 'Approval').withArgs(
- this.address1,
- this.address3,
- AMOUNT_TO_APPROVE);
- });
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Approval')
+ .withArgs(this.address1, this.address3, AMOUNT_TO_APPROVE)
+ })
// ADDRESS1 -> ADDRESS3
- it("testRedefinedAllowanceWithApprove", async function () {
- const AMOUNT_TO_APPROVE = 50n;
- const FIRST_AMOUNT_TO_APPROVE = 20n;
+ it('testRedefinedAllowanceWithApprove', async function () {
+ const AMOUNT_TO_APPROVE = 50n
+ const FIRST_AMOUNT_TO_APPROVE = 20n
// Arrange
- expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal("0");
+ expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
+ '0'
+ )
await this.cmtat
.connect(this.address1)
- .approve(this.address3, FIRST_AMOUNT_TO_APPROVE);
+ .approve(this.address3, FIRST_AMOUNT_TO_APPROVE)
// Arrange - Assert
expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
FIRST_AMOUNT_TO_APPROVE
- );
+ )
// Act
this.logs = await this.cmtat
.connect(this.address1)
- .approve(this.address3, AMOUNT_TO_APPROVE);
+ .approve(this.address3, AMOUNT_TO_APPROVE)
// Assert
expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
AMOUNT_TO_APPROVE
- );
+ )
// emits an Approval event
- await expect(this.logs).to.emit(this.cmtat, 'Approval').withArgs(
- this.address1,
- this.address3,
- AMOUNT_TO_APPROVE);
- });
- });
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Approval')
+ .withArgs(this.address1, this.address3, AMOUNT_TO_APPROVE)
+ })
+ })
- context("Transfer", function () {
- const TOKEN_AMOUNTS = [31n, 32n, 33n];
+ context('Transfer', function () {
+ const TOKEN_AMOUNTS = [31n, 32n, 33n]
const TOKEN_INITIAL_SUPPLY = TOKEN_AMOUNTS.reduce((a, b) => {
- return a + b;
- });
+ return a + b
+ })
beforeEach(async function () {
await this.cmtat
.connect(this.admin)
- .mint(this.address1, TOKEN_AMOUNTS[0]);
+ .mint(this.address1, TOKEN_AMOUNTS[0])
await this.cmtat
.connect(this.admin)
- .mint(this.address2, TOKEN_AMOUNTS[1]);
- await this.cmtat.connect(this.admin).mint(this.address3, TOKEN_AMOUNTS[2]);
- });
+ .mint(this.address2, TOKEN_AMOUNTS[1])
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, TOKEN_AMOUNTS[2])
+ })
- it("testTransferFromOneAccountToAnother", async function () {
- const AMOUNT_TO_TRANSFER = 11n;
+ it('testTransferFromOneAccountToAnother', async function () {
+ const AMOUNT_TO_TRANSFER = 11n
// Act
this.logs = await this.cmtat
.connect(this.address1)
- .transfer(this.address2, AMOUNT_TO_TRANSFER);
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
// Assert
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
TOKEN_AMOUNTS[0] - AMOUNT_TO_TRANSFER
- );
+ )
expect(await this.cmtat.balanceOf(this.address2)).to.equal(
TOKEN_AMOUNTS[1] + AMOUNT_TO_TRANSFER
- );
- expect(await this.cmtat.balanceOf(this.address3)).to.equal(TOKEN_AMOUNTS[2]);
- expect(await this.cmtat.totalSupply()).to.equal(TOKEN_INITIAL_SUPPLY);
+ )
+ expect(await this.cmtat.balanceOf(this.address3)).to.equal(
+ TOKEN_AMOUNTS[2]
+ )
+ expect(await this.cmtat.totalSupply()).to.equal(TOKEN_INITIAL_SUPPLY)
// emits a Transfer event
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs(
- this.address1,
- this.address2,
- AMOUNT_TO_TRANSFER);
- });
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, this.address2, AMOUNT_TO_TRANSFER)
+ })
// ADDRESS1 -> ADDRESS2
- it("testCannotTransferMoreTokensThanOwn", async function () {
- const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1);
- const AMOUNT_TO_TRANSFER = 50n;
+ it('testCannotTransferMoreTokensThanOwn', async function () {
+ const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1)
+ const AMOUNT_TO_TRANSFER = 50n
// Act
- await expect( this.cmtat
- .connect(this.address1)
- .transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
- .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_TRANSFER)
- });
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
+ .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_TRANSFER)
+ })
// allows address3 to transfer tokens from address1 to address2 with the right allowance
// ADDRESS3 : ADDRESS1 -> ADDRESS2
- it("testTransferByAnotherAccountWithTheRightAllowance", async function () {
- const AMOUNT_TO_TRANSFER = 11n;
- const AMOUNT_TO_APPROVE = 20;
+ it('testTransferByAnotherAccountWithTheRightAllowance', async function () {
+ const AMOUNT_TO_TRANSFER = 11n
+ const AMOUNT_TO_APPROVE = 20
// Arrange
await this.cmtat
.connect(this.address1)
- .approve(this.address3, AMOUNT_TO_APPROVE);
+ .approve(this.address3, AMOUNT_TO_APPROVE)
// Act
// Transfer
this.logs = await this.cmtat
.connect(this.address3)
- .transferFrom(this.address1, this.address2, 11);
+ .transferFrom(this.address1, this.address2, 11)
// Assert
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
TOKEN_AMOUNTS[0] - AMOUNT_TO_TRANSFER
- );
+ )
expect(await this.cmtat.balanceOf(this.address2)).to.equal(
TOKEN_AMOUNTS[1] + AMOUNT_TO_TRANSFER
- );
- expect(await this.cmtat.balanceOf(this.address3)).to.equal(TOKEN_AMOUNTS[2]);
- expect(await this.cmtat.totalSupply()).to.equal(TOKEN_INITIAL_SUPPLY);
+ )
+ expect(await this.cmtat.balanceOf(this.address3)).to.equal(
+ TOKEN_AMOUNTS[2]
+ )
+ expect(await this.cmtat.totalSupply()).to.equal(TOKEN_INITIAL_SUPPLY)
// emits a Transfer event
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs(
- this.address1,
- this.address2,
- AMOUNT_TO_TRANSFER);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, this.address2, AMOUNT_TO_TRANSFER)
// emits a Spend event
- await expect(this.logs).to.emit(this.cmtat, 'Spend').withArgs(
- this.address1,
- this.address3,
- AMOUNT_TO_TRANSFER);
- });
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Spend')
+ .withArgs(this.address1, this.address3, AMOUNT_TO_TRANSFER)
+ })
// reverts if address3 transfers more tokens than the allowance from address1 to address2
- it("testCannotTransferByAnotherAccountWithInsufficientAllowance", async function () {
- const AMOUNT_TO_TRANSFER = 31n;
- const ALLOWANCE_FOR_ADDRESS3 = 20n;
+ it('testCannotTransferByAnotherAccountWithInsufficientAllowance', async function () {
+ const AMOUNT_TO_TRANSFER = 31n
+ const ALLOWANCE_FOR_ADDRESS3 = 20n
// Arrange
// Define allowance
- expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal("0");
+ expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
+ '0'
+ )
await this.cmtat
.connect(this.address1)
- .approve(this.address3, ALLOWANCE_FOR_ADDRESS3);
+ .approve(this.address3, ALLOWANCE_FOR_ADDRESS3)
// Arrange - Assert
expect(await this.cmtat.allowance(this.address1, this.address3)).to.equal(
ALLOWANCE_FOR_ADDRESS3
- );
+ )
// Act
// Transfer
- await expect( this.cmtat
- .connect(this.address3)
- .transferFrom(this.address1, this.address2, 31))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientAllowance')
- .withArgs(this.address3.address, ALLOWANCE_FOR_ADDRESS3, AMOUNT_TO_TRANSFER)
- });
+ await expect(
+ this.cmtat
+ .connect(this.address3)
+ .transferFrom(this.address1, this.address2, 31)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientAllowance')
+ .withArgs(
+ this.address3.address,
+ ALLOWANCE_FOR_ADDRESS3,
+ AMOUNT_TO_TRANSFER
+ )
+ })
// reverts if address3 transfers more tokens than address1 owns from address1 to address2
- it("testCannotTransferByAnotherAccountWithInsufficientBalance", async function () {
+ it('testCannotTransferByAnotherAccountWithInsufficientBalance', async function () {
// Arrange
- const AMOUNT_TO_TRANSFER = 50n;
- const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1);
- await this.cmtat.connect(this.address1).approve(this.address3, 1000);
+ const AMOUNT_TO_TRANSFER = 50n
+ const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1)
+ await this.cmtat.connect(this.address1).approve(this.address3, 1000)
// Act
- await expect( this.cmtat
- .connect(this.address3)
- .transferFrom(this.address1, this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
- .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_TRANSFER)
- });
- });
+ await expect(
+ this.cmtat
+ .connect(this.address3)
+ .transferFrom(this.address1, this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
+ .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_TRANSFER)
+ })
+ })
- context("transferFrom", function () {
- const TOKEN_AMOUNTS = [31n, 32n, 33n];
+ context('transferFrom', function () {
+ const TOKEN_AMOUNTS = [31n, 32n, 33n]
const TOKEN_INITIAL_SUPPLY = TOKEN_AMOUNTS.reduce((a, b) => {
- return a + b;
- });
+ return a + b
+ })
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, TOKEN_AMOUNTS[0]);
await this.cmtat
.connect(this.admin)
- .mint(this.address2, TOKEN_AMOUNTS[1]);
- await this.cmtat.connect(this.admin).mint(this.address3, TOKEN_AMOUNTS[2]);
- });
+ .mint(this.address1, TOKEN_AMOUNTS[0])
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, TOKEN_AMOUNTS[1])
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, TOKEN_AMOUNTS[2])
+ })
- it("testTransferFromOneAccountToAnother", async function () {
- const AMOUNT_TO_TRANSFER = 11n;
+ it('testTransferFromOneAccountToAnother', async function () {
+ const AMOUNT_TO_TRANSFER = 11n
// Act
this.logs = await this.cmtat
.connect(this.address1)
- .transfer(this.address2, AMOUNT_TO_TRANSFER);
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
// Assert
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
TOKEN_AMOUNTS[0] - AMOUNT_TO_TRANSFER
- );
+ )
expect(await this.cmtat.balanceOf(this.address2)).to.equal(
TOKEN_AMOUNTS[1] + AMOUNT_TO_TRANSFER
- );
- expect(await this.cmtat.balanceOf(this.address3)).to.equal(TOKEN_AMOUNTS[2]);
- expect(await this.cmtat.totalSupply()).to.equal(TOKEN_INITIAL_SUPPLY);
+ )
+ expect(await this.cmtat.balanceOf(this.address3)).to.equal(
+ TOKEN_AMOUNTS[2]
+ )
+ expect(await this.cmtat.totalSupply()).to.equal(TOKEN_INITIAL_SUPPLY)
// emits a Transfer event
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs(
- this.address1,
- this.address2,
- AMOUNT_TO_TRANSFER);
- });
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, this.address2, AMOUNT_TO_TRANSFER)
+ })
// ADDRESS1 -> ADDRESS2
- it("testCannotTransferMoreTokensThanOwn", async function () {
- const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1);
- const AMOUNT_TO_TRANSFER = 50n;
+ it('testCannotTransferMoreTokensThanOwn', async function () {
+ const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1)
+ const AMOUNT_TO_TRANSFER = 50n
// Act
- await expect( this.cmtat
- .connect(this.address1)
- .transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
- .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_TRANSFER)
- });
- });
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
+ .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_TRANSFER)
+ })
+ })
- context("transferBatch", function () {
- const TOKEN_AMOUNTS = [10n, 100n, 1000n];
+ context('transferBatch', function () {
+ const TOKEN_AMOUNTS = [10n, 100n, 1000n]
beforeEach(async function () {
// Only the admin has tokens
await this.cmtat.connect(this.admin).mint(
this.admin,
TOKEN_AMOUNTS.reduce((a, b) => {
- return a + b;
+ return a + b
})
- );
- });
+ )
+ })
- it("testTransferBatch", async function () {
- const TOKEN_ADDRESS_TOS = [this.address1, this.address2, this.address3];
+ it('testTransferBatch', async function () {
+ const TOKEN_ADDRESS_TOS = [this.address1, this.address2, this.address3]
// Act
this.logs = await this.cmtat
.connect(this.admin)
- .transferBatch(TOKEN_ADDRESS_TOS, TOKEN_AMOUNTS);
+ .transferBatch(TOKEN_ADDRESS_TOS, TOKEN_AMOUNTS)
// Assert
for (let i = 0; i < TOKEN_ADDRESS_TOS.length; ++i) {
expect(await this.cmtat.balanceOf(TOKEN_ADDRESS_TOS[i])).to.equal(
TOKEN_AMOUNTS[i]
- );
+ )
}
// emits a Transfer event
for (let i = 0; i < TOKEN_ADDRESS_TOS.length; ++i) {
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs(
- this.admin,
- TOKEN_ADDRESS_TOS[i],
- TOKEN_AMOUNTS[i]);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.admin, TOKEN_ADDRESS_TOS[i], TOKEN_AMOUNTS[i])
}
- });
+ })
// ADDRESS1 -> ADDRESS2
- it("testCannotTransferBatchMoreTokensThanOwn", async function () {
- const TOKEN_ADDRESS_TOS = [this.address1, this.address2, this.address3];
+ it('testCannotTransferBatchMoreTokensThanOwn', async function () {
+ const TOKEN_ADDRESS_TOS = [this.address1, this.address2, this.address3]
const BALANCE_AFTER_FIRST_TRANSFER =
- (await this.cmtat.balanceOf(this.admin)) - TOKEN_AMOUNTS[0];
- const AMOUNT_TO_TRANSFER_SECOND = BALANCE_AFTER_FIRST_TRANSFER + 1n;
+ (await this.cmtat.balanceOf(this.admin)) - TOKEN_AMOUNTS[0]
+ const AMOUNT_TO_TRANSFER_SECOND = BALANCE_AFTER_FIRST_TRANSFER + 1n
// Second amount is invalid
const TOKEN_AMOUNTS_INVALID = [
TOKEN_AMOUNTS[0],
AMOUNT_TO_TRANSFER_SECOND,
- TOKEN_AMOUNTS[2],
- ];
+ TOKEN_AMOUNTS[2]
+ ]
// Act
- await expect( this.cmtat
- .connect(this.admin)
- .transferBatch(TOKEN_ADDRESS_TOS, TOKEN_AMOUNTS_INVALID))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
- .withArgs(this.admin.address, BALANCE_AFTER_FIRST_TRANSFER, AMOUNT_TO_TRANSFER_SECOND)
- });
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .transferBatch(TOKEN_ADDRESS_TOS, TOKEN_AMOUNTS_INVALID)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
+ .withArgs(
+ this.admin.address,
+ BALANCE_AFTER_FIRST_TRANSFER,
+ AMOUNT_TO_TRANSFER_SECOND
+ )
+ })
- it("testCannotTransferBatchIfLengthMismatchMissingAddresses", async function () {
+ it('testCannotTransferBatchIfLengthMismatchMissingAddresses', async function () {
// Number of addresses is insufficient
- const TOKEN_ADDRESS_TOS_INVALID = [this.address1, this.address2];
- await expect(this.cmtat.connect(this.admin).transferBatch(TOKEN_ADDRESS_TOS_INVALID, TOKEN_AMOUNTS))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_ERC20BaseModule_TosValueslengthMismatch')
- });
+ const TOKEN_ADDRESS_TOS_INVALID = [this.address1, this.address2]
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .transferBatch(TOKEN_ADDRESS_TOS_INVALID, TOKEN_AMOUNTS)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_ERC20BaseModule_TosValueslengthMismatch'
+ )
+ })
- it("testCannotTransferBatchIfLengthMismatchTooManyAddresses", async function () {
+ it('testCannotTransferBatchIfLengthMismatchTooManyAddresses', async function () {
// There are too many addresses
const TOKEN_ADDRESS_TOS_INVALID = [
this.address1,
this.address2,
this.address1,
- this.address1,
- ];
- await expect(this.cmtat.connect(this.admin).transferBatch(TOKEN_ADDRESS_TOS_INVALID, TOKEN_AMOUNTS))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_ERC20BaseModule_TosValueslengthMismatch')
- });
+ this.address1
+ ]
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .transferBatch(TOKEN_ADDRESS_TOS_INVALID, TOKEN_AMOUNTS)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_ERC20BaseModule_TosValueslengthMismatch'
+ )
+ })
- it("testCannotTransferBatchIfTOSIsEmpty", async function () {
- const TOKEN_ADDRESS_TOS_INVALID = [];
- await expect(this.cmtat.connect(this.admin).transferBatch(TOKEN_ADDRESS_TOS_INVALID, TOKEN_AMOUNTS))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_ERC20BaseModule_EmptyTos')
- });
- });
+ it('testCannotTransferBatchIfTOSIsEmpty', async function () {
+ const TOKEN_ADDRESS_TOS_INVALID = []
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .transferBatch(TOKEN_ADDRESS_TOS_INVALID, TOKEN_AMOUNTS)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_ERC20BaseModule_EmptyTos'
+ )
+ })
+ })
}
-module.exports = ERC20BaseModuleCommon;
+module.exports = ERC20BaseModuleCommon
diff --git a/test/common/ERC20BurnModuleCommon.js b/test/common/ERC20BurnModuleCommon.js
index e3dd16a3..dbd675cf 100644
--- a/test/common/ERC20BurnModuleCommon.js
+++ b/test/common/ERC20BurnModuleCommon.js
@@ -4,7 +4,7 @@ const {
MINTER_ROLE,
ZERO_ADDRESS
} = require('../utils')
-const { expect } = require('chai');
+const { expect } = require('chai')
function ERC20BurnModuleCommon () {
context('burn', function () {
@@ -14,59 +14,70 @@ function ERC20BurnModuleCommon () {
const DIFFERENCE = INITIAL_SUPPLY - VALUE1
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, INITIAL_SUPPLY);
- expect(await this.cmtat.totalSupply()).to.equal(
- INITIAL_SUPPLY
- )
+ await this.cmtat.connect(this.admin).mint(this.address1, INITIAL_SUPPLY)
+ expect(await this.cmtat.totalSupply()).to.equal(INITIAL_SUPPLY)
})
it('testCanBeBurntByAdmin', async function () {
// Act
// Burn 20
- this.logs = await this.cmtat.connect(this.admin).burn(this.address1, VALUE1, REASON)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .burn(this.address1, VALUE1, REASON)
// Assert
// emits a Transfer event
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs( this.address1, ZERO_ADDRESS, VALUE1);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, ZERO_ADDRESS, VALUE1)
// Emits a Burn event
- await expect(this.logs).to.emit(this.cmtat, 'Burn').withArgs( this.address1, VALUE1, REASON);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Burn')
+ .withArgs(this.address1, VALUE1, REASON)
// Check balances and total supply
- expect(await this.cmtat.balanceOf(this.address1)).to.equal(
- DIFFERENCE
- );
+ expect(await this.cmtat.balanceOf(this.address1)).to.equal(DIFFERENCE)
expect(await this.cmtat.totalSupply()).to.equal(DIFFERENCE)
// Burn 30
// Act
- this.logs = await this.cmtat.connect(this.admin).burn(this.address1, DIFFERENCE, REASON)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .burn(this.address1, DIFFERENCE, REASON)
// Assert
// Emits a Transfer event
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs( this.address1, ZERO_ADDRESS, DIFFERENCE);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, ZERO_ADDRESS, DIFFERENCE)
// Emits a Burn event
- await expect(this.logs).to.emit(this.cmtat, 'Burn').withArgs(
- this.address1,
- DIFFERENCE,
- REASON);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Burn')
+ .withArgs(this.address1, DIFFERENCE, REASON)
// Check balances and total supply
- expect(await this.cmtat.balanceOf(this.address1)).to.equal(0n);
+ expect(await this.cmtat.balanceOf(this.address1)).to.equal(0n)
expect(await this.cmtat.totalSupply()).to.equal(0n)
})
it('testCanBeBurntByBurnerRole', async function () {
// Arrange
- await this.cmtat.connect(this.admin).grantRole(BURNER_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(BURNER_ROLE, this.address2)
// Act
- this.logs = await this.cmtat.connect(this.address2).burn(this.address1, VALUE1, REASON);
+ this.logs = await this.cmtat
+ .connect(this.address2)
+ .burn(this.address1, VALUE1, REASON)
// Assert
- expect(await this.cmtat.balanceOf(this.address1)).to.equal(
- DIFFERENCE
- );
+ expect(await this.cmtat.balanceOf(this.address1)).to.equal(DIFFERENCE)
expect(await this.cmtat.totalSupply()).to.equal(DIFFERENCE)
// Emits a Transfer event
- await expect(this.logs).to.emit(this.cmtat, 'Transfer').withArgs( this.address1, ZERO_ADDRESS, VALUE1);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, ZERO_ADDRESS, VALUE1)
// Emits a Burn event
- await expect(this.logs).to.emit(this.cmtat, 'Burn').withArgs( this.address1, VALUE1, REASON);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Burn')
+ .withArgs(this.address1, VALUE1, REASON)
})
it('testCannotBeBurntIfBalanceExceeds', async function () {
@@ -74,15 +85,22 @@ function ERC20BurnModuleCommon () {
const AMOUNT_TO_BURN = 200n
const ADDRESS1_BALANCE = await this.cmtat.balanceOf(this.address1)
// Act
- await expect( this.cmtat.connect(this.admin).burn(this.address1, AMOUNT_TO_BURN, ''))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
- .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_BURN);
+ await expect(
+ this.cmtat.connect(this.admin).burn(this.address1, AMOUNT_TO_BURN, '')
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
+ .withArgs(this.address1.address, ADDRESS1_BALANCE, AMOUNT_TO_BURN)
})
it('testCannotBeBurntWithoutBurnerRole', async function () {
- await expect( this.cmtat.connect(this.address2).burn(this.address1, 20n, ''))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, BURNER_ROLE);
+ await expect(
+ this.cmtat.connect(this.address2).burn(this.address1, 20n, '')
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, BURNER_ROLE)
})
})
@@ -91,41 +109,50 @@ function ERC20BurnModuleCommon () {
const VALUE1 = 20n
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, INITIAL_SUPPLY);
- expect(await this.cmtat.totalSupply()).to.equal(
- INITIAL_SUPPLY
- )
+ await this.cmtat.connect(this.admin).mint(this.address1, INITIAL_SUPPLY)
+ expect(await this.cmtat.totalSupply()).to.equal(INITIAL_SUPPLY)
})
it('canBeBurnFrom', async function () {
// Arrange
const AMOUNT_TO_BURN = 20n
- await this.cmtat.connect(this.admin).grantRole(BURNER_FROM_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(BURNER_FROM_ROLE, this.address2)
await this.cmtat.connect(this.address1).approve(this.address2, 50n)
// Act
- this.logs = await this.cmtat.connect(this.address2).burnFrom(this.address1, AMOUNT_TO_BURN)
+ this.logs = await this.cmtat
+ .connect(this.address2)
+ .burnFrom(this.address1, AMOUNT_TO_BURN)
// Assert
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(this.address1, ZERO_ADDRESS, AMOUNT_TO_BURN);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, ZERO_ADDRESS, AMOUNT_TO_BURN)
await expect(this.logs)
- .to.emit(this.cmtat, "BurnFrom")
- .withArgs(this.address1, this.address2, AMOUNT_TO_BURN);
- expect(await this.cmtat.balanceOf(this.address1)).to.equal(30n);
+ .to.emit(this.cmtat, 'BurnFrom')
+ .withArgs(this.address1, this.address2, AMOUNT_TO_BURN)
+ expect(await this.cmtat.balanceOf(this.address1)).to.equal(30n)
expect(await this.cmtat.totalSupply()).to.equal(30n)
})
it('TestCannotBeBurnWithoutAllowance', async function () {
const AMOUNT_TO_BURN = 20n
- await expect( this.cmtat.connect(this.admin).burnFrom(this.address1, AMOUNT_TO_BURN))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientAllowance')
- .withArgs(this.admin.address, 0, AMOUNT_TO_BURN);
+ await expect(
+ this.cmtat.connect(this.admin).burnFrom(this.address1, AMOUNT_TO_BURN)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientAllowance')
+ .withArgs(this.admin.address, 0, AMOUNT_TO_BURN)
})
it('testCannotBeBurntWithoutBurnerFromRole', async function () {
- await expect( this.cmtat.connect(this.address2).burnFrom(this.address1, 20n))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, BURNER_FROM_ROLE);
+ await expect(
+ this.cmtat.connect(this.address2).burnFrom(this.address1, 20n)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, BURNER_FROM_ROLE)
})
})
@@ -134,49 +161,53 @@ function ERC20BurnModuleCommon () {
const VALUE1 = 20n
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, INITIAL_SUPPLY);
- expect(await this.cmtat.totalSupply()).to.equal(
- INITIAL_SUPPLY
- )
+ await this.cmtat.connect(this.admin).mint(this.address1, INITIAL_SUPPLY)
+ expect(await this.cmtat.totalSupply()).to.equal(INITIAL_SUPPLY)
})
it('canBeBurnAndMit', async function () {
// Arrange
const AMOUNT_TO_BURN = 20n
const AMOUNT_TO_MINT = 15n
- await this.cmtat.connect(this.admin).grantRole(BURNER_ROLE, this.address2)
- await this.cmtat.connect(this.admin).grantRole(MINTER_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(BURNER_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(MINTER_ROLE, this.address2)
// Act
- this.logs = await this.cmtat.connect(this.address2).burnAndMint(
- this.address1,
- this.address3,
- AMOUNT_TO_BURN,
- AMOUNT_TO_MINT,
- 'recovery'
- )
+ this.logs = await this.cmtat
+ .connect(this.address2)
+ .burnAndMint(
+ this.address1,
+ this.address3,
+ AMOUNT_TO_BURN,
+ AMOUNT_TO_MINT,
+ 'recovery'
+ )
// Assert
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(this.address1, ZERO_ADDRESS, AMOUNT_TO_BURN);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(this.address1, ZERO_ADDRESS, AMOUNT_TO_BURN)
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(ZERO_ADDRESS,this.address3,AMOUNT_TO_MINT);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(ZERO_ADDRESS, this.address3, AMOUNT_TO_MINT)
await expect(this.logs)
- .to.emit(this.cmtat, "Burn")
- .withArgs(this.address1, AMOUNT_TO_BURN, 'recovery');
+ .to.emit(this.cmtat, 'Burn')
+ .withArgs(this.address1, AMOUNT_TO_BURN, 'recovery')
await expect(this.logs)
- .to.emit(this.cmtat, "Mint")
- .withArgs(this.address3, AMOUNT_TO_MINT);
+ .to.emit(this.cmtat, 'Mint')
+ .withArgs(this.address3, AMOUNT_TO_MINT)
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
INITIAL_SUPPLY - AMOUNT_TO_BURN
- );
+ )
expect(await this.cmtat.balanceOf(this.address3)).to.equal(
AMOUNT_TO_MINT
- );
+ )
expect(await this.cmtat.totalSupply()).to.equal(
INITIAL_SUPPLY - AMOUNT_TO_BURN + AMOUNT_TO_MINT
)
@@ -186,34 +217,52 @@ function ERC20BurnModuleCommon () {
// Arrange
const AMOUNT_TO_BURN = 20n
const AMOUNT_TO_MINT = 15n
- await this.cmtat.connect(this.admin).grantRole(BURNER_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(BURNER_ROLE, this.address2)
// Act
- await expect( this.cmtat.connect(this.address2).burnAndMint(
- this.address1,
- this.address3,
- AMOUNT_TO_BURN,
- AMOUNT_TO_MINT,
- 'recovery'
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, MINTER_ROLE);
+ await expect(
+ this.cmtat
+ .connect(this.address2)
+ .burnAndMint(
+ this.address1,
+ this.address3,
+ AMOUNT_TO_BURN,
+ AMOUNT_TO_MINT,
+ 'recovery'
+ )
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, MINTER_ROLE)
})
it('canBeBurnAndMintWithoutBurnerRole', async function () {
// Arrange
const AMOUNT_TO_BURN = 20n
const AMOUNT_TO_MINT = 15n
- await this.cmtat.connect(this.admin).grantRole(MINTER_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(MINTER_ROLE, this.address2)
// Assert
- await expect( this.cmtat.connect(this.address2).burnAndMint(
- this.address1,
- this.address3,
- AMOUNT_TO_BURN,
- AMOUNT_TO_MINT,
- 'recovery'
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, BURNER_ROLE);
+ await expect(
+ this.cmtat
+ .connect(this.address2)
+ .burnAndMint(
+ this.address1,
+ this.address3,
+ AMOUNT_TO_BURN,
+ AMOUNT_TO_MINT,
+ 'recovery'
+ )
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, BURNER_ROLE)
})
})
@@ -225,36 +274,31 @@ function ERC20BurnModuleCommon () {
})
const TOKEN_BY_HOLDERS_TO_BURN = [5, 50, 500]
const TOKEN_BALANCE_BY_HOLDERS_AFTER_BURN = [
- TOKEN_SUPPLY_BY_HOLDERS[0] - (TOKEN_BY_HOLDERS_TO_BURN[0]),
- TOKEN_SUPPLY_BY_HOLDERS[1] - (TOKEN_BY_HOLDERS_TO_BURN[1]),
- TOKEN_SUPPLY_BY_HOLDERS[2] - (TOKEN_BY_HOLDERS_TO_BURN[2])
+ TOKEN_SUPPLY_BY_HOLDERS[0] - TOKEN_BY_HOLDERS_TO_BURN[0],
+ TOKEN_SUPPLY_BY_HOLDERS[1] - TOKEN_BY_HOLDERS_TO_BURN[1],
+ TOKEN_SUPPLY_BY_HOLDERS[2] - TOKEN_BY_HOLDERS_TO_BURN[2]
]
- const TOTAL_SUPPLY_AFTER_BURN = INITIAL_SUPPLY - (
+ const TOTAL_SUPPLY_AFTER_BURN =
+ INITIAL_SUPPLY -
TOKEN_BY_HOLDERS_TO_BURN.reduce((a, b) => {
return a + b
})
- )
beforeEach(async function () {
const TOKEN_HOLDER = [this.admin, this.address1, this.address2];
- ({ logs: this.logs1 } = await this.cmtat.connect(this.admin).mintBatch(
- TOKEN_HOLDER,
- TOKEN_SUPPLY_BY_HOLDERS
- ));
- expect(await this.cmtat.totalSupply()).to.equal(
- INITIAL_SUPPLY
- )
+ ({ logs: this.logs1 } = await this.cmtat
+ .connect(this.admin)
+ .mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS))
+ expect(await this.cmtat.totalSupply()).to.equal(INITIAL_SUPPLY)
})
it('testCanBeBurntBatchByAdmin', async function () {
const TOKEN_HOLDER = [this.admin, this.address1, this.address2]
// Act
// Burn
- this.logs = await this.cmtat.connect(this.admin).burnBatch(
- TOKEN_HOLDER,
- TOKEN_BY_HOLDERS_TO_BURN,
- REASON,
- )
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .burnBatch(TOKEN_HOLDER, TOKEN_BY_HOLDERS_TO_BURN, REASON)
// Assert
// emits a Transfer event
// Assert event
@@ -262,15 +306,15 @@ function ERC20BurnModuleCommon () {
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
// emits a Transfer event
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(TOKEN_HOLDER[i], ZERO_ADDRESS, TOKEN_BY_HOLDERS_TO_BURN[i]);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(TOKEN_HOLDER[i], ZERO_ADDRESS, TOKEN_BY_HOLDERS_TO_BURN[i])
}
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
// emits a Burn event
await expect(this.logs)
- .to.emit(this.cmtat, "Burn")
- .withArgs(TOKEN_HOLDER[i], TOKEN_BY_HOLDERS_TO_BURN[i], REASON);
+ .to.emit(this.cmtat, 'Burn')
+ .withArgs(TOKEN_HOLDER[i], TOKEN_BY_HOLDERS_TO_BURN[i], REASON)
}
// Check balances and total supply
// Assert
@@ -280,39 +324,37 @@ function ERC20BurnModuleCommon () {
)
}
- expect(await this.cmtat.totalSupply()).to.equal(
- TOTAL_SUPPLY_AFTER_BURN
- )
+ expect(await this.cmtat.totalSupply()).to.equal(TOTAL_SUPPLY_AFTER_BURN)
})
it('testCanBeBurntBatchByBurnerRole', async function () {
const TOKEN_HOLDER = [this.admin, this.address1, this.address2]
// Arrange
- await this.cmtat.connect(this.admin).grantRole(BURNER_ROLE, this.address2)
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(BURNER_ROLE, this.address2)
// Act
// Burn
- this.logs = await this.cmtat.connect(this.address2).burnBatch(
- TOKEN_HOLDER,
- TOKEN_BY_HOLDERS_TO_BURN,
- REASON
- )
+ this.logs = await this.cmtat
+ .connect(this.address2)
+ .burnBatch(TOKEN_HOLDER, TOKEN_BY_HOLDERS_TO_BURN, REASON)
// Assert
// emits a Transfer event
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
// emits a transfer event
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(TOKEN_HOLDER[i], ZERO_ADDRESS, TOKEN_BY_HOLDERS_TO_BURN[i]);
- };
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(TOKEN_HOLDER[i], ZERO_ADDRESS, TOKEN_BY_HOLDERS_TO_BURN[i])
+ }
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
- // emits a burn
+ // emits a burn
await expect(this.logs)
- .to.emit(this.cmtat, "Burn")
- .withArgs(TOKEN_HOLDER[i], TOKEN_BY_HOLDERS_TO_BURN[i], REASON);
+ .to.emit(this.cmtat, 'Burn')
+ .withArgs(TOKEN_HOLDER[i], TOKEN_BY_HOLDERS_TO_BURN[i], REASON)
}
// Check balances and total supply
// Assert
@@ -322,9 +364,7 @@ function ERC20BurnModuleCommon () {
)
}
- expect(await this.cmtat.totalSupply()).to.equal(
- TOTAL_SUPPLY_AFTER_BURN
- )
+ expect(await this.cmtat.totalSupply()).to.equal(TOTAL_SUPPLY_AFTER_BURN)
})
it('testCannotBeBurntBatchIfOneBalanceExceeds', async function () {
@@ -332,48 +372,78 @@ function ERC20BurnModuleCommon () {
const TOKEN_BY_HOLDERS_TO_BURN_FAIL = [5n, 50n, 5000000n]
const ADDRESS2_BALANCE = await this.cmtat.balanceOf(this.address2)
// Act
- await expect( this.cmtat.connect(this.admin).burnBatch(TOKEN_HOLDER, TOKEN_BY_HOLDERS_TO_BURN_FAIL, ''))
- .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
- .withArgs(this.address2.address, ADDRESS2_BALANCE, TOKEN_BY_HOLDERS_TO_BURN_FAIL[2]);
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .burnBatch(TOKEN_HOLDER, TOKEN_BY_HOLDERS_TO_BURN_FAIL, '')
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'ERC20InsufficientBalance')
+ .withArgs(
+ this.address2.address,
+ ADDRESS2_BALANCE,
+ TOKEN_BY_HOLDERS_TO_BURN_FAIL[2]
+ )
})
it('testCannotBeBurntBatchWithoutBurnerRole', async function () {
const TOKEN_HOLDER = [this.admin, this.address1, this.address2]
- await expect( this.cmtat.connect(this.address2).burnBatch(TOKEN_HOLDER, TOKEN_BY_HOLDERS_TO_BURN, ''))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, BURNER_ROLE);
+ await expect(
+ this.cmtat
+ .connect(this.address2)
+ .burnBatch(TOKEN_HOLDER, TOKEN_BY_HOLDERS_TO_BURN, '')
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, BURNER_ROLE)
})
it('testCannotburnBatchIfLengthMismatchMissingAddresses', async function () {
// Number of addresses is insufficient
const TOKEN_HOLDER_INVALID = [this.admin, this.address1]
- await expect(this.cmtat.connect(this.admin).burnBatch(
- TOKEN_HOLDER_INVALID,
- TOKEN_BY_HOLDERS_TO_BURN,
- REASON
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_BurnModule_AccountsValueslengthMismatch')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .burnBatch(TOKEN_HOLDER_INVALID, TOKEN_BY_HOLDERS_TO_BURN, REASON)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_BurnModule_AccountsValueslengthMismatch'
+ )
})
it('testCannotburnBatchIfLengthMismatchTooManyAddresses', async function () {
// There are too many addresses
- const TOKEN_HOLDER_INVALID = [this.admin, this.address1, this.address1, this.address1]
- await expect(this.cmtat.connect(this.admin).burnBatch(
- TOKEN_HOLDER_INVALID,
- TOKEN_BY_HOLDERS_TO_BURN,
- REASON
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_BurnModule_AccountsValueslengthMismatch')
+ const TOKEN_HOLDER_INVALID = [
+ this.admin,
+ this.address1,
+ this.address1,
+ this.address1
+ ]
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .burnBatch(TOKEN_HOLDER_INVALID, TOKEN_BY_HOLDERS_TO_BURN, REASON)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_BurnModule_AccountsValueslengthMismatch'
+ )
})
it('testCannotburnBatchIfAccountsIsEmpty', async function () {
const TOKEN_ADDRESS_TOS_INVALID = []
- await expect(this.cmtat.connect(this.admin).burnBatch(
- TOKEN_ADDRESS_TOS_INVALID,
- TOKEN_BY_HOLDERS_TO_BURN,
- REASON
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_BurnModule_EmptyAccounts')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .burnBatch(
+ TOKEN_ADDRESS_TOS_INVALID,
+ TOKEN_BY_HOLDERS_TO_BURN,
+ REASON
+ )
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_BurnModule_EmptyAccounts'
+ )
})
})
}
diff --git a/test/common/ERC20MintModuleCommon.js b/test/common/ERC20MintModuleCommon.js
index a51b6a6b..e222a9ab 100644
--- a/test/common/ERC20MintModuleCommon.js
+++ b/test/common/ERC20MintModuleCommon.js
@@ -1,235 +1,258 @@
-const { expect } = require('chai');
-const { ZERO_ADDRESS, MINTER_ROLE } = require("../utils.js");
+const { expect } = require('chai')
+const { ZERO_ADDRESS, MINTER_ROLE } = require('../utils.js')
-function ERC20MintModuleCommon() {
- context("Minting", function () {
- const VALUE1 = 20n;
- const VALUE2 = 50n;
+function ERC20MintModuleCommon () {
+ context('Minting', function () {
+ const VALUE1 = 20n
+ const VALUE2 = 50n
/**
The admin is assigned the MINTER role when the contract is deployed
*/
- it("testCanBeMintedByAdmin", async function () {
+ it('testCanBeMintedByAdmin', async function () {
// Arrange
// Arrange - Assert
// Check first balance
- expect(await this.cmtat.balanceOf(this.admin)).to.equal(0n);
+ expect(await this.cmtat.balanceOf(this.admin)).to.equal(0n)
// Act
// Issue 20 and check balances and total supply
this.logs = await this.cmtat
.connect(this.admin)
- .mint(this.address1, VALUE1);
+ .mint(this.address1, VALUE1)
// Assert
- expect(await this.cmtat.balanceOf(this.address1)).to.equal(VALUE1);
- expect(await this.cmtat.totalSupply()).to.equal(VALUE1);
+ expect(await this.cmtat.balanceOf(this.address1)).to.equal(VALUE1)
+ expect(await this.cmtat.totalSupply()).to.equal(VALUE1)
// Assert event
// emits a Transfer event
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(ZERO_ADDRESS, this.address1, VALUE1);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(ZERO_ADDRESS, this.address1, VALUE1)
// emits a Mint event
await expect(this.logs)
- .to.emit(this.cmtat, "Mint")
- .withArgs(this.address1, VALUE1);
+ .to.emit(this.cmtat, 'Mint')
+ .withArgs(this.address1, VALUE1)
// Act
// Issue 50 and check intermediate balances and total supply
this.logs = await this.cmtat
.connect(this.admin)
- .mint(this.address2, VALUE2);
+ .mint(this.address2, VALUE2)
// Assert
- expect(await this.cmtat.balanceOf(this.address2)).to.equal(VALUE2);
- expect(await this.cmtat.totalSupply()).to.equal(VALUE1 + VALUE2);
+ expect(await this.cmtat.balanceOf(this.address2)).to.equal(VALUE2)
+ expect(await this.cmtat.totalSupply()).to.equal(VALUE1 + VALUE2)
// Assert event
// emits a Transfer event
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(ZERO_ADDRESS, this.address2, VALUE2);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(ZERO_ADDRESS, this.address2, VALUE2)
// emits a Mint event
await expect(this.logs)
- .to.emit(this.cmtat, "Mint")
- .withArgs(this.address2, VALUE2);
- });
+ .to.emit(this.cmtat, 'Mint')
+ .withArgs(this.address2, VALUE2)
+ })
- it("testCanMintByANewMinter", async function () {
+ it('testCanMintByANewMinter', async function () {
// Arrange
await this.cmtat
.connect(this.admin)
- .grantRole(MINTER_ROLE, this.address1);
+ .grantRole(MINTER_ROLE, this.address1)
// Arrange - Assert
// Check first balance
- expect(await this.cmtat.balanceOf(this.admin)).to.equal(0n);
+ expect(await this.cmtat.balanceOf(this.admin)).to.equal(0n)
// Act
// Issue 20
this.logs = await this.cmtat
.connect(this.address1)
- .mint(this.address1, VALUE1);
+ .mint(this.address1, VALUE1)
// Assert
// Check balances and total supply
- expect(await this.cmtat.balanceOf(this.address1)).to.equal(VALUE1);
- expect(await this.cmtat.totalSupply()).to.equal(VALUE1);
+ expect(await this.cmtat.balanceOf(this.address1)).to.equal(VALUE1)
+ expect(await this.cmtat.totalSupply()).to.equal(VALUE1)
// Assert event
// emits a Transfer event
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(ZERO_ADDRESS, this.address1, VALUE1);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(ZERO_ADDRESS, this.address1, VALUE1)
// emits a Mint event
await expect(this.logs)
- .to.emit(this.cmtat, "Mint")
- .withArgs(this.address1, VALUE1);
- });
+ .to.emit(this.cmtat, 'Mint')
+ .withArgs(this.address1, VALUE1)
+ })
// reverts when issuing by a non minter
- it("testCannotMintByNonMinter", async function () {
- await expect( this.cmtat.connect(this.address1).mint(this.address1, VALUE1))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, MINTER_ROLE);
- });
- });
+ it('testCannotMintByNonMinter', async function () {
+ await expect(
+ this.cmtat.connect(this.address1).mint(this.address1, VALUE1)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, MINTER_ROLE)
+ })
+ })
- context("Batch Minting", function () {
- const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n];
+ context('Batch Minting', function () {
+ const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n]
/**
- * The admin is assigned the MINTER role when the contract is deployed
- */
- it("testCanBeMintedBatchByAdmin", async function () {
- const TOKEN_HOLDER = [this.admin, this.address1, this.address2];
+ * The admin is assigned the MINTER role when the contract is deployed
+ */
+ it('testCanBeMintedBatchByAdmin', async function () {
+ const TOKEN_HOLDER = [this.admin, this.address1, this.address2]
// Arrange - Assert
// Check first balance
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
- expect(await this.cmtat.balanceOf(TOKEN_HOLDER[i])).to.equal(0n);
+ expect(await this.cmtat.balanceOf(TOKEN_HOLDER[i])).to.equal(0n)
}
// Act
// Issue 20 and check balances and total supply
- this.logs = await this.cmtat.connect(this.admin).mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS)
// Assert
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
expect(await this.cmtat.balanceOf(TOKEN_HOLDER[i])).to.equal(
TOKEN_SUPPLY_BY_HOLDERS[i]
- );
+ )
}
expect(await this.cmtat.totalSupply()).to.equal(
TOKEN_SUPPLY_BY_HOLDERS.reduce((a, b) => {
- return a + b;
+ return a + b
})
- );
+ )
// Assert event
// emits a Transfer event
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(ZERO_ADDRESS, TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i]);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(ZERO_ADDRESS, TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i])
}
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
// emits a Mint event
await expect(this.logs)
- .to.emit(this.cmtat, "Mint")
- .withArgs(TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i]);
+ .to.emit(this.cmtat, 'Mint')
+ .withArgs(TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i])
}
- });
+ })
- it("testCanBeMinteBatchdByANewMinter", async function () {
+ it('testCanBeMinteBatchdByANewMinter', async function () {
// Arrange
await this.cmtat
.connect(this.admin)
- .grantRole(MINTER_ROLE, this.address1);
- const TOKEN_HOLDER = [this.admin, this.address1, this.address2];
- const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n];
+ .grantRole(MINTER_ROLE, this.address1)
+ const TOKEN_HOLDER = [this.admin, this.address1, this.address2]
+ const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n]
// Arrange - Assert
// Check first balance
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
- expect(await this.cmtat.balanceOf(TOKEN_HOLDER[i])).to.equal(0n);
+ expect(await this.cmtat.balanceOf(TOKEN_HOLDER[i])).to.equal(0n)
}
// Act
// Issue 20 and check balances and total supply
this.logs = await this.cmtat
.connect(this.address1)
- .mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS);
+ .mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS)
// Assert
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
expect(await this.cmtat.balanceOf(TOKEN_HOLDER[i])).to.equal(
TOKEN_SUPPLY_BY_HOLDERS[i]
- );
+ )
}
expect(await this.cmtat.totalSupply()).to.equal(
TOKEN_SUPPLY_BY_HOLDERS.reduce((a, b) => {
- return a+b;
+ return a + b
})
- );
+ )
// Assert event
// emits a Transfer event
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
await expect(this.logs)
- .to.emit(this.cmtat, "Transfer")
- .withArgs(ZERO_ADDRESS, TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i]);
+ .to.emit(this.cmtat, 'Transfer')
+ .withArgs(ZERO_ADDRESS, TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i])
}
// emits a Mint event
for (let i = 0; i < TOKEN_HOLDER.length; ++i) {
await expect(this.logs)
- .to.emit(this.cmtat, "Mint")
- .withArgs(TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i]);
+ .to.emit(this.cmtat, 'Mint')
+ .withArgs(TOKEN_HOLDER[i], TOKEN_SUPPLY_BY_HOLDERS[i])
}
- });
+ })
- it("testCannotMintBatchByNonMinter", async function () {
- const TOKEN_HOLDER = [this.admin, this.address1, this.address2];
- const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n];
- await expect( this.cmtat
- .connect(this.address1)
- .mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, MINTER_ROLE);
- });
+ it('testCannotMintBatchByNonMinter', async function () {
+ const TOKEN_HOLDER = [this.admin, this.address1, this.address2]
+ const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n]
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .mintBatch(TOKEN_HOLDER, TOKEN_SUPPLY_BY_HOLDERS)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, MINTER_ROLE)
+ })
- it("testCannotMintBatchIfLengthMismatchMissingAddresses", async function () {
+ it('testCannotMintBatchIfLengthMismatchMissingAddresses', async function () {
// Number of addresses is insufficient
- const TOKEN_HOLDER_INVALID = [this.admin, this.address1];
- const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n];
- await expect( this.cmtat
- .connect(this.admin)
- .mintBatch(TOKEN_HOLDER_INVALID, TOKEN_SUPPLY_BY_HOLDERS))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_MintModule_AccountsValueslengthMismatch')
- });
+ const TOKEN_HOLDER_INVALID = [this.admin, this.address1]
+ const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n]
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .mintBatch(TOKEN_HOLDER_INVALID, TOKEN_SUPPLY_BY_HOLDERS)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_MintModule_AccountsValueslengthMismatch'
+ )
+ })
- it("testCannotMintBatchIfLengthMismatchTooManyAddresses", async function () {
+ it('testCannotMintBatchIfLengthMismatchTooManyAddresses', async function () {
// There are too many addresses
const TOKEN_HOLDER_INVALID = [
this.admin,
this.address1,
this.address1,
- this.address1,
- ];
- const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n];
- await expect( this.cmtat
- .connect(this.admin)
- .mintBatch(TOKEN_HOLDER_INVALID, TOKEN_SUPPLY_BY_HOLDERS))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_MintModule_AccountsValueslengthMismatch')
- });
-
- it("testCannotMintBatchIfTOSIsEmpty", async function () {
- const TOKEN_HOLDER_INVALID = [];
- const TOKEN_SUPPLY_BY_HOLDERS = [];
- await expect( this.cmtat
- .connect(this.admin)
- .mintBatch(TOKEN_HOLDER_INVALID, TOKEN_SUPPLY_BY_HOLDERS))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_MintModule_EmptyAccounts')
+ this.address1
+ ]
+ const TOKEN_SUPPLY_BY_HOLDERS = [10n, 100n, 1000n]
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .mintBatch(TOKEN_HOLDER_INVALID, TOKEN_SUPPLY_BY_HOLDERS)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_MintModule_AccountsValueslengthMismatch'
+ )
+ })
- });
- });
+ it('testCannotMintBatchIfTOSIsEmpty', async function () {
+ const TOKEN_HOLDER_INVALID = []
+ const TOKEN_SUPPLY_BY_HOLDERS = []
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .mintBatch(TOKEN_HOLDER_INVALID, TOKEN_SUPPLY_BY_HOLDERS)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_MintModule_EmptyAccounts'
+ )
+ })
+ })
}
-module.exports = ERC20MintModuleCommon;
+module.exports = ERC20MintModuleCommon
diff --git a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonGetNextSnapshot.js b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonGetNextSnapshot.js
index c0c811d1..09d063de 100644
--- a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonGetNextSnapshot.js
+++ b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonGetNextSnapshot.js
@@ -1,5 +1,5 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const {
checkArraySnapshot
} = require('./ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils')
diff --git a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonRescheduling.js b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonRescheduling.js
index ef51825c..87b13c09 100644
--- a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonRescheduling.js
+++ b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonRescheduling.js
@@ -1,5 +1,5 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const { SNAPSHOOTER_ROLE } = require('../../utils')
const {
checkArraySnapshot
@@ -15,35 +15,35 @@ function ERC20SnapshotModuleCommonRescheduling () {
})
it('can reschedule a snapshot with the snapshoter role and emits a SnapshotSchedule event', async function () {
- this.logs = await this.cmtat.connect(this.admin).rescheduleSnapshot(
- this.snapshotTime,
- this.newSnapshotTime
- )
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime)
await expect(this.logs)
- .to.emit(this.cmtat, "SnapshotSchedule")
- .withArgs(this.snapshotTime, this.newSnapshotTime);
+ .to.emit(this.cmtat, 'SnapshotSchedule')
+ .withArgs(this.snapshotTime, this.newSnapshotTime)
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
expect(snapshots[0]).to.equal(this.newSnapshotTime)
})
it('can reschedule a snapshot between a range of snapshot', async function () {
- const SNAPSHOT_MIDDLE_OLD_TIME = this.snapshotTime +
- time.duration.seconds(30)
- const SNAPSHOT_MIDDLE_NEW_TIME = this.snapshotTime +
- time.duration.seconds(40)
+ const SNAPSHOT_MIDDLE_OLD_TIME =
+ this.snapshotTime + time.duration.seconds(30)
+ const SNAPSHOT_MIDDLE_NEW_TIME =
+ this.snapshotTime + time.duration.seconds(40)
const FIRST_SNAPSHOT = this.snapshotTime + time.duration.seconds(60)
const SECOND_SNAPSHOT = this.snapshotTime + time.duration.seconds(90)
- await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME)
+ await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME)
await this.cmtat.connect(this.admin).scheduleSnapshot(FIRST_SNAPSHOT)
await this.cmtat.connect(this.admin).scheduleSnapshot(SECOND_SNAPSHOT)
- this.logs = await this.cmtat.connect(this.admin).rescheduleSnapshot(
- SNAPSHOT_MIDDLE_OLD_TIME,
- SNAPSHOT_MIDDLE_NEW_TIME
- )
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME, SNAPSHOT_MIDDLE_NEW_TIME)
await expect(this.logs)
- .to.emit(this.cmtat, "SnapshotSchedule")
- .withArgs(SNAPSHOT_MIDDLE_OLD_TIME, SNAPSHOT_MIDDLE_NEW_TIME);
+ .to.emit(this.cmtat, 'SnapshotSchedule')
+ .withArgs(SNAPSHOT_MIDDLE_OLD_TIME, SNAPSHOT_MIDDLE_NEW_TIME)
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(4)
checkArraySnapshot(snapshots, [
@@ -55,23 +55,31 @@ function ERC20SnapshotModuleCommonRescheduling () {
})
it('testCannotRescheduleASnapshotAfterTheNextSnapshot', async function () {
- const SNAPSHOT_MIDDLE_OLD_TIME = this.snapshotTime +
- time.duration.seconds(30)
- const SNAPSHOT_MIDDLE_NEW_TIME = this.snapshotTime +
- time.duration.seconds(61)
+ const SNAPSHOT_MIDDLE_OLD_TIME =
+ this.snapshotTime + time.duration.seconds(30)
+ const SNAPSHOT_MIDDLE_NEW_TIME =
+ this.snapshotTime + time.duration.seconds(61)
const FIRST_SNAPSHOT = this.snapshotTime + time.duration.seconds(60)
const SECOND_SNAPSHOT = this.snapshotTime + time.duration.seconds(90)
- await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME)
+ await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME)
await this.cmtat.connect(this.admin).scheduleSnapshot(FIRST_SNAPSHOT)
await this.cmtat.connect(this.admin).scheduleSnapshot(SECOND_SNAPSHOT)
// Act
- await expect( this.cmtat.connect(this.admin).rescheduleSnapshot(
- SNAPSHOT_MIDDLE_OLD_TIME,
- SNAPSHOT_MIDDLE_NEW_TIME
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotTimestampAfterNextSnapshot').withArgs(
- SNAPSHOT_MIDDLE_NEW_TIME, FIRST_SNAPSHOT
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(
+ SNAPSHOT_MIDDLE_OLD_TIME,
+ SNAPSHOT_MIDDLE_NEW_TIME
+ )
)
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotTimestampAfterNextSnapshot'
+ )
+ .withArgs(SNAPSHOT_MIDDLE_NEW_TIME, FIRST_SNAPSHOT)
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(4)
@@ -84,23 +92,33 @@ function ERC20SnapshotModuleCommonRescheduling () {
})
it('testCannotRescheduleASnapshotBeforeThePreviousSnapshot', async function () {
- const SNAPSHOT_MIDDLE_OLD_TIME = this.snapshotTime +
- time.duration.seconds(30)
- const SNAPSHOT_MIDDLE_NEW_TIME = this.snapshotTime - time.duration.seconds(1)
+ const SNAPSHOT_MIDDLE_OLD_TIME =
+ this.snapshotTime + time.duration.seconds(30)
+ const SNAPSHOT_MIDDLE_NEW_TIME =
+ this.snapshotTime - time.duration.seconds(1)
const FIRST_SNAPSHOT = this.snapshotTime + time.duration.seconds(60)
const SECOND_SNAPSHOT = this.snapshotTime + time.duration.seconds(90)
- await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME)
+ await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_MIDDLE_OLD_TIME)
await this.cmtat.connect(this.admin).scheduleSnapshot(FIRST_SNAPSHOT)
await this.cmtat.connect(this.admin).scheduleSnapshot(SECOND_SNAPSHOT)
// Act
- await expect( this.cmtat.connect(this.admin).rescheduleSnapshot(
- SNAPSHOT_MIDDLE_OLD_TIME,
- SNAPSHOT_MIDDLE_NEW_TIME
- ))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotTimestampBeforePreviousSnapshot').withArgs(
- SNAPSHOT_MIDDLE_NEW_TIME, this.snapshotTime)
-
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(
+ SNAPSHOT_MIDDLE_OLD_TIME,
+ SNAPSHOT_MIDDLE_NEW_TIME
+ )
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotTimestampBeforePreviousSnapshot'
+ )
+ .withArgs(SNAPSHOT_MIDDLE_NEW_TIME, this.snapshotTime)
+
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(4)
@@ -114,40 +132,65 @@ function ERC20SnapshotModuleCommonRescheduling () {
it('reverts when calling from non-owner', async function () {
// Act
- await expect( this.cmtat.connect(this.address1).rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, SNAPSHOOTER_ROLE);
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
})
it('reverts when trying to reschedule a snapshot in the past', async function () {
const NEW_TIME = this.snapshotTime - time.duration.seconds(60)
- await expect( this.cmtat.connect(this.admin).rescheduleSnapshot(this.snapshotTime, NEW_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotScheduledInThePast')
- .withArgs(NEW_TIME, (await time.latest()) + time.duration.seconds(1));
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(this.snapshotTime, NEW_TIME)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotScheduledInThePast'
+ )
+ .withArgs(NEW_TIME, (await time.latest()) + time.duration.seconds(1))
})
it('reverts when trying to reschedule a snapshot to a snapshot time already existing', async function () {
const NEW_TIME = this.snapshotTime + time.duration.seconds(60)
await this.cmtat.connect(this.admin).scheduleSnapshot(NEW_TIME)
- await expect(this.cmtat.connect(this.admin).rescheduleSnapshot(this.snapshotTime, NEW_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotAlreadyExists')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(this.snapshotTime, NEW_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotAlreadyExists'
+ )
})
it('reverts when trying to schedule a snapshot with the same time twice', async function () {
/*
Arrange: we schedule the snapshot at a new time
*/
- await this.cmtat.connect(this.admin).rescheduleSnapshot(
- this.snapshotTime,
- this.newSnapshotTime
- )
+ await this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime)
/*
// Act
We try to reschedule the previous snapshot
*/
- await expect(this.cmtat.connect(this.admin).rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotNotFound')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotNotFound'
+ )
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
@@ -156,20 +199,40 @@ function ERC20SnapshotModuleCommonRescheduling () {
it('reverts when snapshot is not found', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(90)
- await expect(this.cmtat.connect(this.admin).rescheduleSnapshot(SNAPSHOT_TIME, this.newSnapshotTime))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotNotFound')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(SNAPSHOT_TIME, this.newSnapshotTime)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotNotFound'
+ )
})
it('reverts if no snapshot exits', async function () {
- this.logs = await this.cmtat.connect(this.admin).unscheduleLastSnapshot(this.snapshotTime)
- await expect(this.cmtat.connect(this.admin).rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_NoSnapshotScheduled')
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .unscheduleLastSnapshot(this.snapshotTime)
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(this.snapshotTime, this.newSnapshotTime)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_NoSnapshotScheduled'
+ )
})
it('reverts when snapshot has been processed', async function () {
const SNAPSHOT_TIME = this.currentTime - time.duration.seconds(60)
- await expect(this.cmtat.connect(this.admin).rescheduleSnapshot(SNAPSHOT_TIME, this.newSnapshotTime))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotAlreadyDone')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .rescheduleSnapshot(SNAPSHOT_TIME, this.newSnapshotTime)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotAlreadyDone'
+ )
})
})
}
diff --git a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonScheduling.js b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonScheduling.js
index 54e5c304..50ffd7b3 100644
--- a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonScheduling.js
+++ b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonScheduling.js
@@ -1,5 +1,5 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const { SNAPSHOOTER_ROLE } = require('../../utils')
const {
checkArraySnapshot
@@ -13,7 +13,9 @@ function ERC20SnapshotModuleCommonScheduling () {
it('can schedule a snapshot with the snapshoter role', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
// Act
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_TIME)
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
@@ -21,33 +23,53 @@ function ERC20SnapshotModuleCommonScheduling () {
// emits a SnapshotSchedule event
await expect(this.logs)
- .to.emit(this.cmtat, "SnapshotSchedule")
- .withArgs('0', SNAPSHOT_TIME);
+ .to.emit(this.cmtat, 'SnapshotSchedule')
+ .withArgs('0', SNAPSHOT_TIME)
})
it('reverts when calling from non-admin', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
- await expect( this.cmtat.connect(this.address1).scheduleSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, SNAPSHOOTER_ROLE);
+ await expect(
+ this.cmtat.connect(this.address1).scheduleSnapshot(SNAPSHOT_TIME)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
})
it('reverts when trying to schedule a snapshot before the last snapshot', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(120)
// Act
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_TIME)
const SNAPSHOT_TIME_INVALID = SNAPSHOT_TIME - time.duration.seconds(60)
-
- await expect( this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME_INVALID))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotTimestampBeforeLastSnapshot')
- .withArgs(SNAPSHOT_TIME_INVALID, SNAPSHOT_TIME)
+
+ await expect(
+ this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME_INVALID)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotTimestampBeforeLastSnapshot'
+ )
+ .withArgs(SNAPSHOT_TIME_INVALID, SNAPSHOT_TIME)
})
it('reverts when trying to schedule a snapshot in the past', async function () {
const SNAPSHOT_TIME = this.currentTime - time.duration.seconds(60)
- await expect( this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotScheduledInThePast')
- .withArgs(SNAPSHOT_TIME, (await time.latest()) + time.duration.seconds(1))
+ await expect(
+ this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotScheduledInThePast'
+ )
+ .withArgs(
+ SNAPSHOT_TIME,
+ (await time.latest()) + time.duration.seconds(1)
+ )
})
it('reverts when trying to schedule a snapshot with the same time twice', async function () {
@@ -55,8 +77,12 @@ function ERC20SnapshotModuleCommonScheduling () {
// Arrange
await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
// Act
- await expect(this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotAlreadyExists')
+ await expect(
+ this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotAlreadyExists'
+ )
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
@@ -73,14 +99,18 @@ function ERC20SnapshotModuleCommonScheduling () {
const SECOND_SNAPSHOT = this.currentTime + time.duration.seconds(200)
const THIRD_SNAPSHOT = this.currentTime + time.duration.seconds(15)
// Arrange
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(FIRST_SNAPSHOT)
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(SECOND_SNAPSHOT)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(FIRST_SNAPSHOT)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SECOND_SNAPSHOT)
// Act
// We schedule the snapshot at the first place
this.snapshotTime = this.currentTime + time.duration.seconds(10)
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshotNotOptimized(
- THIRD_SNAPSHOT
- )
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshotNotOptimized(THIRD_SNAPSHOT)
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(3)
@@ -102,7 +132,9 @@ function ERC20SnapshotModuleCommonScheduling () {
await this.cmtat.connect(this.admin).scheduleSnapshot(FOUR_SNAPSHOT)
await this.cmtat.connect(this.admin).scheduleSnapshot(FIVE_SNAPSHOT)
// Act
- await this.cmtat.connect(this.admin).scheduleSnapshotNotOptimized(RANDOM_SNAPSHOT)
+ await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshotNotOptimized(RANDOM_SNAPSHOT)
// Assert
let snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(6)
@@ -119,39 +151,68 @@ function ERC20SnapshotModuleCommonScheduling () {
it('schedule a snapshot, which will be in the last position', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshotNotOptimized(SNAPSHOT_TIME)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshotNotOptimized(SNAPSHOT_TIME)
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
// emits a SnapshotSchedule event
await expect(this.logs)
- .to.emit(this.cmtat, "SnapshotSchedule")
- .withArgs('0', SNAPSHOT_TIME);
+ .to.emit(this.cmtat, 'SnapshotSchedule')
+ .withArgs('0', SNAPSHOT_TIME)
})
it('reverts when calling from non-admin', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
- await expect( this.cmtat.connect(this.address1).scheduleSnapshotNotOptimized(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, SNAPSHOOTER_ROLE);
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .scheduleSnapshotNotOptimized(SNAPSHOT_TIME)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
})
it('reverts when trying to schedule a snapshot in the past', async function () {
const SNAPSHOT_TIME = this.currentTime - time.duration.seconds(60)
- await expect( this.cmtat.connect(this.admin).scheduleSnapshotNotOptimized(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotScheduledInThePast')
- .withArgs(SNAPSHOT_TIME, (await time.latest()) + time.duration.seconds(1))
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshotNotOptimized(SNAPSHOT_TIME)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotScheduledInThePast'
+ )
+ .withArgs(
+ SNAPSHOT_TIME,
+ (await time.latest()) + time.duration.seconds(1)
+ )
})
it('reverts when trying to schedule a snapshot with the same time twice', async function () {
const FIRST_SNAPSHOT = this.currentTime + time.duration.seconds(10)
const SECOND_SNAPSHOT = this.currentTime + time.duration.seconds(100)
// Arrange
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(FIRST_SNAPSHOT)
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(SECOND_SNAPSHOT)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(FIRST_SNAPSHOT)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SECOND_SNAPSHOT)
// Act
- await expect( this.cmtat.connect(this.admin).scheduleSnapshotNotOptimized(FIRST_SNAPSHOT))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotAlreadyExists')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshotNotOptimized(FIRST_SNAPSHOT)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotAlreadyExists'
+ )
// Assert
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(2)
diff --git a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonUnschedule.js b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonUnschedule.js
index c3400c4d..4f47f2f9 100644
--- a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonUnschedule.js
+++ b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonUnschedule.js
@@ -1,5 +1,5 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const { SNAPSHOOTER_ROLE } = require('../../utils')
const {
checkArraySnapshot
@@ -19,11 +19,15 @@ function ERC20SnapshotModuleCommonUnschedule () {
it('can remove a snapshot as admin', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_TIME)
let snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
expect(snapshots[0]).to.equal(SNAPSHOT_TIME)
- await this.cmtat.connect(this.admin).unscheduleSnapshotNotOptimized(SNAPSHOT_TIME)
+ await this.cmtat
+ .connect(this.admin)
+ .unscheduleSnapshotNotOptimized(SNAPSHOT_TIME)
snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(0)
})
@@ -35,7 +39,9 @@ function ERC20SnapshotModuleCommonUnschedule () {
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime5)
let snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(5)
- await this.cmtat.connect(this.admin).unscheduleSnapshotNotOptimized(this.snapshotTime3)
+ await this.cmtat
+ .connect(this.admin)
+ .unscheduleSnapshotNotOptimized(this.snapshotTime3)
snapshots = await this.cmtat.getNextSnapshots()
checkArraySnapshot(snapshots, [
this.snapshotTime1,
@@ -49,16 +55,26 @@ function ERC20SnapshotModuleCommonUnschedule () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
let snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(0)
- await expect(this.cmtat.connect(this.admin).unscheduleSnapshotNotOptimized(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotNotFound')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .unscheduleSnapshotNotOptimized(SNAPSHOT_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotNotFound'
+ )
snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(0)
})
it('testCannotUnscheduleASnapshotInThePast', async function () {
const SNAPSHOT_TIME = this.currentTime - time.duration.seconds(60)
- await expect(this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotAlreadyDone')
+ await expect(
+ this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotAlreadyDone'
+ )
})
it('can unschedule a snaphot in a random place', async function () {
@@ -68,7 +84,9 @@ function ERC20SnapshotModuleCommonUnschedule () {
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime3)
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime4)
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime5)
- await this.cmtat.connect(this.admin).scheduleSnapshotNotOptimized(RANDOM_SNAPSHOT)
+ await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshotNotOptimized(RANDOM_SNAPSHOT)
let snapshots = await this.cmtat.getNextSnapshots()
checkArraySnapshot(snapshots, [
this.snapshotTime1,
@@ -79,7 +97,9 @@ function ERC20SnapshotModuleCommonUnschedule () {
this.snapshotTime5
])
expect(snapshots.length).to.equal(6)
- await this.cmtat.connect(this.admin).unscheduleSnapshotNotOptimized(RANDOM_SNAPSHOT)
+ await this.cmtat
+ .connect(this.admin)
+ .unscheduleSnapshotNotOptimized(RANDOM_SNAPSHOT)
snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(5)
snapshots = await this.cmtat.getNextSnapshots()
@@ -100,7 +120,9 @@ function ERC20SnapshotModuleCommonUnschedule () {
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime5)
let snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(5)
- await this.cmtat.connect(this.admin).unscheduleSnapshotNotOptimized(this.snapshotTime2)
+ await this.cmtat
+ .connect(this.admin)
+ .unscheduleSnapshotNotOptimized(this.snapshotTime2)
snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(4)
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime6)
@@ -118,14 +140,23 @@ function ERC20SnapshotModuleCommonUnschedule () {
it('reverts when calling from non-admin', async function () {
// Arrange
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(60)
- this.logs = await this.cmtat.connect(this.admin).scheduleSnapshot(SNAPSHOT_TIME)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .scheduleSnapshot(SNAPSHOT_TIME)
let snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
expect(snapshots[0]).to.equal(SNAPSHOT_TIME)
// Act
- await expect( this.cmtat.connect(this.address1).unscheduleSnapshotNotOptimized(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .unscheduleSnapshotNotOptimized(SNAPSHOT_TIME)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
// Assert
snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(1)
@@ -140,41 +171,64 @@ function ERC20SnapshotModuleCommonUnschedule () {
})
it('can unschedule a snapshot with the snapshoter role and emits a SnapshotUnschedule event', async function () {
- this.logs = await this.cmtat.connect(this.admin).unscheduleLastSnapshot(this.snapshotTime)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .unscheduleLastSnapshot(this.snapshotTime)
await expect(this.logs)
- .to.emit(this.cmtat, "SnapshotUnschedule")
- .withArgs(this.snapshotTime);
+ .to.emit(this.cmtat, 'SnapshotUnschedule')
+ .withArgs(this.snapshotTime)
const snapshots = await this.cmtat.getNextSnapshots()
expect(snapshots.length).to.equal(0)
})
it('reverts when calling from non-admin', async function () {
- await expect( this.cmtat.connect(this.address1).unscheduleLastSnapshot(this.snapshotTime))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .unscheduleLastSnapshot(this.snapshotTime)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, SNAPSHOOTER_ROLE)
})
it('reverts if no snapshot is scheduled', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(90)
// Arrange
// Delete the only snapshot
- this.logs = await this.cmtat.connect(this.admin).unscheduleLastSnapshot(this.snapshotTime)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .unscheduleLastSnapshot(this.snapshotTime)
// Act
- await expect(this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_NoSnapshotScheduled')
+ await expect(
+ this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_NoSnapshotScheduled'
+ )
})
it('reverts when snapshot is not found', async function () {
const SNAPSHOT_TIME = this.currentTime + time.duration.seconds(90)
// Act
- await expect(this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotNotFound')
+ await expect(
+ this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotNotFound'
+ )
})
it('reverts when snapshot has been processed', async function () {
const SNAPSHOT_TIME = this.currentTime - time.duration.seconds(60)
- await expect(this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_SnapshotModule_SnapshotAlreadyDone')
+ await expect(
+ this.cmtat.connect(this.admin).unscheduleLastSnapshot(SNAPSHOT_TIME)
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_SnapshotModule_SnapshotAlreadyDone'
+ )
})
})
}
diff --git a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils.js b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils.js
index 273b60e3..54ad7e42 100644
--- a/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils.js
+++ b/test/common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils.js
@@ -1,4 +1,4 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const getUnixTimestamp = () => {
return Math.round(new Date().getTime() / 1000)
}
@@ -8,24 +8,24 @@ const timeout = function (ms) {
}
async function checkSnapshot (time, totalSupply, addressese, balances) {
-const addresses = [this.address1, this.address2, this.address3]
+ const addresses = [this.address1, this.address2, this.address3]
// Values before the snapshot
- expect(await this.cmtat.snapshotTotalSupply(time)).to.equal(
- totalSupply
+ expect(await this.cmtat.snapshotTotalSupply(time)).to.equal(totalSupply)
+ // const result = await this.cmtat.snapshotInfoBatch(time, addresses)
+ const result = await this.cmtat['snapshotInfoBatch(uint256,address[])'](
+ time,
+ addresses
)
- //const result = await this.cmtat.snapshotInfoBatch(time, addresses)
- const result = await this.cmtat[
- 'snapshotInfoBatch(uint256,address[])'
- ](time, addresses)
- /*methods*/
+ /* methods */
const times = [time]
- const result2 = await this.cmtat[
- 'snapshotInfoBatch(uint256[],address[])'
- ](times, addresses)
+ const result2 = await this.cmtat['snapshotInfoBatch(uint256[],address[])'](
+ times,
+ addresses
+ )
for (let i = 0; i < balances.length; ++i) {
- expect(
- await this.cmtat.snapshotBalanceOf(time, addresses[i])
- ).to.equal(balances[i])
+ expect(await this.cmtat.snapshotBalanceOf(time, addresses[i])).to.equal(
+ balances[i]
+ )
await this.cmtat.snapshotInfo(time, addresses[i])
const { 0: ownerBalance, 1: totalSupplyGet } =
await this.cmtat.snapshotInfo(time, addresses[i])
diff --git a/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleMultiplePlannedTest.js b/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleMultiplePlannedTest.js
index c59fbbad..2989346f 100644
--- a/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleMultiplePlannedTest.js
+++ b/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleMultiplePlannedTest.js
@@ -1,11 +1,10 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const {
checkSnapshot
} = require('../ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils')
-function ERC20SnapshotModuleMultiplePlannedTest (
-) {
+function ERC20SnapshotModuleMultiplePlannedTest () {
// With multiple planned snapshot
context('SnapshotMultiplePlannedTest', function () {
const ADDRESSES = [this.address1, this.address2, this.address3]
@@ -20,16 +19,22 @@ function ERC20SnapshotModuleMultiplePlannedTest (
const TRANSFER_AMOUNT_2 = 10n
const TRANSFER_AMOUNT_3 = 5n
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, ADDRESS1_INITIAL_MINT)
- await this.cmtat.connect(this.admin).mint(this.address2, ADDRESS2_INITIAL_MINT)
- await this.cmtat.connect(this.admin).mint(this.address3, ADDRESS3_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, ADDRESS1_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, ADDRESS2_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, ADDRESS3_INITIAL_MINT)
this.currentTime = await time.latest()
- this.snapshotTime1 = this.currentTime +
- time.duration.seconds(FIRST_SNAPSHOT_INTERVAL)
- this.snapshotTime2 = this.currentTime +
- time.duration.seconds(SECOND_SNAPSHOT_INTERVAL)
- this.snapshotTime3 = this.currentTime +
- time.duration.seconds(THIRD_SNAPSHOT_INTERVAL)
+ this.snapshotTime1 =
+ this.currentTime + time.duration.seconds(FIRST_SNAPSHOT_INTERVAL)
+ this.snapshotTime2 =
+ this.currentTime + time.duration.seconds(SECOND_SNAPSHOT_INTERVAL)
+ this.snapshotTime3 =
+ this.currentTime + time.duration.seconds(THIRD_SNAPSHOT_INTERVAL)
this.beforeSnapshotTime = this.currentTime - time.duration.seconds(60)
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime1)
await this.cmtat.connect(this.admin).scheduleSnapshot(this.snapshotTime2)
@@ -51,10 +56,12 @@ function ERC20SnapshotModuleMultiplePlannedTest (
// Act
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address1).transfer(this.address2, TRANSFER_AMOUNT_1, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, TRANSFER_AMOUNT_1, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Values before the snapshot
await checkSnapshot.call(
this,
@@ -91,8 +98,7 @@ function ERC20SnapshotModuleMultiplePlannedTest (
it('testCanTransferAfterSecondSnapshot', async function () {
// We jump into the future
- await time.increase(
- SECOND_SNAPSHOT_INTERVAL - FIRST_SNAPSHOT_INTERVAL)
+ await time.increase(SECOND_SNAPSHOT_INTERVAL - FIRST_SNAPSHOT_INTERVAL)
// Arrange - Assert
// No transfer performed since the minting
await checkSnapshot.call(
@@ -105,10 +111,12 @@ function ERC20SnapshotModuleMultiplePlannedTest (
// Act
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address1).transfer(this.address2, TRANSFER_AMOUNT_1, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, TRANSFER_AMOUNT_1, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Values before the snapshot
await checkSnapshot.call(
this,
@@ -166,10 +174,12 @@ function ERC20SnapshotModuleMultiplePlannedTest (
)
// Act
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address1).transfer(this.address2, TRANSFER_AMOUNT_1, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, TRANSFER_AMOUNT_1, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Values before the snapshot
await checkSnapshot.call(
this,
@@ -234,10 +244,12 @@ function ERC20SnapshotModuleMultiplePlannedTest (
// **********Act**************** */
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address1).transfer(this.address2, TRANSFER_AMOUNT_1, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, TRANSFER_AMOUNT_1, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Values before the snapshot
await checkSnapshot.call(
this,
@@ -293,18 +305,19 @@ function ERC20SnapshotModuleMultiplePlannedTest (
ADDRESS2_BALANCE_AFTER_TONE_TRANSFER,
ADDRESS3_INITIAL_MINT
]
- );
+ )
expect((await this.cmtat.getNextSnapshots()).length).to.equal(2)
// We jump into the future
- await time.increase(
- SECOND_SNAPSHOT_INTERVAL - FIRST_SNAPSHOT_INTERVAL)
+ await time.increase(SECOND_SNAPSHOT_INTERVAL - FIRST_SNAPSHOT_INTERVAL)
// **********Act**************** */
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address2).transfer(this.address1, TRANSFER_AMOUNT_2, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address2)
+ .transfer(this.address1, TRANSFER_AMOUNT_2, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Values before the snapshot
await checkSnapshot.call(
this,
@@ -348,7 +361,7 @@ function ERC20SnapshotModuleMultiplePlannedTest (
ADDRESS2_BALANCE_AFTER_TWO_TRANSFER,
ADDRESS3_INITIAL_MINT
]
- );
+ )
expect((await this.cmtat.getNextSnapshots()).length).to.equal(1)
// We jump into the future
await time.increase(THIRD_SNAPSHOT_INTERVAL - FIRST_SNAPSHOT_INTERVAL)
@@ -356,10 +369,12 @@ function ERC20SnapshotModuleMultiplePlannedTest (
// **********Act**************** */
// Act
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address1).transfer(this.address2, TRANSFER_AMOUNT_3, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, TRANSFER_AMOUNT_3, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Values before the snapshot
await checkSnapshot.call(
this,
@@ -415,7 +430,7 @@ function ERC20SnapshotModuleMultiplePlannedTest (
ADDRESS2_BALANCE_AFTER_THREE_TRANSFER,
ADDRESS3_INITIAL_MINT
]
- );
+ )
expect((await this.cmtat.getNextSnapshots()).length).to.equal(0)
})
})
diff --git a/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleOnePlannedSnapshotTest.js b/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleOnePlannedSnapshotTest.js
index 87412ab1..a450f066 100644
--- a/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleOnePlannedSnapshotTest.js
+++ b/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleOnePlannedSnapshotTest.js
@@ -1,12 +1,11 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const {
checkSnapshot
} = require('../ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils')
const reason = 'BURN_TEST'
-function ERC20SnapshotModuleOnePlannedSnapshotTest (
-) {
+function ERC20SnapshotModuleOnePlannedSnapshotTest () {
const ADDRESSES = [this.address1, this.address2, this.address3]
const ADDRESS1_INITIAL_MINT = '31'
const ADDRESS2_INITIAL_MINT = '32'
@@ -14,9 +13,15 @@ function ERC20SnapshotModuleOnePlannedSnapshotTest (
const TOTAL_SUPPLY_INITIAL_MINT = '96'
context('OnePlannedSnapshotTest', function () {
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, ADDRESS1_INITIAL_MINT)
- await this.cmtat.connect(this.admin).mint(this.address2, ADDRESS2_INITIAL_MINT)
- await this.cmtat.connect(this.admin).mint(this.address3, ADDRESS3_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, ADDRESS1_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, ADDRESS2_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, ADDRESS3_INITIAL_MINT)
this.currentTime = await time.latest()
this.snapshotTime = this.currentTime + time.duration.seconds(3)
this.beforeSnapshotTime = this.currentTime - time.duration.seconds(60)
@@ -37,10 +42,12 @@ function ERC20SnapshotModuleOnePlannedSnapshotTest (
);
// Act
// Gas and gasPrice are fixed arbitrarily
- ({ logs: this.logs } = await this.cmtat.connect(this.admin).mint(this.address1, MINT_AMOUNT, {
- gas: 5000000,
- gasPrice: 500000000
- }))
+ ({ logs: this.logs } = await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, MINT_AMOUNT, {
+ gas: 5000000,
+ gasPrice: 500000000
+ }))
// Assert
// Values before the snapshot
@@ -83,10 +90,12 @@ function ERC20SnapshotModuleOnePlannedSnapshotTest (
)
// Act
- await this.cmtat.connect(this.admin).burn(this.address1, BURN_AMOUNT, reason, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.admin)
+ .burn(this.address1, BURN_AMOUNT, reason, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Assert
// Values before the snapshot
@@ -130,10 +139,12 @@ function ERC20SnapshotModuleOnePlannedSnapshotTest (
// Act
// Gas and gasPrice are fixed arbitrarily
- await this.cmtat.connect(this.address1).transfer(this.address2, TRANSFER_AMOUNT, {
- gas: 5000000,
- gasPrice: 500000000
- })
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, TRANSFER_AMOUNT, {
+ gas: 5000000,
+ gasPrice: 500000000
+ })
// Assert
// Values before the snapshot
diff --git a/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleZeroPlannedSnapshot.js b/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleZeroPlannedSnapshot.js
index 3fb175bc..7db3afbc 100644
--- a/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleZeroPlannedSnapshot.js
+++ b/test/common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleZeroPlannedSnapshot.js
@@ -1,5 +1,5 @@
-const { time } = require ("@nomicfoundation/hardhat-network-helpers");
-const { expect } = require('chai');
+const { time } = require('@nomicfoundation/hardhat-network-helpers')
+const { expect } = require('chai')
const {
checkSnapshot
} = require('../ERC20SnapshotModuleUtils/ERC20SnapshotModuleUtils')
@@ -12,9 +12,15 @@ function ERC20SnapshotModuleCommonGlobal () {
const ADDRESS3_INITIAL_MINT = '33'
const TOTAL_SUPPLY_INITIAL_MINT = '96'
beforeEach(async function () {
- await this.cmtat.connect(this.admin).mint(this.address1, ADDRESS1_INITIAL_MINT)
- await this.cmtat.connect(this.admin).mint(this.address2, ADDRESS2_INITIAL_MINT)
- await this.cmtat.connect(this.admin).mint(this.address3, ADDRESS3_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, ADDRESS1_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, ADDRESS2_INITIAL_MINT)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, ADDRESS3_INITIAL_MINT)
})
context('Before any snapshot', function () {
diff --git a/test/common/EnforcementModuleCommon.js b/test/common/EnforcementModuleCommon.js
index 8ba58094..5dd22081 100644
--- a/test/common/EnforcementModuleCommon.js
+++ b/test/common/EnforcementModuleCommon.js
@@ -1,5 +1,5 @@
const { ENFORCER_ROLE } = require('../utils')
-const { expect } = require('chai');
+const { expect } = require('chai')
const reasonFreeze = 'testFreeze'
const reasonUnfreeze = 'testUnfreeze'
@@ -13,94 +13,103 @@ function EnforcementModuleCommon () {
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
// Act
- this.logs = await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .freeze(this.address1, reasonFreeze)
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
// emits a Freeze event
- await expect(this.logs).to.emit(this.cmtat, 'Freeze').withArgs(
- this.admin,
- this.address1,
- reasonFreeze,
- reasonFreeze);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Freeze')
+ .withArgs(this.admin, this.address1, reasonFreeze, reasonFreeze)
})
it('testReasonParameterCanBeEmptyString', async function () {
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
// Act
- this.logs = await this.cmtat.connect(this.admin).freeze(this.address1, '');
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .freeze(this.address1, '')
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
// emits a Freeze event
- await expect(this.logs).to.emit(this.cmtat, 'Freeze').withArgs(
- this.admin,
- this.address1,
- '',
- '');
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Freeze')
+ .withArgs(this.admin, this.address1, '', '')
})
it('testEnforcerRoleCanFreezeAddress', async function () {
// Arrange
- await this.cmtat.connect(this.admin).grantRole(ENFORCER_ROLE, this.address2);
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(ENFORCER_ROLE, this.address2)
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
// Act
- this.logs = await this.cmtat.connect(this.address2).freeze(this.address1, reasonFreeze);
+ this.logs = await this.cmtat
+ .connect(this.address2)
+ .freeze(this.address1, reasonFreeze)
// Act + Assert
// Act + Assert
expect(
await this.cmtat.validateTransfer(this.address1, this.address2, 10)
- ).to.equal(false);
+ ).to.equal(false)
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
// emits a Freeze event
- await expect(this.logs).to.emit(this.cmtat, 'Freeze').withArgs(
- this.address2,
- this.address1,
- reasonFreeze,
- reasonFreeze);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Freeze')
+ .withArgs(this.address2, this.address1, reasonFreeze, reasonFreeze)
})
it('testAdminCanUnfreezeAddress', async function () {
// Arrange
- await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze);
+ await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
// Act
- this.logs = await this.cmtat.connect(this.admin).unfreeze(this.address1, reasonUnfreeze);
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .unfreeze(this.address1, reasonUnfreeze)
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
- await expect(this.logs).to.emit(this.cmtat, 'Unfreeze').withArgs(
- this.admin,
- this.address1,
- reasonUnfreeze,
- reasonUnfreeze);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Unfreeze')
+ .withArgs(this.admin, this.address1, reasonUnfreeze, reasonUnfreeze)
})
it('testEnforcerRoleCanUnfreezeAddress', async function () {
// Arrange
await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
- await this.cmtat.connect(this.admin).grantRole(ENFORCER_ROLE, this.address2);
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(ENFORCER_ROLE, this.address2)
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
// Act
- this.logs = await this.cmtat.connect(this.address2).unfreeze(this.address1, reasonUnfreeze);
+ this.logs = await this.cmtat
+ .connect(this.address2)
+ .unfreeze(this.address1, reasonUnfreeze)
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
// emits an Unfreeze event
- await expect(this.logs).to.emit(this.cmtat, 'Unfreeze').withArgs(
- this.address2,
- this.address1,
- reasonUnfreeze,
- reasonUnfreeze);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Unfreeze')
+ .withArgs(this.address2, this.address1, reasonUnfreeze, reasonUnfreeze)
})
it('testCannotNonEnforcerFreezeAddress', async function () {
// Act
- await expect( this.cmtat.connect(this.address2).freeze(this.address1, reasonFreeze))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, ENFORCER_ROLE);
+ await expect(
+ this.cmtat.connect(this.address2).freeze(this.address1, reasonFreeze)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, ENFORCER_ROLE)
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
})
@@ -109,9 +118,14 @@ function EnforcementModuleCommon () {
// Arrange
await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
// Act
- await expect( this.cmtat.connect(this.address2).unfreeze(this.address1, reasonFreeze))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address2.address, ENFORCER_ROLE);
+ await expect(
+ this.cmtat.connect(this.address2).unfreeze(this.address1, reasonFreeze)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address2.address, ENFORCER_ROLE)
// Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
})
@@ -119,18 +133,30 @@ function EnforcementModuleCommon () {
// reverts if address1 transfers tokens to address2 when paused
it('testCannotTransferWhenFromIsFrozenWithTransfer', async function () {
// Act
- await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze);
+ await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
// Assert
expect(
- await this.cmtat.detectTransferRestriction(this.address1, this.address2, 10)
- ).to.equal('2');
+ await this.cmtat.detectTransferRestriction(
+ this.address1,
+ this.address2,
+ 10
+ )
+ ).to.equal('2')
expect(await this.cmtat.messageForTransferRestriction(2)).to.equal(
'Address FROM is frozen'
)
const AMOUNT_TO_TRANSFER = 10
- await expect( this.cmtat.connect(this.address1).transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER);
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
})
// reverts if address3 transfers tokens from address1 to this.address2 when paused
@@ -139,19 +165,31 @@ function EnforcementModuleCommon () {
// Define allowance
await this.cmtat.connect(this.address3).approve(this.address1, 20)
// Act
- await this.cmtat.connect(this.admin).freeze(this.address2, reasonFreeze);
+ await this.cmtat.connect(this.admin).freeze(this.address2, reasonFreeze)
// Assert
expect(
- await this.cmtat.detectTransferRestriction(this.address1, this.address2, 10)
- ).to.equal('3');
+ await this.cmtat.detectTransferRestriction(
+ this.address1,
+ this.address2,
+ 10
+ )
+ ).to.equal('3')
expect(await this.cmtat.messageForTransferRestriction(3)).to.equal(
'Address TO is frozen'
)
const AMOUNT_TO_TRANSFER = 10
- await expect( this.cmtat.connect(this.address1).transferFrom(this.address3, this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address3.address, this.address2.address, AMOUNT_TO_TRANSFER)
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transferFrom(this.address3, this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address3.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
})
// Improvement: check the return value but it is not possible to get the return value of a state modifying function
@@ -159,11 +197,13 @@ function EnforcementModuleCommon () {
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
// Arrange
- await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze);
+ await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
// Act
- this.logs = await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .freeze(this.address1, reasonFreeze)
// Assert
await expect(this.logs).to.not.emit(this.cmtat, 'Freeze')
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
@@ -172,13 +212,17 @@ function EnforcementModuleCommon () {
// Improvement: check the return value but it is not possible to get the return value of a state modifying function
it('testUnfreezeDoesNotEmitEventIfAddressAlreadyUnfrozen', async function () {
// Arrange
- await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze);
+ await this.cmtat.connect(this.admin).freeze(this.address1, reasonFreeze)
// Arrange - Assert
expect(await this.cmtat.frozen(this.address1)).to.equal(true)
- await this.cmtat.connect(this.admin).unfreeze(this.address1, reasonFreeze)
+ await this.cmtat
+ .connect(this.admin)
+ .unfreeze(this.address1, reasonFreeze)
// Act
- this.logs = await this.cmtat.connect(this.admin).unfreeze(this.address1, reasonUnfreeze)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .unfreeze(this.address1, reasonUnfreeze)
// Assert
await expect(this.logs).to.not.emit(this.cmtat, 'Unfreeze')
expect(await this.cmtat.frozen(this.address1)).to.equal(false)
diff --git a/test/common/MetaTxModuleCommon.js b/test/common/MetaTxModuleCommon.js
index 5ab814b6..4a5e8638 100644
--- a/test/common/MetaTxModuleCommon.js
+++ b/test/common/MetaTxModuleCommon.js
@@ -1,10 +1,10 @@
-const helpers = require('@nomicfoundation/hardhat-network-helpers');
+const helpers = require('@nomicfoundation/hardhat-network-helpers')
const {
getDomain,
- ForwardRequest,
+ ForwardRequest
} = require('../../openzeppelin-contracts-upgradeable/test/helpers/eip712')
const { expect } = require('chai')
-const { waffle} = require("hardhat");
+const { waffle } = require('hardhat')
function MetaTxModuleCommon () {
context('Transferring without paying gas', function () {
const AMOUNT_TO_TRANSFER = 11n
@@ -25,50 +25,57 @@ function MetaTxModuleCommon () {
{ name: 'data', type: 'bytes' }
]
}
- await this.cmtat.connect(this.admin).mint(this.address1, ADDRESS1_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address2, ADDRESS2_INITIAL_BALANCE);
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, ADDRESS1_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, ADDRESS2_INITIAL_BALANCE)
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
ADDRESS1_INITIAL_BALANCE
)
- this.data = this.cmtat.interface.encodeFunctionData('transfer',[this.address2.address, AMOUNT_TO_TRANSFER])
+ this.data = this.cmtat.interface.encodeFunctionData('transfer', [
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ ])
this.forgeRequest = async (override = {}, signer = this.address1) => {
const req = {
from: await signer.getAddress(),
to: this.cmtat.target,
value: 0n,
- data: this.data,
+ data: this.data,
gas: 100000n,
deadline: (await helpers.time.latest()) + 60,
nonce: await this.forwarder.nonces(this.address1),
- ...override,
- };
- req.signature = await signer.signTypedData(this.domain, this.types, req);
- return req;
- };
+ ...override
+ }
+ req.signature = await signer.signTypedData(
+ this.domain,
+ this.types,
+ req
+ )
+ return req
+ }
})
it('returns true without altering the nonce', async function () {
- const request = await this.forgeRequest();
- expect(
- await this.forwarder.nonces(request.from)
- ).to.equal(request.nonce)
+ const request = await this.forgeRequest()
+ expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce)
expect(await this.forwarder.verify(request)).to.be.equal(true)
- expect(
- await this.forwarder.nonces(request.from)
- ).to.equal(request.nonce)
+ expect(await this.forwarder.nonces(request.from)).to.equal(request.nonce)
})
it('can send a transfer transaction without paying gas', async function () {
- const provider = await ethers.getDefaultProvider();;
- const balanceEtherBefore = await provider.getBalance(this.address1);
+ const provider = await ethers.getDefaultProvider()
+ const balanceEtherBefore = await provider.getBalance(this.address1)
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
ADDRESS1_INITIAL_BALANCE
)
- const request = await this.forgeRequest();
- await this.forwarder.connect(this.address3).execute(request);
+ const request = await this.forgeRequest()
+ await this.forwarder.connect(this.address3).execute(request)
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
ADDRESS1_INITIAL_BALANCE - AMOUNT_TO_TRANSFER
- );
+ )
expect(await this.cmtat.balanceOf(this.address2)).to.equal(
ADDRESS2_INITIAL_BALANCE + AMOUNT_TO_TRANSFER
)
diff --git a/test/common/PauseModuleCommon.js b/test/common/PauseModuleCommon.js
index a3794557..337e5901 100644
--- a/test/common/PauseModuleCommon.js
+++ b/test/common/PauseModuleCommon.js
@@ -1,104 +1,128 @@
-const { PAUSER_ROLE, DEFAULT_ADMIN_ROLE } = require("../utils");
-const { expect } = require('chai');
-function PauseModuleCommon() {
- context("Pause", function () {
+const { PAUSER_ROLE, DEFAULT_ADMIN_ROLE } = require('../utils')
+const { expect } = require('chai')
+function PauseModuleCommon () {
+ context('Pause', function () {
/**
The admin is assigned the PAUSER role when the contract is deployed
*/
- it("testCanBePausedByAdmin", async function () {
- const AMOUNT_TO_TRANSFER = 10n;
+ it('testCanBePausedByAdmin', async function () {
+ const AMOUNT_TO_TRANSFER = 10n
// Act
- this.logs = await this.cmtat.connect(this.admin).pause();
+ this.logs = await this.cmtat.connect(this.admin).pause()
// Assert
- expect(await this.cmtat.paused()).to.equal(true);
+ expect(await this.cmtat.paused()).to.equal(true)
// emits a Paused event
await expect(this.logs)
- .to.emit(this.cmtat, "Paused")
- .withArgs(this.admin);
+ .to.emit(this.cmtat, 'Paused')
+ .withArgs(this.admin)
// Transfer is reverted
- await expect( this.cmtat
- .connect(this.address1)
- .transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER);
- });
-
- it("testCanBePausedByPauserRole", async function () {
- const AMOUNT_TO_TRANSFER = 10n;
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
+ })
+
+ it('testCanBePausedByPauserRole', async function () {
+ const AMOUNT_TO_TRANSFER = 10n
// Arrange
await this.cmtat
.connect(this.admin)
- .grantRole(PAUSER_ROLE, this.address1);
+ .grantRole(PAUSER_ROLE, this.address1)
// Act
- this.logs = await this.cmtat.connect(this.address1).pause();
+ this.logs = await this.cmtat.connect(this.address1).pause()
// Assert
- expect(await this.cmtat.paused()).to.equal(true);
+ expect(await this.cmtat.paused()).to.equal(true)
// emits a Paused event
await expect(this.logs)
- .to.emit(this.cmtat, "Paused")
- .withArgs(this.address1);
+ .to.emit(this.cmtat, 'Paused')
+ .withArgs(this.address1)
// Transfer is reverted
- await expect( this.cmtat.connect(this.address1).transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER);
- });
-
- it("testCannotBePausedByNonPauser", async function () {
- await expect( this.cmtat.connect(this.address1).pause())
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, PAUSER_ROLE);
- });
-
- it("testCanBeUnpausedByAdmin", async function () {
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
+ })
+
+ it('testCannotBePausedByNonPauser', async function () {
+ await expect(this.cmtat.connect(this.address1).pause())
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, PAUSER_ROLE)
+ })
+
+ it('testCanBeUnpausedByAdmin', async function () {
// Arrange
- await this.cmtat.connect(this.admin).pause();
+ await this.cmtat.connect(this.admin).pause()
// Act
- this.logs = await this.cmtat.connect(this.admin).unpause();
+ this.logs = await this.cmtat.connect(this.admin).unpause()
// Assert
- expect(await this.cmtat.paused()).to.equal(false);
+ expect(await this.cmtat.paused()).to.equal(false)
// emits a Unpaused event
await expect(this.logs)
- .to.emit(this.cmtat, "Unpaused")
- .withArgs(this.admin);
+ .to.emit(this.cmtat, 'Unpaused')
+ .withArgs(this.admin)
// Transfer works
- this.cmtat.connect(this.address1).transfer(this.address2, 10n);
- });
+ this.cmtat.connect(this.address1).transfer(this.address2, 10n)
+ })
- it("testCanBeUnpausedByANewPauser", async function () {
+ it('testCanBeUnpausedByANewPauser', async function () {
// Arrange
- await this.cmtat.connect(this.admin).pause();
- await this.cmtat.connect(this.admin).grantRole(PAUSER_ROLE, this.address1);
+ await this.cmtat.connect(this.admin).pause()
+ await this.cmtat
+ .connect(this.admin)
+ .grantRole(PAUSER_ROLE, this.address1)
// Act
- this.logs = await this.cmtat.connect(this.address1).unpause();
+ this.logs = await this.cmtat.connect(this.address1).unpause()
// Assert
- expect(await this.cmtat.paused()).to.equal(false);
+ expect(await this.cmtat.paused()).to.equal(false)
// emits a Unpaused event
- await expect(this.logs).to.emit(this.cmtat, "Unpaused").withArgs( this.address1);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Unpaused')
+ .withArgs(this.address1)
// Transfer works
- this.cmtat.connect(this.address1).transfer(this.address2, 10n);
- });
+ this.cmtat.connect(this.address1).transfer(this.address2, 10n)
+ })
- it("testCannotBeUnpausedByNonPauser", async function () {
+ it('testCannotBeUnpausedByNonPauser', async function () {
// Arrange
- await this.cmtat.connect(this.admin).pause();
+ await this.cmtat.connect(this.admin).pause()
// Act
- await expect( this.cmtat.connect(this.address1).unpause())
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, PAUSER_ROLE);
- });
+ await expect(this.cmtat.connect(this.address1).unpause())
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, PAUSER_ROLE)
+ })
// reverts if address1 transfers tokens to address2 when paused
- it("testCannotTransferTokenWhenPausedWithTransfer", async function () {
- const AMOUNT_TO_TRANSFER = 10n;
+ it('testCannotTransferTokenWhenPausedWithTransfer', async function () {
+ const AMOUNT_TO_TRANSFER = 10n
// Act
- await this.cmtat.connect(this.admin).pause();
+ await this.cmtat.connect(this.admin).pause()
// Act + Assert
expect(
await this.cmtat.validateTransfer(
@@ -106,7 +130,7 @@ function PauseModuleCommon() {
this.address2,
AMOUNT_TO_TRANSFER
)
- ).to.equal(false);
+ ).to.equal(false)
// Assert
expect(
await this.cmtat.detectTransferRestriction(
@@ -114,26 +138,32 @@ function PauseModuleCommon() {
this.address2,
AMOUNT_TO_TRANSFER
)
- ).to.equal("1");
+ ).to.equal('1')
expect(await this.cmtat.messageForTransferRestriction(1)).to.equal(
- "All transfers paused"
- );
- await expect( this.cmtat
- .connect(this.address1)
- .transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER);
- });
+ 'All transfers paused'
+ )
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
+ })
// reverts if address3 transfers tokens from address1 to address2 when paused
- it("testCannotTransferTokenWhenPausedWithTransferFrom", async function () {
- const AMOUNT_TO_TRANSFER = 10n;
+ it('testCannotTransferTokenWhenPausedWithTransferFrom', async function () {
+ const AMOUNT_TO_TRANSFER = 10n
// Arrange
// Define allowance
- await this.cmtat.connect(this.address1).approve(this.address3, 20);
+ await this.cmtat.connect(this.address1).approve(this.address3, 20)
// Act
- await this.cmtat.connect(this.admin).pause();
+ await this.cmtat.connect(this.admin).pause()
// Assert
expect(
@@ -142,51 +172,74 @@ function PauseModuleCommon() {
this.address2,
AMOUNT_TO_TRANSFER
)
- ).to.equal("1");
+ ).to.equal('1')
expect(await this.cmtat.messageForTransferRestriction(1)).to.equal(
- "All transfers paused"
- );
- await expect( this.cmtat
- .connect(this.address3)
- .transferFrom(this.address1, this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER);
- });
- });
-
- context("DeactivateContract", function () {
+ 'All transfers paused'
+ )
+ await expect(
+ this.cmtat
+ .connect(this.address3)
+ .transferFrom(this.address1, this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
+ })
+ })
+
+ context('DeactivateContract', function () {
/**
The admin is assigned the PAUSER role when the contract is deployed
*/
- it("testCanDeactivatedByAdmin", async function () {
- const AMOUNT_TO_TRANSFER = 10n;
+ it('testCanDeactivatedByAdmin', async function () {
+ const AMOUNT_TO_TRANSFER = 10n
// Act
- this.logs = await this.cmtat.connect(this.admin).deactivateContract();
+ this.logs = await this.cmtat.connect(this.admin).deactivateContract()
// Assert
- expect(await this.cmtat.deactivated()).to.equal(true);
+ expect(await this.cmtat.deactivated()).to.equal(true)
// Contract is in pause state
- expect(await this.cmtat.paused()).to.equal(true);
+ expect(await this.cmtat.paused()).to.equal(true)
// emits a Deactivated event
- await expect(this.logs).to.emit(this.cmtat, 'Deactivated').withArgs(this.admin);
+ await expect(this.logs)
+ .to.emit(this.cmtat, 'Deactivated')
+ .withArgs(this.admin)
// Transfer is reverted because contract is in paused state
- await expect(this.cmtat.connect(this.address1).transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER);
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
// Unpause is reverted
- await expect( this.cmtat.connect(this.admin).unpause())
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_PauseModule_ContractIsDeactivated')
- });
-
- it("testCannotBeDeactivatedByNonAdmin", async function () {
+ await expect(
+ this.cmtat.connect(this.admin).unpause()
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_PauseModule_ContractIsDeactivated'
+ )
+ })
+
+ it('testCannotBeDeactivatedByNonAdmin', async function () {
// Act
- await expect( this.cmtat.connect(this.address1).deactivateContract())
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE);
+ await expect(this.cmtat.connect(this.address1).deactivateContract())
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
// Assert
- expect(await this.cmtat.deactivated()).to.equal(false);
- });
- });
+ expect(await this.cmtat.deactivated()).to.equal(false)
+ })
+ })
}
-module.exports = PauseModuleCommon;
+module.exports = PauseModuleCommon
diff --git a/test/common/ValidationModule/ValidationModuleCommon.js b/test/common/ValidationModule/ValidationModuleCommon.js
index 26493f0e..8ec9f09e 100644
--- a/test/common/ValidationModule/ValidationModuleCommon.js
+++ b/test/common/ValidationModule/ValidationModuleCommon.js
@@ -1,4 +1,4 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { RULE_MOCK_AMOUNT_MAX, ZERO_ADDRESS } = require('../../utils')
function ValidationModuleCommon () {
@@ -6,20 +6,24 @@ function ValidationModuleCommon () {
context('RuleEngineTransferTest', function () {
beforeEach(async function () {
if ((await this.cmtat.ruleEngine()) === ZERO_ADDRESS) {
- this.ruleEngineMock = await ethers.deployContract("RuleEngineMock")
- await this.cmtat.connect(this.admin).setRuleEngine(this.ruleEngineMock.target)
+ this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
+ await this.cmtat
+ .connect(this.admin)
+ .setRuleEngine(this.ruleEngineMock.target)
}
})
- it("testCanReturnTheRightAddressIfSet", async function (){
- if(this.definedAtDeployment){
- expect(this.ruleEngineMock.target).to.equal(await this.cmtat.ruleEngine());
+ it('testCanReturnTheRightAddressIfSet', async function () {
+ if (this.definedAtDeployment) {
+ expect(this.ruleEngineMock.target).to.equal(
+ await this.cmtat.ruleEngine()
+ )
}
- });
+ })
it('testCanValidateTransferWithoutRuleEngine', async function () {
- // Arrange
- await this.cmtat.connect(this.admin).setRuleEngine(ZERO_ADDRESS);
+ // Arrange
+ await this.cmtat.connect(this.admin).setRuleEngine(ZERO_ADDRESS)
// Act + Assert
- expect(
+ expect(
await this.cmtat.validateTransfer(this.address1, this.address2, 10)
).to.equal(true)
})
@@ -27,8 +31,12 @@ function ValidationModuleCommon () {
it('testCanDetectTransferRestrictionValidTransfer', async function () {
// Act + Assert
expect(
- await this.cmtat.detectTransferRestriction(this.address1, this.address2, 11)
- ).to.equal(0);
+ await this.cmtat.detectTransferRestriction(
+ this.address1,
+ this.address2,
+ 11
+ )
+ ).to.equal(0)
expect(
await this.cmtat.validateTransfer(this.address1, this.address2, 11)
).to.equal(true)
@@ -49,7 +57,7 @@ function ValidationModuleCommon () {
this.address2,
RULE_MOCK_AMOUNT_MAX + 1
)
- ).to.equal(10n);
+ ).to.equal(10n)
expect(
await this.cmtat.validateTransfer(
@@ -76,7 +84,7 @@ function ValidationModuleCommon () {
// this.address1 may transfer tokens to this.address2
it('testCanTransferAllowedByRule', async function () {
- const AMOUNT_TO_TRANSFER = 11n;
+ const AMOUNT_TO_TRANSFER = 11n
// Act
expect(
await this.cmtat.validateTransfer(
@@ -86,14 +94,16 @@ function ValidationModuleCommon () {
)
).to.equal(true)
// Act
- await this.cmtat.connect(this.address1).transfer(this.address2, AMOUNT_TO_TRANSFER);
+ await this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
// Assert
expect(await this.cmtat.balanceOf(this.address1)).to.equal(
this.ADDRESS1_INITIAL_BALANCE - AMOUNT_TO_TRANSFER
- );
+ )
expect(await this.cmtat.balanceOf(this.address2)).to.equal(
this.ADDRESS2_INITIAL_BALANCE + AMOUNT_TO_TRANSFER
- );
+ )
expect(await this.cmtat.balanceOf(this.address3)).to.equal(
this.ADDRESS3_INITIAL_BALANCE
)
@@ -101,7 +111,7 @@ function ValidationModuleCommon () {
// reverts if this.address1 transfers more tokens than rule allows
it('testCannotTransferIfNotAllowedByRule', async function () {
- const AMOUNT_TO_TRANSFER = RULE_MOCK_AMOUNT_MAX + 1;
+ const AMOUNT_TO_TRANSFER = RULE_MOCK_AMOUNT_MAX + 1
// Act
expect(
await this.cmtat.validateTransfer(
@@ -111,9 +121,17 @@ function ValidationModuleCommon () {
)
).to.equal(false)
// Act
- await expect(this.cmtat.connect(this.address1).transfer(this.address2, AMOUNT_TO_TRANSFER))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
- .withArgs(this.address1.address, this.address2.address, AMOUNT_TO_TRANSFER)
+ await expect(
+ this.cmtat
+ .connect(this.address1)
+ .transfer(this.address2, AMOUNT_TO_TRANSFER)
+ )
+ .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_InvalidTransfer')
+ .withArgs(
+ this.address1.address,
+ this.address2.address,
+ AMOUNT_TO_TRANSFER
+ )
})
})
}
diff --git a/test/common/ValidationModule/ValidationModuleSetRuleEngineCommon.js b/test/common/ValidationModule/ValidationModuleSetRuleEngineCommon.js
index 33209258..6d9b15ad 100644
--- a/test/common/ValidationModule/ValidationModuleSetRuleEngineCommon.js
+++ b/test/common/ValidationModule/ValidationModuleSetRuleEngineCommon.js
@@ -1,29 +1,42 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { DEFAULT_ADMIN_ROLE } = require('../../utils')
function ValidationModuleSetRuleEngineCommon () {
context('RuleEngineSetTest', function () {
it('testCanBeSetByAdmin', async function () {
// Act
- this.logs = await this.cmtat.connect(this.admin).setRuleEngine(this.ruleEngine)
+ this.logs = await this.cmtat
+ .connect(this.admin)
+ .setRuleEngine(this.ruleEngine)
// Assert
// emits a RuleEngineSet event
await expect(this.logs)
- .to.emit(this.cmtat, "RuleEngine")
- .withArgs(this.ruleEngine);
+ .to.emit(this.cmtat, 'RuleEngine')
+ .withArgs(this.ruleEngine)
})
it('testCanNotBeSetByAdminWithTheSameValue', async function () {
// Act
- await expect(this.cmtat.connect(this.admin).setRuleEngine(await this.cmtat.ruleEngine()))
- .to.be.revertedWithCustomError(this.cmtat, 'CMTAT_ValidationModule_SameValue')
+ await expect(
+ this.cmtat
+ .connect(this.admin)
+ .setRuleEngine(await this.cmtat.ruleEngine())
+ ).to.be.revertedWithCustomError(
+ this.cmtat,
+ 'CMTAT_ValidationModule_SameValue'
+ )
})
it('testCannotBeSetByNonAdmin', async function () {
// Act
- await expect( this.cmtat.connect(this.address1).setRuleEngine(this.ruleEngine))
- .to.be.revertedWithCustomError(this.cmtat, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE);
+ await expect(
+ this.cmtat.connect(this.address1).setRuleEngine(this.ruleEngine)
+ )
+ .to.be.revertedWithCustomError(
+ this.cmtat,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, DEFAULT_ADMIN_ROLE)
})
it('testCanReturnMessageWithNoRuleEngine&UnknownRestrictionCode', async function () {
@@ -36,7 +49,11 @@ function ValidationModuleSetRuleEngineCommon () {
it('testCanDetectTransferRestrictionValidTransferWithoutRuleEngine', async function () {
// Act + Assert
expect(
- await this.cmtat.detectTransferRestriction(this.address1, this.admin, 11)
+ await this.cmtat.detectTransferRestriction(
+ this.address1,
+ this.admin,
+ 11
+ )
).to.equal('0')
})
})
diff --git a/test/deployment/deployment.test.js b/test/deployment/deployment.test.js
index 4ef95764..9c387620 100644
--- a/test/deployment/deployment.test.js
+++ b/test/deployment/deployment.test.js
@@ -1,47 +1,62 @@
const { ZERO_ADDRESS } = require('../utils')
-const { expect } = require('chai');
+const { expect } = require('chai')
const {
deployCMTATProxyWithParameter,
deployCMTATStandaloneWithParameter,
deployCMTATProxy,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../deploymentUtils')
describe('CMTAT - Deployment', function () {
beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtatCustomError = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtatCustomError = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
})
it('testCannotDeployProxyWithAdminSetToAddressZero', async function () {
const DECIMAL = 0
// Act + Assert
- await expect( deployCMTATProxyWithParameter(
- this.deployerAddress.address,
- this._.address,
- ZERO_ADDRESS,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]))
- .to.be.revertedWithCustomError( this.cmtatCustomError, 'CMTAT_AuthorizationModule_AddressZeroNotAllowed')
+ await expect(
+ deployCMTATProxyWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ ZERO_ADDRESS,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ ).to.be.revertedWithCustomError(
+ this.cmtatCustomError,
+ 'CMTAT_AuthorizationModule_AddressZeroNotAllowed'
+ )
})
it('testCannotDeployStandaloneWithAdminSetToAddressZero', async function () {
const DECIMAL = 0
// Act + Assert
- await expect( deployCMTATStandaloneWithParameter(
- this.deployerAddress.address,
- this._.address,
- ZERO_ADDRESS,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]))
- .to.be.revertedWithCustomError( this.cmtatCustomError, 'CMTAT_AuthorizationModule_AddressZeroNotAllowed')
+ await expect(
+ deployCMTATStandaloneWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ ZERO_ADDRESS,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ ).to.be.revertedWithCustomError(
+ this.cmtatCustomError,
+ 'CMTAT_AuthorizationModule_AddressZeroNotAllowed'
+ )
})
})
diff --git a/test/deploymentUtils.js b/test/deploymentUtils.js
index a5e31992..0bfc3c15 100644
--- a/test/deploymentUtils.js
+++ b/test/deploymentUtils.js
@@ -1,18 +1,39 @@
-const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
+const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers')
const { ZERO_ADDRESS } = require('./utils')
const { ethers, upgrades } = require('hardhat')
const DEPLOYMENT_DECIMAL = 0n
-async function fixture() {
- const [_, admin, address1, address2, address3, deployerAddress, fakeRuleEngine, ruleEngine, attacker] = await ethers.getSigners()
- return {_, admin, address1, address2, address3, deployerAddress, fakeRuleEngine, ruleEngine, attacker };
+async function fixture () {
+ const [
+ _,
+ admin,
+ address1,
+ address2,
+ address3,
+ deployerAddress,
+ fakeRuleEngine,
+ ruleEngine,
+ attacker
+ ] = await ethers.getSigners()
+ return {
+ _,
+ admin,
+ address1,
+ address2,
+ address3,
+ deployerAddress,
+ fakeRuleEngine,
+ ruleEngine,
+ attacker
+ }
}
async function deployCMTATStandalone (_, admin, deployerAddress) {
-
- const cmtat = await ethers.deployContract("CMTAT_STANDALONE", [ _,
+ const cmtat = await ethers.deployContract('CMTAT_STANDALONE', [
+ _,
admin,
- ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]]);
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ ])
return cmtat
}
@@ -20,7 +41,9 @@ async function deployCMTATProxyImplementation (
deployerAddress,
forwarderIrrevocable
) {
- const cmtat = await ethers.deployContract('CMTAT_PROXY',[forwarderIrrevocable])
+ const cmtat = await ethers.deployContract('CMTAT_PROXY', [
+ forwarderIrrevocable
+ ])
return cmtat
}
@@ -28,7 +51,9 @@ async function deployCMTATProxyUUPSImplementation (
deployerAddress,
forwarderIrrevocable
) {
- const cmtat = await ethers.deployContract('CMTAT_PROXY_UUPS',[forwarderIrrevocable])
+ const cmtat = await ethers.deployContract('CMTAT_PROXY_UUPS', [
+ forwarderIrrevocable
+ ])
return cmtat
}
@@ -44,11 +69,11 @@ async function deployCMTATStandaloneWithParameter (
information_,
engines
) {
- const cmtat = await ethers.deployContract('CMTAT_STANDALONE',[
+ const cmtat = await ethers.deployContract('CMTAT_STANDALONE', [
forwarderIrrevocable,
admin,
- [ nameIrrevocable, symbolIrrevocable, decimalsIrrevocable],
- [tokenId_, terms_, information_],
+ [nameIrrevocable, symbolIrrevocable, decimalsIrrevocable],
+ [tokenId_, terms_, information_],
engines
])
return cmtat
@@ -63,8 +88,8 @@ async function deployCMTATProxy (_, admin, deployerAddress) {
ETHERS_CMTAT_PROXY_FACTORY,
[
admin,
- ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
[ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
],
{
@@ -96,8 +121,8 @@ async function deployCMTATProxyWithParameter (
ETHERS_CMTAT_PROXY_FACTORY,
[
admin,
- [ nameIrrevocable, symbolIrrevocable, decimalsIrrevocable],
- [tokenId_, terms_, information_],
+ [nameIrrevocable, symbolIrrevocable, decimalsIrrevocable],
+ [tokenId_, terms_, information_],
engines
],
{
@@ -106,7 +131,7 @@ async function deployCMTATProxyWithParameter (
from: deployerAddress
}
)
- //return ETHERS_CMTAT_PROXY.getAddress()
+ // return ETHERS_CMTAT_PROXY.getAddress()
return ETHERS_CMTAT_PROXY
}
diff --git a/test/proxy/general/Proxy.test.js b/test/proxy/general/Proxy.test.js
index 7d956442..7dd4241d 100644
--- a/test/proxy/general/Proxy.test.js
+++ b/test/proxy/general/Proxy.test.js
@@ -1,48 +1,54 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { DEFAULT_ADMIN_ROLE, PAUSER_ROLE } = require('../../utils')
const { ZERO_ADDRESS } = require('../../utils')
-const { deployCMTATProxy,
+const {
+ deployCMTATProxy,
fixture,
loadFixture,
- DEPLOYMENT_DECIMAL } = require('../../deploymentUtils')
+ DEPLOYMENT_DECIMAL
+} = require('../../deploymentUtils')
const { upgrades } = require('hardhat')
-describe(
- 'Proxy - Security Test',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- // Contract to deploy: CMTAT
- this.CMTAT_PROXY = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- const implementationContractAddress =
- await upgrades.erc1967.getImplementationAddress(
- this.CMTAT_PROXY.target
- )
+describe('Proxy - Security Test', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ // Contract to deploy: CMTAT
+ this.CMTAT_PROXY = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ const implementationContractAddress =
+ await upgrades.erc1967.getImplementationAddress(this.CMTAT_PROXY.target)
- const MyContract = await ethers.getContractFactory("CMTAT_PROXY");
- this.implementationContract = MyContract.attach(
- implementationContractAddress
- )
- })
+ const MyContract = await ethers.getContractFactory('CMTAT_PROXY')
+ this.implementationContract = MyContract.attach(
+ implementationContractAddress
+ )
+ })
- context('Attacker', function () {
- it('testCannotBeTakenControlByAttacker', async function () {
- // Act
- await expect( this.implementationContract.connect(this.attacker).initialize(
- this.attacker,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- ))
- .to.be.revertedWithCustomError(this.implementationContract, 'InvalidInitialization')
- // act + assert
- await expect( this.implementationContract.connect(this.attacker).pause())
- .to.be.revertedWithCustomError(this.implementationContract, 'AccessControlUnauthorizedAccount')
+ context('Attacker', function () {
+ it('testCannotBeTakenControlByAttacker', async function () {
+ // Act
+ await expect(
+ this.implementationContract
+ .connect(this.attacker)
+ .initialize(
+ this.attacker,
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ ).to.be.revertedWithCustomError(
+ this.implementationContract,
+ 'InvalidInitialization'
+ )
+ // act + assert
+ await expect(this.implementationContract.connect(this.attacker).pause())
+ .to.be.revertedWithCustomError(
+ this.implementationContract,
+ 'AccessControlUnauthorizedAccount'
+ )
.withArgs(this.attacker.address, PAUSER_ROLE)
- })
})
- }
-)
+ })
+})
diff --git a/test/proxy/general/UpgradeProxy.test.js b/test/proxy/general/UpgradeProxy.test.js
index 85968e47..7eac4889 100644
--- a/test/proxy/general/UpgradeProxy.test.js
+++ b/test/proxy/general/UpgradeProxy.test.js
@@ -1,44 +1,36 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { ZERO_ADDRESS } = require('../../utils')
const UpgradeProxyCommon = require('./UpgradeProxyCommon')
const {
DEPLOYMENT_DECIMAL,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../deploymentUtils')
const { ethers, upgrades } = require('hardhat')
-let CMTAT_PROXY_FACTORY,CMTAT_PROXY_TEST_FACTORY, CMTAT_PROXY
-describe(
- 'UpgradeableCMTAT - Proxy',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- /* Factory & Artefact */
- CMTAT_PROXY_FACTORY = await ethers.getContractFactory(
- 'CMTAT_PROXY'
- )
- this.CMTAT_PROXY_TestFactory = await ethers.getContractFactory(
- 'CMTAT_PROXY_TEST'
- )
- // Deployment
- this.CMTAT = await upgrades.deployProxy(
- CMTAT_PROXY_FACTORY,
- [
- this.admin.address,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- ],
- {
- initializer: 'initialize',
- constructorArgs: [this._.address],
- from: this.deployerAddress.address
- }
- )
- })
- UpgradeProxyCommon()
- }
-)
+let CMTAT_PROXY_FACTORY, CMTAT_PROXY_TEST_FACTORY, CMTAT_PROXY
+describe('UpgradeableCMTAT - Proxy', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ /* Factory & Artefact */
+ CMTAT_PROXY_FACTORY = await ethers.getContractFactory('CMTAT_PROXY')
+ this.CMTAT_PROXY_TestFactory = await ethers.getContractFactory(
+ 'CMTAT_PROXY_TEST'
+ )
+ // Deployment
+ this.CMTAT = await upgrades.deployProxy(
+ CMTAT_PROXY_FACTORY,
+ [
+ this.admin.address,
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ ],
+ {
+ initializer: 'initialize',
+ constructorArgs: [this._.address],
+ from: this.deployerAddress.address
+ }
+ )
+ })
+ UpgradeProxyCommon()
+})
diff --git a/test/proxy/general/UpgradeProxyCommon.js b/test/proxy/general/UpgradeProxyCommon.js
index 68b3beb2..363c0cba 100644
--- a/test/proxy/general/UpgradeProxyCommon.js
+++ b/test/proxy/general/UpgradeProxyCommon.js
@@ -1,93 +1,77 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { ethers, upgrades } = require('hardhat')
-function UpgradeProxyCommon () {
-
+function UpgradeProxyCommon () {
/*
- * Functions used: balanceOf, totalSupply, mint
- */
- it('testKeepStorageForTokens', async function () {
- // Get Proxy Address
- const CMTAT_PROXY_ADDRESS = await this.CMTAT.getAddress()
- const IMPLEMENTATION_CONTRACT_ADDRESS_V1 =
- await upgrades.erc1967.getImplementationAddress(CMTAT_PROXY_ADDRESS);
+ * Functions used: balanceOf, totalSupply, mint
+ */
+ it('testKeepStorageForTokens', async function () {
+ // Get Proxy Address
+ const CMTAT_PROXY_ADDRESS = await this.CMTAT.getAddress()
+ const IMPLEMENTATION_CONTRACT_ADDRESS_V1 =
+ await upgrades.erc1967.getImplementationAddress(CMTAT_PROXY_ADDRESS)
- // With the first version of CMTAT
- expect(
- await this.CMTAT.balanceOf(this.admin)
- ).to.equal('0');
+ // With the first version of CMTAT
+ expect(await this.CMTAT.balanceOf(this.admin)).to.equal('0');
- // Issue 20 and check balances and total supply
- ({ logs: this.logs1 } = await this.CMTAT.connect(this.admin).mint(
- this.address1,
- 20
- ));
+ // Issue 20 and check balances and total supply
+ ({ logs: this.logs1 } = await this.CMTAT.connect(this.admin).mint(
+ this.address1,
+ 20
+ ))
- expect(
- await this.CMTAT.balanceOf(this.address1)
- ).to.equal('20');
- expect(
- await this.CMTAT.totalSupply()
- ).to.equal('20')
+ expect(await this.CMTAT.balanceOf(this.address1)).to.equal('20')
+ expect(await this.CMTAT.totalSupply()).to.equal('20')
- // Upgrade the proxy with a new implementation contract
- let CMTAT_PROXY_V2
- if(this.IsUUPSProxy){
- CMTAT_PROXY_V2 = await upgrades.upgradeProxy(
- CMTAT_PROXY_ADDRESS,
- this.CMTAT_PROXY_TestFactory.connect(this.admin),
- {
- constructorArgs: [this._.address],
- kind: 'uups'
- }
- )
- }else{
- CMTAT_PROXY_V2 = await upgrades.upgradeProxy(
- CMTAT_PROXY_ADDRESS,
- this.CMTAT_PROXY_TestFactory,
- {
- constructorArgs: [this._.address]
- }
- )
- }
-
- const PROXY_ADDRESS_V2_INSTANCE =
- await CMTAT_PROXY_V2.getAddress()
+ // Upgrade the proxy with a new implementation contract
+ let CMTAT_PROXY_V2
+ if (this.IsUUPSProxy) {
+ CMTAT_PROXY_V2 = await upgrades.upgradeProxy(
+ CMTAT_PROXY_ADDRESS,
+ this.CMTAT_PROXY_TestFactory.connect(this.admin),
+ {
+ constructorArgs: [this._.address],
+ kind: 'uups'
+ }
+ )
+ } else {
+ CMTAT_PROXY_V2 = await upgrades.upgradeProxy(
+ CMTAT_PROXY_ADDRESS,
+ this.CMTAT_PROXY_TestFactory,
+ {
+ constructorArgs: [this._.address]
+ }
+ )
+ }
- // Get the new implementation contract address
- const IMPLEMENTATION_CONTRACT_ADDRESS_V2 =
- await upgrades.erc1967.getImplementationAddress(
- PROXY_ADDRESS_V2_INSTANCE
- )
+ const PROXY_ADDRESS_V2_INSTANCE = await CMTAT_PROXY_V2.getAddress()
- // Just to be sure that the proxy address remains unchanged
- expect(CMTAT_PROXY_ADDRESS).to.equal(PROXY_ADDRESS_V2_INSTANCE);
+ // Get the new implementation contract address
+ const IMPLEMENTATION_CONTRACT_ADDRESS_V2 =
+ await upgrades.erc1967.getImplementationAddress(
+ PROXY_ADDRESS_V2_INSTANCE
+ )
- // The address of the implementation contract has changed
- expect(IMPLEMENTATION_CONTRACT_ADDRESS_V1).to.not.equal(
- IMPLEMENTATION_CONTRACT_ADDRESS_V2
- );
+ // Just to be sure that the proxy address remains unchanged
+ expect(CMTAT_PROXY_ADDRESS).to.equal(PROXY_ADDRESS_V2_INSTANCE)
- ({ logs: this.logs1 } = await CMTAT_PROXY_V2.balanceOf(
- this.address1
- ))
+ // The address of the implementation contract has changed
+ expect(IMPLEMENTATION_CONTRACT_ADDRESS_V1).to.not.equal(
+ IMPLEMENTATION_CONTRACT_ADDRESS_V2
+ );
- expect(
- await CMTAT_PROXY_V2.balanceOf(this.address1)
- ).to.equal(20);
+ ({ logs: this.logs1 } = await CMTAT_PROXY_V2.balanceOf(this.address1))
- // keep the storage
+ expect(await CMTAT_PROXY_V2.balanceOf(this.address1)).to.equal(20);
- // Issue 20 and check balances and total supply
- ({ logs: this.logs1 } = await CMTAT_PROXY_V2.connect(this.admin).mint(
- this.address1,
- 20
- ));
- expect(
- await CMTAT_PROXY_V2.balanceOf(this.address1)
- ).to.equal('40');
- expect(
- await CMTAT_PROXY_V2.totalSupply()
- ).to.equal('40')
- })
- }
- module.exports = UpgradeProxyCommon;
+ // keep the storage
+
+ // Issue 20 and check balances and total supply
+ ({ logs: this.logs1 } = await CMTAT_PROXY_V2.connect(this.admin).mint(
+ this.address1,
+ 20
+ ))
+ expect(await CMTAT_PROXY_V2.balanceOf(this.address1)).to.equal('40')
+ expect(await CMTAT_PROXY_V2.totalSupply()).to.equal('40')
+ })
+}
+module.exports = UpgradeProxyCommon
diff --git a/test/proxy/general/UpgradeProxyUUPS.test.js b/test/proxy/general/UpgradeProxyUUPS.test.js
index 9291921a..eb62139c 100644
--- a/test/proxy/general/UpgradeProxyUUPS.test.js
+++ b/test/proxy/general/UpgradeProxyUUPS.test.js
@@ -1,53 +1,67 @@
-const { expect } = require("chai");
-const { ethers, upgrades } = require("hardhat");
+const { expect } = require('chai')
+const { ethers, upgrades } = require('hardhat')
const { ZERO_ADDRESS, PROXY_UPGRADE_ROLE } = require('../../utils')
const UpgradeProxyCommon = require('./UpgradeProxyCommon')
-
+
const {
- DEPLOYMENT_DECIMAL,
- fixture, loadFixture
- } = require('../../deploymentUtils')
-describe("CMTAT with UUPS Proxy", function () {
+ DEPLOYMENT_DECIMAL,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
+describe('CMTAT with UUPS Proxy', function () {
beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
+ Object.assign(this, await loadFixture(fixture))
// Deploy the implementation contract
- CMTAT_PROXY_FACTORY = await ethers.getContractFactory(
- 'CMTAT_PROXY_UUPS'
- )
- this.CMTAT_PROXY_TestFactory = await ethers.getContractFactory(
- 'CMTAT_PROXY_TEST_UUPS'
- )
+ CMTAT_PROXY_FACTORY = await ethers.getContractFactory('CMTAT_PROXY_UUPS')
+ this.CMTAT_PROXY_TestFactory = await ethers.getContractFactory(
+ 'CMTAT_PROXY_TEST_UUPS'
+ )
this.IsUUPSProxy = true
- this.CMTAT = await upgrades.deployProxy(CMTAT_PROXY_FACTORY, [this.admin.address,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]],
- { initializer: 'initialize', kind: 'uups',constructorArgs: [this._.address] });
+ this.CMTAT = await upgrades.deployProxy(
+ CMTAT_PROXY_FACTORY,
+ [
+ this.admin.address,
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ ],
+ {
+ initializer: 'initialize',
+ kind: 'uups',
+ constructorArgs: [this._.address]
+ }
+ )
})
-
+
UpgradeProxyCommon()
+ it('testAdminCanUpgradeProxy', async function () {
+ await upgrades.upgradeProxy(
+ this.CMTAT.target,
+ this.CMTAT_PROXY_TestFactory.connect(this.admin),
+ {
+ constructorArgs: [this._.address],
+ kind: 'uups'
+ }
+ )
+ })
- it("testAdminCanUpgradeProxy", async function () {
- await upgrades.upgradeProxy(this.CMTAT.target, this.CMTAT_PROXY_TestFactory.connect(this.admin),
+ it('testNonAdminCanNotUpgradeProxy', async function () {
+ await expect(
+ upgrades.upgradeProxy(
+ this.CMTAT.target,
+ this.CMTAT_PROXY_TestFactory.connect(this.address1),
{
- constructorArgs: [this._.address],
- kind: 'uups'
- });
- });
-
- it("testNonAdminCanNotUpgradeProxy", async function () {
- await expect( upgrades.upgradeProxy(this.CMTAT.target, this.CMTAT_PROXY_TestFactory.connect(this.address1),
- {
- constructorArgs: [this._.address],
- kind: 'uups'
- }))
- .to.be.revertedWithCustomError(this.CMTAT, 'AccessControlUnauthorizedAccount')
- .withArgs(this.address1.address, PROXY_UPGRADE_ROLE)
- });
-});
\ No newline at end of file
+ constructorArgs: [this._.address],
+ kind: 'uups'
+ }
+ )
+ )
+ .to.be.revertedWithCustomError(
+ this.CMTAT,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.address1.address, PROXY_UPGRADE_ROLE)
+ })
+})
diff --git a/test/proxy/general/factory/Beacon.test.js b/test/proxy/general/factory/Beacon.test.js
index de1f251c..fe702cc8 100644
--- a/test/proxy/general/factory/Beacon.test.js
+++ b/test/proxy/general/factory/Beacon.test.js
@@ -1,106 +1,107 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { CMTAT_DEPLOYER_ROLE } = require('../../../utils.js')
const { ZERO_ADDRESS } = require('../../../utils.js')
const {
deployCMTATProxyImplementation,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils.js')
const DEPLOYMENT_DECIMAL = 0
-describe(
- 'Deploy Beacon with Factory',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
- this.deployerAddress.address,
- this._.address,
- )
- this.FACTORY = await ethers.deployContract("CMTAT_BEACON_FACTORY",[
- this.CMTAT_PROXY_IMPL.target,
- this.admin,
- this.admin,
- false
- ])
- this.CMTATArg = [
- this.admin,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- ];
- })
+describe('Deploy Beacon with Factory', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
+ this.deployerAddress.address,
+ this._.address
+ )
+ this.FACTORY = await ethers.deployContract('CMTAT_BEACON_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ this.admin,
+ this.admin,
+ false
+ ])
+ this.CMTATArg = [
+ this.admin,
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ ]
+ })
- context('FactoryDeployment', function () {
- it('testCanReturnTheRightImplementation', async function () {
- // Act + Assert
- expect(await this.FACTORY.implementation()).to.equal(
- this.CMTAT_PROXY_IMPL.target
- )
- })
+ context('FactoryDeployment', function () {
+ it('testCanReturnTheRightImplementation', async function () {
+ // Act + Assert
+ expect(await this.FACTORY.implementation()).to.equal(
+ this.CMTAT_PROXY_IMPL.target
+ )
})
+ })
- context('Deploy CMTAT with Factory', function () {
- it('testCannotBeDeployedByAttacker', async function () {
- // Act
- await expect( this.FACTORY.connect(this.attacker).deployCMTAT(
- ethers.encodeBytes32String("test"),
- this.CMTATArg
- ))
- .to.be.revertedWithCustomError(this.FACTORY, 'AccessControlUnauthorizedAccount')
- .withArgs(this.attacker.address, CMTAT_DEPLOYER_ROLE);
- })
- it('testCanDeployCMTATWithFactory', async function () {
- let computedCMTATAddress = await this.FACTORY.computedProxyAddress(
- // 0x0 => id counter 0
- ethers.keccak256(ethers.solidityPacked(["uint256"], [0x0])),
- this.CMTATArg
- );
- // Act
- this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String("test"),
+ context('Deploy CMTAT with Factory', function () {
+ it('testCannotBeDeployedByAttacker', async function () {
+ // Act
+ await expect(
+ this.FACTORY.connect(this.attacker).deployCMTAT(
+ ethers.encodeBytes32String('test'),
this.CMTATArg
)
-
- // https://github.com/ethers-io/ethers.js/discussions/4484#discussioncomment-9890653
- const receipt = await this.logs.wait();
- const filter = this.FACTORY.filters.CMTAT;
- let events = await this.FACTORY.queryFilter(filter, -1);
- let args = events[0].args;
- // Check Id increment
- expect(args[1]).to.equal(0)
- // Assert
- let CMTAT_ADDRESS = args[0];
- // Check address with ID
- expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS)
- expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(computedCMTATAddress);
- const MyContract = await ethers.getContractFactory("CMTAT_PROXY");
- const CMTAT_PROXY = MyContract.attach(
- CMTAT_ADDRESS
- )
- // Act + Assert
- await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
- // Deploy second contract
- this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String("test"),
- this.CMTATArg
+ )
+ .to.be.revertedWithCustomError(
+ this.FACTORY,
+ 'AccessControlUnauthorizedAccount'
)
- // Check Id increment
- events = await this.FACTORY.queryFilter(filter, -1);
- args = events[0].args;
- expect(args[1]).to.equal(1)
+ .withArgs(this.attacker.address, CMTAT_DEPLOYER_ROLE)
+ })
+ it('testCanDeployCMTATWithFactory', async function () {
+ let computedCMTATAddress = await this.FACTORY.computedProxyAddress(
+ // 0x0 => id counter 0
+ ethers.keccak256(ethers.solidityPacked(['uint256'], [0x0])),
+ this.CMTATArg
+ )
+ // Act
+ this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.CMTATArg
+ )
+
+ // https://github.com/ethers-io/ethers.js/discussions/4484#discussioncomment-9890653
+ const receipt = await this.logs.wait()
+ const filter = this.FACTORY.filters.CMTAT
+ let events = await this.FACTORY.queryFilter(filter, -1)
+ let args = events[0].args
+ // Check Id increment
+ expect(args[1]).to.equal(0)
+ // Assert
+ let CMTAT_ADDRESS = args[0]
+ // Check address with ID
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS)
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(
+ computedCMTATAddress
+ )
+ const MyContract = await ethers.getContractFactory('CMTAT_PROXY')
+ const CMTAT_PROXY = MyContract.attach(CMTAT_ADDRESS)
+ // Act + Assert
+ await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
+ // Deploy second contract
+ this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.CMTATArg
+ )
+ // Check Id increment
+ events = await this.FACTORY.queryFilter(filter, -1)
+ args = events[0].args
+ expect(args[1]).to.equal(1)
- // Check address
+ // Check address
computedCMTATAddress = await this.FACTORY.computedProxyAddress(
- ethers.keccak256(ethers.solidityPacked(["uint256"], [0x1])),
+ ethers.keccak256(ethers.solidityPacked(['uint256'], [0x1])),
this.CMTATArg
- );
- CMTAT_ADDRESS = args[0];
- expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(CMTAT_ADDRESS);
- expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(computedCMTATAddress);
- })
+ )
+ CMTAT_ADDRESS = args[0]
+ expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(CMTAT_ADDRESS)
+ expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(
+ computedCMTATAddress
+ )
})
- }
-)
+ })
+})
diff --git a/test/proxy/general/factory/BeaconFactoryDeploy.test.js b/test/proxy/general/factory/BeaconFactoryDeploy.test.js
index 790769ec..255b3bae 100644
--- a/test/proxy/general/factory/BeaconFactoryDeploy.test.js
+++ b/test/proxy/general/factory/BeaconFactoryDeploy.test.js
@@ -1,44 +1,58 @@
const { ZERO_ADDRESS } = require('../../../utils.js')
-const { expect } = require('chai');
+const { expect } = require('chai')
+const DEPLOYMENT_DECIMAL = 0
const {
deployCMTATProxyImplementation,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils.js')
-describe(
- 'Deploy Beacon with Factory',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
- this._.address,
- this.deployerAddress.address
- )
- this.FACTORYCustomError = await ethers.deployContract("CMTAT_BEACON_FACTORY",[
- this.CMTAT_PROXY_IMPL.target,
+describe('Deploy Beacon with Factory', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
+ this._.address,
+ this.deployerAddress.address
+ )
+ this.FACTORYCustomError = await ethers.deployContract(
+ 'CMTAT_BEACON_FACTORY',
+ [this.CMTAT_PROXY_IMPL.target, this.admin, this.admin, true]
+ )
+ this.CMTATArg = [
+ this.admin,
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ ]
+ })
+ context('BeaconDeployment', function () {
+ it('testCanDeployFactoryWithNoImplementation', async function () {
+ this.FACTORY = await ethers.deployContract('CMTAT_BEACON_FACTORY', [
+ ZERO_ADDRESS,
this.admin,
this.admin,
- true
+ false
])
+ await this.FACTORY.connect(this.admin).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.CMTATArg
+ )
+ const CMTAT_ADDRESS = await this.FACTORY.CMTATProxyAddress(0)
+ const MyContract = await ethers.getContractFactory('CMTAT_PROXY')
+ const CMTAT_PROXY = MyContract.attach(CMTAT_ADDRESS)
+ // Act + Assert
+ await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
})
- context('BeaconDeployment', function () {
- it('testCannotDeployIfImplementationIsZero', async function () {
- await expect(ethers.deployContract("CMTAT_BEACON_FACTORY",[ZERO_ADDRESS, this.admin.address, this.admin.address]))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForLogicContract')
- })
- it('testCannotDeployIfFactoryAdminIsZero', async function () {
- await expect( ethers.deployContract("CMTAT_BEACON_FACTORY",[ this.CMTAT_PROXY_IMPL.target,
- ZERO_ADDRESS,
- this.admin.address]
- ))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForFactoryAdmin')
- })
- it('testCannotDeployIfBeaconOwnerIsZero', async function () {
- await expect(ethers.deployContract("CMTAT_BEACON_FACTORY",[ this.CMTAT_PROXY_IMPL.target,
+ it('testCannotDeployIfBeaconOwnerIsZero', async function () {
+ await expect(
+ ethers.deployContract('CMTAT_BEACON_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
this.admin.address,
- ZERO_ADDRESS]
- ))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForBeaconOwner')
- })
+ ZERO_ADDRESS
+ ])
+ ).to.be.revertedWithCustomError(
+ this.FACTORYCustomError,
+ 'CMTAT_Factory_AddressZeroNotAllowedForBeaconOwner'
+ )
})
- }
-)
+ })
+})
diff --git a/test/proxy/general/factory/Transparent.test.js b/test/proxy/general/factory/Transparent.test.js
index 9dc5bfd7..60570594 100644
--- a/test/proxy/general/factory/Transparent.test.js
+++ b/test/proxy/general/factory/Transparent.test.js
@@ -1,106 +1,108 @@
-const { expect } = require('chai');
-const { ZERO_ADDRESS, CMTAT_DEPLOYER_ROLE } = require("../../../utils.js");
+const { expect } = require('chai')
+const { ZERO_ADDRESS, CMTAT_DEPLOYER_ROLE } = require('../../../utils.js')
const {
DEPLOYMENT_FLAG,
deployCMTATProxyImplementation,
fixture,
- loadFixture,
-} = require("../../../deploymentUtils.js");
-const { ethers } = require("hardhat");
-const DEPLOYMENT_DECIMAL = 0;
-describe("Deploy TP with Factory", function () {
+ loadFixture
+} = require('../../../deploymentUtils.js')
+const { ethers } = require('hardhat')
+const DEPLOYMENT_DECIMAL = 0
+describe('Deploy TP with Factory', function () {
beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
+ Object.assign(this, await loadFixture(fixture))
this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
this._.address,
this.deployerAddress.address
- );
- this.FACTORY = await ethers.deployContract("CMTAT_TP_FACTORY",[
- this.CMTAT_PROXY_IMPL.target, this.admin, false
- ]);
+ )
+ this.FACTORY = await ethers.deployContract('CMTAT_TP_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ this.admin,
+ false
+ ])
this.CMTATArg = [
this.admin,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
[ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- ];
- });
+ ]
+ })
- context("FactoryDeployment", function () {
- it("testCanReturnTheRightImplementation", async function () {
+ context('FactoryDeployment', function () {
+ it('testCanReturnTheRightImplementation', async function () {
// Act + Assert
- expect(await this.FACTORY.logic()).to.equal(
- this.CMTAT_PROXY_IMPL.target
- );
- });
- });
+ expect(await this.FACTORY.logic()).to.equal(this.CMTAT_PROXY_IMPL.target)
+ })
+ })
- context("Deploy CMTAT with Factory", function () {
- it("testCannotBeDeployedByAttacker", async function () {
+ context('Deploy CMTAT with Factory', function () {
+ it('testCannotBeDeployedByAttacker', async function () {
// Act
- await expect( this.FACTORY.connect(this.attacker).deployCMTAT(
- ethers.encodeBytes32String("test"),
- this.admin.address,
- this.CMTATArg
- ))
- .to.be.revertedWithCustomError(this.FACTORY, 'AccessControlUnauthorizedAccount').withArgs(
- this.attacker.address, CMTAT_DEPLOYER_ROLE
+ await expect(
+ this.FACTORY.connect(this.attacker).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.admin.address,
+ this.CMTATArg
+ )
)
- });
- it("testCanDeployCMTATWithFactory", async function () {
+ .to.be.revertedWithCustomError(
+ this.FACTORY,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.attacker.address, CMTAT_DEPLOYER_ROLE)
+ })
+ it('testCanDeployCMTATWithFactory', async function () {
let computedCMTATAddress = await this.FACTORY.computedProxyAddress(
// 0x0 => id counter 0
- ethers.keccak256(ethers.solidityPacked(["uint256"], [0x0])),
+ ethers.keccak256(ethers.solidityPacked(['uint256'], [0x0])),
this.admin,
this.CMTATArg
- );
+ )
// Act
this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String("test"),
+ ethers.encodeBytes32String('test'),
this.admin,
this.CMTATArg
- );
- const receipt = await this.logs.wait();
- const filter = this.FACTORY.filters.CMTAT;
- let events = await this.FACTORY.queryFilter(filter, -1);
- let args = events[0].args;
+ )
+ const receipt = await this.logs.wait()
+ const filter = this.FACTORY.filters.CMTAT
+ let events = await this.FACTORY.queryFilter(filter, -1)
+ let args = events[0].args
// Assert
// Check Id
- expect(args[1]).to.equal(0);
- let CMTAT_ADDRESS = args[0];
+ expect(args[1]).to.equal(0)
+ let CMTAT_ADDRESS = args[0]
// Check address with ID
- expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS);
- expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(computedCMTATAddress);
- const MyContract = await ethers.getContractFactory("CMTAT_PROXY");
- const CMTAT_PROXY = MyContract.attach(
- CMTAT_ADDRESS
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS)
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(
+ computedCMTATAddress
)
- await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100);
+ const MyContract = await ethers.getContractFactory('CMTAT_PROXY')
+ const CMTAT_PROXY = MyContract.attach(CMTAT_ADDRESS)
+ await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
// Second deployment
this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String("test"),
+ ethers.encodeBytes32String('test'),
this.admin,
this.CMTATArg
- );
+ )
// Check Id increment
- events = await this.FACTORY.queryFilter(filter, -1);
- args = events[0].args;
- expect(args[1]).to.equal(1);
+ events = await this.FACTORY.queryFilter(filter, -1)
+ args = events[0].args
+ expect(args[1]).to.equal(1)
// Check address
computedCMTATAddress = await this.FACTORY.computedProxyAddress(
- ethers.keccak256(ethers.solidityPacked(["uint256"], [0x1])),
+ ethers.keccak256(ethers.solidityPacked(['uint256'], [0x1])),
this.admin,
this.CMTATArg
- );
- CMTAT_ADDRESS = args[0];
- expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(CMTAT_ADDRESS);
- expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(computedCMTATAddress);
- });
- });
-});
+ )
+ CMTAT_ADDRESS = args[0]
+ expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(CMTAT_ADDRESS)
+ expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(
+ computedCMTATAddress
+ )
+ })
+ })
+})
diff --git a/test/proxy/general/factory/TransparentFactoyDeploy.test.js b/test/proxy/general/factory/TransparentFactoyDeploy.test.js
index d7bc5a83..99d03227 100644
--- a/test/proxy/general/factory/TransparentFactoyDeploy.test.js
+++ b/test/proxy/general/factory/TransparentFactoyDeploy.test.js
@@ -1,39 +1,44 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { ZERO_ADDRESS } = require('../../../utils.js')
const {
deployCMTATProxyImplementation,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils.js')
-describe(
- 'Deploy TP Factory',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
- this._.address,
- this.deployerAddress.address
+describe('Deploy TP Factory', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
+ this._.address,
+ this.deployerAddress.address
+ )
+ this.FACTORYCustomError = await ethers.deployContract('CMTAT_TP_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ this.admin,
+ true
+ ])
+ })
+
+ context('FactoryDeployment', function () {
+ it('testCannotDeployIfImplementationIsZero', async function () {
+ await expect(
+ ethers.deployContract('CMTAT_TP_FACTORY', [ZERO_ADDRESS, this.admin])
+ ).to.be.revertedWithCustomError(
+ this.FACTORYCustomError,
+ 'CMTAT_Factory_AddressZeroNotAllowedForLogicContract'
)
- this.FACTORYCustomError = await ethers.deployContract('CMTAT_TP_FACTORY',[
- this.CMTAT_PROXY_IMPL.target,
- this.admin,
- true
- ])
})
- context('FactoryDeployment', function () {
- it('testCannotDeployIfImplementationIsZero', async function () {
- await expect( ethers.deployContract('CMTAT_TP_FACTORY',[
- ZERO_ADDRESS, this.admin
- ]))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForLogicContract')
- })
-
- it('testCannotDeployIfFactoryAdminIsZero', async function () {
- await expect( ethers.deployContract('CMTAT_TP_FACTORY', [
- this.CMTAT_PROXY_IMPL.target, ZERO_ADDRESS
- ]))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForFactoryAdmin')
- })
+ it('testCannotDeployIfFactoryAdminIsZero', async function () {
+ await expect(
+ ethers.deployContract('CMTAT_TP_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ ZERO_ADDRESS
+ ])
+ ).to.be.revertedWithCustomError(
+ this.FACTORYCustomError,
+ 'CMTAT_Factory_AddressZeroNotAllowedForFactoryAdmin'
+ )
})
- }
-)
+ })
+})
diff --git a/test/proxy/general/factory/TransparentSalt.test.js b/test/proxy/general/factory/TransparentSalt.test.js
index bbfcdf53..76348e40 100644
--- a/test/proxy/general/factory/TransparentSalt.test.js
+++ b/test/proxy/general/factory/TransparentSalt.test.js
@@ -1,114 +1,117 @@
-const { expect } = require('chai');
+const { expect } = require('chai')
const { ZERO_ADDRESS, CMTAT_DEPLOYER_ROLE } = require('../../../utils.js')
const {
DEPLOYMENT_FLAG,
deployCMTATProxyImplementation,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils.js')
const { ethers } = require('hardhat')
const DEPLOYMENT_DECIMAL = 0
-describe(
- 'Deploy TP with Factory - Salt',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
- this._.address,
- this.deployerAddress.address
- )
- this.FACTORY = await ethers.deployContract('CMTAT_TP_FACTORY',[
- this.CMTAT_PROXY_IMPL.target,
- this.admin,
- true
- ])
- this.CMTATArg = [
- this.admin,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- ]
- })
+describe('Deploy TP with Factory - Salt', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
+ this._.address,
+ this.deployerAddress.address
+ )
+ this.FACTORY = await ethers.deployContract('CMTAT_TP_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ this.admin,
+ true
+ ])
+ this.CMTATArg = [
+ this.admin,
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ ]
+ })
- context('FactoryDeployment', function () {
- it('testCanReturnTheRightImplementation', async function () {
- // Act + Assert
- expect(await this.FACTORY.logic()).to.equal(
- this.CMTAT_PROXY_IMPL.target
- )
- })
+ context('FactoryDeployment', function () {
+ it('testCanReturnTheRightImplementation', async function () {
+ // Act + Assert
+ expect(await this.FACTORY.logic()).to.equal(this.CMTAT_PROXY_IMPL.target)
})
+ })
- context('Deploy CMTAT with Factory', function () {
- it('testCannotBeDeployedByAttacker', async function () {
- // Act
- await expect( this.FACTORY.connect(this.attacker).deployCMTAT(
+ context('Deploy CMTAT with Factory', function () {
+ it('testCannotBeDeployedByAttacker', async function () {
+ // Act
+ await expect(
+ this.FACTORY.connect(this.attacker).deployCMTAT(
ethers.encodeBytes32String('test'),
this.admin,
this.CMTATArg
- ))
- .to.be.revertedWithCustomError(this.FACTORY, 'AccessControlUnauthorizedAccount')
- .withArgs(this.attacker.address, CMTAT_DEPLOYER_ROLE);
- })
- it('testCanDeployCMTATWithFactory', async function () {
- // Act
- this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String('test'),
- this.admin,
- this.CMTATArg,
- )
- // Assert
- // Check Id
- const receipt = await this.logs.wait();
- const filter = this.FACTORY.filters.CMTAT;
- let events = await this.FACTORY.queryFilter(filter, -1);
- let args = events[0].args;
- expect(args[1]).to.equal(0)
- const CMTAT_ADDRESS = args[0];
- const MyContract = await ethers.getContractFactory("CMTAT_PROXY");
- const CMTAT_PROXY = MyContract.attach(
- CMTAT_ADDRESS
)
- // Check address with ID
- expect((await this.FACTORY.CMTATProxyAddress(0))).to.equal(CMTAT_ADDRESS)
- await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
- // Second deployment
- this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String('test2'),
- this.admin,
- this.CMTATArg,
+ )
+ .to.be.revertedWithCustomError(
+ this.FACTORY,
+ 'AccessControlUnauthorizedAccount'
)
- // Check Id increment
- events = await this.FACTORY.queryFilter(filter, -1);
- args = events[0].args;
- expect(args[1]).to.equal(1)
- // Revert
- await expect(this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String('test'),
- this.admin,
- this.CMTATArg,
- ))
- .to.be.revertedWithCustomError(this.FACTORY, 'CMTAT_Factory_SaltAlreadyUsed')
- })
- it('testCannotDeployCMTATWithFactoryWithSaltAlreadyUsed', async function () {
- // Arrange
- await this.FACTORY.connect(this.admin).deployCMTAT(
+ .withArgs(this.attacker.address, CMTAT_DEPLOYER_ROLE)
+ })
+ it('testCanDeployCMTATWithFactory', async function () {
+ // Act
+ this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.admin,
+ this.CMTATArg
+ )
+ // Assert
+ // Check Id
+ const receipt = await this.logs.wait()
+ const filter = this.FACTORY.filters.CMTAT
+ let events = await this.FACTORY.queryFilter(filter, -1)
+ let args = events[0].args
+ expect(args[1]).to.equal(0)
+ const CMTAT_ADDRESS = args[0]
+ const MyContract = await ethers.getContractFactory('CMTAT_PROXY')
+ const CMTAT_PROXY = MyContract.attach(CMTAT_ADDRESS)
+ // Check address with ID
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS)
+ await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
+ // Second deployment
+ this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
+ ethers.encodeBytes32String('test2'),
+ this.admin,
+ this.CMTATArg
+ )
+ // Check Id increment
+ events = await this.FACTORY.queryFilter(filter, -1)
+ args = events[0].args
+ expect(args[1]).to.equal(1)
+ // Revert
+ await expect(
+ this.FACTORY.connect(this.admin).deployCMTAT(
ethers.encodeBytes32String('test'),
this.admin,
this.CMTATArg
)
-
- // Act with Revert
- await expect( this.FACTORY.connect(this.admin).deployCMTAT(
+ ).to.be.revertedWithCustomError(
+ this.FACTORY,
+ 'CMTAT_Factory_SaltAlreadyUsed'
+ )
+ })
+ it('testCannotDeployCMTATWithFactoryWithSaltAlreadyUsed', async function () {
+ // Arrange
+ await this.FACTORY.connect(this.admin).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.admin,
+ this.CMTATArg
+ )
+
+ // Act with Revert
+ await expect(
+ this.FACTORY.connect(this.admin).deployCMTAT(
ethers.encodeBytes32String('test'),
this.admin,
this.CMTATArg
- ))
- .to.be.revertedWithCustomError(this.FACTORY, 'CMTAT_Factory_SaltAlreadyUsed')
- })
+ )
+ ).to.be.revertedWithCustomError(
+ this.FACTORY,
+ 'CMTAT_Factory_SaltAlreadyUsed'
+ )
})
- }
-)
+ })
+})
diff --git a/test/proxy/general/factory/UUPS.test.js b/test/proxy/general/factory/UUPS.test.js
index b7bfc32e..e5b370c2 100644
--- a/test/proxy/general/factory/UUPS.test.js
+++ b/test/proxy/general/factory/UUPS.test.js
@@ -1,101 +1,103 @@
-const { expect } = require('chai');
-const { ZERO_ADDRESS, CMTAT_DEPLOYER_ROLE } = require("../../../utils.js");
+const { expect } = require('chai')
+const { ZERO_ADDRESS, CMTAT_DEPLOYER_ROLE } = require('../../../utils.js')
const {
DEPLOYMENT_FLAG,
deployCMTATProxyUUPSImplementation,
fixture,
- loadFixture,
-} = require("../../../deploymentUtils.js");
-const { ethers } = require("hardhat");
-const DEPLOYMENT_DECIMAL = 0;
-describe("Deploy UUPPSwith Factory", function () {
+ loadFixture
+} = require('../../../deploymentUtils.js')
+const { ethers } = require('hardhat')
+const DEPLOYMENT_DECIMAL = 0
+describe('Deploy UUPPSwith Factory', function () {
beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
+ Object.assign(this, await loadFixture(fixture))
this.CMTAT_PROXY_IMPL = await deployCMTATProxyUUPSImplementation(
this._.address,
this.deployerAddress.address
- );
- this.FACTORY = await ethers.deployContract("CMTAT_UUPS_FACTORY",[
- this.CMTAT_PROXY_IMPL.target, this.admin, false
- ]);
+ )
+ this.FACTORY = await ethers.deployContract('CMTAT_UUPS_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ this.admin,
+ false
+ ])
this.CMTATArg = [
this.admin,
- ['CMTA Token',
- 'CMTAT',
- DEPLOYMENT_DECIMAL],
- ['CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info'],
+ ['CMTA Token', 'CMTAT', DEPLOYMENT_DECIMAL],
+ ['CMTAT_ISIN', 'https://cmta.ch', 'CMTAT_info'],
[ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- ];
- });
+ ]
+ })
- context("FactoryDeployment", function () {
- it("testCanReturnTheRightImplementation", async function () {
+ context('FactoryDeployment', function () {
+ it('testCanReturnTheRightImplementation', async function () {
// Act + Assert
- expect(await this.FACTORY.logic()).to.equal(
- this.CMTAT_PROXY_IMPL.target
- );
- });
- });
+ expect(await this.FACTORY.logic()).to.equal(this.CMTAT_PROXY_IMPL.target)
+ })
+ })
- context("Deploy CMTAT with Factory", function () {
- it("testCannotBeDeployedByAttacker", async function () {
+ context('Deploy CMTAT with Factory', function () {
+ it('testCannotBeDeployedByAttacker', async function () {
// Act
- await expect( this.FACTORY.connect(this.attacker).deployCMTAT(
- ethers.encodeBytes32String("test"),
- this.CMTATArg
- ))
- .to.be.revertedWithCustomError(this.FACTORY, 'AccessControlUnauthorizedAccount').withArgs(
- this.attacker.address, CMTAT_DEPLOYER_ROLE
+ await expect(
+ this.FACTORY.connect(this.attacker).deployCMTAT(
+ ethers.encodeBytes32String('test'),
+ this.CMTATArg
+ )
)
- });
- it("testCanDeployCMTATWithFactory", async function () {
+ .to.be.revertedWithCustomError(
+ this.FACTORY,
+ 'AccessControlUnauthorizedAccount'
+ )
+ .withArgs(this.attacker.address, CMTAT_DEPLOYER_ROLE)
+ })
+ it('testCanDeployCMTATWithFactory', async function () {
let computedCMTATAddress = await this.FACTORY.computedProxyAddress(
// 0x0 => id counter 0
- ethers.keccak256(ethers.solidityPacked(["uint256"], [0x0])),
+ ethers.keccak256(ethers.solidityPacked(['uint256'], [0x0])),
this.CMTATArg
- );
+ )
// Act
this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String("test"),
+ ethers.encodeBytes32String('test'),
this.CMTATArg
- );
- const receipt = await this.logs.wait();
- const filter = this.FACTORY.filters.CMTAT;
- let events = await this.FACTORY.queryFilter(filter, -1);
- let args = events[0].args;
+ )
+ const receipt = await this.logs.wait()
+ const filter = this.FACTORY.filters.CMTAT
+ let events = await this.FACTORY.queryFilter(filter, -1)
+ let args = events[0].args
// Assert
// Check Id
- expect(args[1]).to.equal(0);
- let CMTAT_ADDRESS = args[0];
+ expect(args[1]).to.equal(0)
+ let CMTAT_ADDRESS = args[0]
// Check address with ID
- expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS);
- expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(computedCMTATAddress);
- const MyContract = await ethers.getContractFactory("CMTAT_PROXY_UUPS");
- const CMTAT_PROXY = MyContract.attach(
- CMTAT_ADDRESS
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(CMTAT_ADDRESS)
+ expect(await this.FACTORY.CMTATProxyAddress(0)).to.equal(
+ computedCMTATAddress
)
- await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100);
+ const MyContract = await ethers.getContractFactory('CMTAT_PROXY_UUPS')
+ const CMTAT_PROXY = MyContract.attach(CMTAT_ADDRESS)
+ await CMTAT_PROXY.connect(this.admin).mint(this.admin, 100)
// Second deployment
this.logs = await this.FACTORY.connect(this.admin).deployCMTAT(
- ethers.encodeBytes32String("test"),
+ ethers.encodeBytes32String('test'),
this.CMTATArg
- );
+ )
// Check Id increment
- events = await this.FACTORY.queryFilter(filter, -1);
- args = events[0].args;
- expect(args[1]).to.equal(1);
+ events = await this.FACTORY.queryFilter(filter, -1)
+ args = events[0].args
+ expect(args[1]).to.equal(1)
// Check address
computedCMTATAddress = await this.FACTORY.computedProxyAddress(
- ethers.keccak256(ethers.solidityPacked(["uint256"], [0x1])),
+ ethers.keccak256(ethers.solidityPacked(['uint256'], [0x1])),
this.CMTATArg
- );
- CMTAT_ADDRESS = args[0];
- expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(CMTAT_ADDRESS);
- expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(computedCMTATAddress);
- });
- });
-});
+ )
+ CMTAT_ADDRESS = args[0]
+ expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(CMTAT_ADDRESS)
+ expect(await this.FACTORY.CMTATProxyAddress(1)).to.equal(
+ computedCMTATAddress
+ )
+ })
+ })
+})
diff --git a/test/proxy/general/factory/UUPSFactoyDeploy.test.js b/test/proxy/general/factory/UUPSFactoyDeploy.test.js
index f2658603..97b68c6b 100644
--- a/test/proxy/general/factory/UUPSFactoyDeploy.test.js
+++ b/test/proxy/general/factory/UUPSFactoyDeploy.test.js
@@ -1,39 +1,43 @@
const { ZERO_ADDRESS } = require('../../../utils.js')
-const { expect } = require('chai');
+const { expect } = require('chai')
const {
deployCMTATProxyImplementation,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils.js')
-describe(
- 'Deploy UUPS Factory',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
- this._.address,
- this.deployerAddress.address
+describe('Deploy UUPS Factory', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.CMTAT_PROXY_IMPL = await deployCMTATProxyImplementation(
+ this._.address,
+ this.deployerAddress.address
+ )
+ this.FACTORYCustomError = await ethers.deployContract(
+ 'CMTAT_UUPS_FACTORY',
+ [this.CMTAT_PROXY_IMPL.target, this.admin, true]
+ )
+ })
+
+ context('FactoryDeployment', function () {
+ it('testCannotDeployIfImplementationIsZero', async function () {
+ await expect(
+ ethers.deployContract('CMTAT_UUPS_FACTORY', [ZERO_ADDRESS, this.admin])
+ ).to.be.revertedWithCustomError(
+ this.FACTORYCustomError,
+ 'CMTAT_Factory_AddressZeroNotAllowedForLogicContract'
)
- this.FACTORYCustomError = await ethers.deployContract('CMTAT_UUPS_FACTORY',[
- this.CMTAT_PROXY_IMPL.target,
- this.admin,
- true
- ])
})
- context('FactoryDeployment', function () {
- it('testCannotDeployIfImplementationIsZero', async function () {
- await expect(ethers.deployContract('CMTAT_UUPS_FACTORY',[
- ZERO_ADDRESS, this.admin
- ]))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForLogicContract')
- })
-
- it('testCannotDeployIfFactoryAdminIsZero', async function () {
- await expect(ethers.deployContract('CMTAT_UUPS_FACTORY', [
- this.CMTAT_PROXY_IMPL.target, ZERO_ADDRESS
- ]))
- .to.be.revertedWithCustomError(this.FACTORYCustomError, 'CMTAT_Factory_AddressZeroNotAllowedForFactoryAdmin')
- })
+ it('testCannotDeployIfFactoryAdminIsZero', async function () {
+ await expect(
+ ethers.deployContract('CMTAT_UUPS_FACTORY', [
+ this.CMTAT_PROXY_IMPL.target,
+ ZERO_ADDRESS
+ ])
+ ).to.be.revertedWithCustomError(
+ this.FACTORYCustomError,
+ 'CMTAT_Factory_AddressZeroNotAllowedForFactoryAdmin'
+ )
})
- }
-)
+ })
+})
diff --git a/test/proxy/modules/AuthorizationModule/AuthorizationModule.test.js b/test/proxy/modules/AuthorizationModule/AuthorizationModule.test.js
index 700458f7..541da049 100644
--- a/test/proxy/modules/AuthorizationModule/AuthorizationModule.test.js
+++ b/test/proxy/modules/AuthorizationModule/AuthorizationModule.test.js
@@ -1,17 +1,24 @@
const AuthorizationModuleCommon = require('../../../common/AuthorizationModule/AuthorizationModuleCommon')
const AuthorizationModuleSetAuthorizationEngineCommon = require('../../../common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
-describe(
- 'Proxy - AuthorizationModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- this.authorizationEngineMock = await ethers.deployContract("AuthorizationEngineMock")
- })
+describe('Proxy - AuthorizationModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.authorizationEngineMock = await ethers.deployContract(
+ 'AuthorizationEngineMock'
+ )
+ })
- AuthorizationModuleCommon()
- AuthorizationModuleSetAuthorizationEngineCommon()
- }
-)
+ AuthorizationModuleCommon()
+ AuthorizationModuleSetAuthorizationEngineCommon()
+})
diff --git a/test/proxy/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js b/test/proxy/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js
index 2c50ce29..31bb03c0 100644
--- a/test/proxy/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js
+++ b/test/proxy/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js
@@ -1,28 +1,36 @@
const AuthorizationModuleSetAuthorizationEngineCommon = require('../../../common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon')
-const { deployCMTATProxyWithParameter, fixture, loadFixture } = require('../../../deploymentUtils')
+const {
+ deployCMTATProxyWithParameter,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Proxy - AuthorizationModule',
- function () {
- beforeEach(async function () {
- const DECIMAL = 0
- Object.assign(this, await loadFixture(fixture));
- this.authorizationEngineMock = await ethers.deployContract("AuthorizationEngineMock")
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATProxyWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, this.authorizationEngineMock.target, ZERO_ADDRESS]
- )
- })
+describe('Proxy - AuthorizationModule', function () {
+ beforeEach(async function () {
+ const DECIMAL = 0
+ Object.assign(this, await loadFixture(fixture))
+ this.authorizationEngineMock = await ethers.deployContract(
+ 'AuthorizationEngineMock'
+ )
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATProxyWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [
+ ZERO_ADDRESS,
+ ZERO_ADDRESS,
+ this.authorizationEngineMock.target,
+ ZERO_ADDRESS
+ ]
+ )
+ })
- AuthorizationModuleSetAuthorizationEngineCommon()
- }
-)
+ AuthorizationModuleSetAuthorizationEngineCommon()
+})
diff --git a/test/proxy/modules/BaseModule.test.js b/test/proxy/modules/BaseModule.test.js
index 87ef7bcf..ad20a027 100644
--- a/test/proxy/modules/BaseModule.test.js
+++ b/test/proxy/modules/BaseModule.test.js
@@ -1,15 +1,21 @@
const BaseModuleCommon = require('../../common/BaseModuleCommon')
-const { deployCMTATProxy, DEPLOYMENT_FLAG, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ DEPLOYMENT_FLAG,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Proxy - BaseModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.flag = DEPLOYMENT_FLAG // value used in tests
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- })
+describe('Proxy - BaseModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.flag = DEPLOYMENT_FLAG // value used in tests
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- BaseModuleCommon()
- }
-)
+ BaseModuleCommon()
+})
diff --git a/test/proxy/modules/DocumentModule/DocumentModule.test.js b/test/proxy/modules/DocumentModule/DocumentModule.test.js
index 51b38409..57e3184e 100644
--- a/test/proxy/modules/DocumentModule/DocumentModule.test.js
+++ b/test/proxy/modules/DocumentModule/DocumentModule.test.js
@@ -1,15 +1,20 @@
const DocumentModuleSetDocumentEngineCommon = require('../../../common/DocumentModule/DocumentModuleSetDocumentEngineCommon')
const DocumentModuleCommon = require('../../../common/DocumentModule/DocumentModuleCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../../deploymentUtils')
-describe(
- 'Standard - DocumentModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- this.documentEngineMock = await ethers.deployContract("DocumentEngineMock")
- })
- DocumentModuleCommon()
- DocumentModuleSetDocumentEngineCommon()
- }
-)
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
+describe('Standard - DocumentModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.documentEngineMock = await ethers.deployContract('DocumentEngineMock')
+ })
+ DocumentModuleCommon()
+ DocumentModuleSetDocumentEngineCommon()
+})
diff --git a/test/proxy/modules/DocumentModule/DocumentModuleConstructor.test.js b/test/proxy/modules/DocumentModule/DocumentModuleConstructor.test.js
index a9563311..01bacefe 100644
--- a/test/proxy/modules/DocumentModule/DocumentModuleConstructor.test.js
+++ b/test/proxy/modules/DocumentModule/DocumentModuleConstructor.test.js
@@ -1,32 +1,30 @@
const DocumentModuleCommon = require('../../../common/DocumentModule/DocumentModuleCommon')
const {
- deployCMTATProxyWithParameter, fixture, loadFixture
+ deployCMTATProxyWithParameter,
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Standard - DocumentModule - Constructor',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- const DECIMAL = 0
- this.documentEngineMock = await ethers.deployContract('DocumentEngineMock')
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATProxyWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, this.documentEngineMock.target]
-
- )
- })
- DocumentModuleCommon()
- }
-)
+describe('Standard - DocumentModule - Constructor', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ const DECIMAL = 0
+ this.documentEngineMock = await ethers.deployContract('DocumentEngineMock')
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATProxyWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, this.documentEngineMock.target]
+ )
+ })
+ DocumentModuleCommon()
+})
diff --git a/test/proxy/modules/ERC20BaseModule.test.js b/test/proxy/modules/ERC20BaseModule.test.js
index 2da80166..abe1bbff 100644
--- a/test/proxy/modules/ERC20BaseModule.test.js
+++ b/test/proxy/modules/ERC20BaseModule.test.js
@@ -1,14 +1,19 @@
const ERC20BaseModuleCommon = require('../../common/ERC20BaseModuleCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Proxy - ERC20BaseModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- })
+describe('Proxy - ERC20BaseModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- ERC20BaseModuleCommon()
- }
-)
+ ERC20BaseModuleCommon()
+})
diff --git a/test/proxy/modules/ERC20BurnModule.test.js b/test/proxy/modules/ERC20BurnModule.test.js
index 3a7c5c3f..8c393ad2 100644
--- a/test/proxy/modules/ERC20BurnModule.test.js
+++ b/test/proxy/modules/ERC20BurnModule.test.js
@@ -1,14 +1,19 @@
const BurnModuleCommon = require('../../common/ERC20BurnModuleCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Proxy - ERC20BurnModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- })
+describe('Proxy - ERC20BurnModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- BurnModuleCommon()
- }
-)
+ BurnModuleCommon()
+})
diff --git a/test/proxy/modules/ERC20MintModule.test.js b/test/proxy/modules/ERC20MintModule.test.js
index 9c280211..c8da96c6 100644
--- a/test/proxy/modules/ERC20MintModule.test.js
+++ b/test/proxy/modules/ERC20MintModule.test.js
@@ -1,14 +1,19 @@
const ERC20MintModuleCommon = require('../../common/ERC20MintModuleCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Proxy - ERC20MintModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- })
+describe('Proxy - ERC20MintModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- ERC20MintModuleCommon()
- }
-)
+ ERC20MintModuleCommon()
+})
diff --git a/test/proxy/modules/ERC20SnapshotModule.test.js b/test/proxy/modules/ERC20SnapshotModule.test.js
index e079aec0..a1c0399f 100644
--- a/test/proxy/modules/ERC20SnapshotModule.test.js
+++ b/test/proxy/modules/ERC20SnapshotModule.test.js
@@ -1,4 +1,8 @@
-const { deployCMTATProxy, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
const ERC20SnapshotModuleCommonRescheduling = require('../../common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonRescheduling')
const ERC20SnapshotModuleCommonScheduling = require('../../common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonScheduling')
const ERC20SnapshotModuleCommonUnschedule = require('../../common/ERC20SnapshotModuleCommon/ERC20SnapshotModuleCommonUnschedule')
@@ -7,23 +11,20 @@ const ERC20SnapshotModuleMultiplePlannedTest = require('../../common/ERC20Snapsh
const ERC20SnapshotModuleOnePlannedSnapshotTest = require('../../common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleOnePlannedSnapshotTest')
const ERC20SnapshotModuleZeroPlannedSnapshotTest = require('../../common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleZeroPlannedSnapshot')
-describe(
- 'Proxy - ERC20SnapshotModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(
- this._.address,
- this.admin.address,
- this.deployerAddress.address
- )
- })
- ERC20SnapshotModuleMultiplePlannedTest()
- ERC20SnapshotModuleOnePlannedSnapshotTest()
- ERC20SnapshotModuleZeroPlannedSnapshotTest()
- ERC20SnapshotModuleCommonRescheduling()
- ERC20SnapshotModuleCommonScheduling()
- ERC20SnapshotModuleCommonUnschedule()
- ERC20SnapshotModuleCommonGetNextSnapshot()
- }
-)
+describe('Proxy - ERC20SnapshotModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
+ ERC20SnapshotModuleMultiplePlannedTest()
+ ERC20SnapshotModuleOnePlannedSnapshotTest()
+ ERC20SnapshotModuleZeroPlannedSnapshotTest()
+ ERC20SnapshotModuleCommonRescheduling()
+ ERC20SnapshotModuleCommonScheduling()
+ ERC20SnapshotModuleCommonUnschedule()
+ ERC20SnapshotModuleCommonGetNextSnapshot()
+})
diff --git a/test/proxy/modules/EnforcementModule.test.js b/test/proxy/modules/EnforcementModule.test.js
index b29aaab7..7bb45718 100644
--- a/test/proxy/modules/EnforcementModule.test.js
+++ b/test/proxy/modules/EnforcementModule.test.js
@@ -1,14 +1,19 @@
const EnforcementModuleCommon = require('../../common/EnforcementModuleCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Proxy - EnforcementModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- })
+describe('Proxy - EnforcementModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- EnforcementModuleCommon()
- }
-)
+ EnforcementModuleCommon()
+})
diff --git a/test/proxy/modules/MetaTxModule.test.js b/test/proxy/modules/MetaTxModule.test.js
index c7d7adc8..6472e79a 100644
--- a/test/proxy/modules/MetaTxModule.test.js
+++ b/test/proxy/modules/MetaTxModule.test.js
@@ -1,30 +1,31 @@
const MetaTxModuleCommon = require('../../common/MetaTxModuleCommon')
-const { deployCMTATProxyWithParameter, fixture, loadFixture } = require('../../deploymentUtils.js')
+const {
+ deployCMTATProxyWithParameter,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils.js')
const { ZERO_ADDRESS, ERC2771ForwarderDomain } = require('../../utils.js')
-describe(
- 'Proxy - MetaTxModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.flag = 5
- const DECIMAL = 0
- this.forwarder = await ethers.deployContract("MinimalForwarderMock")
- await this.forwarder.initialize(ERC2771ForwarderDomain)
- this.cmtat = await deployCMTATProxyWithParameter(
- this.deployerAddress.address,
- this.forwarder.target,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- )
- })
+describe('Proxy - MetaTxModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.flag = 5
+ const DECIMAL = 0
+ this.forwarder = await ethers.deployContract('MinimalForwarderMock')
+ await this.forwarder.initialize(ERC2771ForwarderDomain)
+ this.cmtat = await deployCMTATProxyWithParameter(
+ this.deployerAddress.address,
+ this.forwarder.target,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ })
- MetaTxModuleCommon()
- }
-)
+ MetaTxModuleCommon()
+})
diff --git a/test/proxy/modules/PauseModule.test.js b/test/proxy/modules/PauseModule.test.js
index ee84ab0d..72a4962a 100644
--- a/test/proxy/modules/PauseModule.test.js
+++ b/test/proxy/modules/PauseModule.test.js
@@ -1,15 +1,20 @@
const PauseModuleCommon = require('../../common/PauseModuleCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Proxy - PauseModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- // Mint tokens to test the transfer
- await this.cmtat.connect(this.admin).mint(this.address1, 20)
- })
- PauseModuleCommon()
- }
-)
+describe('Proxy - PauseModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ // Mint tokens to test the transfer
+ await this.cmtat.connect(this.admin).mint(this.address1, 20)
+ })
+ PauseModuleCommon()
+})
diff --git a/test/proxy/modules/ValidationModule/ValidationModule.test.js b/test/proxy/modules/ValidationModule/ValidationModule.test.js
index e4331a1e..062077cd 100644
--- a/test/proxy/modules/ValidationModule/ValidationModule.test.js
+++ b/test/proxy/modules/ValidationModule/ValidationModule.test.js
@@ -1,20 +1,31 @@
const ValidationModuleCommon = require('../../../common/ValidationModule/ValidationModuleSetRuleEngineCommon')
-const { deployCMTATProxy,fixture, loadFixture } = require('../../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
-describe(
- 'Proxy - ValidationModule',
- function () {
- beforeEach(async function () {
- this.ADDRESS1_INITIAL_BALANCE = 17n
- this.ADDRESS2_INITIAL_BALANCE = 18n
- this.ADDRESS3_INITIAL_BALANCE = 19n
- Object.assign(this, await loadFixture(fixture));
- this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- await this.cmtat.connect(this.admin).mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
- })
- ValidationModuleCommon()
- }
-)
+describe('Proxy - ValidationModule', function () {
+ beforeEach(async function () {
+ this.ADDRESS1_INITIAL_BALANCE = 17n
+ this.ADDRESS2_INITIAL_BALANCE = 18n
+ this.ADDRESS3_INITIAL_BALANCE = 19n
+ Object.assign(this, await loadFixture(fixture))
+ this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
+ })
+ ValidationModuleCommon()
+})
diff --git a/test/proxy/modules/ValidationModule/ValidationModuleConstructor.test.js b/test/proxy/modules/ValidationModule/ValidationModuleConstructor.test.js
index 6e83f7de..7d74e6ea 100644
--- a/test/proxy/modules/ValidationModule/ValidationModuleConstructor.test.js
+++ b/test/proxy/modules/ValidationModule/ValidationModuleConstructor.test.js
@@ -1,34 +1,41 @@
const ValidationModuleCommon = require('../../../common/ValidationModule/ValidationModuleCommon')
-const { deployCMTATProxyWithParameter, fixture, loadFixture } = require('../../../deploymentUtils')
+const {
+ deployCMTATProxyWithParameter,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Proxy - ValidationModule - Constructor',
- function () {
- beforeEach(async function () {
- this.ADDRESS1_INITIAL_BALANCE = 17n
- this.ADDRESS2_INITIAL_BALANCE = 18n
- this.ADDRESS3_INITIAL_BALANCE = 19n
- Object.assign(this, await loadFixture(fixture));
- const DECIMAL = 0
- this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATProxyWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [this.ruleEngineMock.target, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- )
- await this.cmtat.connect(this.admin).mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
- })
- ValidationModuleCommon()
- }
-)
+describe('Proxy - ValidationModule - Constructor', function () {
+ beforeEach(async function () {
+ this.ADDRESS1_INITIAL_BALANCE = 17n
+ this.ADDRESS2_INITIAL_BALANCE = 18n
+ this.ADDRESS3_INITIAL_BALANCE = 19n
+ Object.assign(this, await loadFixture(fixture))
+ const DECIMAL = 0
+ this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATProxyWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [this.ruleEngineMock.target, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
+ })
+ ValidationModuleCommon()
+})
diff --git a/test/proxy/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js b/test/proxy/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js
index 52f61808..2405f82d 100644
--- a/test/proxy/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js
+++ b/test/proxy/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js
@@ -1,14 +1,19 @@
const ValidationModuleSetRuleEngineCommon = require('../../../common/ValidationModule/ValidationModuleSetRuleEngineCommon')
-const { deployCMTATProxy, fixture, loadFixture } = require('../../../deploymentUtils')
+const {
+ deployCMTATProxy,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
-describe(
- 'Proxy - ValidationModule - setRuleEngine',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATProxy(this._.address, this.admin.address, this.deployerAddress.address)
- this.ruleEngine = await ethers.deployContract("RuleEngineMock")
- })
- ValidationModuleSetRuleEngineCommon()
- }
-)
+describe('Proxy - ValidationModule - setRuleEngine', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATProxy(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.ruleEngine = await ethers.deployContract('RuleEngineMock')
+ })
+ ValidationModuleSetRuleEngineCommon()
+})
diff --git a/test/standard/modules/AuthorizationModule/AuthorizationModule.test.js b/test/standard/modules/AuthorizationModule/AuthorizationModule.test.js
index e438506b..7f5a07e0 100644
--- a/test/standard/modules/AuthorizationModule/AuthorizationModule.test.js
+++ b/test/standard/modules/AuthorizationModule/AuthorizationModule.test.js
@@ -1,15 +1,22 @@
const AuthorizationModuleCommon = require('../../../common/AuthorizationModule/AuthorizationModuleCommon')
const AuthorizationModuleSetAuthorizationEngineCommon = require('../../../common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../../deploymentUtils')
-describe(
- 'Standard - AuthorizationModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- this.authorizationEngineMock = await ethers.deployContract("AuthorizationEngineMock")
- })
- AuthorizationModuleCommon()
- AuthorizationModuleSetAuthorizationEngineCommon()
- }
-)
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
+describe('Standard - AuthorizationModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.authorizationEngineMock = await ethers.deployContract(
+ 'AuthorizationEngineMock'
+ )
+ })
+ AuthorizationModuleCommon()
+ AuthorizationModuleSetAuthorizationEngineCommon()
+})
diff --git a/test/standard/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js b/test/standard/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js
index b9aff553..40e826c3 100644
--- a/test/standard/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js
+++ b/test/standard/modules/AuthorizationModule/AuthorizationModuleConstructor.test.js
@@ -1,31 +1,37 @@
const AuthorizationModuleSetAuthorizationEngineCommon = require('../../../common/AuthorizationModule/AuthorizationModuleSetAuthorizationEngineCommon')
const {
- deployCMTATStandaloneWithParameter, fixture, loadFixture
+ deployCMTATStandaloneWithParameter,
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Proxy - AuthorizationModule - Constructor',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.authorizationEngineMock = await ethers.deployContract("AuthorizationEngineMock")
- const DECIMAL = 0
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATStandaloneWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, this.authorizationEngineMock.target, ZERO_ADDRESS]
- )
- })
- AuthorizationModuleSetAuthorizationEngineCommon()
- }
-)
+describe('Proxy - AuthorizationModule - Constructor', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.authorizationEngineMock = await ethers.deployContract(
+ 'AuthorizationEngineMock'
+ )
+ const DECIMAL = 0
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATStandaloneWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [
+ ZERO_ADDRESS,
+ ZERO_ADDRESS,
+ this.authorizationEngineMock.target,
+ ZERO_ADDRESS
+ ]
+ )
+ })
+ AuthorizationModuleSetAuthorizationEngineCommon()
+})
diff --git a/test/standard/modules/BaseModule.test.js b/test/standard/modules/BaseModule.test.js
index 15c4ff15..29a34073 100644
--- a/test/standard/modules/BaseModule.test.js
+++ b/test/standard/modules/BaseModule.test.js
@@ -2,17 +2,19 @@ const BaseModuleCommon = require('../../common/BaseModuleCommon')
const {
deployCMTATStandalone,
DEPLOYMENT_FLAG,
- fixture, loadFixture
+ fixture,
+ loadFixture
} = require('../../deploymentUtils')
-describe(
- 'Standard - BaseModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.flag = DEPLOYMENT_FLAG // value used in tests
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- })
+describe('Standard - BaseModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.flag = DEPLOYMENT_FLAG // value used in tests
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- BaseModuleCommon()
- }
-)
+ BaseModuleCommon()
+})
diff --git a/test/standard/modules/DebtModule/DebtModule.test.js b/test/standard/modules/DebtModule/DebtModule.test.js
index 30c9b876..6c3afd6c 100644
--- a/test/standard/modules/DebtModule/DebtModule.test.js
+++ b/test/standard/modules/DebtModule/DebtModule.test.js
@@ -1,15 +1,20 @@
const DebtModuleSetDebtEngineCommon = require('../../../common/DebtModule/DebtModuleSetDebtEngineCommon')
const DebtModuleCommon = require('../../../common/DebtModule/DebtModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../../deploymentUtils')
-describe(
- 'Standard - DebtModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- this.debtEngineMock = await ethers.deployContract("DebtEngineMock")
- })
- DebtModuleCommon()
- DebtModuleSetDebtEngineCommon()
- }
-)
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
+describe('Standard - DebtModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.debtEngineMock = await ethers.deployContract('DebtEngineMock')
+ })
+ DebtModuleCommon()
+ DebtModuleSetDebtEngineCommon()
+})
diff --git a/test/standard/modules/DebtModule/DebtModuleConstructor.test.js b/test/standard/modules/DebtModule/DebtModuleConstructor.test.js
index de380621..ffb23791 100644
--- a/test/standard/modules/DebtModule/DebtModuleConstructor.test.js
+++ b/test/standard/modules/DebtModule/DebtModuleConstructor.test.js
@@ -1,32 +1,30 @@
const DebtModuleCommon = require('../../../common/DebtModule/DebtModuleCommon')
const {
- deployCMTATStandaloneWithParameter, fixture, loadFixture
+ deployCMTATStandaloneWithParameter,
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Standard - DebtModule - Constructor',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- const DECIMAL = 0
- this.debtEngineMock = await ethers.deployContract('DebtEngineMock')
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATStandaloneWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, this.debtEngineMock.target, ZERO_ADDRESS, ZERO_ADDRESS]
-
- )
- })
- DebtModuleCommon()
- }
-)
+describe('Standard - DebtModule - Constructor', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ const DECIMAL = 0
+ this.debtEngineMock = await ethers.deployContract('DebtEngineMock')
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATStandaloneWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, this.debtEngineMock.target, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ })
+ DebtModuleCommon()
+})
diff --git a/test/standard/modules/DocumentModule/DocumentModule.test.js b/test/standard/modules/DocumentModule/DocumentModule.test.js
index 93676fb9..9410cf6d 100644
--- a/test/standard/modules/DocumentModule/DocumentModule.test.js
+++ b/test/standard/modules/DocumentModule/DocumentModule.test.js
@@ -1,15 +1,20 @@
const DocumentModuleSetDocumentEngineCommon = require('../../../common/DocumentModule/DocumentModuleSetDocumentEngineCommon')
const DocumentModuleCommon = require('../../../common/DocumentModule/DocumentModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../../deploymentUtils')
-describe(
- 'Standard - DocumentModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- this.documentEngineMock = await ethers.deployContract("DocumentEngineMock")
- })
- DocumentModuleCommon()
- DocumentModuleSetDocumentEngineCommon()
- }
-)
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
+describe('Standard - DocumentModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.documentEngineMock = await ethers.deployContract('DocumentEngineMock')
+ })
+ DocumentModuleCommon()
+ DocumentModuleSetDocumentEngineCommon()
+})
diff --git a/test/standard/modules/DocumentModule/DocumentModuleConstructor.test.js b/test/standard/modules/DocumentModule/DocumentModuleConstructor.test.js
index a0f6519b..f1b7ef38 100644
--- a/test/standard/modules/DocumentModule/DocumentModuleConstructor.test.js
+++ b/test/standard/modules/DocumentModule/DocumentModuleConstructor.test.js
@@ -1,32 +1,30 @@
const DocumentModuleCommon = require('../../../common/DocumentModule/DocumentModuleCommon')
const {
- deployCMTATStandaloneWithParameter, fixture, loadFixture
+ deployCMTATStandaloneWithParameter,
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Standard - DocumentModule - Constructor',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- const DECIMAL = 0
- this.documentEngineMock = await ethers.deployContract('DocumentEngineMock')
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATStandaloneWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, this.documentEngineMock.target]
-
- )
- })
- DocumentModuleCommon()
- }
-)
+describe('Standard - DocumentModule - Constructor', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ const DECIMAL = 0
+ this.documentEngineMock = await ethers.deployContract('DocumentEngineMock')
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATStandaloneWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, this.documentEngineMock.target]
+ )
+ })
+ DocumentModuleCommon()
+})
diff --git a/test/standard/modules/ERC20BaseModule.test.js b/test/standard/modules/ERC20BaseModule.test.js
index c9693c94..5cfa9eb6 100644
--- a/test/standard/modules/ERC20BaseModule.test.js
+++ b/test/standard/modules/ERC20BaseModule.test.js
@@ -1,13 +1,18 @@
const ERC20BaseModuleCommon = require('../../common/ERC20BaseModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../deploymentUtils')
-describe(
- 'Standard - ERC20BaseModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- })
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
+describe('Standard - ERC20BaseModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- ERC20BaseModuleCommon()
- }
-)
+ ERC20BaseModuleCommon()
+})
diff --git a/test/standard/modules/ERC20BurnModule.test.js b/test/standard/modules/ERC20BurnModule.test.js
index 72cd8c7c..18f67c72 100644
--- a/test/standard/modules/ERC20BurnModule.test.js
+++ b/test/standard/modules/ERC20BurnModule.test.js
@@ -1,13 +1,18 @@
const ERC20BurnModuleCommon = require('../../common/ERC20BurnModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../deploymentUtils')
-describe(
- 'Standard - ERC20BurnModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- })
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
+describe('Standard - ERC20BurnModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- ERC20BurnModuleCommon()
- }
-)
+ ERC20BurnModuleCommon()
+})
diff --git a/test/standard/modules/ERC20MintModule.test.js b/test/standard/modules/ERC20MintModule.test.js
index 2171a207..d1781f38 100644
--- a/test/standard/modules/ERC20MintModule.test.js
+++ b/test/standard/modules/ERC20MintModule.test.js
@@ -1,13 +1,18 @@
const ERC20MintModuleCommon = require('../../common/ERC20MintModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../deploymentUtils')
-describe(
- 'Standard - ERC20MintModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- })
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
+describe('Standard - ERC20MintModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- ERC20MintModuleCommon()
- }
-)
+ ERC20MintModuleCommon()
+})
diff --git a/test/standard/modules/ERC20SnapshotModule.test.js b/test/standard/modules/ERC20SnapshotModule.test.js
index 93ffef95..111c8f01 100644
--- a/test/standard/modules/ERC20SnapshotModule.test.js
+++ b/test/standard/modules/ERC20SnapshotModule.test.js
@@ -5,25 +5,26 @@ const ERC20SnapshotModuleCommonGetNextSnapshot = require('../../common/ERC20Snap
const ERC20SnapshotModuleMultiplePlannedTest = require('../../common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleMultiplePlannedTest')
const ERC20SnapshotModuleOnePlannedSnapshotTest = require('../../common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleOnePlannedSnapshotTest')
const ERC20SnapshotModuleZeroPlannedSnapshotTest = require('../../common/ERC20SnapshotModuleCommon/global/ERC20SnapshotModuleZeroPlannedSnapshot')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../deploymentUtils')
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
-describe(
- 'Standard - ERC20SnapshotModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(
- this._.address,
- this.admin.address,
- this.deployerAddress.address
- )
- })
- ERC20SnapshotModuleMultiplePlannedTest()
- ERC20SnapshotModuleOnePlannedSnapshotTest()
- ERC20SnapshotModuleZeroPlannedSnapshotTest()
- ERC20SnapshotModuleCommonRescheduling()
- ERC20SnapshotModuleCommonScheduling()
- ERC20SnapshotModuleCommonUnschedule()
- ERC20SnapshotModuleCommonGetNextSnapshot()
- }
-)
+describe('Standard - ERC20SnapshotModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
+ ERC20SnapshotModuleMultiplePlannedTest()
+ ERC20SnapshotModuleOnePlannedSnapshotTest()
+ ERC20SnapshotModuleZeroPlannedSnapshotTest()
+ ERC20SnapshotModuleCommonRescheduling()
+ ERC20SnapshotModuleCommonScheduling()
+ ERC20SnapshotModuleCommonUnschedule()
+ ERC20SnapshotModuleCommonGetNextSnapshot()
+})
diff --git a/test/standard/modules/EnforcementModule.test.js b/test/standard/modules/EnforcementModule.test.js
index 8b2f2c36..507b9395 100644
--- a/test/standard/modules/EnforcementModule.test.js
+++ b/test/standard/modules/EnforcementModule.test.js
@@ -1,13 +1,18 @@
const EnforcementModuleCommon = require('../../common/EnforcementModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../deploymentUtils')
-describe(
- 'Standard - EnforcementModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- })
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
+describe('Standard - EnforcementModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ })
- EnforcementModuleCommon()
- }
-)
+ EnforcementModuleCommon()
+})
diff --git a/test/standard/modules/MetaTxModule.test.js b/test/standard/modules/MetaTxModule.test.js
index 8b49a745..d40cd3aa 100644
--- a/test/standard/modules/MetaTxModule.test.js
+++ b/test/standard/modules/MetaTxModule.test.js
@@ -1,29 +1,30 @@
const MetaTxModuleCommon = require('../../common/MetaTxModuleCommon')
-const { deployCMTATStandaloneWithParameter, fixture, loadFixture } = require('../../deploymentUtils.js')
+const {
+ deployCMTATStandaloneWithParameter,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils.js')
const { ZERO_ADDRESS, ERC2771ForwarderDomain } = require('../../utils.js')
-describe(
- 'Standard - MetaTxModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- const DECIMAL = 0n
+describe('Standard - MetaTxModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ const DECIMAL = 0n
- this.forwarder = await ethers.deployContract("MinimalForwarderMock")
- await this.forwarder.initialize(ERC2771ForwarderDomain)
- this.cmtat = await deployCMTATStandaloneWithParameter(
- this.deployerAddress.address,
- this.forwarder.target,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
- )
- })
+ this.forwarder = await ethers.deployContract('MinimalForwarderMock')
+ await this.forwarder.initialize(ERC2771ForwarderDomain)
+ this.cmtat = await deployCMTATStandaloneWithParameter(
+ this.deployerAddress.address,
+ this.forwarder.target,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ })
- MetaTxModuleCommon()
- }
-)
+ MetaTxModuleCommon()
+})
diff --git a/test/standard/modules/PauseModule.test.js b/test/standard/modules/PauseModule.test.js
index 2c4b6dda..f5f64831 100644
--- a/test/standard/modules/PauseModule.test.js
+++ b/test/standard/modules/PauseModule.test.js
@@ -1,14 +1,19 @@
const PauseModuleCommon = require('../../common/PauseModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../deploymentUtils')
-describe(
- 'Standard - PauseModule',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- // Mint tokens to test the transfer
- await this.cmtat.connect(this.admin).mint(this.address1, 20)
- })
- PauseModuleCommon()
- }
-)
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../deploymentUtils')
+describe('Standard - PauseModule', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ // Mint tokens to test the transfer
+ await this.cmtat.connect(this.admin).mint(this.address1, 20)
+ })
+ PauseModuleCommon()
+})
diff --git a/test/standard/modules/ValidationModule/ValidationModule.test.js b/test/standard/modules/ValidationModule/ValidationModule.test.js
index 3ac79ecd..1b99b881 100644
--- a/test/standard/modules/ValidationModule/ValidationModule.test.js
+++ b/test/standard/modules/ValidationModule/ValidationModule.test.js
@@ -1,19 +1,30 @@
const ValidationModuleCommon = require('../../../common/ValidationModule/ValidationModuleCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../../deploymentUtils')
-describe(
- 'Standard - ValidationModule',
- function () {
- beforeEach(async function () {
- this.ADDRESS1_INITIAL_BALANCE = 31n
- this.ADDRESS2_INITIAL_BALANCE = 32n
- this.ADDRESS3_INITIAL_BALANCE = 33n
- Object.assign(this, await loadFixture(fixture));
- this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- await this.cmtat.connect(this.admin).mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
- })
- ValidationModuleCommon()
- }
-)
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
+describe('Standard - ValidationModule', function () {
+ beforeEach(async function () {
+ this.ADDRESS1_INITIAL_BALANCE = 31n
+ this.ADDRESS2_INITIAL_BALANCE = 32n
+ this.ADDRESS3_INITIAL_BALANCE = 33n
+ Object.assign(this, await loadFixture(fixture))
+ this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
+ })
+ ValidationModuleCommon()
+})
diff --git a/test/standard/modules/ValidationModule/ValidationModuleConstructor.test.js b/test/standard/modules/ValidationModule/ValidationModuleConstructor.test.js
index 43b218e7..0372b67d 100644
--- a/test/standard/modules/ValidationModule/ValidationModuleConstructor.test.js
+++ b/test/standard/modules/ValidationModule/ValidationModuleConstructor.test.js
@@ -1,38 +1,42 @@
const ValidationModuleCommon = require('../../../common/ValidationModule/ValidationModuleCommon')
const {
- deployCMTATStandaloneWithParameter, fixture, loadFixture
+ deployCMTATStandaloneWithParameter,
+ fixture,
+ loadFixture
} = require('../../../deploymentUtils')
const { ZERO_ADDRESS } = require('../../../utils')
-describe(
- 'Standard - ValidationModule - Constructor',
- function () {
- beforeEach(async function () {
- this.ADDRESS1_INITIAL_BALANCE = 17n
- this.ADDRESS2_INITIAL_BALANCE = 18n
- this.ADDRESS3_INITIAL_BALANCE = 19n
- Object.assign(this, await loadFixture(fixture));
- const DECIMAL = 0
- this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
- this.definedAtDeployment = true
- this.cmtat = await deployCMTATStandaloneWithParameter(
- this.deployerAddress.address,
- this._.address,
- this.admin.address,
- 'CMTA Token',
- 'CMTAT',
- DECIMAL,
- 'CMTAT_ISIN',
- 'https://cmta.ch',
- 'CMTAT_info',
- [this.ruleEngineMock.target, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
-
- )
- await this.cmtat.connect(this.admin).mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
- await this.cmtat.connect(this.admin).mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
- })
- ValidationModuleCommon()
- }
-)
+describe('Standard - ValidationModule - Constructor', function () {
+ beforeEach(async function () {
+ this.ADDRESS1_INITIAL_BALANCE = 17n
+ this.ADDRESS2_INITIAL_BALANCE = 18n
+ this.ADDRESS3_INITIAL_BALANCE = 19n
+ Object.assign(this, await loadFixture(fixture))
+ const DECIMAL = 0
+ this.ruleEngineMock = await ethers.deployContract('RuleEngineMock')
+ this.definedAtDeployment = true
+ this.cmtat = await deployCMTATStandaloneWithParameter(
+ this.deployerAddress.address,
+ this._.address,
+ this.admin.address,
+ 'CMTA Token',
+ 'CMTAT',
+ DECIMAL,
+ 'CMTAT_ISIN',
+ 'https://cmta.ch',
+ 'CMTAT_info',
+ [this.ruleEngineMock.target, ZERO_ADDRESS, ZERO_ADDRESS, ZERO_ADDRESS]
+ )
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address1, this.ADDRESS1_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address2, this.ADDRESS2_INITIAL_BALANCE)
+ await this.cmtat
+ .connect(this.admin)
+ .mint(this.address3, this.ADDRESS3_INITIAL_BALANCE)
+ })
+ ValidationModuleCommon()
+})
diff --git a/test/standard/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js b/test/standard/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js
index fb98c425..d47972aa 100644
--- a/test/standard/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js
+++ b/test/standard/modules/ValidationModule/ValidationModuleSetRuleEngine.test.js
@@ -1,14 +1,18 @@
const ValidationModuleSetRuleEngineCommon = require('../../../common/ValidationModule/ValidationModuleSetRuleEngineCommon')
-const { deployCMTATStandalone, fixture, loadFixture } = require('../../../deploymentUtils')
-describe(
- 'Standard - ValidationModule - setRuleEngine',
- function () {
- beforeEach(async function () {
- Object.assign(this, await loadFixture(fixture));
- this.cmtat = await deployCMTATStandalone(this._.address, this.admin.address, this.deployerAddress.address)
- this.ruleEngine = await ethers.deployContract("RuleEngineMock")
-
- })
- ValidationModuleSetRuleEngineCommon()
- }
-)
+const {
+ deployCMTATStandalone,
+ fixture,
+ loadFixture
+} = require('../../../deploymentUtils')
+describe('Standard - ValidationModule - setRuleEngine', function () {
+ beforeEach(async function () {
+ Object.assign(this, await loadFixture(fixture))
+ this.cmtat = await deployCMTATStandalone(
+ this._.address,
+ this.admin.address,
+ this.deployerAddress.address
+ )
+ this.ruleEngine = await ethers.deployContract('RuleEngineMock')
+ })
+ ValidationModuleSetRuleEngineCommon()
+})
diff --git a/test/utils.js b/test/utils.js
index 55b73cc7..b984047f 100644
--- a/test/utils.js
+++ b/test/utils.js
@@ -21,7 +21,7 @@ module.exports = {
'0x13293a342e85bb7a675992804d0c6194d27d85f90a7401d0666e206fe3b06a03',
DOCUMENT_ROLE:
'0xdd7c9aafbb91d54fb2041db1d5b172ea665309b32f5fffdbddf452802a1e3b20',
- PROXY_UPGRADE_ROLE: `0x233d5d22cfc2df30a1764cac21e2207537a3711647f2c29fe3702201f65c1444`,
+ PROXY_UPGRADE_ROLE: '0x233d5d22cfc2df30a1764cac21e2207537a3711647f2c29fe3702201f65c1444',
ZERO_ADDRESS: ethers.ZeroAddress,
RULE_MOCK_AMOUNT_MAX: '20',
CMTAT_TRANSFER_REJECT: 'CMTAT: transfer rejected by validation module',
|