* 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.
18 lines
404 B
Solidity
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;
|
|
}
|
|
}
|