commit d3072272d811bfd5d00dd5b927b99e1971e9c4f5
parent 7e5409eb16791c851c5ce8a465eb1a18c8a8b413
Author: nolash <dev@holbrook.no>
Date: Sat, 1 May 2021 00:40:27 +0200
Rename data files
Diffstat:
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/python/erc20_faucet/faucet.py b/python/erc20_faucet/faucet.py
@@ -37,11 +37,11 @@ class SingleShotFaucet(Faucet):
@staticmethod
def abi(part=None):
if SingleShotFaucet.__abi == None:
- f = open(os.path.join(datadir, 'ERC20SingleShotFaucet.json'), 'r')
+ f = open(os.path.join(datadir, 'ERC20Faucet.json'), 'r')
SingleShotFaucet.__abi = json.load(f)
f.close()
if part == 'storage':
- f = open(os.path.join(datadir, 'ERC20SingleShotFaucetStorage.json'))
+ f = open(os.path.join(datadir, 'ERC20FaucetStorage.json'))
abi = f.read()
f.close()
return abi
@@ -53,11 +53,11 @@ class SingleShotFaucet(Faucet):
@staticmethod
def bytecode(part=None):
if SingleShotFaucet.__bytecode == None:
- f = open(os.path.join(datadir, 'ERC20SingleShotFaucet.bin'))
+ f = open(os.path.join(datadir, 'ERC20Faucet.bin'))
SingleShotFaucet.__bytecode = f.read()
f.close()
if part == 'storage':
- f = open(os.path.join(datadir, 'ERC20SingleShotFaucetStorage.bin'))
+ f = open(os.path.join(datadir, 'ERC20FaucetStorage.bin'))
bytecode = f.read()
f.close()
return bytecode
diff --git a/python/erc20_faucet/interface.py b/python/erc20_faucet/interface.py
@@ -81,11 +81,11 @@ class Faucet(TxFactory):
return abi_decode_single(ABIContractType.ADDRESS, v)
- def amount(self, contract_address, block_height=None, sender_address=ZERO_ADDRESS):
+ def token_amount(self, contract_address, block_height=None, sender_address=ZERO_ADDRESS):
o = jsonrpc_template()
o['method'] = 'eth_call'
enc = ABIContractEncoder()
- enc.method('amount')
+ enc.method('tokenAmount')
data = add_0x(enc.get())
tx = self.template(sender_address, contract_address)
tx = self.set_code(tx, data)
@@ -98,5 +98,5 @@ class Faucet(TxFactory):
@classmethod
- def parse_amount(self, v):
+ def parse_token_amount(self, v):
return abi_decode_single(ABIContractType.UINT256, v)
diff --git a/python/erc20_faucet/runnable/deploy.py b/python/erc20_faucet/runnable/deploy.py
@@ -14,7 +14,7 @@ import logging
# external imports
import web3
from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer
-from crypto_dev_signer.keystore import DictKeystore
+from crypto_dev_signer.keystore.dict import DictKeystore
from crypto_dev_signer.eth.helper import EthTxExecutor
logging.basicConfig(level=logging.WARNING)