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

Feature Request: Pass transaction by string #126

Closed
eosinbox opened this issue Apr 18, 2019 · 3 comments · Fixed by #131
Closed

Feature Request: Pass transaction by string #126

eosinbox opened this issue Apr 18, 2019 · 3 comments · Fixed by #131

Comments

@eosinbox
Copy link

It would be nice to be able to pass a transaction by string (similar to what cleos supports) instead of filename. This would allow tools such as EOS Inbox to allow a user to copy the full eosc tx sign command with a transaction string.

@maoueh
Copy link
Contributor

maoueh commented Apr 18, 2019

Sure, that would be great. Can you show me how it looks like when used through cleos?

@eosinbox
Copy link
Author

Here is an example of the voteproducer action:

cleos --url https://mainnet.eos.dfuse.io push transaction '{
"expiration": "2019-04-19T00:22:13.000",
"ref_block_num": 15058,
"ref_block_prefix": 1731519432,
"max_net_usage_words": 0,
"max_cpu_usage_ms": 0,
"delay_sec": 0,
"context_free_actions": [],
"actions": [
{
"account": "eosio",
"name": "voteproducer",
"authorization": [
{
"actor": "eosinboxdapp",
"permission": "active"
}
],
"data": {
"voter": "eosinboxdapp",
"proxy": "brockpierce1",
"producers": []
}
}
],
"transaction_extensions": []
}'

@maoueh
Copy link
Contributor

maoueh commented Apr 19, 2019

Perfect, thanks. We are looking into it.

maoueh pushed a commit that referenced this issue May 4, 2019
The feature is heuristics based, if the first argument is an existing
file, it is used right away. Otherwise, if it looks like a JSON string
(really basic checks enough to avoid ambiguity with a plain filename), then
the input is considered a JSON transaction. Otherwise, an error is thrown.

Fixes #126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants