mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-12-21 11:37:32 +01:00
Prevent non-owner from changing seal, bump deps
This commit is contained in:
parent
a40385a5a0
commit
8c09ff266e
@ -1,3 +1,5 @@
|
||||
- 0.5.6
|
||||
* Truncate approve maxuint value to tolerable value for contract.
|
||||
- 0.5.5
|
||||
* Make allowance method public
|
||||
- 0.5.4
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,9 @@
|
||||
chainlib-eth~=0.4.11
|
||||
chainlib~=0.4.12
|
||||
eth-erc20~=0.7.0
|
||||
funga-eth~=0.6.0
|
||||
#chainlib-eth~=0.4.11
|
||||
#chainlib~=0.4.12
|
||||
#eth-erc20~=0.7.0
|
||||
#funga-eth~=0.6.0
|
||||
chainlib-eth~=0.6.1
|
||||
chainlib~=0.5.0
|
||||
eth-erc20~=0.9.0
|
||||
funga-eth~=0.8.0
|
||||
dexif~=0.0.2
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = erc20-demurrage-token
|
||||
version = 0.5.6
|
||||
version = 0.5.7
|
||||
description = ERC20 token with redistributed continual demurrage
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
@ -1,2 +1,3 @@
|
||||
eth_tester==0.5.0b3
|
||||
py-evm==0.3.0a20
|
||||
eth_tester==0.10.0b4
|
||||
py-evm==0.10.0b4
|
||||
rlp==3.0.0
|
||||
|
@ -165,6 +165,7 @@ contract DemurrageTokenSingleNocap {
|
||||
}
|
||||
|
||||
function seal(uint256 _state) public returns(uint256) {
|
||||
require(msg.sender == owner);
|
||||
require(_state < 16, 'ERR_INVALID_STATE');
|
||||
require(_state & sealState == 0, 'ERR_ALREADY_LOCKED');
|
||||
sealState |= _state;
|
||||
@ -599,8 +600,8 @@ contract DemurrageTokenSingleNocap {
|
||||
|
||||
changePeriod();
|
||||
|
||||
// dex code will attempt uint256max approve, but contract cannot handle that size
|
||||
// truncate to biggest possible value
|
||||
// dex code will attempt uint256max approve, but basevalue calc is only valid up to a maximum of 2^63-1
|
||||
// skip the base value calc for higher values
|
||||
if (_value <= VALUE_LIMIT) {
|
||||
baseValue = toBaseAmount(_value);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user