Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Invoke from address selection #329

Merged

Conversation

brianlenz
Copy link
Contributor

@brianlenz brianlenz commented Mar 16, 2018

What current issue(s) does this address, or what feature is it adding?

#322

How did you solve this problem?

Added support for --from-addr= parameters for the various invoke methods in both prompt.py and other relevant commands.

How did you make sure your solution works?

Tested it. Updated a test to use it.

Are there any special changes in the code that we should be aware of?

No.

Please check the following, if applicable:

  • Did you add any tests?
  • Did you run make lint?
  • Did you run make test?
  • Are you making a PR to a feature branch or development rather than master?
  • Did you add an entry to CHANGELOG.rst? (if not, please do)

Brian Lenz added 4 commits March 16, 2018 11:34
* Added support for --from-addr= for testinvoke and other build/load/invoke commands.

* Added `help` documentation for prompt for a couple of missing commands and tab completions.
* Found bug in testing where I wasn't properly translating the from_addr address string into the proper 20-byte (UInt160) script hash. There were only 3 places this was necessary. It keeps the interface to using these methods clean in that a human-readable address can be passed in and will automatically be converted to the script hash.
* Added support for --from-addr= for testinvoke and other build/load/invoke commands.

* Added `help` documentation for prompt for a couple of missing commands and tab completions.
…neo-python into invoke-from-address-selection
@coveralls
Copy link

coveralls commented Mar 16, 2018

Coverage Status

Coverage decreased (-0.0003%) to 78.238% when pulling ecd1c6c on brianlenz:invoke-from-address-selection into 8108303 on CityOfZion:development.

@@ -104,7 +104,7 @@ class PromptInterface(object):
'wallet tkn_approve {token symbol} {address_from} {address to} {amount}',
'wallet tkn_allowance {token symbol} {address_from} {address to}',
'wallet tkn_mint {token symbol} {mint_to_addr} (--attach-neo={amount}, --attach-gas={amount})',
'wallet tkn_register {addr} ({addr}...)',
'wallet tkn_register {addr} ({addr}...) (--from-addr={addr})',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder if we even want to support tkn_register as a native command at all. It's not part of NEP-5, and there are conversations around changing the de facto standard (e.g. camel case instead of underscores). It's easy enough to do with testinvoke, so we may just want to get rid of support for it entirely?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its good to keep around. We're working on an NEP for sale related ICO methods, so once that is complete we can change the syntax to camelCase or whatever it ends up being.

@localhuman localhuman merged commit 0bc23be into CityOfZion:development Mar 17, 2018
@brianlenz brianlenz deleted the invoke-from-address-selection branch March 17, 2018 22:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants