Skip to main content

Counters

Git Source

Functions​

current​

function current(Counter storage counter) internal view returns (uint256);

increment​

function increment(Counter storage counter) internal;

decrement​

function decrement(Counter storage counter) internal;

Structs​

Counter​

struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}