commit 16392a78b9085a1c7d81babb20f9ead3100a53d4 parent 7336c46f0e692cbe1270077e2d686794d293777c Author: nolash <dev@holbrook.no> Date: Sat, 12 Dec 2020 12:48:41 +0100 Rename abis Diffstat:
8 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/solidity/ERC20SingleShotFaucet.abi.json b/python/erc20_single_shot_faucet/data/ERC20SingleShotFaucet.json diff --git a/solidity/ERC20SingleShotFaucetStorage.abi.json b/python/erc20_single_shot_faucet/data/ERC20SingleShotFaucetStorage.json diff --git a/python/erc20_single_shot_faucet/data/GiftableToken.json b/python/erc20_single_shot_faucet/data/GiftableToken.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferFrom","type":"event"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/solidity/IERC20SingleShotFaucet.abi.json b/python/erc20_single_shot_faucet/data/IERC20SingleShotFaucet.json diff --git a/solidity/IERC20SingleShotFaucetStorage.abi.json b/python/erc20_single_shot_faucet/data/IERC20SingleShotFaucetStorage.json diff --git a/python/erc20_single_shot_faucet/faucet.py b/python/erc20_single_shot_faucet/faucet.py @@ -36,11 +36,11 @@ class Faucet: @staticmethod def abi(part=None): if Faucet.__abi == None: - f = open(os.path.join(datadir, 'ERC20SingleShotFaucet.abi.json'), 'r') + f = open(os.path.join(datadir, 'ERC20SingleShotFaucet.json'), 'r') Faucet.__abi = json.load(f) f.close() if part == 'storage': - f = open(os.path.join(datadir, 'ERC20SingleShotFaucetStorage.abi.json')) + f = open(os.path.join(datadir, 'ERC20SingleShotFaucetStorage.json')) abi = f.read() f.close() return abi diff --git a/python/tests/test_app.py b/python/tests/test_app.py @@ -32,7 +32,7 @@ class Test(unittest.TestCase): bytecode = f.read() f.close() - f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucetStorage.abi.json'), 'r') + f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucetStorage.json'), 'r') self.abi_storage = json.load(f) f.close() @@ -54,7 +54,7 @@ class Test(unittest.TestCase): bytecode = f.read() f.close() - f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/GiftableToken.abi.json'), 'r') + f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/GiftableToken.json'), 'r') self.abi_token = json.load(f) f.close() @@ -74,11 +74,11 @@ class Test(unittest.TestCase): bytecode = f.read() f.close() - f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.abi.json'), 'r') + f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.json'), 'r') self.abi_faucet = json.load(f) f.close() -# f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.abi.json'), 'r') +# f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.json'), 'r') # abi_storage_interface = json.load(f) # f.close() diff --git a/python/tests/test_contract.py b/python/tests/test_contract.py @@ -30,7 +30,7 @@ class Test(unittest.TestCase): bytecode = f.read() f.close() - f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucetStorage.abi.json'), 'r') + f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucetStorage.json'), 'r') self.abi_storage = json.load(f) f.close() @@ -52,7 +52,7 @@ class Test(unittest.TestCase): bytecode = f.read() f.close() - f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/GiftableToken.abi.json'), 'r') + f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/GiftableToken.json'), 'r') self.abi_token = json.load(f) f.close() @@ -72,11 +72,11 @@ class Test(unittest.TestCase): bytecode = f.read() f.close() - f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.abi.json'), 'r') + f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.json'), 'r') self.abi_faucet = json.load(f) f.close() -# f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.abi.json'), 'r') +# f = open(os.path.join(testdir, '../erc20_single_shot_faucet/data/ERC20SingleShotFaucet.json'), 'r') # abi_storage_interface = json.load(f) # f.close() @@ -132,4 +132,5 @@ class Test(unittest.TestCase): self.assertEqual(t.functions.balanceOf(self.address_faucet).call(), 40); - +if __name__ == '__main__': + unittest.main()