DEV Community

Airic Yu
Airic Yu

Posted on

Solana client sample - Do 100 times wallet transfer

Recently I am learning Solana blockchain. So I will write some sample code or sharing posts during my learning journey.

This time, I would like to share some sample client code for doing 100 times wallet transfer.

Github repo:
https://github.com/airicyu/solana-sample-client-wallet-transfer

As you can see, doing 100 transfer operation and get a confirm is just taking ~900ms.
In terms of interactions we do with BLOCKCHAIN nowadays. Performing a series of 100 operation get confirm(Not finalized yet though) in 900ms is very amazing.

#################### Test Transfer in batch #####################
trx time=103.29119999706745 ms, send batch[1], trx hash=DbS7ZM4yEstTKkJPtRCqQC9tVT7UUM2Ye4YUeKnUmAa9JnV33qxrHH9z9HGzPmZKnKfDD6RPQDjbwnTYRRqrkuA
trx time=104.26439999789 ms, send batch[0], trx hash=2kSADoeq9KAmpGm4uPLZgzLz1khi47GQyjRvYmhwgtckj13J9vryo2VZSZy3QEnRWjyBtxNJZUaNoj45xtf9g9de
trx time=182.70139999687672 ms, send batch[4], trx hash=38WG3dZAZGumWRrrStJ7ENSmuTUDehYeqc2cRD5GWZ56gcLQ1Hrg25iDCCH1u7K574hcUyCoCs9iUnVaZ2SAAGJy
trx time=183.33809999376535 ms, send batch[2], trx hash=HjdfTFJcgx87Z6VSnSDpPZ844rUHK2wyq8yM8JUzQT5hASLnc9phW7fFUogLiAN2ZoRHppvB7SV1r2iTtQtjeTF
trx time=186.82880000025034 ms, send batch[3], trx hash=3eNSWQ7Hr9bpqFQdh4fSuifMmUceuM9prhJdihz1HZrFq6abr7NfTGuznSJntoAgE89uWeHTyEYJu1gs6sH9v1FQ
Sent all trx. Total elapsed time: 187.63710000365973 ms
confirm trx 3eNSWQ7Hr9bpqFQdh4fSuifMmUceuM9prhJdihz1HZrFq6abr7NfTGuznSJntoAgE89uWeHTyEYJu1gs6sH9v1FQ
confirm trx 2kSADoeq9KAmpGm4uPLZgzLz1khi47GQyjRvYmhwgtckj13J9vryo2VZSZy3QEnRWjyBtxNJZUaNoj45xtf9g9de
confirm trx 38WG3dZAZGumWRrrStJ7ENSmuTUDehYeqc2cRD5GWZ56gcLQ1Hrg25iDCCH1u7K574hcUyCoCs9iUnVaZ2SAAGJy
confirm trx HjdfTFJcgx87Z6VSnSDpPZ844rUHK2wyq8yM8JUzQT5hASLnc9phW7fFUogLiAN2ZoRHppvB7SV1r2iTtQtjeTF
confirm trx DbS7ZM4yEstTKkJPtRCqQC9tVT7UUM2Ye4YUeKnUmAa9JnV33qxrHH9z9HGzPmZKnKfDD6RPQDjbwnTYRRqrkuA
Confirmed all trxs. Total elapsed time: 919.9912000000477 ms
#########################################
Enter fullscreen mode Exit fullscreen mode

This is rather crazy speed, and that's why I am diving in to learn Solana now.

Top comments (0)