Your First Transaction

This tutorial describes how to generate and submit PRC-20 transactions to the Palette blockchain, and verify these submitted transactions.

Step 1: Pick a Tutorial Tool

Install your preferred tutorial tool from the list:

  • Mac

  • Windows

Step 2: Run the example

After installing and unzipping the Tutorial Tool, run the binary with the following command:

  • Mac

./transfer_plt
  • Windows

./transfer_plt.exe

Step 3: Understand the result

An output very similar to the following will appear after executing the Tutorial Tool:

=== Addresses ===
Alice: 0x8Ed3bc6b5175C9A89B7F88Bb3a19bda4AC74440b
Bob: 0x75c722a7b6130B908735F2d30262731332AfB148

=== Current Balance ===
Alice: 10 PLT
Bob: 0 PLT

=== TxHash ===
0x416e51832417ad74df33b8420da80e90e9c7b2fd3243ed3c6df673d602f742f1

=== TxReceipt ===
{"root":"0x","status":"0x1","cumulativeGasUsed":"0x0","logsBloom":"0x00000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000100000004000000000080000008000000000000000000000800000000000000000100000000000000000000001000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000800000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","logs":[{"address":"0x0000000000000000000000000000000000000103","topics":["0xbeabacc8ffedac16e9a60acdb2ca743d80c2ebb44977a93fa8e483c74d2b35a8","0x0000000000000000000000008ed3bc6b5175c9a89b7f88bb3a19bda4ac74440b","0x00000000000000000000000075c722a7b6130b908735f2d30262731332afb148"],"data":"0x8ac7230489e80000","blockNumber":"0x5dd742","transactionHash":"0x416e51832417ad74df33b8420da80e90e9c7b2fd3243ed3c6df673d602f742f1","transactionIndex":"0x1","blockHash":"0xd20bc95f24b833ce86ceb0e3740f52fb520e7b2d376e782ba68790056199b838","logIndex":"0x0","removed":false}],"transactionHash":"0x416e51832417ad74df33b8420da80e90e9c7b2fd3243ed3c6df673d602f742f1","contractAddress":"0x0000000000000000000000000000000000000000","gasUsed":"0x0","blockHash":"0xd20bc95f24b833ce86ceb0e3740f52fb520e7b2d376e782ba68790056199b838","blockNumber":"0x5dd742","transactionIndex":"0x1"}

=== Final Balance ===
Alice: 0 PLT
Bob: 10 PLT

The above output demonstrates that the transfer_plt example executes the following steps:

  • The creation of two accounts: Alice and Bob.

    • The creation of Alice's account.

      • The account received PLT from PLT-Pool's account.

    • The creation of Bob's account.

  • The transferring of 10 PLT from Alice to Bob.

    • No gas is charged for this transaction.

  • After all, the processing is completed, return the PLT owned by the two accounts to the PLT-Pool's account.

Last updated