Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve script creation UX #2221

Open
Tommytrg opened this issue Jun 13, 2022 · 5 comments · May be fixed by #2240
Open

Improve script creation UX #2221

Tommytrg opened this issue Jun 13, 2022 · 5 comments · May be fixed by #2240
Assignees
Labels
enhancement 📈 New feature or request UX / DX 🙋 Improvement to user experience / developer experience

Comments

@Tommytrg
Copy link
Member

No description provided.

@aesedepece
Copy link
Member

Is there any PR following up on this? Or is this a wontfix?

@tmpolaczyk
Copy link
Contributor

PR #2240 implements a few CLI commands to improve the user experience, such as "encodeScript" and "decodeScript".

@aesedepece aesedepece linked a pull request Aug 5, 2022 that will close this issue
@aesedepece aesedepece added enhancement 📈 New feature or request UX / DX 🙋 Improvement to user experience / developer experience labels Aug 8, 2022
@aesedepece
Copy link
Member

@tmpolaczyk can you please provide a little write up listing the CLI commands needed for a 2-of-3 multisig? That will help us a lot to test the workflow 🙏

@tmpolaczyk
Copy link
Contributor

tmpolaczyk commented Aug 8, 2022

Sure, I have this example but it is outdated as some commands do not exist anymore, I will try to adapt it to the latest changes later:

Show outdated commands
RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node sendLockedMultisig --value 1000000000000 --fee 0 --m-sig 2 --n-sig 3 --pkhs twit1qa3cuch8r3jhfz6ya9tl7u86tjyp80pmha3a6r twit1j7x20sj33fwqh575zezapxdejrs5ets99p2kx0 twit1zutan0dwtfmfcnv34epvjyhwamny20vkx09zjc

e60cf82215a389dc0baeac2903d9eb18de41b3aaee63720194b9fc723952f07b:0

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node createOpenedMultiSig --value 1000000000000 --fee 0 --m-sig 2 --n-sig 3 --pkhs twit1qa3cuch8r3jhfz6ya9tl7u86tjyp80pmha3a6r twit1j7x20sj33fwqh575zezapxdejrs5ets99p2kx0 twit1zutan0dwtfmfcnv34epvjyhwamny20vkx09zjc --pkh twit1zutan0dwtfmfcnv34epvjyhwamny20vkx09zjc --utxo e60cf82215a389dc0baeac2903d9eb18de41b3aaee63720194b9fc723952f07b:0

3abc030ab5030a8f030a240a220a20e60cf82215a389dc0baeac2903d9eb18de41b3aaee63720194b9fc723952f07b12e6025b7b2256616c7565223a7b22496e7465676572223a327d7d2c7b2256616c7565223a7b224279746573223a5b372c39392c3134322c39382c3233312c32382c3130312c3131362c3133392c36382c3233332c38372c3235352c3131322c3235302c39322c3133362c31392c3138382c35395d7d7d2c7b2256616c7565223a7b224279746573223a5b3135312c3134302c3136372c3139342c38312c3133382c39322c31312c3231312c3231322c32322c36392c3230382c3135332c3138352c3134342c3232352c37362c3137342c355d7d7d2c7b2256616c7565223a7b224279746573223a5b32332c32332c3231372c3138392c3137342c39302c3131382c3135362c37372c3134352c3137342c36362c3230312c31382c3233382c3233382c3233302c36392c36312c3135305d7d7d2c7b2256616c7565223a7b22496e7465676572223a337d7d2c7b224f70657261746f72223a22436865636b4d756c7469536967227d5d12210a1f0a160a141717d9bdae5a769c4d91ae42c912eeeee6453d961080a094a58d1d12025b5d

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node sign_tx --hex

