Add publish cli

This commit is contained in:
lash
2023-05-31 16:28:38 +01:00
parent 88546a88a2
commit 92216df990
10 changed files with 161 additions and 30 deletions

View File

@@ -71,12 +71,11 @@ contract CappedToken {
uint8 constant EXPIRY_STATE = 4;
uint256 constant public maxSealState = 15;
constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _expireTimestamp) {
constructor(string memory _name, string memory _symbol, uint8 _decimals) {
owner = msg.sender;
name = _name;
symbol = _symbol;
decimals = _decimals;
expires = _expireTimestamp;
}
// Change max token supply.
@@ -122,8 +121,8 @@ contract CappedToken {
// Implements Minter
function mintTo(address _to, uint256 _value) public returns (bool) {
require(writers[msg.sender] || msg.sender == owner);
require(applyExpiry() == 0);
require(writers[msg.sender] || msg.sender == owner, "ERR_AXX");
require(applyExpiry() == 0, "ERR_EXPIRE");
if (maxSupply > 0) {
require(totalSupply() + _value <= maxSupply);
}