mirror of
git://holbrook.no/eth-accounts-index
synced 2024-11-05 10:16:47 +01:00
Add owner flag to deploy script
This commit is contained in:
parent
b278d2fb69
commit
1b37e0726a
@ -1,3 +1,5 @@
|
|||||||
|
- 0.0.6
|
||||||
|
* Add owner flag to deploy script
|
||||||
- 0.0.5
|
- 0.0.5
|
||||||
* Rename solidity file, add return values from evm functions
|
* Rename solidity file, add return values from evm functions
|
||||||
- 0.0.4
|
- 0.0.4
|
||||||
|
@ -24,6 +24,7 @@ logging.getLogger('urllib3').setLevel(logging.WARNING)
|
|||||||
argparser = argparse.ArgumentParser()
|
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', '--writer', dest='w', action='append', type=str, help='Writer to add')
|
argparser.add_argument('-w', '--writer', dest='w', action='append', type=str, help='Writer to add')
|
||||||
|
argparser.add_argument('-o', '--owner', dest='o', type=str, help='Accounts index owner')
|
||||||
argparser.add_argument('-a', '--account', dest='a', action='append', type=str, help='Account to add')
|
argparser.add_argument('-a', '--account', dest='a', action='append', type=str, help='Account to add')
|
||||||
argparser.add_argument('-k', '--keep-sender', dest='k', action='store_true', help='If set, sender will be kept as writer')
|
argparser.add_argument('-k', '--keep-sender', dest='k', action='store_true', help='If set, sender will be kept as writer')
|
||||||
argparser.add_argument('--contracts-dir', dest='contracts_dir', default='.', help='Directory containing bytecode and abi')
|
argparser.add_argument('--contracts-dir', dest='contracts_dir', default='.', help='Directory containing bytecode and abi')
|
||||||
@ -45,6 +46,8 @@ def main():
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
w3.eth.defaultAccount = w3.eth.accounts[0]
|
w3.eth.defaultAccount = w3.eth.accounts[0]
|
||||||
|
if args.o != None:
|
||||||
|
w3.eth.defaultAccount = web3.Web3.toChecksumAddress(args.o)
|
||||||
|
|
||||||
c = w3.eth.contract(abi=abi, bytecode=bytecode)
|
c = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||||
tx_hash = c.constructor().transact({'from': w3.eth.accounts[0]})
|
tx_hash = c.constructor().transact({'from': w3.eth.accounts[0]})
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = eth-accounts-index
|
name = eth-accounts-index
|
||||||
version = 0.0.5
|
version = 0.0.6
|
||||||
description = Accounts index evm contract tooling with permissioned writes
|
description = Accounts index evm contract tooling with permissioned writes
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
@ -29,6 +29,16 @@ packages =
|
|||||||
install_requires =
|
install_requires =
|
||||||
confini==0.3.2
|
confini==0.3.2
|
||||||
web3==5.12.2
|
web3==5.12.2
|
||||||
|
tests_require =
|
||||||
|
pytest==6.0.1
|
||||||
|
eth-tester==0.5.0b2
|
||||||
|
py-evm==0.3.0a20
|
||||||
|
|
||||||
|
[options.extras_require]
|
||||||
|
testing =
|
||||||
|
pytest==6.0.1
|
||||||
|
eth-tester==0.5.0b2
|
||||||
|
py-evm==0.3.0a20
|
||||||
|
|
||||||
[options.package_data]
|
[options.package_data]
|
||||||
* = **/*.abi.json
|
* = **/*.abi.json
|
||||||
|
Loading…
Reference in New Issue
Block a user