Skip to content

Commit

Permalink
Add slither report for the version 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rya-sge committed Sep 13, 2023
1 parent 95fef65 commit 166fe25
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 209 deletions.
2 changes: 0 additions & 2 deletions contracts/CMTAT_PROXY.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ contract CMTAT_PROXY is CMTAT_BASE {
constructor(
address forwarderIrrevocable
) MetaTxModule(forwarderIrrevocable) {
// Initialize the variable for the implementation
deployedWithProxy = true;
// Disable the possibility to initialize the implementation
_disableInitializers();
}
Expand Down
7 changes: 5 additions & 2 deletions contracts/modules/internal/ERC20SnapshotModuleInternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ abstract contract ERC20SnapshotModuleInternal is ERC20Upgradeable {
/**
@dev time instead of a counter for OpenZeppelin
*/
// Initialized to zero
uint256 private _currentSnapshotTime;
// Initialized to zero
uint256 private _currentSnapshotIndex;

/**
Expand All @@ -74,8 +76,8 @@ abstract contract ERC20SnapshotModuleInternal is ERC20Upgradeable {
}

function __ERC20Snapshot_init_unchained() internal onlyInitializing {
_currentSnapshotTime = 0;
_currentSnapshotIndex = 0;
// Nothing to do
// _currentSnapshotTime & _currentSnapshotIndex are initialized to zero
}

/**
Expand Down Expand Up @@ -470,6 +472,7 @@ abstract contract ERC20SnapshotModuleInternal is ERC20Upgradeable {
) {
return (0, currentArraySize);
}
// mostRecent is initialized in the loop
uint256 mostRecent;
index = currentArraySize;
for (uint256 i = _currentSnapshotIndex; i < currentArraySize; ) {
Expand Down
2 changes: 0 additions & 2 deletions contracts/modules/wrapper/core/BaseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ abstract contract BaseModule is AuthorizationModule {
Get the current version of the smart contract
*/
string public constant VERSION = "2.3.1";
// to initialize inside the implementation constructor when deployed with a Proxy
bool internal deployedWithProxy;
/* Events */
event Term(string indexed newTermIndexed, string newTerm);
event TokenId(string indexed newTokenIdIndexed, string newTokenId);
Expand Down
2 changes: 0 additions & 2 deletions contracts/test/CMTATSnapshot/CMTATSnapshotProxyTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ contract CMTATSnapshotProxyTest is CMTAT_BASE_SnapshotTest {
constructor(
address forwarderIrrevocable
) MetaTxModule(forwarderIrrevocable) {
// Initialize the variable for the implementation
deployedWithProxy = true;
// Disable the possibility to initialize the implementation
_disableInitializers();
}
Expand Down
File renamed without changes.
Loading

0 comments on commit 166fe25

Please sign in to comment.