From 92216df99055c8eb162ba7e5aad64ffbf4a6130c Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 31 May 2023 16:28:38 +0100 Subject: [PATCH] Add publish cli --- .gitignore | 1 + python/MANIFEST.in | 2 +- python/ge_capped_token/__init__.py | 36 ++++++ python/ge_capped_token/data/CappedToken.bin | 2 +- python/ge_capped_token/data/CappedToken.json | 2 +- .../data/CappedToken.metadata.json | 2 +- python/ge_capped_token/runnable/publish.py | 109 ++++++++++++++++++ python/ge_capped_token/unittest/__init__.py | 14 +-- python/setup.cfg | 16 +-- solidity/CappedToken.sol | 7 +- 10 files changed, 161 insertions(+), 30 deletions(-) create mode 100644 python/ge_capped_token/runnable/publish.py diff --git a/.gitignore b/.gitignore index 8cdbaee..e3abc58 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ __pycache__ build/ solidity/*.bin solidity/*.json +python/dist/ diff --git a/python/MANIFEST.in b/python/MANIFEST.in index e14e43a..b485e89 100644 --- a/python/MANIFEST.in +++ b/python/MANIFEST.in @@ -1 +1 @@ -include **/data/ERC20.json **/data/GiftableToken.json **/data/GiftableToken.bin *requirements.txt CHANGELOG LICENSE WAIVER WAIVER.asc **/data/.chainlib +include **/data/*.json **/data/*.json **/data/*.bin *requirements.txt CHANGELOG LICENSE WAIVER WAIVER.asc **/data/.chainlib diff --git a/python/ge_capped_token/__init__.py b/python/ge_capped_token/__init__.py index c74be6f..320a4fb 100644 --- a/python/ge_capped_token/__init__.py +++ b/python/ge_capped_token/__init__.py @@ -1,12 +1,48 @@ +# standard imports +import os +import logging + # external imports from giftable_erc20_token import GiftableToken +from chainlib.eth.tx import ( + TxFactory, + TxFormat, + ) +from chainlib.eth.contract import ( + ABIContractEncoder, + ABIContractType, + ) + # local imports from ge_capped_token.data import data_dir +logg = logging.getLogger(__name__) class CappedToken(GiftableToken): + __abi = None + __bytecode = None + + def constructor(self, sender_address, name, symbol, decimals, tx_format=TxFormat.JSONRPC, version=None): + code = self.cargs(name, symbol, decimals) + tx = self.template(sender_address, None, use_nonce=True) + tx = self.set_code(tx, code) + return self.finalize(tx, tx_format) + + + @staticmethod + def cargs(name, symbol, decimals, version=None): + code = CappedToken.bytecode(version=version) + enc = ABIContractEncoder() + enc.string(name) + enc.string(symbol) + enc.uint256(decimals) + args = enc.get() + code += args + logg.debug('constructor code: ' + args) + return code + @staticmethod def abi(): if CappedToken.__abi == None: diff --git a/python/ge_capped_token/data/CappedToken.bin b/python/ge_capped_token/data/CappedToken.bin index 222a144..f477faf 100644 --- a/python/ge_capped_token/data/CappedToken.bin +++ b/python/ge_capped_token/data/CappedToken.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b5060405162002bdc38038062002bdc8339818101604052810190620000379190620002d3565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360029081620000889190620005ca565b5082600390816200009a9190620005ca565b5081600460006101000a81548160ff021916908360ff1602179055508060098190555050505050620006b1565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200013082620000e5565b810181811067ffffffffffffffff82111715620001525762000151620000f6565b5b80604052505050565b600062000167620000c7565b905062000175828262000125565b919050565b600067ffffffffffffffff821115620001985762000197620000f6565b5b620001a382620000e5565b9050602081019050919050565b60005b83811015620001d0578082015181840152602081019050620001b3565b60008484015250505050565b6000620001f3620001ed846200017a565b6200015b565b905082815260208101848484011115620002125762000211620000e0565b5b6200021f848285620001b0565b509392505050565b600082601f8301126200023f576200023e620000db565b5b815162000251848260208601620001dc565b91505092915050565b600060ff82169050919050565b62000272816200025a565b81146200027e57600080fd5b50565b600081519050620002928162000267565b92915050565b6000819050919050565b620002ad8162000298565b8114620002b957600080fd5b50565b600081519050620002cd81620002a2565b92915050565b60008060008060808587031215620002f057620002ef620000d1565b5b600085015167ffffffffffffffff811115620003115762000310620000d6565b5b6200031f8782880162000227565b945050602085015167ffffffffffffffff811115620003435762000342620000d6565b5b620003518782880162000227565b9350506040620003648782880162000281565b92505060606200037787828801620002bc565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003d657607f821691505b602082108103620003ec57620003eb6200038e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000417565b62000465868362000417565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620004a8620004a26200049c8462000298565b6200047d565b62000298565b9050919050565b6000819050919050565b620004c48362000487565b620004dc620004d382620004af565b84845462000427565b825550505050565b600090565b620004f3620004e4565b62000500818484620004b9565b505050565b5b8181101562000528576200051c600082620004e9565b60018101905062000506565b5050565b601f82111562000577576200054181620003f2565b6200054c8462000407565b810160208510156200055c578190505b620005746200056b8562000407565b83018262000505565b50505b505050565b60008160020a8304905092915050565b60006200059f600019846008026200057c565b1980831691505092915050565b6000620005ba83836200058c565b9150826002028217905092915050565b620005d58262000383565b67ffffffffffffffff811115620005f157620005f0620000f6565b5b620005fd8254620003bd565b6200060a8282856200052c565b600060209050601f8311600181146200064257600084156200062d578287015190505b620006398582620005ac565b865550620006a9565b601f1984166200065286620003f2565b60005b828110156200067c5784890151825560018201915060208501945060208101905062000655565b868310156200069c578489015162000698601f8916826200058c565b8355505b6001600288020188555050505b505050505050565b61251b80620006c16000396000f3fe608060405234801561001057600080fd5b5060043610610202576000357c0100000000000000000000000000000000000000000000000000000000900480635ae06f7e1161012c578063a2309ff8116100bf578063d89135cd1161008e578063d89135cd146105ef578063da2824a81461060d578063dd62ed3e1461063d578063f2fde38b1461066d57610202565b8063a2309ff814610565578063a9059cbb14610583578063b1cb0db3146105b3578063d5abeb01146105d157610202565b806386fe212d116100fb57806386fe212d146104dd5780638da5cb5b1461050d57806394d008ef1461052b57806395d89b411461054757610202565b80635ae06f7e146104435780635f408c04146104735780636f8b44b01461049157806370a08231146104ad57610202565b80632c1758c1116101a457806342966c681161017357806342966c68146103a9578063449a52f8146103d957806344d171871461040957806344df8e701461042557610202565b80632c1758c114610321578063313ce5671461035157806331a5995d1461036f57806332c270521461038d57610202565b806318160ddd116101e057806318160ddd1461028557806318cbbcfc146102a357806323b872dd146102c15780632b29ba23146102f157610202565b806301ffc9a71461020757806306fdde0314610237578063095ea7b314610255575b600080fd5b610221600480360381019061021c9190611cc0565b61069d565b60405161022e9190611d08565b60405180910390f35b61023f6108e7565b60405161024c9190611db3565b60405180910390f35b61026f600480360381019061026a9190611e69565b610975565b60405161027c9190611d08565b60405180910390f35b61028d610b10565b60405161029a9190611eb8565b60405180910390f35b6102ab610b27565b6040516102b89190611eb8565b60405180910390f35b6102db60048036038101906102d69190611ed3565b610b2c565b6040516102e89190611d08565b60405180910390f35b61030b60048036038101906103069190611f26565b610e54565b6040516103189190611d08565b60405180910390f35b61033b60048036038101906103369190611f53565b610f00565b6040516103489190611d08565b60405180910390f35b610359610f33565b6040516103669190611f9c565b60405180910390f35b610377610f46565b6040516103849190611eb8565b60405180910390f35b6103a760048036038101906103a29190611f53565b610f4c565b005b6103c360048036038101906103be9190611f53565b611027565b6040516103d09190611d08565b60405180910390f35b6103f360048036038101906103ee9190611e69565b6111e9565b6040516104009190611d08565b60405180910390f35b610423600480360381019061041e919061201c565b6113b9565b005b61042d611437565b60405161043a9190611d08565b60405180910390f35b61045d60048036038101906104589190611f26565b611486565b60405161046a9190611d08565b60405180910390f35b61047b6115c4565b6040516104889190611f9c565b60405180910390f35b6104ab60048036038101906104a69190611f53565b611662565b005b6104c760048036038101906104c29190611f26565b611728565b6040516104d49190611eb8565b60405180910390f35b6104f760048036038101906104f29190611f53565b611740565b6040516105049190611eb8565b60405180910390f35b610515611833565b604051610522919061209f565b60405180910390f35b6105456004803603810190610540919061201c565b611857565b005b61054f611868565b60405161055c9190611db3565b60405180910390f35b61056d6118f6565b60405161057a9190611eb8565b60405180910390f35b61059d60048036038101906105989190611e69565b6118fc565b6040516105aa9190611d08565b60405180910390f35b6105bb611a7b565b6040516105c89190611eb8565b60405180910390f35b6105d9611a81565b6040516105e69190611eb8565b60405180910390f35b6105f7611a87565b6040516106049190611eb8565b60405180910390f35b61062760048036038101906106229190611f26565b611a8d565b6040516106349190611d08565b60405180910390f35b610657600480360381019061065291906120ba565b611b95565b6040516106649190611eb8565b60405180910390f35b61068760048036038101906106829190611f26565b611bba565b6040516106949190611d08565b60405180910390f35b600063b61bc9417c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106f157600190506108e2565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361074357600190506108e2565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361079557600190506108e2565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107e757600190506108e2565b63abe1f1f57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361083957600190506108e2565b63b1110c1b7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361088b57600190506108e2565b63841a0e947c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108dd57600190506108e2565b600090505b919050565b600280546108f490612129565b80601f016020809104026020016040519081016040528092919081815260200182805461092090612129565b801561096d5780601f106109425761010080835404028352916020019161096d565b820191906000526020600020905b81548152906001019060200180831161095057829003601f168201915b505050505081565b6000806109806115c4565b60ff161461098d57600080fd5b6000821115610a20576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610a1f57600080fd5b5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610afe9190611eb8565b60405180910390a36001905092915050565b6000600854600754610b229190612189565b905090565b600f81565b600080610b376115c4565b60ff1614610b4457600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610bcd57600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610c1957600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ca19190612189565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d709190612189565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610dc691906121bd565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f93985604051610e419190611eb8565b60405180910390a4600190509392505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610ef9575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b6000600f8210610f0f57600080fd5b60008203610f2457600f600d54149050610f2e565b81600d5483161490505b919050565b600460009054906101000a900460ff1681565b600d5481565b610f59600460ff16610f00565b15610f99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f909061223d565b60405180910390fd5b428110610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd2906122a9565b60405180910390fd5b6000600954905081600981905550807ff5bd6cb27a0006b5ea8618058a0d84719695cb6d984f4840bc1a54ca12ae4b7c60095460405161101b9190611eb8565b60405180910390a25050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110af90612315565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561113a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113190612381565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111899190612189565b9250508190555081600860008282546111a291906121bd565b925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb826040516111d89190611eb8565b60405180910390a160019050919050565b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061128e575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61129757600080fd5b60006112a16115c4565b60ff16146112ae57600080fd5b6000600b5411156112db57600b54826112c5610b10565b6112cf91906121bd565b11156112da57600080fd5b5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461132a91906121bd565b92505081905550816007600082825461134391906121bd565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8846040516113a79190611eb8565b60405180910390a36001905092915050565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141e906123ed565b60405180910390fd5b61143083611027565b5050505050565b6000611481600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611027565b905090565b6000611495600160ff16610f00565b156114d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cc9061223d565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061155a57508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61156357600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600954036115d8576000905061165f565b600a60009054906101000a900460ff16156115f6576001905061165f565b600954421061165a576001600a60006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe9426040516116499190611eb8565b60405180910390a16002905061165f565b600090505b90565b61166f600260ff16610f00565b1561167957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116d157600080fd5b6116d9610b10565b81116116e457600080fd5b600b547f9722adea12ab7ef86fc45b88f0e0b567639e8dddaae60261e08c03d747fbbfe6826040516117169190611eb8565b60405180910390a280600b8190555050565b60056020528060005260406000206000915090505481565b60006001600f61175091906121bd565b8210611791576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178890612459565b60405180910390fd5b6000600d548316146117d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117cf906124c5565b60405180910390fd5b81600d60008282541792505081905550600f600d541415157f6b7e2e653f93b645d4ed7292d6429f96637084363e477c8aaea1a43ed13c284e600d546040516118219190611eb8565b60405180910390a2600d549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61186184846111e9565b5050505050565b6003805461187590612129565b80601f01602080910402602001604051908101604052809291908181526020018280546118a190612129565b80156118ee5780601f106118c3576101008083540402835291602001916118ee565b820191906000526020600020905b8154815290600101906020018083116118d157829003601f168201915b505050505081565b60075481565b6000806119076115c4565b60ff161461191457600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561196057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119af9190612189565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a0591906121bd565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611a699190611eb8565b60405180910390a36001905092915050565b60095481565b600b5481565b60085481565b6000611a9c600160ff16610f00565b15611adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad39061223d565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b3457600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c1557600080fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c9d81611c68565b8114611ca857600080fd5b50565b600081359050611cba81611c94565b92915050565b600060208284031215611cd657611cd5611c5e565b5b6000611ce484828501611cab565b91505092915050565b60008115159050919050565b611d0281611ced565b82525050565b6000602082019050611d1d6000830184611cf9565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611d5d578082015181840152602081019050611d42565b60008484015250505050565b6000601f19601f8301169050919050565b6000611d8582611d23565b611d8f8185611d2e565b9350611d9f818560208601611d3f565b611da881611d69565b840191505092915050565b60006020820190508181036000830152611dcd8184611d7a565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e0082611dd5565b9050919050565b611e1081611df5565b8114611e1b57600080fd5b50565b600081359050611e2d81611e07565b92915050565b6000819050919050565b611e4681611e33565b8114611e5157600080fd5b50565b600081359050611e6381611e3d565b92915050565b60008060408385031215611e8057611e7f611c5e565b5b6000611e8e85828601611e1e565b9250506020611e9f85828601611e54565b9150509250929050565b611eb281611e33565b82525050565b6000602082019050611ecd6000830184611ea9565b92915050565b600080600060608486031215611eec57611eeb611c5e565b5b6000611efa86828701611e1e565b9350506020611f0b86828701611e1e565b9250506040611f1c86828701611e54565b9150509250925092565b600060208284031215611f3c57611f3b611c5e565b5b6000611f4a84828501611e1e565b91505092915050565b600060208284031215611f6957611f68611c5e565b5b6000611f7784828501611e54565b91505092915050565b600060ff82169050919050565b611f9681611f80565b82525050565b6000602082019050611fb16000830184611f8d565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611fdc57611fdb611fb7565b5b8235905067ffffffffffffffff811115611ff957611ff8611fbc565b5b60208301915083600182028301111561201557612014611fc1565b5b9250929050565b6000806000806060858703121561203657612035611c5e565b5b600061204487828801611e1e565b945050602061205587828801611e54565b935050604085013567ffffffffffffffff81111561207657612075611c63565b5b61208287828801611fc6565b925092505092959194509250565b61209981611df5565b82525050565b60006020820190506120b46000830184612090565b92915050565b600080604083850312156120d1576120d0611c5e565b5b60006120df85828601611e1e565b92505060206120f085828601611e1e565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061214157607f821691505b602082108103612154576121536120fa565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061219482611e33565b915061219f83611e33565b92508282039050818111156121b7576121b661215a565b5b92915050565b60006121c882611e33565b91506121d383611e33565b92508282019050808211156121eb576121ea61215a565b5b92915050565b7f4552525f5345414c454400000000000000000000000000000000000000000000600082015250565b6000612227600a83611d2e565b9150612232826121f1565b602082019050919050565b600060208201905081810360008301526122568161221a565b9050919050565b7f4552525f4558504952455f504153540000000000000000000000000000000000600082015250565b6000612293600f83611d2e565b915061229e8261225d565b602082019050919050565b600060208201905081810360008301526122c281612286565b9050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b60006122ff600a83611d2e565b915061230a826122c9565b602082019050919050565b6000602082019050818103600083015261232e816122f2565b9050919050565b7f4552525f46554e44530000000000000000000000000000000000000000000000600082015250565b600061236b600983611d2e565b915061237682612335565b602082019050919050565b6000602082019050818103600083015261239a8161235e565b9050919050565b7f4552525f4e4f545f53454c460000000000000000000000000000000000000000600082015250565b60006123d7600c83611d2e565b91506123e2826123a1565b602082019050919050565b60006020820190508181036000830152612406816123ca565b9050919050565b7f4552525f494e56414c49445f5354415445000000000000000000000000000000600082015250565b6000612443601183611d2e565b915061244e8261240d565b602082019050919050565b6000602082019050818103600083015261247281612436565b9050919050565b7f4552525f414c52454144595f4c4f434b45440000000000000000000000000000600082015250565b60006124af601283611d2e565b91506124ba82612479565b602082019050919050565b600060208201905081810360008301526124de816124a2565b905091905056fea2646970667358221220200054cdf1385e20d7db57cc26c03b18a42ad20bf32b991a378fc17e916091d064736f6c63430008130033 \ No newline at end of file +60806040523480156200001157600080fd5b5060405162002cd138038062002cd1833981810160405281019062000037919062000290565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600290816200008891906200057b565b5081600390816200009a91906200057b565b5080600460006101000a81548160ff021916908360ff16021790555050505062000662565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200012882620000dd565b810181811067ffffffffffffffff821117156200014a5762000149620000ee565b5b80604052505050565b60006200015f620000bf565b90506200016d82826200011d565b919050565b600067ffffffffffffffff82111562000190576200018f620000ee565b5b6200019b82620000dd565b9050602081019050919050565b60005b83811015620001c8578082015181840152602081019050620001ab565b60008484015250505050565b6000620001eb620001e58462000172565b62000153565b9050828152602081018484840111156200020a5762000209620000d8565b5b62000217848285620001a8565b509392505050565b600082601f830112620002375762000236620000d3565b5b815162000249848260208601620001d4565b91505092915050565b600060ff82169050919050565b6200026a8162000252565b81146200027657600080fd5b50565b6000815190506200028a816200025f565b92915050565b600080600060608486031215620002ac57620002ab620000c9565b5b600084015167ffffffffffffffff811115620002cd57620002cc620000ce565b5b620002db868287016200021f565b935050602084015167ffffffffffffffff811115620002ff57620002fe620000ce565b5b6200030d868287016200021f565b9250506040620003208682870162000279565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200037d57607f821691505b60208210810362000393576200039262000335565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620004007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003be565b6200040c8683620003be565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000459620004536200044d8462000424565b6200042e565b62000424565b9050919050565b6000819050919050565b620004758362000438565b6200048d620004848262000460565b848454620003ce565b825550505050565b600090565b620004a462000495565b620004b18184846200046a565b505050565b5b81811015620004d957620004cd6000826200049a565b600181019050620004b7565b5050565b601f8211156200052857620004f28162000399565b620004fd84620003ae565b810160208510156200050d578190505b620005256200051c85620003ae565b830182620004b6565b50505b505050565b60008160020a8304905092915050565b600062000550600019846008026200052d565b1980831691505092915050565b60006200056b83836200053d565b9150826002028217905092915050565b62000586826200032a565b67ffffffffffffffff811115620005a257620005a1620000ee565b5b620005ae825462000364565b620005bb828285620004dd565b600060209050601f831160018114620005f35760008415620005de578287015190505b620005ea85826200055d565b8655506200065a565b601f198416620006038662000399565b60005b828110156200062d5784890151825560018201915060208501945060208101905062000606565b868310156200064d578489015162000649601f8916826200053d565b8355505b6001600288020188555050505b505050505050565b61265f80620006726000396000f3fe608060405234801561001057600080fd5b5060043610610202576000357c0100000000000000000000000000000000000000000000000000000000900480635ae06f7e1161012c578063a2309ff8116100bf578063d89135cd1161008e578063d89135cd146105ef578063da2824a81461060d578063dd62ed3e1461063d578063f2fde38b1461066d57610202565b8063a2309ff814610565578063a9059cbb14610583578063b1cb0db3146105b3578063d5abeb01146105d157610202565b806386fe212d116100fb57806386fe212d146104dd5780638da5cb5b1461050d57806394d008ef1461052b57806395d89b411461054757610202565b80635ae06f7e146104435780635f408c04146104735780636f8b44b01461049157806370a08231146104ad57610202565b80632c1758c1116101a457806342966c681161017357806342966c68146103a9578063449a52f8146103d957806344d171871461040957806344df8e701461042557610202565b80632c1758c114610321578063313ce5671461035157806331a5995d1461036f57806332c270521461038d57610202565b806318160ddd116101e057806318160ddd1461028557806318cbbcfc146102a357806323b872dd146102c15780632b29ba23146102f157610202565b806301ffc9a71461020757806306fdde0314610237578063095ea7b314610255575b600080fd5b610221600480360381019061021c9190611d2c565b61069d565b60405161022e9190611d74565b60405180910390f35b61023f6108e7565b60405161024c9190611e1f565b60405180910390f35b61026f600480360381019061026a9190611ed5565b610975565b60405161027c9190611d74565b60405180910390f35b61028d610b10565b60405161029a9190611f24565b60405180910390f35b6102ab610b27565b6040516102b89190611f24565b60405180910390f35b6102db60048036038101906102d69190611f3f565b610b2c565b6040516102e89190611d74565b60405180910390f35b61030b60048036038101906103069190611f92565b610e54565b6040516103189190611d74565b60405180910390f35b61033b60048036038101906103369190611fbf565b610f00565b6040516103489190611d74565b60405180910390f35b610359610f33565b6040516103669190612008565b60405180910390f35b610377610f46565b6040516103849190611f24565b60405180910390f35b6103a760048036038101906103a29190611fbf565b610f4c565b005b6103c360048036038101906103be9190611fbf565b611027565b6040516103d09190611d74565b60405180910390f35b6103f360048036038101906103ee9190611ed5565b6111e9565b6040516104009190611d74565b60405180910390f35b610423600480360381019061041e9190612088565b611425565b005b61042d6114a3565b60405161043a9190611d74565b60405180910390f35b61045d60048036038101906104589190611f92565b6114f2565b60405161046a9190611d74565b60405180910390f35b61047b611630565b6040516104889190612008565b60405180910390f35b6104ab60048036038101906104a69190611fbf565b6116ce565b005b6104c760048036038101906104c29190611f92565b611794565b6040516104d49190611f24565b60405180910390f35b6104f760048036038101906104f29190611fbf565b6117ac565b6040516105049190611f24565b60405180910390f35b61051561189f565b604051610522919061210b565b60405180910390f35b61054560048036038101906105409190612088565b6118c3565b005b61054f6118d4565b60405161055c9190611e1f565b60405180910390f35b61056d611962565b60405161057a9190611f24565b60405180910390f35b61059d60048036038101906105989190611ed5565b611968565b6040516105aa9190611d74565b60405180910390f35b6105bb611ae7565b6040516105c89190611f24565b60405180910390f35b6105d9611aed565b6040516105e69190611f24565b60405180910390f35b6105f7611af3565b6040516106049190611f24565b60405180910390f35b61062760048036038101906106229190611f92565b611af9565b6040516106349190611d74565b60405180910390f35b61065760048036038101906106529190612126565b611c01565b6040516106649190611f24565b60405180910390f35b61068760048036038101906106829190611f92565b611c26565b6040516106949190611d74565b60405180910390f35b600063b61bc9417c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106f157600190506108e2565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361074357600190506108e2565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361079557600190506108e2565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107e757600190506108e2565b63abe1f1f57c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361083957600190506108e2565b63b1110c1b7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361088b57600190506108e2565b63841a0e947c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036108dd57600190506108e2565b600090505b919050565b600280546108f490612195565b80601f016020809104026020016040519081016040528092919081815260200182805461092090612195565b801561096d5780601f106109425761010080835404028352916020019161096d565b820191906000526020600020905b81548152906001019060200180831161095057829003601f168201915b505050505081565b600080610980611630565b60ff161461098d57600080fd5b6000821115610a20576000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610a1f57600080fd5b5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610afe9190611f24565b60405180910390a36001905092915050565b6000600854600754610b2291906121f5565b905090565b600f81565b600080610b37611630565b60ff1614610b4457600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610bcd57600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610c1957600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ca191906121f5565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d7091906121f5565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610dc69190612229565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f5f7542858008eeb041631f30e6109ae94b83a58e9a58261dd2c42c508850f93985604051610e419190611f24565b60405180910390a4600190509392505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610ef9575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b6000600f8210610f0f57600080fd5b60008203610f2457600f600d54149050610f2e565b81600d5483161490505b919050565b600460009054906101000a900460ff1681565b600d5481565b610f59600460ff16610f00565b15610f99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f90906122a9565b60405180910390fd5b428110610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290612315565b60405180910390fd5b6000600954905081600981905550807ff5bd6cb27a0006b5ea8618058a0d84719695cb6d984f4840bc1a54ca12ae4b7c60095460405161101b9190611f24565b60405180910390a25050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110af90612381565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561113a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611131906123ed565b60405180910390fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461118991906121f5565b9250508190555081600860008282546111a29190612229565b925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb826040516111d89190611f24565b60405180910390a160019050919050565b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061128e575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6112cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c490612459565b60405180910390fd5b60006112d7611630565b60ff161461131a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611311906124c5565b60405180910390fd5b6000600b54111561134757600b5482611331610b10565b61133b9190612229565b111561134657600080fd5b5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113969190612229565b9250508190555081600760008282546113af9190612229565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8846040516114139190611f24565b60405180910390a36001905092915050565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148a90612531565b60405180910390fd5b61149c83611027565b5050505050565b60006114ed600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611027565b905090565b6000611501600160ff16610f00565b15611541576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611538906122a9565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806115c657508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6115cf57600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806009540361164457600090506116cb565b600a60009054906101000a900460ff161561166257600190506116cb565b60095442106116c6576001600a60006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe9426040516116b59190611f24565b60405180910390a1600290506116cb565b600090505b90565b6116db600260ff16610f00565b156116e557600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461173d57600080fd5b611745610b10565b811161175057600080fd5b600b547f9722adea12ab7ef86fc45b88f0e0b567639e8dddaae60261e08c03d747fbbfe6826040516117829190611f24565b60405180910390a280600b8190555050565b60056020528060005260406000206000915090505481565b60006001600f6117bc9190612229565b82106117fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f49061259d565b60405180910390fd5b6000600d54831614611844576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183b90612609565b60405180910390fd5b81600d60008282541792505081905550600f600d541415157f6b7e2e653f93b645d4ed7292d6429f96637084363e477c8aaea1a43ed13c284e600d5460405161188d9190611f24565b60405180910390a2600d549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118cd84846111e9565b5050505050565b600380546118e190612195565b80601f016020809104026020016040519081016040528092919081815260200182805461190d90612195565b801561195a5780601f1061192f5761010080835404028352916020019161195a565b820191906000526020600020905b81548152906001019060200180831161193d57829003601f168201915b505050505081565b60075481565b600080611973611630565b60ff161461198057600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156119cc57600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a1b91906121f5565b9250508190555081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a719190612229565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611ad59190611f24565b60405180910390a36001905092915050565b60095481565b600b5481565b60085481565b6000611b08600160ff16610f00565b15611b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3f906122a9565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba057600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c8157600080fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611d0981611cd4565b8114611d1457600080fd5b50565b600081359050611d2681611d00565b92915050565b600060208284031215611d4257611d41611cca565b5b6000611d5084828501611d17565b91505092915050565b60008115159050919050565b611d6e81611d59565b82525050565b6000602082019050611d896000830184611d65565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611dc9578082015181840152602081019050611dae565b60008484015250505050565b6000601f19601f8301169050919050565b6000611df182611d8f565b611dfb8185611d9a565b9350611e0b818560208601611dab565b611e1481611dd5565b840191505092915050565b60006020820190508181036000830152611e398184611de6565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e6c82611e41565b9050919050565b611e7c81611e61565b8114611e8757600080fd5b50565b600081359050611e9981611e73565b92915050565b6000819050919050565b611eb281611e9f565b8114611ebd57600080fd5b50565b600081359050611ecf81611ea9565b92915050565b60008060408385031215611eec57611eeb611cca565b5b6000611efa85828601611e8a565b9250506020611f0b85828601611ec0565b9150509250929050565b611f1e81611e9f565b82525050565b6000602082019050611f396000830184611f15565b92915050565b600080600060608486031215611f5857611f57611cca565b5b6000611f6686828701611e8a565b9350506020611f7786828701611e8a565b9250506040611f8886828701611ec0565b9150509250925092565b600060208284031215611fa857611fa7611cca565b5b6000611fb684828501611e8a565b91505092915050565b600060208284031215611fd557611fd4611cca565b5b6000611fe384828501611ec0565b91505092915050565b600060ff82169050919050565b61200281611fec565b82525050565b600060208201905061201d6000830184611ff9565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261204857612047612023565b5b8235905067ffffffffffffffff81111561206557612064612028565b5b6020830191508360018202830111156120815761208061202d565b5b9250929050565b600080600080606085870312156120a2576120a1611cca565b5b60006120b087828801611e8a565b94505060206120c187828801611ec0565b935050604085013567ffffffffffffffff8111156120e2576120e1611ccf565b5b6120ee87828801612032565b925092505092959194509250565b61210581611e61565b82525050565b600060208201905061212060008301846120fc565b92915050565b6000806040838503121561213d5761213c611cca565b5b600061214b85828601611e8a565b925050602061215c85828601611e8a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806121ad57607f821691505b6020821081036121c0576121bf612166565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061220082611e9f565b915061220b83611e9f565b9250828203905081811115612223576122226121c6565b5b92915050565b600061223482611e9f565b915061223f83611e9f565b9250828201905080821115612257576122566121c6565b5b92915050565b7f4552525f5345414c454400000000000000000000000000000000000000000000600082015250565b6000612293600a83611d9a565b915061229e8261225d565b602082019050919050565b600060208201905081810360008301526122c281612286565b9050919050565b7f4552525f4558504952455f504153540000000000000000000000000000000000600082015250565b60006122ff600f83611d9a565b915061230a826122c9565b602082019050919050565b6000602082019050818103600083015261232e816122f2565b9050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600061236b600a83611d9a565b915061237682612335565b602082019050919050565b6000602082019050818103600083015261239a8161235e565b9050919050565b7f4552525f46554e44530000000000000000000000000000000000000000000000600082015250565b60006123d7600983611d9a565b91506123e2826123a1565b602082019050919050565b60006020820190508181036000830152612406816123ca565b9050919050565b7f4552525f41585800000000000000000000000000000000000000000000000000600082015250565b6000612443600783611d9a565b915061244e8261240d565b602082019050919050565b6000602082019050818103600083015261247281612436565b9050919050565b7f4552525f45585049524500000000000000000000000000000000000000000000600082015250565b60006124af600a83611d9a565b91506124ba82612479565b602082019050919050565b600060208201905081810360008301526124de816124a2565b9050919050565b7f4552525f4e4f545f53454c460000000000000000000000000000000000000000600082015250565b600061251b600c83611d9a565b9150612526826124e5565b602082019050919050565b6000602082019050818103600083015261254a8161250e565b9050919050565b7f4552525f494e56414c49445f5354415445000000000000000000000000000000600082015250565b6000612587601183611d9a565b915061259282612551565b602082019050919050565b600060208201905081810360008301526125b68161257a565b9050919050565b7f4552525f414c52454144595f4c4f434b45440000000000000000000000000000600082015250565b60006125f3601283611d9a565b91506125fe826125bd565b602082019050919050565b60006020820190508181036000830152612622816125e6565b905091905056fea26469706673582212200d1c8d97739d0ddfe961fc9b736f7668d5e09fc105103bd8924b12c7ad10e45664736f6c63430008130033 \ No newline at end of file diff --git a/python/ge_capped_token/data/CappedToken.json b/python/ge_capped_token/data/CappedToken.json index 2f9dfb5..979a8a2 100644 --- a/python/ge_capped_token/data/CappedToken.json +++ b/python/ge_capped_token/data/CappedToken.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":true,"internalType":"uint256","name":"_oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"Cap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newTimestamp","type":"uint256"}],"name":"ExpiryChange","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":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setExpire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setMaxSupply","outputs":[],"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":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"Cap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newTimestamp","type":"uint256"}],"name":"ExpiryChange","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":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setExpire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setMaxSupply","outputs":[],"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":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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/ge_capped_token/data/CappedToken.metadata.json b/python/ge_capped_token/data/CappedToken.metadata.json index 51c02aa..281c917 100644 --- a/python/ge_capped_token/data/CappedToken.metadata.json +++ b/python/ge_capped_token/data/CappedToken.metadata.json @@ -1 +1 @@ -{"compiler":{"version":"0.8.19+commit.7dd6d404"},"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":true,"internalType":"uint256","name":"_oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"Cap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newTimestamp","type":"uint256"}],"name":"ExpiryChange","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":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setExpire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setMaxSupply","outputs":[],"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":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":{"CappedToken.sol":"CappedToken"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"CappedToken.sol":{"keccak256":"0x8d201af84af68db58fccc746718b4abfe7d649e84a1f1bd1949ba378bf03fcb7","license":"AGPL-3.0-or-later","urls":["bzz-raw://7b3adbbcca0f48c6eee68fc88923d2d3446db2221231315cdbda6919d0fc0c6f","dweb:/ipfs/QmRTY3LPX7ef7GTL6HxuDFm3A6tYMqB3QSnEDHXj4TmgRR"]}},"version":1} +{"compiler":{"version":"0.8.19+commit.7dd6d404"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"Cap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newTimestamp","type":"uint256"}],"name":"ExpiryChange","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":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setExpire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setMaxSupply","outputs":[],"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":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":{"CappedToken.sol":"CappedToken"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"CappedToken.sol":{"keccak256":"0x1e679f5350ce90601ee89b63ec34482a73b0a0e9d9435258151bf5c1724b74a7","license":"AGPL-3.0-or-later","urls":["bzz-raw://61692975df94173c7461a4954f43ae945e945895a1b91ddf243cf205d87efd0a","dweb:/ipfs/QmPtXyTNMqWnDEk32xrd1MSqTihMJe73LPDccDEqcMwWc8"]}},"version":1} diff --git a/python/ge_capped_token/runnable/publish.py b/python/ge_capped_token/runnable/publish.py new file mode 100644 index 0000000..1d98266 --- /dev/null +++ b/python/ge_capped_token/runnable/publish.py @@ -0,0 +1,109 @@ +#!python3 + +"""Deploys capped token + +.. moduleauthor:: Louis Holbrook +.. pgp:: 0826EDA1702D1E87C6E2875121D2E7BB88C2A746 + +""" + +# SPDX-License-Identifier: GPL-3.0-or-later + +# standard imports +import sys +import os +import json +import argparse +import logging +import time +from enum import Enum + +# external imports +import chainlib.eth.cli +from chainlib.eth.tx import receipt +from chainlib.settings import ChainSettings +from chainlib.eth.cli.log import process_log +from chainlib.eth.settings import process_settings +from chainlib.eth.cli.arg import ( + Arg, + ArgFlag, + process_args, + ) +from chainlib.eth.cli.config import ( + Config, + process_config, + ) + + +# local imports +from ge_capped_token import CappedToken + +logg = logging.getLogger() + + +def process_config_local(config, arg, args, flags): + config.add(args.token_name, '_TOKEN_NAME', False) + config.add(args.token_symbol, '_TOKEN_SYMBOL', False) + config.add(args.token_decimals, '_TOKEN_DECIMALS', False) + return config + + +arg_flags = ArgFlag() +arg = Arg(arg_flags) +flags = arg_flags.STD_WRITE | arg_flags.WALLET + +argparser = chainlib.eth.cli.ArgumentParser() +argparser = process_args(argparser, arg, flags) +argparser.add_argument('--name', dest='token_name', required=True, type=str, help='Token name') +argparser.add_argument('--symbol', dest='token_symbol', required=True, type=str, help='Token symbol') +argparser.add_argument('--decimals', dest='token_decimals', default=18, type=int, help='Token decimals') +args = argparser.parse_args() + +logg = process_log(args, logg) + +config = Config() +config = process_config(config, arg, args, flags) +config = process_config_local(config, arg, args, flags) +logg.debug('config loaded:\n{}'.format(config)) + +settings = ChainSettings() +settings = process_settings(settings, config) +logg.debug('settings loaded:\n{}'.format(settings)) + + +def main(): + signer_address = settings.get('SENDER_ADDRESS') + conn = settings.get('CONN') + + c = CappedToken( + settings.get('CHAIN_SPEC'), + signer=settings.get('SIGNER'), + gas_oracle=settings.get('GAS_ORACLE'), + nonce_oracle=settings.get('NONCE_ORACLE'), + ) + + (tx_hash_hex, o) = c.constructor( + signer_address, + config.get('_TOKEN_NAME'), + config.get('_TOKEN_SYMBOL'), + config.get('_TOKEN_DECIMALS'), + ) + if settings.get('RPC_SEND'): + conn.do(o) + if settings.get('WAIT'): + r = conn.wait(tx_hash_hex) + if r['status'] == 0: + sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you') + sys.exit(1) + # TODO: pass through translator for keys (evm tester uses underscore instead of camelcase) + address = r['contractAddress'] + + print(address) + else: + print(tx_hash_hex) + else: + print(o) + + +if __name__ == '__main__': + main() diff --git a/python/ge_capped_token/unittest/__init__.py b/python/ge_capped_token/unittest/__init__.py index ddee7c8..809cad4 100644 --- a/python/ge_capped_token/unittest/__init__.py +++ b/python/ge_capped_token/unittest/__init__.py @@ -17,8 +17,6 @@ logg = logging.getLogger(__name__) class TestCappedToken(EthTesterCase): - expire = 0 - def setUp(self): super(TestCappedToken, self).setUp() self.conn = RPCConnection.connect(self.chain_spec, 'default') @@ -27,7 +25,7 @@ class TestCappedToken(EthTesterCase): self.symbol = 'FOO' self.name = 'Foo Token' self.decimals = 16 - (tx_hash, o) = c.constructor(self.accounts[0], self.name, self.symbol, self.decimals, expire=self.expire) + (tx_hash, o) = c.constructor(self.accounts[0], self.name, self.symbol, self.decimals) self.rpc.do(o) o = receipt(tx_hash) r = self.rpc.do(o) @@ -37,15 +35,7 @@ class TestCappedToken(EthTesterCase): self.initial_supply = 1 << 40 (tx_hash, o) = c.mint_to(self.address, self.accounts[0], self.accounts[0], self.initial_supply) - r = self.conn.do(o) + self.conn.do(o) o = receipt(tx_hash) r = self.conn.do(o) self.assertEqual(r['status'], 1) - - -class TestCappedExpireToken(TestCappedToken): - - expire = int(time.time()) + 100000 - - def setUp(self): - super(TestCappedExpireToken, self).setUp() diff --git a/python/setup.cfg b/python/setup.cfg index b077332..ce6f5bc 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ge-capped-token -version = 0.0.1 +version = 0.1.0 description = ERC20 token that can be minted, capped and expired. author = Louis Holbrook author_email = dev@holbrook.no @@ -29,14 +29,10 @@ licence_files = include_package_data = True python_requires = >= 3.8 packages = - giftable_erc20_token - giftable_erc20_token.runnable - giftable_erc20_token.unittest - giftable_erc20_token.data - eth_erc20 - eth_erc20.data - eth_erc20.runnable - static_token.data + ge_capped_token + ge_capped_token.runnable + ge_capped_token.unittest + ge_capped_token.data [options.package_data] * = @@ -48,4 +44,4 @@ packages = [options.entry_points] console_scripts = - capped-token-publish = giftable_erc20_token.runnable.publish:main + ge-capped-token-publish = ge_capped_token.runnable.publish:main diff --git a/solidity/CappedToken.sol b/solidity/CappedToken.sol index eec15b9..d5a2c3c 100644 --- a/solidity/CappedToken.sol +++ b/solidity/CappedToken.sol @@ -71,12 +71,11 @@ contract CappedToken { uint8 constant EXPIRY_STATE = 4; uint256 constant public maxSealState = 15; - constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _expireTimestamp) { + constructor(string memory _name, string memory _symbol, uint8 _decimals) { owner = msg.sender; name = _name; symbol = _symbol; decimals = _decimals; - expires = _expireTimestamp; } // Change max token supply. @@ -122,8 +121,8 @@ contract CappedToken { // Implements Minter function mintTo(address _to, uint256 _value) public returns (bool) { - require(writers[msg.sender] || msg.sender == owner); - require(applyExpiry() == 0); + require(writers[msg.sender] || msg.sender == owner, "ERR_AXX"); + require(applyExpiry() == 0, "ERR_EXPIRE"); if (maxSupply > 0) { require(totalSupply() + _value <= maxSupply); }