Skip to content

Instantly share code, notes, and snippets.

@Tolsi
Created December 22, 2017 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tolsi/bf2133e669880cfd91f70ae62a80c64d to your computer and use it in GitHub Desktop.
Save Tolsi/bf2133e669880cfd91f70ae62a80c64d to your computer and use it in GitHub Desktop.
Waves distribution using WavesJ
import com.wavesplatform.wavesj.{Asset, Node, PrivateKeyAccount, Transaction}
object Mainb extends App {
val seeds = Seq.fill(30)(PrivateKeyAccount.generateSeed())
val myAcc = new PrivateKeyAccount("", 0, 'W')
val addresses = seeds.map(s => new PrivateKeyAccount(s, 0, 'W'))
val txs = addresses.map(a => Transaction.makeTransferTx(myAcc, a.getAddress, 100000000, Asset.WAVES, 100000, Asset.WAVES, ""))
println(seeds.mkString("\n"))
println(txs.map(_.getJson))
val node = new Node("https://nodes.wavesnodes.com")
println(txs.map(node.send))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment