Developer Fundamentals
-- Write Transactions I
Set up your wallet and environment to begin writing to VeChainThor.
Environment & Wallet Setup
Every change on the blockchain requires a transaction. A transaction wraps function calls in the form of clauses. Each clause sends instructions to an address that is encoded as a hex string.
To send a transaction, you will need to complete multiple steps. First, you'll need to have the Private Key at hand that will sign the transaction. In the video, we use one-time wallets for the example. However, you'll need your VeWorld mnemonic to deploy contracts on VeChainThor.
Here's how you can create wallets without exposing the private key:
Alternatively, you can import your own wallet into the script. You will need to add your mnemonic to an .env file.
Now that you have your private key, these are the steps you need to follow:
Encode the function calls into data calls
Calculate how much gas the transaction will cost
Build a transaction object with all the previous information
Sign the transaction
Send the transaction to the network
Before moving on to learning about encoding the function calls into data calls, make sure to have your VeWorld Wallet set up.
Now that we've covered the basic intro, let's look at encoding function calls.
Join our Telegram