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

Support named parameter type entry for sc build commands #781

Open
ixje opened this issue Dec 31, 2018 · 4 comments
Open

Support named parameter type entry for sc build commands #781

ixje opened this issue Dec 31, 2018 · 4 comments

Comments

@ixje
Copy link
Member

ixje commented Dec 31, 2018

Current behavior

Do after #623 is merged.

Currently the sc build_run and sc load_run commands require numeric entry of the contract parameter types defined in

Signature = 0x00
Boolean = 0x01
Integer = 0x02
Hash160 = 0x03
Hash256 = 0x04
ByteArray = 0x05
PublicKey = 0x06
String = 0x07
Array = 0x10
InteropInterface = 0xf0
Void = 0xff

Expected behavior

We can improve the user experience by allowing for named inputs, such that these numbers don't have to be remembered.

@LysanderGG
Copy link
Contributor

I'd like to implement this.

I would suggest both complete names and some abbreviations, for instance "sig", "bool", "int", "str", "arr"

@ixje
Copy link
Member Author

ixje commented Jan 6, 2019

👌
ping @jseagrave21 to avoid double work; as you also indicated you might want to pick this up.

@jseagrave21
Copy link
Contributor

@LysanderGG go for it! I started investigating yesterday but don't have anything written yet. cc @ixje

I would suggest both complete names and some abbreviations, for instance "sig", "bool", "int", "str", "arr"

I like that it would support both. The original issue was that we didn't want the user to have to remember anything proprietary.

My original thought was requiring a list entry (like params for RPC)
So, replace

070202

With

[string, integer, integer]

Also, I was toying with the idea of still supporting the original format. But that is definitely not a must imo.

@ixje
Copy link
Member Author

ixje commented Jan 6, 2019

I think it might be good to support the old format. There might be old tutorial out there that still use it, or people might prefer it (as it's less typing)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants