ConsenSysDiligence / ConsenSysDiligence/scribble
sum from mapping of structs?
Open
question
- Dominant language
- TypeScript
- Stars
- 334
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to achieve something like this?
```solidity
contract Vault {
struct Account {
uint256 id;
uint256 shares;
}
mapping(address => Account) accounts;
uint256 totalShares;
/// #invariant unchecked_sum(accounts.shares) == totalShares;
function deposit() {
/// ...
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.