3ad7060ab6030a90030a240a220a20fa1e808398ab27abe822c13f493055bb72472f8b6c1189682ce142b28547f9ff12e7025b7b2256616c7565223a7b22496e7465676572223a327d7d2c7b2256616c7565223a7b224279746573223a5b3235342c392c3130322c3233342c3235312c3233392c33342c3233352c37392c3230322c37312c3138362c35312c38332c3231352c3131372c322c3133342c3136382c3231375d7d7d2c7b2256616c7565223a7b224279746573223a5b3135312c3134302c3136372c3139342c38312c3133382c39322c31312c3231312c3231322c32322c36392c3230382c3135332c3138352c3134342c3232352c37362c3137342c355d7d7d2c7b2256616c7565223a7b224279746573223a5b32332c32332c3231372c3138392c3137342c39302c3131382c3135362c37372c3134352c3137342c36362c3230312c31382c3233382c3233382c3233302c36392c36312c3135305d7d7d2c7b2256616c7565223a7b22496e7465676572223a337d7d2c7b224f70657261746f72223a22436865636b4d756c7469536967227d5d12210a1f0a160a141717d9bdae5a769c4d91ae42c912eeeee6453d961080a094a58d1d129b035b7b2256616c7565223a7b224279746573223a5b31302c37342c31302c37322c31302c37302c34382c36382c322c33322c39372c3235322c3230342c39342c3130382c38312c3138302c31312c39362c3231362c34302c382c3131352c3232352c3130382c3135342c39362c3136362c36372c33302c34312c38332c34392c3135332c35302c38332c3136392c34302c3132362c3231322c3135382c3136382c322c33322c34302c3235332c3234382c3234322c39352c3232322c36322c3139342c372c3131332c3233382c34332c37302c32312c37312c3139332c3130382c34312c32342c3138302c3137372c3137392c38342c3230382c36362c34382c3137362c3231312c3138372c3231302c38312c32372c31382c33352c31302c33332c322c3131332c3233352c3235322c33392c3135382c3138352c3132382c3130332c31302c3235302c3134392c37392c3132302c3130342c3232322c36392c3136362c3137332c3233362c3130312c3231342c3132302c3133312c35372c35302c3138362c312c39372c3138392c34302c3139322c36395d7d7d5d

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_02.toml node sign_tx --hex

3af3090ab6030a90030a240a220a20fa1e808398ab27abe822c13f493055bb72472f8b6c1189682ce142b28547f9ff12e7025b7b2256616c7565223a7b22496e7465676572223a327d7d2c7b2256616c7565223a7b224279746573223a5b3235342c392c3130322c3233342c3235312c3233392c33342c3233352c37392c3230322c37312c3138362c35312c38332c3231352c3131372c322c3133342c3136382c3231375d7d7d2c7b2256616c7565223a7b224279746573223a5b3135312c3134302c3136372c3139342c38312c3133382c39322c31312c3231312c3231322c32322c36392c3230382c3135332c3138352c3134342c3232352c37362c3137342c355d7d7d2c7b2256616c7565223a7b224279746573223a5b32332c32332c3231372c3138392c3137342c39302c3131382c3135362c37372c3134352c3137342c36362c3230312c31382c3233382c3233382c3233302c36392c36312c3135305d7d7d2c7b2256616c7565223a7b22496e7465676572223a337d7d2c7b224f70657261746f72223a22436865636b4d756c7469536967227d5d12210a1f0a160a141717d9bdae5a769c4d91ae42c912eeeee6453d961080a094a58d1d12b7065b7b2256616c7565223a7b224279746573223a5b31302c37342c31302c37322c31302c37302c34382c36382c322c33322c39372c3235322c3230342c39342c3130382c38312c3138302c31312c39362c3231362c34302c382c3131352c3232352c3130382c3135342c39362c3136362c36372c33302c34312c38332c34392c3135332c35302c38332c3136392c34302c3132362c3231322c3135382c3136382c322c33322c34302c3235332c3234382c3234322c39352c3232322c36322c3139342c372c3131332c3233382c34332c37302c32312c37312c3139332c3130382c34312c32342c3138302c3137372c3137392c38342c3230382c36362c34382c3137362c3231312c3138372c3231302c38312c32372c31382c33352c31302c33332c322c3131332c3233352c3235322c33392c3135382c3138352c3132382c3130332c31302c3235302c3134392c37392c3132302c3130342c3232322c36392c3136362c3137332c3233362c3130312c3231342c3132302c3133312c35372c35302c3138362c312c39372c3138392c34302c3139322c36395d7d7d2c7b2256616c7565223a7b224279746573223a5b31302c37352c31302c37332c31302c37312c34382c36392c322c33332c302c3136302c3137332c3231352c3130362c3135352c3132362c3235312c3139382c3230302c35312c32342c3232382c3234322c34382c38302c3130392c33392c32362c37392c3234352c39322c3130312c37342c3230322c33312c35342c3137352c3235312c3135312c3136352c3136352c3131352c322c33322c342c3139362c33392c38332c3131352c3134332c3133312c3137352c3139352c3234342c3234362c3132312c3139312c38362c302c3232302c39352c31332c37352c3234312c3133352c3235322c31352c392c3139382c3138392c3134312c36382c3235302c3231392c3130352c3130342c31382c33352c31302c33332c332c34392c3235322c3134392c38322c33332c33372c32312c31382c3133312c382c302c3132312c35322c35322c3138382c3133332c36332c39392c3130322c3233322c3135312c3132362c38302c3134312c34322c3232392c3130362c3230362c31302c39362c31302c3134325d7d7d5d


RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node broadcast --hex 

In the sign_tx and broadcast need to copy-paste the output of the previous command after the --hex flag.

@tmpolaczyk
Copy link
Contributor

Updated commands to create a 2-of-3 multisig:

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node createMultiSigAddress --m-sig 2 --n-sig 3 --pkhs twit1vuv64djke9e74qdap06k8uvcx66lhww8rtepjl twit1j7x20sj33fwqh575zezapxdejrs5ets99p2kx0 twit1zutan0dwtfmfcnv34epvjyhwamny20vkx09zjc

twit19zkjef6v4l52hy00yn3qtdr9xqs895j4wnjgar

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node send --value 1000000000000 --fee 0 --address twit19zkjef6v4l52hy00yn3qtdr9xqs895j4wnjgar

378a307853916ddeeb90272040c923174094b8fd9e22c42e79eb3a8ed10e3678:0

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node createOpenedMultiSig --value 1000000000000 --fee 0 --m-sig 2 --n-sig 3 --pkhs twit1vuv64djke9e74qdap06k8uvcx66lhww8rtepjl twit1j7x20sj33fwqh575zezapxdejrs5ets99p2kx0 twit1zutan0dwtfmfcnv34epvjyhwamny20vkx09zjc --pkh twit1zutan0dwtfmfcnv34epvjyhwamny20vkx09zjc --utxo 378a307853916ddeeb90272040c923174094b8fd9e22c42e79eb3a8ed10e3678:0

0abf030ab8030a94030a240a220a20378a307853916ddeeb90272040c923174094b8fd9e22c42e79eb3a8ed10e367812eb025b7b2256616c7565223a7b22496e7465676572223a327d7d2c7b2256616c7565223a7b224279746573223a5b3130332c32352c3137302c3138322c38362c3230312c3131352c3233342c3132392c3138392c31312c3234352c39392c3234312c3135322c35342c3138312c3235312c3138352c3139395d7d7d2c7b2256616c7565223a7b224279746573223a5b3135312c3134302c3136372c3139342c38312c3133382c39322c31312c3231312c3231322c32322c36392c3230382c3135332c3138352c3134342c3232352c37362c3137342c355d7d7d2c7b2256616c7565223a7b224279746573223a5b32332c32332c3231372c3138392c3137342c39302c3131382c3135362c37372c3134352c3137342c36362c3230312c31382c3233382c3233382c3233302c36392c36312c3135305d7d7d2c7b2256616c7565223a7b22496e7465676572223a337d7d2c7b224f70657261746f72223a22436865636b4d756c7469536967227d5d121f0a160a141717d9bdae5a769c4d91ae42c912eeeee6453d961080a094a58d1d12025b5d

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node signTx --hex

0adc060ab8030a94030a240a220a20378a307853916ddeeb90272040c923174094b8fd9e22c42e79eb3a8ed10e367812eb025b7b2256616c7565223a7b22496e7465676572223a327d7d2c7b2256616c7565223a7b224279746573223a5b3130332c32352c3137302c3138322c38362c3230312c3131352c3233342c3132392c3138392c31312c3234352c39392c3234312c3135322c35342c3138312c3235312c3138352c3139395d7d7d2c7b2256616c7565223a7b224279746573223a5b3135312c3134302c3136372c3139342c38312c3133382c39322c31312c3231312c3231322c32322c36392c3230382c3135332c3138352c3134342c3232352c37362c3137342c355d7d7d2c7b2256616c7565223a7b224279746573223a5b32332c32332c3231372c3138392c3137342c39302c3131382c3135362c37372c3134352c3137342c36362c3230312c31382c3233382c3233382c3233302c36392c36312c3135305d7d7d2c7b2256616c7565223a7b22496e7465676572223a337d7d2c7b224f70657261746f72223a22436865636b4d756c7469536967227d5d121f0a160a141717d9bdae5a769c4d91ae42c912eeeee6453d961080a094a58d1d129e035b7b2256616c7565223a7b224279746573223a5b31302c37352c31302c37332c31302c37312c34382c36392c322c33332c302c3231382c37382c3234362c3138302c37312c3132392c36372c3135372c32322c32392c39362c3139372c3234312c3234322c3138342c3233372c3130332c38302c3234302c3133332c37372c36372c3231342c3235332c3131392c34382c37322c3136342c3133382c32342c33392c38372c322c33322c36372c3234362c3134372c3139302c35342c33392c37352c39342c32372c3233392c3137382c3235302c3235352c3231392c3230372c3135392c35392c31382c34302c3230332c34392c37392c32312c32372c3234302c3234382c39332c3131332c3134322c3138332c36342c39382c31382c33352c31302c33332c322c39362c3232352c3134302c3134382c32302c3232352c34312c3136352c3233382c3133362c3138332c3235302c3230392c352c3230392c3130392c3136352c35332c3137322c35322c3138392c32312c3137322c3233392c38372c38302c3135372c36312c32312c3232342c39332c3133325d7d7d5d

RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_02.toml node signTx --hex

0af4090ab8030a94030a240a220a20378a307853916ddeeb90272040c923174094b8fd9e22c42e79eb3a8ed10e367812eb025b7b2256616c7565223a7b22496e7465676572223a327d7d2c7b2256616c7565223a7b224279746573223a5b3130332c32352c3137302c3138322c38362c3230312c3131352c3233342c3132392c3138392c31312c3234352c39392c3234312c3135322c35342c3138312c3235312c3138352c3139395d7d7d2c7b2256616c7565223a7b224279746573223a5b3135312c3134302c3136372c3139342c38312c3133382c39322c31312c3231312c3231322c32322c36392c3230382c3135332c3138352c3134342c3232352c37362c3137342c355d7d7d2c7b2256616c7565223a7b224279746573223a5b32332c32332c3231372c3138392c3137342c39302c3131382c3135362c37372c3134352c3137342c36362c3230312c31382c3233382c3233382c3233302c36392c36312c3135305d7d7d2c7b2256616c7565223a7b22496e7465676572223a337d7d2c7b224f70657261746f72223a22436865636b4d756c7469536967227d5d121f0a160a141717d9bdae5a769c4d91ae42c912eeeee6453d961080a094a58d1d12b6065b7b2256616c7565223a7b224279746573223a5b31302c37342c31302c37322c31302c37302c34382c36382c322c33322c38382c34302c33332c3139372c3232322c32322c3234312c3137312c3133302c3131382c3139392c36352c3135372c3135342c34322c38312c33322c38372c3132302c3135382c3132372c3135302c3139312c342c3139362c3133382c3231362c34332c3234322c36342c3137302c36372c322c33322c37372c3134372c3135322c3231322c3133372c37302c36312c32302c3233362c362c3135352c3138392c32302c3133392c3231372c31302c3134372c3231382c3131392c31382c37372c3138352c3233392c3132312c39352c3231302c3232392c3133332c3138362c3139392c32342c38392c31382c33352c31302c33332c332c34392c3235322c3134392c38322c33332c33372c32312c31382c3133312c382c302c3132312c35322c35322c3138382c3133332c36332c39392c3130322c3233322c3135312c3132362c38302c3134312c34322c3232392c3130362c3230362c31302c39362c31302c3134325d7d7d2c7b2256616c7565223a7b224279746573223a5b31302c37352c31302c37332c31302c37312c34382c36392c322c33332c302c3231382c37382c3234362c3138302c37312c3132392c36372c3135372c32322c32392c39362c3139372c3234312c3234322c3138342c3233372c3130332c38302c3234302c3133332c37372c36372c3231342c3235332c3131392c34382c37322c3136342c3133382c32342c33392c38372c322c33322c36372c3234362c3134372c3139302c35342c33392c37352c39342c32372c3233392c3137382c3235302c3235352c3231392c3230372c3135392c35392c31382c34302c3230332c34392c37392c32312c32372c3234302c3234382c39332c3131332c3134322c3138332c36342c39382c31382c33352c31302c33332c322c39362c3232352c3134302c3134382c32302c3232352c34312c3136352c3233382c3133362c3138332c3235302c3230392c352c3230392c3130392c3136352c35332c3137322c35322c3138392c32312c3137322c3233392c38372c38302c3135372c36312c32312c3232342c39332c3133325d7d7d5d


RUST_BACKTRACE=full RUST_LOG=witnet=debug cargo run -- -c witnet_01.toml node broadcast --hex 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 📈 New feature or request UX / DX 🙋 Improvement to user experience / developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants