Value Transfer With Memo
TxTypeValueTransferMemo is used when a user wants to send KAIA with a specific message.
feeDelegation
Import the ethers and @kaiachain/ethers-ext packages to add kaia features on ethers.js
Define sender address, sender private key, fee payer address, fee payer private key and reciever address
Set up the provider with the specified kairos testnet URL. A provider in ethers is a read-only abstraction to access the blockchain data.
Also, you can change the provider URL from kairos to quicknode
Create a sender's wallet from private key
Create fee payer's wallet from private key
Declare transaction with the fields such as type, from, to, value, input.
Populating transaction with additional information using senderWallet.populateTransaction
Signing the transaction with the sender's private key
Send the transaction to blockchain using fee payer's wallet. Function sendTransactionAsFeePayer
adds a signature with FeePayer’s private key to the sender’s signature and transmits it to the blockchain network.
The wait function returns the tx receipt if the tx was sent to the blockchain successfully.