eth-faucet

Gas token gifter with controls from time intervals, amounts and access
Log | Files | Refs | README

commit c65bcb00599c975bf2332fd3ab1c730da1ed1518
parent f9563b7a0002513f9c34dc246cafda900f96993d
Author: lash <dev@holbrook.no>
Date:   Sun, 12 Feb 2023 08:16:17 +0000

Add missing event emissions, codegen script package fix

Diffstat:
Mpython/eth_faucet/runnable/gen.py | 15++++++++++-----
Mpython/setup.cfg | 2+-
Msolidity/PeriodSimple.sol | 4+++-
3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/python/eth_faucet/runnable/gen.py b/python/eth_faucet/runnable/gen.py @@ -15,8 +15,13 @@ argparser = argparse.ArgumentParser() argparser.add_argument('name', type=str, default='faucet', choices=['faucet', 'period'], help='list code identifiers') args = argparser.parse_args(sys.argv[1:]) -fp = os.path.join(data_dir, tr[args.name] + '.bin') -f = open(fp, 'r') -r = f.read() -f.close() -print(r) +def main(): + fp = os.path.join(data_dir, tr[args.name] + '.bin') + f = open(fp, 'r') + r = f.read() + f.close() + print(r) + + +if __name__ == '__main__': + main() diff --git a/python/setup.cfg b/python/setup.cfg @@ -4,7 +4,7 @@ version = 0.1.1 description = Gas token gifter with controls from time intervals, amounts and access. author = Louis Holbrook author_email = dev@holbrook.no -url = https://git.grassecon.net/cicnet/eth-faucet +url = https://git.defalsify.org/eth-faucet keywords = ethereum classifiers = diff --git a/solidity/PeriodSimple.sol b/solidity/PeriodSimple.sol @@ -11,7 +11,7 @@ contract PeriodSimple { mapping (address => uint256) public lastUsed; event PeriodChange(uint256 _value); - + event BalanceThresholdChange(uint256 _value); constructor() { owner = msg.sender; poker = owner; @@ -20,6 +20,7 @@ contract PeriodSimple { function setPeriod(uint256 _period) public { require(owner == msg.sender, 'ERR_NOT_OWNER'); period = _period; + emit PeriodChange(_period); } function setPoker(address _poker) public { @@ -30,6 +31,7 @@ contract PeriodSimple { function setBalanceThreshold(uint256 _threshold) public { require(msg.sender == owner); balanceThreshold = _threshold; + emit BalanceThresholdChange(_threshold); } function check(address _subject) public view returns(bool) {