-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix setMaxSupply to check total minted (#27)
- Loading branch information
1 parent
986bbaa
commit 66ba281
Showing
6 changed files
with
187 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"files": [ | ||
"contracts/tokens/CollectibleV1.sol", | ||
"certora/harness/CollectibleV1Harness.sol", | ||
"contracts/tokens/OwnerToken.sol", | ||
"contracts/tokens/MasterToken.sol" | ||
], | ||
"msg": "Verifying CollectibleV1.sol", | ||
"rule_sanity": "basic", | ||
"verify": "CollectibleV1Harness:certora/specs/CollectibleV1.spec", | ||
"link": ["CollectibleV1Harness:ownerToken=OwnerToken", "CollectibleV1Harness:masterToken=MasterToken"], | ||
"packages": ["@openzeppelin=lib/openzeppelin-contracts"], | ||
"optimistic_loop": true, | ||
"loop_iter": "3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-License-Identifier: Mozilla Public License 2.0 | ||
pragma solidity ^0.8.17; | ||
|
||
import {CollectibleV1} from "../../contracts/tokens/CollectibleV1.sol"; | ||
|
||
contract CollectibleV1Harness is CollectibleV1 { | ||
constructor( | ||
string memory name, | ||
string memory symbol, | ||
uint256 maxSupply, | ||
bool remoteBurnable, | ||
bool transferable, | ||
string memory baseURI, | ||
address ownerToken, | ||
address masterToken | ||
) | ||
CollectibleV1( | ||
name, | ||
symbol, | ||
maxSupply, | ||
remoteBurnable, | ||
transferable, | ||
baseURI, | ||
ownerToken, | ||
masterToken | ||
) | ||
{} | ||
|
||
/** | ||
* @notice A helper function to count the number of occurrences of an address in a list. | ||
*/ | ||
function countAddressOccurrences( | ||
address[] memory list, | ||
address addr | ||
) external pure returns (uint) { | ||
uint256 count = 0; | ||
for (uint256 i = 0; i < list.length; i++) { | ||
if (list[i] == addr) { | ||
count++; | ||
} | ||
} | ||
return count; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters