mirror of
https://github.com/chaintool-py/eth-erc20.git
synced 2024-11-29 05:06:47 +01:00
Upgrade chainlib
This commit is contained in:
parent
35328b5769
commit
914dbbdc05
@ -74,7 +74,6 @@ if args.y != None:
|
|||||||
signer = EIP155Signer(keystore)
|
signer = EIP155Signer(keystore)
|
||||||
|
|
||||||
chain_spec = ChainSpec.from_chain_str(args.i)
|
chain_spec = ChainSpec.from_chain_str(args.i)
|
||||||
chain_id = chain_spec.network_id()
|
|
||||||
|
|
||||||
rpc = EthHTTPConnection(args.p)
|
rpc = EthHTTPConnection(args.p)
|
||||||
nonce_oracle = RPCNonceOracle(signer_address, rpc)
|
nonce_oracle = RPCNonceOracle(signer_address, rpc)
|
||||||
@ -86,7 +85,7 @@ token_decimals = args.decimals
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
c = GiftableToken(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = GiftableToken(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
|
||||||
(tx_hash_hex, o) = c.constructor(signer_address, token_name, token_symbol, token_decimals)
|
(tx_hash_hex, o) = c.constructor(signer_address, token_name, token_symbol, token_decimals)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
if block_last:
|
if block_last:
|
||||||
|
@ -38,7 +38,7 @@ argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8
|
|||||||
argparser.add_argument('-e', action='store_true', help='Treat all transactions as essential')
|
argparser.add_argument('-e', action='store_true', help='Treat all transactions as essential')
|
||||||
argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed')
|
argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed')
|
||||||
argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed')
|
argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed')
|
||||||
argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string')
|
argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string')
|
||||||
argparser.add_argument('-a', '--token-address', required='True', dest='a', type=str, help='Giftable token address')
|
argparser.add_argument('-a', '--token-address', required='True', dest='a', type=str, help='Giftable token address')
|
||||||
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
||||||
argparser.add_argument('-v', action='store_true', help='Be verbose')
|
argparser.add_argument('-v', action='store_true', help='Be verbose')
|
||||||
@ -73,7 +73,6 @@ if args.y != None:
|
|||||||
signer = EIP155Signer(keystore)
|
signer = EIP155Signer(keystore)
|
||||||
|
|
||||||
chain_spec = ChainSpec.from_chain_str(args.i)
|
chain_spec = ChainSpec.from_chain_str(args.i)
|
||||||
chain_id = chain_spec.network_id()
|
|
||||||
|
|
||||||
rpc = EthHTTPConnection(args.p)
|
rpc = EthHTTPConnection(args.p)
|
||||||
nonce_oracle = RPCNonceOracle(signer_address, rpc)
|
nonce_oracle = RPCNonceOracle(signer_address, rpc)
|
||||||
@ -87,7 +86,7 @@ token_value = args.value
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
c = GiftableToken(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = GiftableToken(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
|
||||||
(tx_hash_hex, o) = c.mint_to(token_address, signer_address, recipient_address, token_value)
|
(tx_hash_hex, o) = c.mint_to(token_address, signer_address, recipient_address, token_value)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
if block_last:
|
if block_last:
|
||||||
|
@ -37,7 +37,7 @@ argparser = argparse.ArgumentParser()
|
|||||||
argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)')
|
argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)')
|
||||||
argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed')
|
argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed')
|
||||||
argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed')
|
argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed')
|
||||||
argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string')
|
argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string')
|
||||||
argparser.add_argument('-a', '--token-address', required='True', dest='a', type=str, help='Giftable token address')
|
argparser.add_argument('-a', '--token-address', required='True', dest='a', type=str, help='Giftable token address')
|
||||||
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
||||||
argparser.add_argument('-v', action='store_true', help='Be verbose')
|
argparser.add_argument('-v', action='store_true', help='Be verbose')
|
||||||
@ -71,7 +71,6 @@ if args.y != None:
|
|||||||
signer = EIP155Signer(keystore)
|
signer = EIP155Signer(keystore)
|
||||||
|
|
||||||
chain_spec = ChainSpec.from_chain_str(args.i)
|
chain_spec = ChainSpec.from_chain_str(args.i)
|
||||||
chain_id = chain_spec.network_id()
|
|
||||||
|
|
||||||
rpc = EthHTTPConnection(args.p)
|
rpc = EthHTTPConnection(args.p)
|
||||||
nonce_oracle = RPCNonceOracle(signer_address, rpc)
|
nonce_oracle = RPCNonceOracle(signer_address, rpc)
|
||||||
@ -82,7 +81,7 @@ minter_address = args.minter_address
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
c = GiftableToken(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = GiftableToken(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
|
||||||
(tx_hash_hex, o) = c.add_minter(token_address, signer_address, minter_address)
|
(tx_hash_hex, o) = c.add_minter(token_address, signer_address, minter_address)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
if block_last:
|
if block_last:
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
confini~=0.3.6rc3
|
confini~=0.3.6rc3
|
||||||
crypto-dev-signer~=0.4.14a11
|
crypto-dev-signer~=0.4.14a17
|
||||||
chainlib~=0.0.1a36
|
chainlib~=0.0.2a1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = giftable-erc20-token
|
name = giftable-erc20-token
|
||||||
version = 0.0.8a6
|
version = 0.0.8a7
|
||||||
description = Simple ERC20 contract with deployment script that lets any address mint and gift itself tokens.
|
description = Simple ERC20 contract with deployment script that lets any address mint and gift itself tokens.
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user