legacy
TxTypeLegacyTransaction represents a type of transactions existed previously in kaia.
**This type of transaction can create an account, transfer tokens, deploy a smart contract, execute a smart contract, or perform a mix of aforementioned.
Import extend from web3py_ext to extend web3 to kaia web3. In this case if you want to use kaia specific util like Web3.to_peb, you should extend
Import necessary utils from eth_account, web3py_ext
Create a Web3 instance with the specified kairos testnet URL
Also, you can change the provider URL from kairos to quicknode
Load an account from private key
Define the legacy tx with only from, to, value fields. Use unit converter Web3.to_peb
Use fill_transaction to add more params to transaction object like gas limit...
Sign the legacy tx by user's private key
Recover the signer's address from the signature in signed tx
You can decode the RLP-encoded tx by the Account.decode_transaction util and if you want to make the output format pretty, use the to_pretty util
Send the tx to the blockchain. It will return the tx hash, which will be used to wait the receipt
The wait_for_transaction_receipt method returns the tx receipt if it is completed in the blockchain
Finally, get the result.