Browse Source

added init_state axiom for sum of balances

Michael George 3 years ago
parent
commit
27fa53bba9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      certora/specs/ERC1155Supply.spec

+ 3 - 1
certora/specs/ERC1155Supply.spec

@@ -32,7 +32,9 @@ filtered {
 
 /******************************************************************************/
 
-ghost mapping(uint256 => mathint) sumOfBalances;
+ghost mapping(uint256 => mathint) sumOfBalances {
+    init_state axiom forall uint256 token . sumOfBalances[token] == 0;
+}
 
 hook Sstore _balances[KEY uint256 token][KEY address user] uint256 newValue (uint256 oldValue) STORAGE {
     sumOfBalances[token] = sumOfBalances[token] + newValue - oldValue;