Transmitter is a CLI tool for STEEM blockchain witnesses. It quickly allows you to enable/disable your witness or set some properties for the new witness_set_properties call introduced in Hard Fork 20.
Installation
$ pip install transmitter
Configuration (Optional)
If you don't want to repeat yourself while calling commands, create a configuration file on your user directory:
$ touch ~/.transmitter/config.json
Fill it with the corresponding values:
{
"NODES": [
"https://api.steemit.com"
],
"WITNESS_ACCOUNT": "<your_witness_account>",
"SIGNING_KEY": "<signing_key>",
"ACTIVE_KEY": "<active_key>",
"DEFAULT_PROPERTIES": {
"account_creation_fee": "3 STEEM",
"maximum_block_size": 65536,
"sbd_interest_rate": 0
},
"URL": "https://steemit.com/@emrebeyler"
}
All keys are optional. If you don't want to keep your signing key and active key in the config file, that's fine.
You can pass it to the commands in different ways:
- Use
TRANSMITTER_SIGNING_KEY
andTRANSMITTER_ACTIVE_KEY
environment values. - Use --signing-key and --active-key params while running the tool.
That's the same with WITNESS_ACCOUNT and URL parameters.
DEFAULT_PROPERTIES
has a special case. You can't pass it via CLI parameters or environment vars. If you don't fill that key, transmitter will use the latest props information belongs to your witness account in the blockchain.
Note: Config file should be located at ~/user/.transmitter/config.json
.
Enabling the witness
$ transmitter enable
Disabling the witness
$ transmitter disable
Setting a new witness property
$ transmitter set --property account_subsidy_decay=128 --property account_subsidy_budget=2
You can send single or multiple parameters.
Bonus: Installation with Docker
$ git clone https://github.com/emre/transmitter.git
$ cd transmitter
Edit the config file as you wish:
$ vim config.json.docker
$ docker build -t transmitter .
After that, you can run the transmitter like docker run -t transmitter <command>
.
Example:
➜ transmitter git:(master) ✗ docker run -t transmitter disable
2018-10-08 19:14:20,326 - transmitter.main - INFO - Connecting to the blockchain using mainnet.
2018-10-08 19:14:21,007 - transmitter.main - INFO - Got the SIGNING_KEY in the config file.
2018-10-08 19:14:21,238 - transmitter.main - INFO - Got the WITNESS_ACCOUNT in the config file.
2018-10-08 19:14:21,403 - transmitter.main - INFO - Got the URL in the config file.
2018-10-08 19:14:21,403 - transmitter.main - INFO - Disabling the witness: <Witness emrebeyler>
2018-10-08 19:14:24,823 - transmitter.main - INFO - Operation broadcasted.
Disclaimer
Even though I use transmitter
in my witness operations, it's strongly advised for you to review and audit the code before using it. This software may include bugs, use it at your own risk.
Vote for me as a witness
I do my best to support the blockchain with my skills. If you want to support me, consider casting a vote on via Steemconnect or on steemit.com.
Thanks for the contribution, @emrebeyler! Very cool CLI, should be useful for witnesses!
I can't remember if I asked you this before, but I think I did on another CLI you made: how come you aren't using Click?! I have never bothered with argparse, but from reading the "Why not Argparse" section in Click's documentation I never really felt the need. Another one I've wanted to try out, but never found a use for is
prompt_toolkit
- have you heard of it?I also think it would be interesting reading about how a senior Python developer like yourself goes about implementing something like this - maybe an idea for future contributions, but it could be too abstract lol.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for the review, @amosbastian.
I use argparse because that's what I am used to. :) Also, I just need to pass some vars from the command line to the Transmitter instance. So, not actually a complicated use case, argparse does the job.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for your review, @amosbastian!
So far this week you've reviewed 17 contributions. Keep up the good work!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Nice beemApp, do you plan to add more features as price feed or automatic witness disable or switch when missing blocks occur?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you.
Not in the short term. But who knows? :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi @emrebeyler!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey, @emrebeyler!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Look at that birthday pos. !BEER
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
View or trade
BEER
.Hey @emrebeyler, here is a little bit of
BEER
for you. Enjoy it!Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit