forked from cerc-io/ipld-eth-server
Merge pull request #33 from vulcanize/redsquirrel-patch-2
Minor Solidity suggestion
This commit is contained in:
commit
c5862299e6
@ -26,7 +26,7 @@ contract Contract {
|
||||
|
||||
function add_address(address addr) public {
|
||||
bool exists = addresses[addr] > 0;
|
||||
addresses[addr] = addresses[addr] + 1;
|
||||
addresses[addr]++;
|
||||
if (!exists) {
|
||||
emit AddressAdded(addr, ++num_addresses);
|
||||
}
|
||||
@ -164,4 +164,4 @@ The mappings would be able to lookup storage keys reflecting `num_addresses` or
|
||||
|
||||
The repository would be able to persist the value or `num_addresses` or any slot in `addresses`, using metadata returned from the mappings.
|
||||
|
||||
The mappings and repository could be plugged into the common storage transformer, enabling us to know the contract's state as it is changing.
|
||||
The mappings and repository could be plugged into the common storage transformer, enabling us to know the contract's state as it is changing.
|
||||
|
Loading…
Reference in New Issue
Block a user