Files
openzeppelin-contracts/contracts/mocks/CountersImpl.sol
Nicolás Venturo b7d60f2f9a Fix warnings (#1606)
* Bump required compiler version to 0.5.2.

* Fix shadowed variable warning in ERC20Migrator.

* Rename Counter to Counters.

* Add dummy state variable to SafeERC20Helper.

* Update changelog entry.

* Fix CountersImpl name.

* Improve changelog entry.
2019-01-17 15:59:30 -03:00

18 lines
404 B
Solidity

pragma solidity ^0.5.2;
import "../drafts/Counters.sol";
contract CountersImpl {
using Counters for Counters.Counter;
uint256 public theId;
// use whatever key you want to track your counters
mapping(string => Counters.Counter) private _counters;
function doThing(string memory key) public returns (uint256) {
theId = _counters[key].next();
return theId;
}
}