如何用 Ruby 做 Transfer

in #cn6 years ago (edited)

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 。

谢谢阅读。

Sort:  

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!

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.033
BTC 63243.61
ETH 3078.23
USDT 1.00
SBD 3.89