如何用 Ruby 做 Transfer

in cn •  3 months ago

ruby icon

由于最近写贴都没什么人光顾,所以只好借用一点外力。 所以经常会到 steembottracker.com 去找划算的bot 支援。 但划算的bot 一般上都不能bid 太高, 所以基本上必须transfer 很多 0.1 sbd 的bot, 一个一个transfer 太费时了, 所以便想到要用script 来处理。

虽然这里有很多其它语言的教程, 但我只会用ruby 所以以下是用ruby 的示范。

首先要先用 gem 安装radiator

gem install radiator

安装好后, 就可以用以下这个脚本来做 transfer了

require 'radiator'

tx = Radiator::Transaction.new(wif: "你的账户的 active key" )
transfer = {
  type: :transfer,
  from: "账户名",
  to: "收款人",
  amount: "0.1 SBD",
  memo: "笔记"
}

tx.operations << transfer
tx.process(true)

把上面中文字的部分取代成真的值就可以了。

如果要transfer 给很多不同的人用不同的值,
可以把收款人和款厄放进一个array 里, 然后写一个 loop 把账一次转去。

amount 的部分除了 sbd 也可以是 steem 。

谢谢阅读。

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

You got a 11.11% upvote from @bid4joy courtesy of @tensaix2j!

You got a 28.44% upvote from @mitsuko courtesy of @tensaix2j!

This post has received a 19.46% UpGoat from @shares. Send at least 0.1 SBD to @shares with a post link in the memo field.

Interested to earn daily? Delegate Steem Power to receive 95% payout rewards. Use this link https://on.king.net/shares to delegate SP to @Shares. Join us at https://steemchat.com/ discord chat.

Support my owner. Please vote @Yehey as Witness - simply click and vote.

你好吗?客观渴不渴,有没有去 @laodr 老道茶馆喝口热茶啊?如果不想再收到我的留言,请回复“取消”。

Nice post ! You got 13.33% upvote from @flymehigh. Earn free sbd/steem daily by delegating(renting) your SP. We share high return, click here to delegate your sp to flymehigh if you don't know, how to earn passive income by delegating your SP click here for more info Join our discord You can promote your posts. Thanks.

You got a 10.53% upvote from @joeparys! Thank you for your support of our services. To continue your support, please follow and delegate Steem power to @joeparys for daily steem and steem dollar payouts!

This post has received a 2.13% upvote from @lovejuice thanks to @tensaix2j. They love you, so does Aggroed. Please be sure to vote for Witnesses at https://steemit.com/~witnesses.

You got a 8.11% upvote from @whalecreator courtesy of @tensaix2j! Delegate your Steem Power to earn 100% payouts.

You got a 8.49% upvote from @redlambo courtesy of @tensaix2j! Make sure to use tag #redlambo to be considered for the curation post!

You got a 15.15% upvote from @sunrawhale courtesy of @tensaix2j!

This service has been created with the help of @yabapmatt so please show your support by voting for him for witness!

Thank you so much for using our service! You were protected from up to 20% losses!

Help us grow by delegating to us! 100sp, 500SP, 1000SP, ANY SP

You just received 13.78% upvote from @onlyprofitbot courtesy of @tensaix2j!

You got a 1.58% upvote from @oceanwhale With 35+ Bonus Upvotes courtesy of @tensaix2j! Delegate us Steem Power & get 100%daily rewards Payout! 20 SP, 50, 75, 100, 150, 200, 300, 500,1000 or Fill in any amount of SP Earn 1.25 SBD Per 1000 SP | Discord server

This post has received a 50.00% upvote from @aksdwi thanks to: @tensaix2j.