mirror of
git://holbrook.no/erc20-demurrage-token
synced 2025-07-17 00:12:50 +02:00
Compare commits
No commits in common. "9b538d0e47fb6ed20f5a356f02be95f238401db6" and "2ea28aacd1b71a810ed129e25ec95923fcd04635" have entirely different histories.
9b538d0e47
...
2ea28aacd1
@ -147,7 +147,7 @@ class Test(unittest.TestCase):
|
||||
r = self.w3.eth.getTransactionReceipt(tx_hash)
|
||||
# No cheating!
|
||||
self.contract.functions.transfer(self.w3.eth.accounts[3], spend_amount).transact({'from': self.w3.eth.accounts[3]})
|
||||
# No cheapskating!
|
||||
# Cheapskate!
|
||||
self.contract.functions.transfer(external_address, spend_amount-1).transact({'from': self.w3.eth.accounts[4]})
|
||||
|
||||
self.assertEqual(r.status, 1)
|
||||
|
@ -117,15 +117,12 @@ contract RedistributedDemurrageToken {
|
||||
// Creates new tokens out of thin air, and allocates them to the given address
|
||||
// Triggers tax
|
||||
function mintTo(address _beneficiary, uint256 _amount) external returns (bool) {
|
||||
uint256 baseAmount;
|
||||
|
||||
require(minter[msg.sender]);
|
||||
|
||||
applyDemurrage();
|
||||
changePeriod();
|
||||
baseAmount = _amount;
|
||||
totalSupply += _amount;
|
||||
increaseBaseBalance(_beneficiary, baseAmount);
|
||||
increaseBaseBalance(_beneficiary, _amount);
|
||||
emit Mint(msg.sender, _beneficiary, _amount);
|
||||
saveRedistributionSupply();
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user