Created
March 4, 2020 11:58
-
-
Save jimmychu0807/0e34b424d84ed04517db644aee7b19f0 to your computer and use it in GitHub Desktop.
Markdium-用 Polkadot-JS API 輕鬆搭建 Substrate 前端
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// 一個模擬地址 | |
const recipient = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE'; | |
// Sign and send a transfer from Alice to Bob | |
const txHash = await api.tx.balances | |
.transfer(recipient, 12345) | |
.signAndSend(alice); | |
// 顯示交易 hash 碼 | |
console.log(`Submitted with hash ${txHash}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment