mirror of
git://holbrook.no/eth-faucet
synced 2024-12-04 20:46:10 +01:00
Add missing event emissions, codegen script package fix
This commit is contained in:
parent
f9563b7a00
commit
c65bcb0059
@ -15,8 +15,13 @@ argparser = argparse.ArgumentParser()
|
|||||||
argparser.add_argument('name', type=str, default='faucet', choices=['faucet', 'period'], help='list code identifiers')
|
argparser.add_argument('name', type=str, default='faucet', choices=['faucet', 'period'], help='list code identifiers')
|
||||||
args = argparser.parse_args(sys.argv[1:])
|
args = argparser.parse_args(sys.argv[1:])
|
||||||
|
|
||||||
fp = os.path.join(data_dir, tr[args.name] + '.bin')
|
def main():
|
||||||
f = open(fp, 'r')
|
fp = os.path.join(data_dir, tr[args.name] + '.bin')
|
||||||
r = f.read()
|
f = open(fp, 'r')
|
||||||
f.close()
|
r = f.read()
|
||||||
print(r)
|
f.close()
|
||||||
|
print(r)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
@ -4,7 +4,7 @@ version = 0.1.1
|
|||||||
description = Gas token gifter with controls from time intervals, amounts and access.
|
description = Gas token gifter with controls from time intervals, amounts and access.
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
url = https://git.grassecon.net/cicnet/eth-faucet
|
url = https://git.defalsify.org/eth-faucet
|
||||||
keywords =
|
keywords =
|
||||||
ethereum
|
ethereum
|
||||||
classifiers =
|
classifiers =
|
||||||
|
@ -11,7 +11,7 @@ contract PeriodSimple {
|
|||||||
mapping (address => uint256) public lastUsed;
|
mapping (address => uint256) public lastUsed;
|
||||||
|
|
||||||
event PeriodChange(uint256 _value);
|
event PeriodChange(uint256 _value);
|
||||||
|
event BalanceThresholdChange(uint256 _value);
|
||||||
constructor() {
|
constructor() {
|
||||||
owner = msg.sender;
|
owner = msg.sender;
|
||||||
poker = owner;
|
poker = owner;
|
||||||
@ -20,6 +20,7 @@ contract PeriodSimple {
|
|||||||
function setPeriod(uint256 _period) public {
|
function setPeriod(uint256 _period) public {
|
||||||
require(owner == msg.sender, 'ERR_NOT_OWNER');
|
require(owner == msg.sender, 'ERR_NOT_OWNER');
|
||||||
period = _period;
|
period = _period;
|
||||||
|
emit PeriodChange(_period);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPoker(address _poker) public {
|
function setPoker(address _poker) public {
|
||||||
@ -30,6 +31,7 @@ contract PeriodSimple {
|
|||||||
function setBalanceThreshold(uint256 _threshold) public {
|
function setBalanceThreshold(uint256 _threshold) public {
|
||||||
require(msg.sender == owner);
|
require(msg.sender == owner);
|
||||||
balanceThreshold = _threshold;
|
balanceThreshold = _threshold;
|
||||||
|
emit BalanceThresholdChange(_threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
function check(address _subject) public view returns(bool) {
|
function check(address _subject) public view returns(bool) {
|
||||||
|
Loading…
Reference in New Issue
Block a user