commit 0937ecb8cd8fca110c2a0d04bd84ba909a7f781b
parent 99e82dd3bf91f75d504277a9b6cce363df560e8a
Author: lash <dev@holbrook.no>
Date: Tue, 21 Mar 2023 20:08:17 +0000
Add giftable token contract metadata
Diffstat:
17 files changed, 203 insertions(+), 186 deletions(-)
diff --git a/python/CHANGELOG b/python/CHANGELOG
@@ -1,3 +1,5 @@
+* 0.6.2
+ - Add Giftable Token contract metadata
* 0.6.1
- Add explicit burn (reduces supply) to giftable token
* 0.6.0
diff --git a/python/eth_erc20/unittest/base.py b/python/eth_erc20/unittest/base.py
@@ -0,0 +1,169 @@
+# standard imports
+import logging
+
+# external imports
+from chainlib.eth.unittest.ethtester import EthTesterCase
+from chainlib.eth.nonce import RPCNonceOracle
+from chainlib.eth.gas import OverrideGasOracle
+from chainlib.eth.tx import (
+ transaction,
+ receipt,
+ )
+from hexathon import strip_0x
+
+# local imports
+from giftable_erc20_token.unittest import TestGiftableToken
+from eth_erc20 import ERC20
+
+logging.basicConfig(level=logging.DEBUG)
+logg = logging.getLogger(__name__)
+
+
+class TestInterface:
+
+ def test_balance(self):
+ c = ERC20(self.chain_spec)
+ o = c.balance_of(self.address, self.accounts[0], sender_address=self.accounts[0])
+ r = self.conn.do(o)
+ balance = ERC20.parse_balance(r)
+ self.assertEqual(self.initial_supply, balance)
+
+
+ def test_supply(self):
+ c = ERC20(self.chain_spec)
+ o = c.total_supply(self.address, sender_address=self.accounts[0])
+ r = self.conn.do(o)
+ supply = ERC20.parse_total_supply(r)
+ self.assertEqual(self.initial_supply, supply)
+
+
+ def test_name(self):
+ c = ERC20(self.chain_spec)
+ o = c.name(self.address, sender_address=self.accounts[0])
+ r = self.conn.do(o)
+ name = ERC20.parse_name(r)
+ self.assertEqual(self.name, name)
+
+
+ def test_symbol(self):
+ c = ERC20(self.chain_spec)
+ o = c.symbol(self.address, sender_address=self.accounts[0])
+ r = self.conn.do(o)
+ symbol = ERC20.parse_symbol(r)
+ self.assertEqual(self.symbol, symbol)
+
+
+ def test_transfer(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
+ gas_oracle = OverrideGasOracle(limit=100000, conn=self.conn)
+ c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
+ (tx_hash, o) = c.transfer(self.address, self.accounts[0], self.accounts[1], 1000)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 1)
+
+ o = c.balance_of(self.address, self.accounts[0], sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ balance = c.parse_balance(r)
+ self.assertEqual(balance, self.initial_supply - 1000)
+
+ o = c.balance_of(self.address, self.accounts[1], sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ balance = c.parse_balance(r)
+ self.assertEqual(balance, 1000)
+
+ o = transaction(tx_hash)
+ r = self.rpc.do(o)
+ data = c.parse_transfer_request(r['data'])
+ self.assertEqual(data[0], strip_0x(self.accounts[1]))
+ self.assertEqual(data[1], 1000)
+
+
+ def test_transfer_from(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
+ gas_oracle = OverrideGasOracle(limit=100000, conn=self.conn)
+ c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
+ (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 1000)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 1)
+
+ o = c.allowance(self.address, self.accounts[0], self.accounts[1], sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ allowance = c.parse_allowance(r)
+ self.assertEqual(allowance, 1000)
+
+ o = transaction(tx_hash)
+ r = self.rpc.do(o)
+ data = c.parse_approve_request(r['data'])
+ self.assertEqual(data[0], strip_0x(self.accounts[1]))
+ self.assertEqual(data[1], 1000)
+
+ nonce_oracle = RPCNonceOracle(self.accounts[1], conn=self.conn)
+ c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
+ (tx_hash, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[0], self.accounts[2], 1001)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 0)
+
+ o = transaction(tx_hash)
+ r = self.rpc.do(o)
+ data = c.parse_transfer_from_request(r['data'])
+ self.assertEqual(data[0], strip_0x(self.accounts[0]))
+ self.assertEqual(data[1], strip_0x(self.accounts[2]))
+ self.assertEqual(data[2], 1001)
+
+ (tx_hash, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[0], self.accounts[2], 1000)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 1)
+
+ o = c.balance_of(self.address, self.accounts[0], sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ balance = c.parse_balance(r)
+ self.assertEqual(balance, self.initial_supply - 1000)
+
+ o = c.balance_of(self.address, self.accounts[2], sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ balance = c.parse_balance(r)
+ self.assertEqual(balance, 1000)
+
+
+ def test_revoke_approve(self):
+ nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
+ gas_oracle = OverrideGasOracle(limit=100000, conn=self.conn)
+ c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
+ (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 1000)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 1)
+
+ (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 999)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 0)
+
+ (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 0)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 1)
+
+ o = c.allowance(self.address, self.accounts[0], self.accounts[1], sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ allowance = c.parse_allowance(r)
+ self.assertEqual(allowance, 0)
+
+ nonce_oracle = RPCNonceOracle(self.accounts[1], conn=self.conn)
+ c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
+ (tx_hash, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[0], self.accounts[2], 1)
+ r = self.rpc.do(o)
+ o = receipt(tx_hash)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 0)
diff --git a/python/giftable_erc20_token/data/GiftableToken.bin b/python/giftable_erc20_token/data/GiftableToken.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b5060405162002200380380620022008339818101604052810190620000379190620002d3565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360029081620000889190620005ca565b5082600390816200009a9190620005ca565b5081600460006101000a81548160ff021916908360ff1602179055508060098190555050505050620006b1565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200013082620000e5565b810181811067ffffffffffffffff82111715620001525762000151620000f6565b5b80604052505050565b600062000167620000c7565b905062000175828262000125565b919050565b600067ffffffffffffffff821115620001985762000197620000f6565b5b620001a382620000e5565b9050602081019050919050565b60005b83811015620001d0578082015181840152602081019050620001b3565b60008484015250505050565b6000620001f3620001ed846200017a565b6200015b565b905082815260208101848484011115620002125762000211620000e0565b5b6200021f848285620001b0565b509392505050565b600082601f8301126200023f576200023e620000db565b5b815162000251848260208601620001dc565b91505092915050565b600060ff82169050919050565b62000272816200025a565b81146200027e57600080fd5b50565b600081519050620002928162000267565b92915050565b6000819050919050565b620002ad8162000298565b8114620002b957600080fd5b50565b600081519050620002cd81620002a2565b92915050565b60008060008060808587031215620002f057620002ef620000d1565b5b600085015167ffffffffffffffff811115620003115762000310620000d6565b5b6200031f8782880162000227565b945050602085015167ffffffffffffffff811115620003435762000342620000d6565b5b620003518782880162000227565b9350506040620003648782880162000281565b92505060606200037787828801620002bc565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003d657607f821691505b602082108103620003ec57620003eb6200038e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000417565b62000465868362000417565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004a8620004a26200049c8462000298565b6200047d565b62000298565b9050919050565b6000819050919050565b620004c48362000487565b620004dc620004d382620004af565b84845462000427565b825550505050565b600090565b620004f3620004e4565b62000500818484620004b9565b505050565b5b8181101562000528576200051c600082620004e9565b60018101905062000506565b5050565b601f82111562000577576200054181620003f2565b6200054c8462000407565b810160208510156200055c578190505b620005746200056b8562000407565b83018262000505565b50505b505050565b60008160020a8304905092915050565b60006200059f600019846008026200057c565b1980831691505092915050565b6000620005ba83836200058c565b9150826002028217905092915050565b620005d58262000383565b67ffffffffffffffff811115620005f157620005f0620000f6565b5b620005fd8254620003bd565b6200060a8282856200052c565b600060209050601f8311600181146200064257600084156200062d578287015190505b620006398582620005ac565b865550620006a9565b601f1984166200065286620003f2565b60005b828110156200067c5784890151825560018201915060208501945060208101905062000655565b868310156200069c578489015162000698601f8916826200058c565b8355505b6001600288020188555050505b505050505050565b611b3f80620006c16000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c0100000000000000000000000000000000000000000000000000000000900480635f408c04116100d5578063a2309ff811610099578063a2309ff8146103ab578063a9059cbb146103c9578063b1cb0db3146103f9578063da2824a814610417578063dd62ed3e14610447578063f2fde38b1461047757610154565b80635f408c041461030357806370a082311461032157806373f42561146103515780638da5cb5b1461036f57806395d89b411461038d57610154565b80632b29ba231161011c5780632b29ba2314610225578063313ce5671461025557806342966c6814610273578063449a52f8146102a35780635356dddc146102d357610154565b806301ffc9a71461015957806306fdde0314610189578063095ea7b3146101a757806318160ddd146101d757806323b872dd146101f5575b600080fd5b610173600480360381019061016e91906115d9565b6104a7565b6040516101809190611621565b60405180910390f35b61019161069f565b60405161019e91906116cc565b60405180910390f35b6101c160048036038101906101bc9190611782565b61072d565b6040516101ce9190611621565b60405180910390f35b6101df6108c8565b6040516101ec91906117d1565b60405180910390f35b61020f600480360381019061020a91906117ec565b6108df565b60405161021c9190611621565b60405180910390f35b61023f600480360381019061023a919061183f565b610c07565b60405161024c9190611621565b60405180910390f35b61025d610cb3565b60405161026a9190611888565b60405180910390f35b61028d600480360381019061028891906118a3565b610cc6565b60405161029a9190611621565b60405180910390f35b6102bd60048036038101906102b89190611782565b610e84565b6040516102ca9190611621565b60405180910390f35b6102ed60048036038101906102e8919061183f565b611010565b6040516102fa9190611621565b60405180910390f35b61030b611102565b6040516103189190611888565b60405180910390f35b61033b6004803603810190610336919061183f565b6111a0565b60405161034891906117d1565b60405180910390f35b6103596111b8565b60405161036691906117d1565b60405180910390f35b6103776111be565b60405161038491906118df565b60405180910390f35b6103956111e2565b6040516103a291906116cc565b60405180910390f35b6103b3611270565b6040516103c091906117d1565b60405180910390f35b6103e360048036038101906103de9190611782565b611276565b6040516103f09190611621565b60405180910390f35b6104016113f5565b60405161040e91906117d1565b60405180910390f35b610431600480360381019061042c919061183f565b6113fb565b60405161043e9190611621565b60405180910390f35b610461600480360381019061045c91906118fa565b6114b7565b60405161046e91906117d1565b60405180910390f35b610491600480360381019061048c919061183f565b6114dc565b60405161049e9190611621565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104fb576001905061069a565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361054d576001905061069a565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361059f576001905061069a565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105f1576001905061069a565b63abe1f1f57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610643576001905061069a565b63fccc2e797c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610695576001905061069a565b600090505b919050565b600280546106ac90611969565b80601f01602080910402602001604051908101604052809291908181526020018280546106d890611969565b80156107255780601f106106fa57610100808354040283529160200191610725565b820191906000526020600020905b81548152906001019060200180831161070857829003601f168201915b505050505081565b600080610738611102565b60ff161461074557600080fd5b60008211156107d8576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146107d757600080fd5b5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516108b691906117d1565b60405180910390a36001905092915050565b60006008546007546108da91906119c9565b905090565b6000806108ea611102565b60ff16146108f757600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561098057600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109cc57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a5491906119c9565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b2391906119c9565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b7991906119fd565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f93985604051610bf491906117d1565b60405180910390a4600190509392505050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610cac575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b600460009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4e90611a7d565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd090611ae9565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e2891906119c9565b925050819055508160086000828254610e4191906119fd565b925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb82604051610e7791906117d1565b60405180910390a1919050565b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610f29575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f3257600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f8191906119fd565b925050819055508160076000828254610f9a91906119fd565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f884604051610ffe91906117d1565b60405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061109857508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6110a157600080fd5b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008060095403611116576000905061119d565b600a60009054906101000a900460ff1615611134576001905061119d565b6009544210611198576001600a60006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe94260405161118791906117d1565b60405180910390a16002905061119d565b600090505b90565b60056020528060005260406000206000915090505481565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600380546111ef90611969565b80601f016020809104026020016040519081016040528092919081815260200182805461121b90611969565b80156112685780601f1061123d57610100808354040283529160200191611268565b820191906000526020600020905b81548152906001019060200180831161124b57829003601f168201915b505050505081565b60075481565b600080611281611102565b60ff161461128e57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156112da57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461132991906119c9565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461137f91906119fd565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113e391906117d1565b60405180910390a36001905092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461145657600080fd5b6001600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461153757600080fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6115b681611581565b81146115c157600080fd5b50565b6000813590506115d3816115ad565b92915050565b6000602082840312156115ef576115ee61157c565b5b60006115fd848285016115c4565b91505092915050565b60008115159050919050565b61161b81611606565b82525050565b60006020820190506116366000830184611612565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561167657808201518184015260208101905061165b565b60008484015250505050565b6000601f19601f8301169050919050565b600061169e8261163c565b6116a88185611647565b93506116b8818560208601611658565b6116c181611682565b840191505092915050565b600060208201905081810360008301526116e68184611693565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611719826116ee565b9050919050565b6117298161170e565b811461173457600080fd5b50565b60008135905061174681611720565b92915050565b6000819050919050565b61175f8161174c565b811461176a57600080fd5b50565b60008135905061177c81611756565b92915050565b600080604083850312156117995761179861157c565b5b60006117a785828601611737565b92505060206117b88582860161176d565b9150509250929050565b6117cb8161174c565b82525050565b60006020820190506117e660008301846117c2565b92915050565b6000806000606084860312156118055761180461157c565b5b600061181386828701611737565b935050602061182486828701611737565b92505060406118358682870161176d565b9150509250925092565b6000602082840312156118555761185461157c565b5b600061186384828501611737565b91505092915050565b600060ff82169050919050565b6118828161186c565b82525050565b600060208201905061189d6000830184611879565b92915050565b6000602082840312156118b9576118b861157c565b5b60006118c78482850161176d565b91505092915050565b6118d98161170e565b82525050565b60006020820190506118f460008301846118d0565b92915050565b600080604083850312156119115761191061157c565b5b600061191f85828601611737565b925050602061193085828601611737565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061198157607f821691505b6020821081036119945761199361193a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119d48261174c565b91506119df8361174c565b92508282039050818111156119f7576119f661199a565b5b92915050565b6000611a088261174c565b9150611a138361174c565b9250828201905080821115611a2b57611a2a61199a565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000611a67600a83611647565b9150611a7282611a31565b602082019050919050565b60006020820190508181036000830152611a9681611a5a565b9050919050565b7f4552525f46554e44530000000000000000000000000000000000000000000000600082015250565b6000611ad3600983611647565b9150611ade82611a9d565b602082019050919050565b60006020820190508181036000830152611b0281611ac6565b905091905056fea2646970667358221220c4e008886dc0bfd42940dd2b7239b90cc61ec1d68ea065b11977d592b86bb88164736f6c63430008120033
-\ No newline at end of file
+60806040523480156200001157600080fd5b5060405162002208380380620022088339818101604052810190620000379190620002d3565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360029081620000889190620005ca565b5082600390816200009a9190620005ca565b5081600460006101000a81548160ff021916908360ff1602179055508060098190555050505050620006b1565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200013082620000e5565b810181811067ffffffffffffffff82111715620001525762000151620000f6565b5b80604052505050565b600062000167620000c7565b905062000175828262000125565b919050565b600067ffffffffffffffff821115620001985762000197620000f6565b5b620001a382620000e5565b9050602081019050919050565b60005b83811015620001d0578082015181840152602081019050620001b3565b60008484015250505050565b6000620001f3620001ed846200017a565b6200015b565b905082815260208101848484011115620002125762000211620000e0565b5b6200021f848285620001b0565b509392505050565b600082601f8301126200023f576200023e620000db565b5b815162000251848260208601620001dc565b91505092915050565b600060ff82169050919050565b62000272816200025a565b81146200027e57600080fd5b50565b600081519050620002928162000267565b92915050565b6000819050919050565b620002ad8162000298565b8114620002b957600080fd5b50565b600081519050620002cd81620002a2565b92915050565b60008060008060808587031215620002f057620002ef620000d1565b5b600085015167ffffffffffffffff811115620003115762000310620000d6565b5b6200031f8782880162000227565b945050602085015167ffffffffffffffff811115620003435762000342620000d6565b5b620003518782880162000227565b9350506040620003648782880162000281565b92505060606200037787828801620002bc565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003d657607f821691505b602082108103620003ec57620003eb6200038e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000417565b62000465868362000417565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004a8620004a26200049c8462000298565b6200047d565b62000298565b9050919050565b6000819050919050565b620004c48362000487565b620004dc620004d382620004af565b84845462000427565b825550505050565b600090565b620004f3620004e4565b62000500818484620004b9565b505050565b5b8181101562000528576200051c600082620004e9565b60018101905062000506565b5050565b601f82111562000577576200054181620003f2565b6200054c8462000407565b810160208510156200055c578190505b620005746200056b8562000407565b83018262000505565b50505b505050565b60008160020a8304905092915050565b60006200059f600019846008026200057c565b1980831691505092915050565b6000620005ba83836200058c565b9150826002028217905092915050565b620005d58262000383565b67ffffffffffffffff811115620005f157620005f0620000f6565b5b620005fd8254620003bd565b6200060a8282856200052c565b600060209050601f8311600181146200064257600084156200062d578287015190505b620006398582620005ac565b865550620006a9565b601f1984166200065286620003f2565b60005b828110156200067c5784890151825560018201915060208501945060208101905062000655565b868310156200069c578489015162000698601f8916826200058c565b8355505b6001600288020188555050505b505050505050565b611b4780620006c16000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c0100000000000000000000000000000000000000000000000000000000900480635f408c04116100d5578063a2309ff811610099578063a2309ff8146103ab578063a9059cbb146103c9578063b1cb0db3146103f9578063da2824a814610417578063dd62ed3e14610447578063f2fde38b1461047757610154565b80635f408c041461030357806370a082311461032157806373f42561146103515780638da5cb5b1461036f57806395d89b411461038d57610154565b80632b29ba231161011c5780632b29ba2314610225578063313ce5671461025557806342966c6814610273578063449a52f8146102a35780635356dddc146102d357610154565b806301ffc9a71461015957806306fdde0314610189578063095ea7b3146101a757806318160ddd146101d757806323b872dd146101f5575b600080fd5b610173600480360381019061016e91906115e1565b6104a7565b6040516101809190611629565b60405180910390f35b61019161069f565b60405161019e91906116d4565b60405180910390f35b6101c160048036038101906101bc919061178a565b61072d565b6040516101ce9190611629565b60405180910390f35b6101df6108c8565b6040516101ec91906117d9565b60405180910390f35b61020f600480360381019061020a91906117f4565b6108df565b60405161021c9190611629565b60405180910390f35b61023f600480360381019061023a9190611847565b610c07565b60405161024c9190611629565b60405180910390f35b61025d610cb3565b60405161026a9190611890565b60405180910390f35b61028d600480360381019061028891906118ab565b610cc6565b60405161029a9190611629565b60405180910390f35b6102bd60048036038101906102b8919061178a565b610e88565b6040516102ca9190611629565b60405180910390f35b6102ed60048036038101906102e89190611847565b611014565b6040516102fa9190611629565b60405180910390f35b61030b611106565b6040516103189190611890565b60405180910390f35b61033b60048036038101906103369190611847565b6111a4565b60405161034891906117d9565b60405180910390f35b6103596111bc565b60405161036691906117d9565b60405180910390f35b6103776111c2565b60405161038491906118e7565b60405180910390f35b6103956111e6565b6040516103a291906116d4565b60405180910390f35b6103b3611274565b6040516103c091906117d9565b60405180910390f35b6103e360048036038101906103de919061178a565b61127a565b6040516103f09190611629565b60405180910390f35b6104016113f9565b60405161040e91906117d9565b60405180910390f35b610431600480360381019061042c9190611847565b6113ff565b60405161043e9190611629565b60405180910390f35b610461600480360381019061045c9190611902565b6114bb565b60405161046e91906117d9565b60405180910390f35b610491600480360381019061048c9190611847565b6114e0565b60405161049e9190611629565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104fb576001905061069a565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361054d576001905061069a565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361059f576001905061069a565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105f1576001905061069a565b63abe1f1f57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610643576001905061069a565b63fccc2e797c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610695576001905061069a565b600090505b919050565b600280546106ac90611971565b80601f01602080910402602001604051908101604052809291908181526020018280546106d890611971565b80156107255780601f106106fa57610100808354040283529160200191610725565b820191906000526020600020905b81548152906001019060200180831161070857829003601f168201915b505050505081565b600080610738611106565b60ff161461074557600080fd5b60008211156107d8576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146107d757600080fd5b5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516108b691906117d9565b60405180910390a36001905092915050565b60006008546007546108da91906119d1565b905090565b6000806108ea611106565b60ff16146108f757600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561098057600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109cc57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a5491906119d1565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b2391906119d1565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b799190611a05565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f93985604051610bf491906117d9565b60405180910390a4600190509392505050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610cac575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b600460009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4e90611a85565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd090611af1565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e2891906119d1565b925050819055508160086000828254610e419190611a05565b925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb82604051610e7791906117d9565b60405180910390a160019050919050565b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610f2d575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f3657600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f859190611a05565b925050819055508160076000828254610f9e9190611a05565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88460405161100291906117d9565b60405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061109c57508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6110a557600080fd5b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806009540361111a57600090506111a1565b600a60009054906101000a900460ff161561113857600190506111a1565b600954421061119c576001600a60006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe94260405161118b91906117d9565b60405180910390a1600290506111a1565b600090505b90565b60056020528060005260406000206000915090505481565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600380546111f390611971565b80601f016020809104026020016040519081016040528092919081815260200182805461121f90611971565b801561126c5780601f106112415761010080835404028352916020019161126c565b820191906000526020600020905b81548152906001019060200180831161124f57829003601f168201915b505050505081565b60075481565b600080611285611106565b60ff161461129257600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156112de57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461132d91906119d1565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113839190611a05565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113e791906117d9565b60405180910390a36001905092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461145a57600080fd5b6001600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461153b57600080fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6115be81611589565b81146115c957600080fd5b50565b6000813590506115db816115b5565b92915050565b6000602082840312156115f7576115f6611584565b5b6000611605848285016115cc565b91505092915050565b60008115159050919050565b6116238161160e565b82525050565b600060208201905061163e600083018461161a565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561167e578082015181840152602081019050611663565b60008484015250505050565b6000601f19601f8301169050919050565b60006116a682611644565b6116b0818561164f565b93506116c0818560208601611660565b6116c98161168a565b840191505092915050565b600060208201905081810360008301526116ee818461169b565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611721826116f6565b9050919050565b61173181611716565b811461173c57600080fd5b50565b60008135905061174e81611728565b92915050565b6000819050919050565b61176781611754565b811461177257600080fd5b50565b6000813590506117848161175e565b92915050565b600080604083850312156117a1576117a0611584565b5b60006117af8582860161173f565b92505060206117c085828601611775565b9150509250929050565b6117d381611754565b82525050565b60006020820190506117ee60008301846117ca565b92915050565b60008060006060848603121561180d5761180c611584565b5b600061181b8682870161173f565b935050602061182c8682870161173f565b925050604061183d86828701611775565b9150509250925092565b60006020828403121561185d5761185c611584565b5b600061186b8482850161173f565b91505092915050565b600060ff82169050919050565b61188a81611874565b82525050565b60006020820190506118a56000830184611881565b92915050565b6000602082840312156118c1576118c0611584565b5b60006118cf84828501611775565b91505092915050565b6118e181611716565b82525050565b60006020820190506118fc60008301846118d8565b92915050565b6000806040838503121561191957611918611584565b5b60006119278582860161173f565b92505060206119388582860161173f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061198957607f821691505b60208210810361199c5761199b611942565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119dc82611754565b91506119e783611754565b92508282039050818111156119ff576119fe6119a2565b5b92915050565b6000611a1082611754565b9150611a1b83611754565b9250828201905080821115611a3357611a326119a2565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000611a6f600a8361164f565b9150611a7a82611a39565b602082019050919050565b60006020820190508181036000830152611a9e81611a62565b9050919050565b7f4552525f46554e44530000000000000000000000000000000000000000000000600082015250565b6000611adb60098361164f565b9150611ae682611aa5565b602082019050919050565b60006020820190508181036000830152611b0a81611ace565b905091905056fea26469706673582212201acbcdb5c2d68443e08af434c61fbdb073fbbea0c7af1050474c7ee98a021d7564736f6c63430008120033
+\ No newline at end of file
diff --git a/python/giftable_erc20_token/data/GiftableToken.json b/python/giftable_erc20_token/data/GiftableToken.json
@@ -1 +1 @@
-[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_expireTimestamp","type":"uint256"}],"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":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","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":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
+[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_expireTimestamp","type":"uint256"}],"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":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
diff --git a/python/giftable_erc20_token/data/GiftableToken.metadata.json b/python/giftable_erc20_token/data/GiftableToken.metadata.json
@@ -0,0 +1 @@
+{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_expireTimestamp","type":"uint256"}],"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":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"GiftableToken.sol":"GiftableToken"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"GiftableToken.sol":{"keccak256":"0x8117523edbec7be06158f6295f96767b16a202de52a1149a04769a6132e6693c","license":"GPL-3.0-or-later","urls":["bzz-raw://d1ed8b9aaf2bad925af3ecc1a1334c05a192e0f96aee488fd138f2cfd35a8fea","dweb:/ipfs/QmS7w54yhce4ja4LA95XDWWAKRWR4zFUwxz2jUHSbVNzVc"]}},"version":1}
diff --git a/python/giftable_erc20_token/data/StaticToken.bin b/python/giftable_erc20_token/data/StaticToken.bin
@@ -0,0 +1 @@
+60806040523480156200001157600080fd5b506040516200163338038062001633833981810160405281019062000037919062000338565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600290816200008891906200062f565b5082600390816200009a91906200062f565b5081600460006101000a81548160ff021916908360ff1602179055508060058190555080600660008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505062000716565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000195826200014a565b810181811067ffffffffffffffff82111715620001b757620001b66200015b565b5b80604052505050565b6000620001cc6200012c565b9050620001da82826200018a565b919050565b600067ffffffffffffffff821115620001fd57620001fc6200015b565b5b62000208826200014a565b9050602081019050919050565b60005b838110156200023557808201518184015260208101905062000218565b60008484015250505050565b6000620002586200025284620001df565b620001c0565b90508281526020810184848401111562000277576200027662000145565b5b6200028484828562000215565b509392505050565b600082601f830112620002a457620002a362000140565b5b8151620002b684826020860162000241565b91505092915050565b600060ff82169050919050565b620002d781620002bf565b8114620002e357600080fd5b50565b600081519050620002f781620002cc565b92915050565b6000819050919050565b6200031281620002fd565b81146200031e57600080fd5b50565b600081519050620003328162000307565b92915050565b6000806000806080858703121562000355576200035462000136565b5b600085015167ffffffffffffffff8111156200037657620003756200013b565b5b62000384878288016200028c565b945050602085015167ffffffffffffffff811115620003a857620003a76200013b565b5b620003b6878288016200028c565b9350506040620003c987828801620002e6565b9250506060620003dc8782880162000321565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200043b57607f821691505b602082108103620004515762000450620003f3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004be7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200047c565b620004ca86836200047c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006200050d620005076200050184620002fd565b620004e2565b620002fd565b9050919050565b6000819050919050565b6200052983620004ec565b62000541620005388262000514565b8484546200048c565b825550505050565b600090565b6200055862000549565b620005658184846200051e565b505050565b5b818110156200058d57620005816000826200054e565b6001810190506200056b565b5050565b601f821115620005dc57620005a68162000457565b620005b1846200046c565b81016020851015620005c1578190505b620005d9620005d0856200046c565b8301826200056a565b50505b505050565b60008160020a8304905092915050565b60006200060460001984600802620005e1565b1980831691505092915050565b60006200061f8383620005f1565b9150826002028217905092915050565b6200063a82620003e8565b67ffffffffffffffff8111156200065657620006556200015b565b5b62000662825462000422565b6200066f82828562000591565b600060209050601f831160018114620006a7576000841562000692578287015190505b6200069e858262000611565b8655506200070e565b601f198416620006b78662000457565b60005b82811015620006e157848901518255600182019150602085019450602081019050620006ba565b86831015620007015784890151620006fd601f891682620005f1565b8355505b6001600288020188555050505b505050505050565b610f0d80620007266000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c010000000000000000000000000000000000000000000000000000000090048063313ce56711610083578063313ce5671461018c57806370a08231146101aa57806395d89b41146101da578063a9059cbb146101f8578063dd62ed3e14610228576100bb565b806301ffc9a7146100c057806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013e57806323b872dd1461015c575b600080fd5b6100da60048036038101906100d59190610ad6565b610258565b6040516100e79190610b1e565b60405180910390f35b6100f8610308565b6040516101059190610bc9565b60405180910390f35b61012860048036038101906101239190610c7f565b610396565b6040516101359190610b1e565b60405180910390f35b61014661051a565b6040516101539190610cce565b60405180910390f35b61017660048036038101906101719190610ce9565b610520565b6040516101839190610b1e565b60405180910390f35b610194610832565b6040516101a19190610d58565b60405180910390f35b6101c460048036038101906101bf9190610d73565b610845565b6040516101d19190610cce565b60405180910390f35b6101e261085d565b6040516101ef9190610bc9565b60405180910390f35b610212600480360381019061020d9190610c7f565b6108eb565b60405161021f9190610b1e565b60405180910390f35b610242600480360381019061023d9190610da0565b610a54565b60405161024f9190610cce565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102ac5760019050610303565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102fe5760019050610303565b600090505b919050565b6002805461031590610e0f565b80601f016020809104026020016040519081016040528092919081815260200182805461034190610e0f565b801561038e5780601f106103635761010080835404028352916020019161038e565b820191906000526020600020905b81548152906001019060200180831161037157829003601f168201915b505050505081565b60008082111561042a576000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461042957600080fd5b5b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105089190610cce565b60405180910390a36001905092915050565b60055481565b600081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105ab57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105f757600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461067f9190610e6f565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461074e9190610e6f565b9250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107a49190610ea3565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f9398560405161081f9190610cce565b60405180910390a4600190509392505050565b600460009054906101000a900460ff1681565b60066020528060005260406000206000915090505481565b6003805461086a90610e0f565b80601f016020809104026020016040519081016040528092919081815260200182805461089690610e0f565b80156108e35780601f106108b8576101008083540402835291602001916108e3565b820191906000526020600020905b8154815290600101906020018083116108c657829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561093957600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109889190610e6f565b9250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109de9190610ea3565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a429190610cce565b60405180910390a36001905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ab381610a7e565b8114610abe57600080fd5b50565b600081359050610ad081610aaa565b92915050565b600060208284031215610aec57610aeb610a79565b5b6000610afa84828501610ac1565b91505092915050565b60008115159050919050565b610b1881610b03565b82525050565b6000602082019050610b336000830184610b0f565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b73578082015181840152602081019050610b58565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b9b82610b39565b610ba58185610b44565b9350610bb5818560208601610b55565b610bbe81610b7f565b840191505092915050565b60006020820190508181036000830152610be38184610b90565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c1682610beb565b9050919050565b610c2681610c0b565b8114610c3157600080fd5b50565b600081359050610c4381610c1d565b92915050565b6000819050919050565b610c5c81610c49565b8114610c6757600080fd5b50565b600081359050610c7981610c53565b92915050565b60008060408385031215610c9657610c95610a79565b5b6000610ca485828601610c34565b9250506020610cb585828601610c6a565b9150509250929050565b610cc881610c49565b82525050565b6000602082019050610ce36000830184610cbf565b92915050565b600080600060608486031215610d0257610d01610a79565b5b6000610d1086828701610c34565b9350506020610d2186828701610c34565b9250506040610d3286828701610c6a565b9150509250925092565b600060ff82169050919050565b610d5281610d3c565b82525050565b6000602082019050610d6d6000830184610d49565b92915050565b600060208284031215610d8957610d88610a79565b5b6000610d9784828501610c34565b91505092915050565b60008060408385031215610db757610db6610a79565b5b6000610dc585828601610c34565b9250506020610dd685828601610c34565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2757607f821691505b602082108103610e3a57610e39610de0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7a82610c49565b9150610e8583610c49565b9250828203905081811115610e9d57610e9c610e40565b5b92915050565b6000610eae82610c49565b9150610eb983610c49565b9250828201905080821115610ed157610ed0610e40565b5b9291505056fea2646970667358221220d6b5b359ba2e297f488827a6c659fe9f763958c7bf0a87521909384cba1a307c64736f6c63430008120033
+\ No newline at end of file
diff --git a/python/giftable_erc20_token/data/StaticToken.json b/python/giftable_erc20_token/data/StaticToken.json
@@ -0,0 +1 @@
+[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_supply","type":"uint256"}],"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":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","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/python/giftable_erc20_token/data/StaticToken.metadata.json b/python/giftable_erc20_token/data/StaticToken.metadata.json
@@ -0,0 +1 @@
+{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_supply","type":"uint256"}],"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":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","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"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"StaticToken.sol":"StaticToken"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"StaticToken.sol":{"keccak256":"0x7afcc41cbaaaeeac2e372c50ed4cf6962035af89e33b500a65927f46d8bf31f2","license":"GPL-3.0-or-later","urls":["bzz-raw://4077171f628fd470cb7f72ca80426297132050f4d08380b55ca74c87e3df2727","dweb:/ipfs/QmWvgFNWrRtzQFejyfjy6LaerghSnYQ86R5WVTnXS7wiuD"]}},"version":1}
diff --git a/python/setup.cfg b/python/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-erc20
-version = 0.6.1
+version = 0.6.2
description = ERC20 interface and simple contract with deployment script that lets any address mint and gift itself tokens.
author = Louis Holbrook
author_email = dev@holbrook.no
diff --git a/python/tests/test_erc20_interface.py b/python/tests/test_erc20_interface.py
@@ -1,176 +1,13 @@
-# standard imports
-import logging
+# import logging
import unittest
-# external imports
-from chainlib.eth.unittest.ethtester import EthTesterCase
-from chainlib.connection import RPCConnection
-from chainlib.eth.nonce import RPCNonceOracle
-from chainlib.eth.gas import OverrideGasOracle
-from chainlib.eth.tx import (
- transaction,
- receipt,
- )
-from chainlib.eth.address import to_checksum_address
-from hexathon import strip_0x
-
# local imports
from giftable_erc20_token.unittest import TestGiftableToken
-from eth_erc20 import ERC20
-
-logging.basicConfig(level=logging.DEBUG)
-logg = logging.getLogger()
-
-
-class TestToken(TestGiftableToken):
-
- def test_balance(self):
- c = ERC20(self.chain_spec)
- o = c.balance_of(self.address, self.accounts[0], sender_address=self.accounts[0])
- r = self.conn.do(o)
- balance = ERC20.parse_balance(r)
- self.assertEqual(self.initial_supply, balance)
-
-
- def test_supply(self):
- c = ERC20(self.chain_spec)
- o = c.total_supply(self.address, sender_address=self.accounts[0])
- r = self.conn.do(o)
- supply = ERC20.parse_total_supply(r)
- self.assertEqual(self.initial_supply, supply)
-
-
- def test_name(self):
- c = ERC20(self.chain_spec)
- o = c.name(self.address, sender_address=self.accounts[0])
- r = self.conn.do(o)
- name = ERC20.parse_name(r)
- self.assertEqual(self.name, name)
-
-
- def test_symbol(self):
- c = ERC20(self.chain_spec)
- o = c.symbol(self.address, sender_address=self.accounts[0])
- r = self.conn.do(o)
- symbol = ERC20.parse_symbol(r)
- self.assertEqual(self.symbol, symbol)
-
-
- def test_transfer(self):
- nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
- gas_oracle = OverrideGasOracle(limit=100000, conn=self.conn)
- c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
- (tx_hash, o) = c.transfer(self.address, self.accounts[0], self.accounts[1], 1000)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 1)
-
- o = c.balance_of(self.address, self.accounts[0], sender_address=self.accounts[0])
- r = self.rpc.do(o)
- balance = c.parse_balance(r)
- self.assertEqual(balance, self.initial_supply - 1000)
-
- o = c.balance_of(self.address, self.accounts[1], sender_address=self.accounts[0])
- r = self.rpc.do(o)
- balance = c.parse_balance(r)
- self.assertEqual(balance, 1000)
-
- o = transaction(tx_hash)
- r = self.rpc.do(o)
- data = c.parse_transfer_request(r['data'])
- self.assertEqual(data[0], strip_0x(self.accounts[1]))
- self.assertEqual(data[1], 1000)
-
-
- def test_transfer_from(self):
- nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
- gas_oracle = OverrideGasOracle(limit=100000, conn=self.conn)
- c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
- (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 1000)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 1)
-
- o = c.allowance(self.address, self.accounts[0], self.accounts[1], sender_address=self.accounts[0])
- r = self.rpc.do(o)
- allowance = c.parse_allowance(r)
- self.assertEqual(allowance, 1000)
-
- o = transaction(tx_hash)
- r = self.rpc.do(o)
- data = c.parse_approve_request(r['data'])
- self.assertEqual(data[0], strip_0x(self.accounts[1]))
- self.assertEqual(data[1], 1000)
-
- nonce_oracle = RPCNonceOracle(self.accounts[1], conn=self.conn)
- c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
- (tx_hash, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[0], self.accounts[2], 1001)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 0)
-
- o = transaction(tx_hash)
- r = self.rpc.do(o)
- data = c.parse_transfer_from_request(r['data'])
- self.assertEqual(data[0], strip_0x(self.accounts[0]))
- self.assertEqual(data[1], strip_0x(self.accounts[2]))
- self.assertEqual(data[2], 1001)
-
- (tx_hash, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[0], self.accounts[2], 1000)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 1)
-
- o = c.balance_of(self.address, self.accounts[0], sender_address=self.accounts[0])
- r = self.rpc.do(o)
- balance = c.parse_balance(r)
- self.assertEqual(balance, self.initial_supply - 1000)
-
- o = c.balance_of(self.address, self.accounts[2], sender_address=self.accounts[0])
- r = self.rpc.do(o)
- balance = c.parse_balance(r)
- self.assertEqual(balance, 1000)
-
-
- def test_revoke_approve(self):
- nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
- gas_oracle = OverrideGasOracle(limit=100000, conn=self.conn)
- c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
- (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 1000)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 1)
-
- (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 999)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 0)
-
- (tx_hash, o) = c.approve(self.address, self.accounts[0], self.accounts[1], 0)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 1)
-
- o = c.allowance(self.address, self.accounts[0], self.accounts[1], sender_address=self.accounts[0])
- r = self.rpc.do(o)
- allowance = c.parse_allowance(r)
- self.assertEqual(allowance, 0)
+from eth_erc20.unittest import TestInterface
- nonce_oracle = RPCNonceOracle(self.accounts[1], conn=self.conn)
- c = ERC20(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
- (tx_hash, o) = c.transfer_from(self.address, self.accounts[1], self.accounts[0], self.accounts[2], 1)
- r = self.rpc.do(o)
- o = receipt(tx_hash)
- r = self.rpc.do(o)
- self.assertEqual(r['status'], 0)
+class TestBasic(TestGiftableToken, TestInterface):
+ pass
if __name__ == '__main__':
diff --git a/solidity/GiftableToken.bin b/solidity/GiftableToken.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b5060405162002200380380620022008339818101604052810190620000379190620002d3565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360029081620000889190620005ca565b5082600390816200009a9190620005ca565b5081600460006101000a81548160ff021916908360ff1602179055508060098190555050505050620006b1565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200013082620000e5565b810181811067ffffffffffffffff82111715620001525762000151620000f6565b5b80604052505050565b600062000167620000c7565b905062000175828262000125565b919050565b600067ffffffffffffffff821115620001985762000197620000f6565b5b620001a382620000e5565b9050602081019050919050565b60005b83811015620001d0578082015181840152602081019050620001b3565b60008484015250505050565b6000620001f3620001ed846200017a565b6200015b565b905082815260208101848484011115620002125762000211620000e0565b5b6200021f848285620001b0565b509392505050565b600082601f8301126200023f576200023e620000db565b5b815162000251848260208601620001dc565b91505092915050565b600060ff82169050919050565b62000272816200025a565b81146200027e57600080fd5b50565b600081519050620002928162000267565b92915050565b6000819050919050565b620002ad8162000298565b8114620002b957600080fd5b50565b600081519050620002cd81620002a2565b92915050565b60008060008060808587031215620002f057620002ef620000d1565b5b600085015167ffffffffffffffff811115620003115762000310620000d6565b5b6200031f8782880162000227565b945050602085015167ffffffffffffffff811115620003435762000342620000d6565b5b620003518782880162000227565b9350506040620003648782880162000281565b92505060606200037787828801620002bc565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003d657607f821691505b602082108103620003ec57620003eb6200038e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000417565b62000465868362000417565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004a8620004a26200049c8462000298565b6200047d565b62000298565b9050919050565b6000819050919050565b620004c48362000487565b620004dc620004d382620004af565b84845462000427565b825550505050565b600090565b620004f3620004e4565b62000500818484620004b9565b505050565b5b8181101562000528576200051c600082620004e9565b60018101905062000506565b5050565b601f82111562000577576200054181620003f2565b6200054c8462000407565b810160208510156200055c578190505b620005746200056b8562000407565b83018262000505565b50505b505050565b60008160020a8304905092915050565b60006200059f600019846008026200057c565b1980831691505092915050565b6000620005ba83836200058c565b9150826002028217905092915050565b620005d58262000383565b67ffffffffffffffff811115620005f157620005f0620000f6565b5b620005fd8254620003bd565b6200060a8282856200052c565b600060209050601f8311600181146200064257600084156200062d578287015190505b620006398582620005ac565b865550620006a9565b601f1984166200065286620003f2565b60005b828110156200067c5784890151825560018201915060208501945060208101905062000655565b868310156200069c578489015162000698601f8916826200058c565b8355505b6001600288020188555050505b505050505050565b611b3f80620006c16000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c0100000000000000000000000000000000000000000000000000000000900480635f408c04116100d5578063a2309ff811610099578063a2309ff8146103ab578063a9059cbb146103c9578063b1cb0db3146103f9578063da2824a814610417578063dd62ed3e14610447578063f2fde38b1461047757610154565b80635f408c041461030357806370a082311461032157806373f42561146103515780638da5cb5b1461036f57806395d89b411461038d57610154565b80632b29ba231161011c5780632b29ba2314610225578063313ce5671461025557806342966c6814610273578063449a52f8146102a35780635356dddc146102d357610154565b806301ffc9a71461015957806306fdde0314610189578063095ea7b3146101a757806318160ddd146101d757806323b872dd146101f5575b600080fd5b610173600480360381019061016e91906115d9565b6104a7565b6040516101809190611621565b60405180910390f35b61019161069f565b60405161019e91906116cc565b60405180910390f35b6101c160048036038101906101bc9190611782565b61072d565b6040516101ce9190611621565b60405180910390f35b6101df6108c8565b6040516101ec91906117d1565b60405180910390f35b61020f600480360381019061020a91906117ec565b6108df565b60405161021c9190611621565b60405180910390f35b61023f600480360381019061023a919061183f565b610c07565b60405161024c9190611621565b60405180910390f35b61025d610cb3565b60405161026a9190611888565b60405180910390f35b61028d600480360381019061028891906118a3565b610cc6565b60405161029a9190611621565b60405180910390f35b6102bd60048036038101906102b89190611782565b610e84565b6040516102ca9190611621565b60405180910390f35b6102ed60048036038101906102e8919061183f565b611010565b6040516102fa9190611621565b60405180910390f35b61030b611102565b6040516103189190611888565b60405180910390f35b61033b6004803603810190610336919061183f565b6111a0565b60405161034891906117d1565b60405180910390f35b6103596111b8565b60405161036691906117d1565b60405180910390f35b6103776111be565b60405161038491906118df565b60405180910390f35b6103956111e2565b6040516103a291906116cc565b60405180910390f35b6103b3611270565b6040516103c091906117d1565b60405180910390f35b6103e360048036038101906103de9190611782565b611276565b6040516103f09190611621565b60405180910390f35b6104016113f5565b60405161040e91906117d1565b60405180910390f35b610431600480360381019061042c919061183f565b6113fb565b60405161043e9190611621565b60405180910390f35b610461600480360381019061045c91906118fa565b6114b7565b60405161046e91906117d1565b60405180910390f35b610491600480360381019061048c919061183f565b6114dc565b60405161049e9190611621565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104fb576001905061069a565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361054d576001905061069a565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361059f576001905061069a565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105f1576001905061069a565b63abe1f1f57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610643576001905061069a565b63fccc2e797c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610695576001905061069a565b600090505b919050565b600280546106ac90611969565b80601f01602080910402602001604051908101604052809291908181526020018280546106d890611969565b80156107255780601f106106fa57610100808354040283529160200191610725565b820191906000526020600020905b81548152906001019060200180831161070857829003601f168201915b505050505081565b600080610738611102565b60ff161461074557600080fd5b60008211156107d8576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146107d757600080fd5b5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516108b691906117d1565b60405180910390a36001905092915050565b60006008546007546108da91906119c9565b905090565b6000806108ea611102565b60ff16146108f757600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561098057600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109cc57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a5491906119c9565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b2391906119c9565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b7991906119fd565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f93985604051610bf491906117d1565b60405180910390a4600190509392505050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610cac575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b600460009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4e90611a7d565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd090611ae9565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e2891906119c9565b925050819055508160086000828254610e4191906119fd565b925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb82604051610e7791906117d1565b60405180910390a1919050565b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610f29575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f3257600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f8191906119fd565b925050819055508160076000828254610f9a91906119fd565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f884604051610ffe91906117d1565b60405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061109857508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6110a157600080fd5b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008060095403611116576000905061119d565b600a60009054906101000a900460ff1615611134576001905061119d565b6009544210611198576001600a60006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe94260405161118791906117d1565b60405180910390a16002905061119d565b600090505b90565b60056020528060005260406000206000915090505481565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600380546111ef90611969565b80601f016020809104026020016040519081016040528092919081815260200182805461121b90611969565b80156112685780601f1061123d57610100808354040283529160200191611268565b820191906000526020600020905b81548152906001019060200180831161124b57829003601f168201915b505050505081565b60075481565b600080611281611102565b60ff161461128e57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156112da57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461132991906119c9565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461137f91906119fd565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113e391906117d1565b60405180910390a36001905092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461145657600080fd5b6001600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461153757600080fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6115b681611581565b81146115c157600080fd5b50565b6000813590506115d3816115ad565b92915050565b6000602082840312156115ef576115ee61157c565b5b60006115fd848285016115c4565b91505092915050565b60008115159050919050565b61161b81611606565b82525050565b60006020820190506116366000830184611612565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561167657808201518184015260208101905061165b565b60008484015250505050565b6000601f19601f8301169050919050565b600061169e8261163c565b6116a88185611647565b93506116b8818560208601611658565b6116c181611682565b840191505092915050565b600060208201905081810360008301526116e68184611693565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611719826116ee565b9050919050565b6117298161170e565b811461173457600080fd5b50565b60008135905061174681611720565b92915050565b6000819050919050565b61175f8161174c565b811461176a57600080fd5b50565b60008135905061177c81611756565b92915050565b600080604083850312156117995761179861157c565b5b60006117a785828601611737565b92505060206117b88582860161176d565b9150509250929050565b6117cb8161174c565b82525050565b60006020820190506117e660008301846117c2565b92915050565b6000806000606084860312156118055761180461157c565b5b600061181386828701611737565b935050602061182486828701611737565b92505060406118358682870161176d565b9150509250925092565b6000602082840312156118555761185461157c565b5b600061186384828501611737565b91505092915050565b600060ff82169050919050565b6118828161186c565b82525050565b600060208201905061189d6000830184611879565b92915050565b6000602082840312156118b9576118b861157c565b5b60006118c78482850161176d565b91505092915050565b6118d98161170e565b82525050565b60006020820190506118f460008301846118d0565b92915050565b600080604083850312156119115761191061157c565b5b600061191f85828601611737565b925050602061193085828601611737565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061198157607f821691505b6020821081036119945761199361193a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119d48261174c565b91506119df8361174c565b92508282039050818111156119f7576119f661199a565b5b92915050565b6000611a088261174c565b9150611a138361174c565b9250828201905080821115611a2b57611a2a61199a565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000611a67600a83611647565b9150611a7282611a31565b602082019050919050565b60006020820190508181036000830152611a9681611a5a565b9050919050565b7f4552525f46554e44530000000000000000000000000000000000000000000000600082015250565b6000611ad3600983611647565b9150611ade82611a9d565b602082019050919050565b60006020820190508181036000830152611b0281611ac6565b905091905056fea2646970667358221220c4e008886dc0bfd42940dd2b7239b90cc61ec1d68ea065b11977d592b86bb88164736f6c63430008120033
-\ No newline at end of file
+60806040523480156200001157600080fd5b5060405162002208380380620022088339818101604052810190620000379190620002d3565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360029081620000889190620005ca565b5082600390816200009a9190620005ca565b5081600460006101000a81548160ff021916908360ff1602179055508060098190555050505050620006b1565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200013082620000e5565b810181811067ffffffffffffffff82111715620001525762000151620000f6565b5b80604052505050565b600062000167620000c7565b905062000175828262000125565b919050565b600067ffffffffffffffff821115620001985762000197620000f6565b5b620001a382620000e5565b9050602081019050919050565b60005b83811015620001d0578082015181840152602081019050620001b3565b60008484015250505050565b6000620001f3620001ed846200017a565b6200015b565b905082815260208101848484011115620002125762000211620000e0565b5b6200021f848285620001b0565b509392505050565b600082601f8301126200023f576200023e620000db565b5b815162000251848260208601620001dc565b91505092915050565b600060ff82169050919050565b62000272816200025a565b81146200027e57600080fd5b50565b600081519050620002928162000267565b92915050565b6000819050919050565b620002ad8162000298565b8114620002b957600080fd5b50565b600081519050620002cd81620002a2565b92915050565b60008060008060808587031215620002f057620002ef620000d1565b5b600085015167ffffffffffffffff811115620003115762000310620000d6565b5b6200031f8782880162000227565b945050602085015167ffffffffffffffff811115620003435762000342620000d6565b5b620003518782880162000227565b9350506040620003648782880162000281565b92505060606200037787828801620002bc565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003d657607f821691505b602082108103620003ec57620003eb6200038e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000417565b62000465868362000417565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004a8620004a26200049c8462000298565b6200047d565b62000298565b9050919050565b6000819050919050565b620004c48362000487565b620004dc620004d382620004af565b84845462000427565b825550505050565b600090565b620004f3620004e4565b62000500818484620004b9565b505050565b5b8181101562000528576200051c600082620004e9565b60018101905062000506565b5050565b601f82111562000577576200054181620003f2565b6200054c8462000407565b810160208510156200055c578190505b620005746200056b8562000407565b83018262000505565b50505b505050565b60008160020a8304905092915050565b60006200059f600019846008026200057c565b1980831691505092915050565b6000620005ba83836200058c565b9150826002028217905092915050565b620005d58262000383565b67ffffffffffffffff811115620005f157620005f0620000f6565b5b620005fd8254620003bd565b6200060a8282856200052c565b600060209050601f8311600181146200064257600084156200062d578287015190505b620006398582620005ac565b865550620006a9565b601f1984166200065286620003f2565b60005b828110156200067c5784890151825560018201915060208501945060208101905062000655565b868310156200069c578489015162000698601f8916826200058c565b8355505b6001600288020188555050505b505050505050565b611b4780620006c16000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c0100000000000000000000000000000000000000000000000000000000900480635f408c04116100d5578063a2309ff811610099578063a2309ff8146103ab578063a9059cbb146103c9578063b1cb0db3146103f9578063da2824a814610417578063dd62ed3e14610447578063f2fde38b1461047757610154565b80635f408c041461030357806370a082311461032157806373f42561146103515780638da5cb5b1461036f57806395d89b411461038d57610154565b80632b29ba231161011c5780632b29ba2314610225578063313ce5671461025557806342966c6814610273578063449a52f8146102a35780635356dddc146102d357610154565b806301ffc9a71461015957806306fdde0314610189578063095ea7b3146101a757806318160ddd146101d757806323b872dd146101f5575b600080fd5b610173600480360381019061016e91906115e1565b6104a7565b6040516101809190611629565b60405180910390f35b61019161069f565b60405161019e91906116d4565b60405180910390f35b6101c160048036038101906101bc919061178a565b61072d565b6040516101ce9190611629565b60405180910390f35b6101df6108c8565b6040516101ec91906117d9565b60405180910390f35b61020f600480360381019061020a91906117f4565b6108df565b60405161021c9190611629565b60405180910390f35b61023f600480360381019061023a9190611847565b610c07565b60405161024c9190611629565b60405180910390f35b61025d610cb3565b60405161026a9190611890565b60405180910390f35b61028d600480360381019061028891906118ab565b610cc6565b60405161029a9190611629565b60405180910390f35b6102bd60048036038101906102b8919061178a565b610e88565b6040516102ca9190611629565b60405180910390f35b6102ed60048036038101906102e89190611847565b611014565b6040516102fa9190611629565b60405180910390f35b61030b611106565b6040516103189190611890565b60405180910390f35b61033b60048036038101906103369190611847565b6111a4565b60405161034891906117d9565b60405180910390f35b6103596111bc565b60405161036691906117d9565b60405180910390f35b6103776111c2565b60405161038491906118e7565b60405180910390f35b6103956111e6565b6040516103a291906116d4565b60405180910390f35b6103b3611274565b6040516103c091906117d9565b60405180910390f35b6103e360048036038101906103de919061178a565b61127a565b6040516103f09190611629565b60405180910390f35b6104016113f9565b60405161040e91906117d9565b60405180910390f35b610431600480360381019061042c9190611847565b6113ff565b60405161043e9190611629565b60405180910390f35b610461600480360381019061045c9190611902565b6114bb565b60405161046e91906117d9565b60405180910390f35b610491600480360381019061048c9190611847565b6114e0565b60405161049e9190611629565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104fb576001905061069a565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361054d576001905061069a565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361059f576001905061069a565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105f1576001905061069a565b63abe1f1f57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610643576001905061069a565b63fccc2e797c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610695576001905061069a565b600090505b919050565b600280546106ac90611971565b80601f01602080910402602001604051908101604052809291908181526020018280546106d890611971565b80156107255780601f106106fa57610100808354040283529160200191610725565b820191906000526020600020905b81548152906001019060200180831161070857829003601f168201915b505050505081565b600080610738611106565b60ff161461074557600080fd5b60008211156107d8576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146107d757600080fd5b5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516108b691906117d9565b60405180910390a36001905092915050565b60006008546007546108da91906119d1565b905090565b6000806108ea611106565b60ff16146108f757600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561098057600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109cc57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a5491906119d1565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b2391906119d1565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b799190611a05565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f93985604051610bf491906117d9565b60405180910390a4600190509392505050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610cac575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b600460009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4e90611a85565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd090611af1565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e2891906119d1565b925050819055508160086000828254610e419190611a05565b925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb82604051610e7791906117d9565b60405180910390a160019050919050565b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610f2d575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610f3657600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f859190611a05565b925050819055508160076000828254610f9e9190611a05565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88460405161100291906117d9565b60405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061109c57508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6110a557600080fd5b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806009540361111a57600090506111a1565b600a60009054906101000a900460ff161561113857600190506111a1565b600954421061119c576001600a60006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe94260405161118b91906117d9565b60405180910390a1600290506111a1565b600090505b90565b60056020528060005260406000206000915090505481565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600380546111f390611971565b80601f016020809104026020016040519081016040528092919081815260200182805461121f90611971565b801561126c5780601f106112415761010080835404028352916020019161126c565b820191906000526020600020905b81548152906001019060200180831161124f57829003601f168201915b505050505081565b60075481565b600080611285611106565b60ff161461129257600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156112de57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461132d91906119d1565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113839190611a05565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113e791906117d9565b60405180910390a36001905092915050565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461145a57600080fd5b6001600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461153b57600080fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6115be81611589565b81146115c957600080fd5b50565b6000813590506115db816115b5565b92915050565b6000602082840312156115f7576115f6611584565b5b6000611605848285016115cc565b91505092915050565b60008115159050919050565b6116238161160e565b82525050565b600060208201905061163e600083018461161a565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561167e578082015181840152602081019050611663565b60008484015250505050565b6000601f19601f8301169050919050565b60006116a682611644565b6116b0818561164f565b93506116c0818560208601611660565b6116c98161168a565b840191505092915050565b600060208201905081810360008301526116ee818461169b565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611721826116f6565b9050919050565b61173181611716565b811461173c57600080fd5b50565b60008135905061174e81611728565b92915050565b6000819050919050565b61176781611754565b811461177257600080fd5b50565b6000813590506117848161175e565b92915050565b600080604083850312156117a1576117a0611584565b5b60006117af8582860161173f565b92505060206117c085828601611775565b9150509250929050565b6117d381611754565b82525050565b60006020820190506117ee60008301846117ca565b92915050565b60008060006060848603121561180d5761180c611584565b5b600061181b8682870161173f565b935050602061182c8682870161173f565b925050604061183d86828701611775565b9150509250925092565b60006020828403121561185d5761185c611584565b5b600061186b8482850161173f565b91505092915050565b600060ff82169050919050565b61188a81611874565b82525050565b60006020820190506118a56000830184611881565b92915050565b6000602082840312156118c1576118c0611584565b5b60006118cf84828501611775565b91505092915050565b6118e181611716565b82525050565b60006020820190506118fc60008301846118d8565b92915050565b6000806040838503121561191957611918611584565b5b60006119278582860161173f565b92505060206119388582860161173f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061198957607f821691505b60208210810361199c5761199b611942565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006119dc82611754565b91506119e783611754565b92508282039050818111156119ff576119fe6119a2565b5b92915050565b6000611a1082611754565b9150611a1b83611754565b9250828201905080821115611a3357611a326119a2565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000611a6f600a8361164f565b9150611a7a82611a39565b602082019050919050565b60006020820190508181036000830152611a9e81611a62565b9050919050565b7f4552525f46554e44530000000000000000000000000000000000000000000000600082015250565b6000611adb60098361164f565b9150611ae682611aa5565b602082019050919050565b60006020820190508181036000830152611b0a81611ace565b905091905056fea26469706673582212201acbcdb5c2d68443e08af434c61fbdb073fbbea0c7af1050474c7ee98a021d7564736f6c63430008120033
+\ No newline at end of file
diff --git a/solidity/GiftableToken.json b/solidity/GiftableToken.json
@@ -1 +1 @@
-[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_expireTimestamp","type":"uint256"}],"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":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","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":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
+[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_expireTimestamp","type":"uint256"}],"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":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_writer","type":"address"}],"name":"WriterRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
diff --git a/solidity/GiftableToken.sol b/solidity/GiftableToken.sol
@@ -52,7 +52,7 @@ contract GiftableToken {
// Implements Burner
event Burn(uint256 _value);
- constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _expireTimestamp) public {
+ constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _expireTimestamp) {
owner = msg.sender;
name = _name;
symbol = _symbol;
@@ -61,7 +61,7 @@ contract GiftableToken {
}
// Implements ERC20
- function totalSupply() public returns (uint256) {
+ function totalSupply() public view returns (uint256) {
return totalMinted - burned;
}
@@ -137,6 +137,7 @@ contract GiftableToken {
burned += _value;
emit Burn(_value);
+ return true;
}
// Implements ERC20
@@ -166,10 +167,11 @@ contract GiftableToken {
function transferOwnership(address _newOwner) public returns (bool) {
require(msg.sender == owner);
owner = _newOwner;
+ return true;
}
// Implements EIP165
- function supportsInterface(bytes4 _sum) public returns (bool) {
+ function supportsInterface(bytes4 _sum) public pure returns (bool) {
if (_sum == 0xc6bb4b70) { // ERC20
return true;
}
diff --git a/solidity/Makefile b/solidity/Makefile
@@ -2,13 +2,15 @@ SOLC = /usr/bin/solc
all:
$(SOLC) --bin GiftableToken.sol --evm-version byzantium | awk 'NR>3' > GiftableToken.bin
- truncate -s -1 GiftableToken.bin
$(SOLC) --abi GiftableToken.sol --evm-version byzantium | awk 'NR>3' > GiftableToken.json
+ $(SOLC) --metadata GiftableToken.sol --evm-version byzantium | awk 'NR>3' > GiftableToken.metadata.json
$(SOLC) --bin StaticToken.sol --evm-version byzantium | awk 'NR>3' > StaticToken.bin
- truncate -s -1 StaticToken.bin
$(SOLC) --abi StaticToken.sol --evm-version byzantium | awk 'NR>3' > StaticToken.json
+ $(SOLC) --metadata StaticToken.sol --evm-version byzantium | awk 'NR>3' > StaticToken.metadata.json
+ truncate -s -1 StaticToken.bin
+ truncate -s -1 GiftableToken.bin
install: all
- cp -v Giftable*{json,bin} ../python/giftable_erc20_token/data/
- cp -v Static*{json,bin} ../python/static_token/data/
+ cp -v *.json ../python/giftable_erc20_token/data/
+ cp -v *.bin ../python/giftable_erc20_token/data/
diff --git a/solidity/StaticToken.bin b/solidity/StaticToken.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b506040516200163338038062001633833981810160405281019062000037919062000338565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600290816200008891906200062f565b5082600390816200009a91906200062f565b5081600460006101000a81548160ff021916908360ff1602179055508060058190555080600660008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505062000716565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000195826200014a565b810181811067ffffffffffffffff82111715620001b757620001b66200015b565b5b80604052505050565b6000620001cc6200012c565b9050620001da82826200018a565b919050565b600067ffffffffffffffff821115620001fd57620001fc6200015b565b5b62000208826200014a565b9050602081019050919050565b60005b838110156200023557808201518184015260208101905062000218565b60008484015250505050565b6000620002586200025284620001df565b620001c0565b90508281526020810184848401111562000277576200027662000145565b5b6200028484828562000215565b509392505050565b600082601f830112620002a457620002a362000140565b5b8151620002b684826020860162000241565b91505092915050565b600060ff82169050919050565b620002d781620002bf565b8114620002e357600080fd5b50565b600081519050620002f781620002cc565b92915050565b6000819050919050565b6200031281620002fd565b81146200031e57600080fd5b50565b600081519050620003328162000307565b92915050565b6000806000806080858703121562000355576200035462000136565b5b600085015167ffffffffffffffff8111156200037657620003756200013b565b5b62000384878288016200028c565b945050602085015167ffffffffffffffff811115620003a857620003a76200013b565b5b620003b6878288016200028c565b9350506040620003c987828801620002e6565b9250506060620003dc8782880162000321565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200043b57607f821691505b602082108103620004515762000450620003f3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004be7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200047c565b620004ca86836200047c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006200050d620005076200050184620002fd565b620004e2565b620002fd565b9050919050565b6000819050919050565b6200052983620004ec565b62000541620005388262000514565b8484546200048c565b825550505050565b600090565b6200055862000549565b620005658184846200051e565b505050565b5b818110156200058d57620005816000826200054e565b6001810190506200056b565b5050565b601f821115620005dc57620005a68162000457565b620005b1846200046c565b81016020851015620005c1578190505b620005d9620005d0856200046c565b8301826200056a565b50505b505050565b60008160020a8304905092915050565b60006200060460001984600802620005e1565b1980831691505092915050565b60006200061f8383620005f1565b9150826002028217905092915050565b6200063a82620003e8565b67ffffffffffffffff8111156200065657620006556200015b565b5b62000662825462000422565b6200066f82828562000591565b600060209050601f831160018114620006a7576000841562000692578287015190505b6200069e858262000611565b8655506200070e565b601f198416620006b78662000457565b60005b82811015620006e157848901518255600182019150602085019450602081019050620006ba565b86831015620007015784890151620006fd601f891682620005f1565b8355505b6001600288020188555050505b505050505050565b610f0d80620007266000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c010000000000000000000000000000000000000000000000000000000090048063313ce56711610083578063313ce5671461018c57806370a08231146101aa57806395d89b41146101da578063a9059cbb146101f8578063dd62ed3e14610228576100bb565b806301ffc9a7146100c057806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013e57806323b872dd1461015c575b600080fd5b6100da60048036038101906100d59190610ad6565b610258565b6040516100e79190610b1e565b60405180910390f35b6100f8610308565b6040516101059190610bc9565b60405180910390f35b61012860048036038101906101239190610c7f565b610396565b6040516101359190610b1e565b60405180910390f35b61014661051a565b6040516101539190610cce565b60405180910390f35b61017660048036038101906101719190610ce9565b610520565b6040516101839190610b1e565b60405180910390f35b610194610832565b6040516101a19190610d58565b60405180910390f35b6101c460048036038101906101bf9190610d73565b610845565b6040516101d19190610cce565b60405180910390f35b6101e261085d565b6040516101ef9190610bc9565b60405180910390f35b610212600480360381019061020d9190610c7f565b6108eb565b60405161021f9190610b1e565b60405180910390f35b610242600480360381019061023d9190610da0565b610a54565b60405161024f9190610cce565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102ac5760019050610303565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102fe5760019050610303565b600090505b919050565b6002805461031590610e0f565b80601f016020809104026020016040519081016040528092919081815260200182805461034190610e0f565b801561038e5780601f106103635761010080835404028352916020019161038e565b820191906000526020600020905b81548152906001019060200180831161037157829003601f168201915b505050505081565b60008082111561042a576000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461042957600080fd5b5b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105089190610cce565b60405180910390a36001905092915050565b60055481565b600081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105ab57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105f757600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461067f9190610e6f565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461074e9190610e6f565b9250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107a49190610ea3565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f9398560405161081f9190610cce565b60405180910390a4600190509392505050565b600460009054906101000a900460ff1681565b60066020528060005260406000206000915090505481565b6003805461086a90610e0f565b80601f016020809104026020016040519081016040528092919081815260200182805461089690610e0f565b80156108e35780601f106108b8576101008083540402835291602001916108e3565b820191906000526020600020905b8154815290600101906020018083116108c657829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561093957600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109889190610e6f565b9250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109de9190610ea3565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a429190610cce565b60405180910390a36001905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ab381610a7e565b8114610abe57600080fd5b50565b600081359050610ad081610aaa565b92915050565b600060208284031215610aec57610aeb610a79565b5b6000610afa84828501610ac1565b91505092915050565b60008115159050919050565b610b1881610b03565b82525050565b6000602082019050610b336000830184610b0f565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b73578082015181840152602081019050610b58565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b9b82610b39565b610ba58185610b44565b9350610bb5818560208601610b55565b610bbe81610b7f565b840191505092915050565b60006020820190508181036000830152610be38184610b90565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c1682610beb565b9050919050565b610c2681610c0b565b8114610c3157600080fd5b50565b600081359050610c4381610c1d565b92915050565b6000819050919050565b610c5c81610c49565b8114610c6757600080fd5b50565b600081359050610c7981610c53565b92915050565b60008060408385031215610c9657610c95610a79565b5b6000610ca485828601610c34565b9250506020610cb585828601610c6a565b9150509250929050565b610cc881610c49565b82525050565b6000602082019050610ce36000830184610cbf565b92915050565b600080600060608486031215610d0257610d01610a79565b5b6000610d1086828701610c34565b9350506020610d2186828701610c34565b9250506040610d3286828701610c6a565b9150509250925092565b600060ff82169050919050565b610d5281610d3c565b82525050565b6000602082019050610d6d6000830184610d49565b92915050565b600060208284031215610d8957610d88610a79565b5b6000610d9784828501610c34565b91505092915050565b60008060408385031215610db757610db6610a79565b5b6000610dc585828601610c34565b9250506020610dd685828601610c34565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2757607f821691505b602082108103610e3a57610e39610de0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7a82610c49565b9150610e8583610c49565b9250828203905081811115610e9d57610e9c610e40565b5b92915050565b6000610eae82610c49565b9150610eb983610c49565b9250828201905080821115610ed157610ed0610e40565b5b9291505056fea2646970667358221220ae6705885ea8b737b251b421191a646a538f30726eb75668ada7b6bcea18788564736f6c63430008120033
-\ No newline at end of file
+60806040523480156200001157600080fd5b506040516200163338038062001633833981810160405281019062000037919062000338565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600290816200008891906200062f565b5082600390816200009a91906200062f565b5081600460006101000a81548160ff021916908360ff1602179055508060058190555080600660008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505062000716565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000195826200014a565b810181811067ffffffffffffffff82111715620001b757620001b66200015b565b5b80604052505050565b6000620001cc6200012c565b9050620001da82826200018a565b919050565b600067ffffffffffffffff821115620001fd57620001fc6200015b565b5b62000208826200014a565b9050602081019050919050565b60005b838110156200023557808201518184015260208101905062000218565b60008484015250505050565b6000620002586200025284620001df565b620001c0565b90508281526020810184848401111562000277576200027662000145565b5b6200028484828562000215565b509392505050565b600082601f830112620002a457620002a362000140565b5b8151620002b684826020860162000241565b91505092915050565b600060ff82169050919050565b620002d781620002bf565b8114620002e357600080fd5b50565b600081519050620002f781620002cc565b92915050565b6000819050919050565b6200031281620002fd565b81146200031e57600080fd5b50565b600081519050620003328162000307565b92915050565b6000806000806080858703121562000355576200035462000136565b5b600085015167ffffffffffffffff8111156200037657620003756200013b565b5b62000384878288016200028c565b945050602085015167ffffffffffffffff811115620003a857620003a76200013b565b5b620003b6878288016200028c565b9350506040620003c987828801620002e6565b9250506060620003dc8782880162000321565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200043b57607f821691505b602082108103620004515762000450620003f3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004be7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200047c565b620004ca86836200047c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006200050d620005076200050184620002fd565b620004e2565b620002fd565b9050919050565b6000819050919050565b6200052983620004ec565b62000541620005388262000514565b8484546200048c565b825550505050565b600090565b6200055862000549565b620005658184846200051e565b505050565b5b818110156200058d57620005816000826200054e565b6001810190506200056b565b5050565b601f821115620005dc57620005a68162000457565b620005b1846200046c565b81016020851015620005c1578190505b620005d9620005d0856200046c565b8301826200056a565b50505b505050565b60008160020a8304905092915050565b60006200060460001984600802620005e1565b1980831691505092915050565b60006200061f8383620005f1565b9150826002028217905092915050565b6200063a82620003e8565b67ffffffffffffffff8111156200065657620006556200015b565b5b62000662825462000422565b6200066f82828562000591565b600060209050601f831160018114620006a7576000841562000692578287015190505b6200069e858262000611565b8655506200070e565b601f198416620006b78662000457565b60005b82811015620006e157848901518255600182019150602085019450602081019050620006ba565b86831015620007015784890151620006fd601f891682620005f1565b8355505b6001600288020188555050505b505050505050565b610f0d80620007266000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c010000000000000000000000000000000000000000000000000000000090048063313ce56711610083578063313ce5671461018c57806370a08231146101aa57806395d89b41146101da578063a9059cbb146101f8578063dd62ed3e14610228576100bb565b806301ffc9a7146100c057806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013e57806323b872dd1461015c575b600080fd5b6100da60048036038101906100d59190610ad6565b610258565b6040516100e79190610b1e565b60405180910390f35b6100f8610308565b6040516101059190610bc9565b60405180910390f35b61012860048036038101906101239190610c7f565b610396565b6040516101359190610b1e565b60405180910390f35b61014661051a565b6040516101539190610cce565b60405180910390f35b61017660048036038101906101719190610ce9565b610520565b6040516101839190610b1e565b60405180910390f35b610194610832565b6040516101a19190610d58565b60405180910390f35b6101c460048036038101906101bf9190610d73565b610845565b6040516101d19190610cce565b60405180910390f35b6101e261085d565b6040516101ef9190610bc9565b60405180910390f35b610212600480360381019061020d9190610c7f565b6108eb565b60405161021f9190610b1e565b60405180910390f35b610242600480360381019061023d9190610da0565b610a54565b60405161024f9190610cce565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102ac5760019050610303565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102fe5760019050610303565b600090505b919050565b6002805461031590610e0f565b80601f016020809104026020016040519081016040528092919081815260200182805461034190610e0f565b801561038e5780601f106103635761010080835404028352916020019161038e565b820191906000526020600020905b81548152906001019060200180831161037157829003601f168201915b505050505081565b60008082111561042a576000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461042957600080fd5b5b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105089190610cce565b60405180910390a36001905092915050565b60055481565b600081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105ab57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156105f757600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461067f9190610e6f565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461074e9190610e6f565b9250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107a49190610ea3565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f9398560405161081f9190610cce565b60405180910390a4600190509392505050565b600460009054906101000a900460ff1681565b60066020528060005260406000206000915090505481565b6003805461086a90610e0f565b80601f016020809104026020016040519081016040528092919081815260200182805461089690610e0f565b80156108e35780601f106108b8576101008083540402835291602001916108e3565b820191906000526020600020905b8154815290600101906020018083116108c657829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561093957600080fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109889190610e6f565b9250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109de9190610ea3565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a429190610cce565b60405180910390a36001905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ab381610a7e565b8114610abe57600080fd5b50565b600081359050610ad081610aaa565b92915050565b600060208284031215610aec57610aeb610a79565b5b6000610afa84828501610ac1565b91505092915050565b60008115159050919050565b610b1881610b03565b82525050565b6000602082019050610b336000830184610b0f565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610b73578082015181840152602081019050610b58565b60008484015250505050565b6000601f19601f8301169050919050565b6000610b9b82610b39565b610ba58185610b44565b9350610bb5818560208601610b55565b610bbe81610b7f565b840191505092915050565b60006020820190508181036000830152610be38184610b90565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c1682610beb565b9050919050565b610c2681610c0b565b8114610c3157600080fd5b50565b600081359050610c4381610c1d565b92915050565b6000819050919050565b610c5c81610c49565b8114610c6757600080fd5b50565b600081359050610c7981610c53565b92915050565b60008060408385031215610c9657610c95610a79565b5b6000610ca485828601610c34565b9250506020610cb585828601610c6a565b9150509250929050565b610cc881610c49565b82525050565b6000602082019050610ce36000830184610cbf565b92915050565b600080600060608486031215610d0257610d01610a79565b5b6000610d1086828701610c34565b9350506020610d2186828701610c34565b9250506040610d3286828701610c6a565b9150509250925092565b600060ff82169050919050565b610d5281610d3c565b82525050565b6000602082019050610d6d6000830184610d49565b92915050565b600060208284031215610d8957610d88610a79565b5b6000610d9784828501610c34565b91505092915050565b60008060408385031215610db757610db6610a79565b5b6000610dc585828601610c34565b9250506020610dd685828601610c34565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610e2757607f821691505b602082108103610e3a57610e39610de0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610e7a82610c49565b9150610e8583610c49565b9250828203905081811115610e9d57610e9c610e40565b5b92915050565b6000610eae82610c49565b9150610eb983610c49565b9250828201905080821115610ed157610ed0610e40565b5b9291505056fea2646970667358221220d6b5b359ba2e297f488827a6c659fe9f763958c7bf0a87521909384cba1a307c64736f6c63430008120033
+\ No newline at end of file
diff --git a/solidity/StaticToken.json b/solidity/StaticToken.json
@@ -1 +1 @@
-[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_supply","type":"uint256"}],"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":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","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"}]
+[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_supply","type":"uint256"}],"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":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","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/StaticToken.sol b/solidity/StaticToken.sol
@@ -24,7 +24,7 @@ contract StaticToken {
event TransferFrom(address indexed _from, address indexed _to, address indexed _spender, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
- constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public {
+ constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) {
owner = msg.sender;
name = _name;
symbol = _symbol;
@@ -64,7 +64,7 @@ contract StaticToken {
}
// Implements EIP165
- function supportsInterface(bytes4 _sum) public returns (bool) {
+ function supportsInterface(bytes4 _sum) public pure returns (bool) {
if (_sum == 0xc6bb4b70) { // ERC20
return true;
}