Account Update
Basic
Import extend from web3py_ext to extend web3 to kaia web3
Import necessary utils from eth_account, web3py_ext and cytools
Create a Web3 instance with the specified kairos testnet URL
Also, you can change the provider URL from kairos to quicknode.
Load transaction key from a private key to use it as transaction role key. You can use it to sign a transaction
Load update key from a private key to use it as update role key. You can use it to sign the account update transaction for this account. It means only a person who have this key can update this account.
Load fee payer key from a private key to use it as fee payer role key. You can use it to sign a transaction as a fee payer.
Creating an empty transaction of type TxType.ACCOUNT_UPDATE. You can use empty_tx util to get a tx with default fields filled.
Merge additional fields like sender and keys into the empty tx by using the merge util.
In this case, the account key to update is the role-based key and each role has pubkey type. Each role can have pubkey or multisig.
You can use the compressed_key util to set each role key. It will extract the compressed public key from the key
Use fill_transaction to add more params to transaction object like gas limit...
You can use the to_pretty util to print the formatted tx.
Sign the account update tx type. You should sign it with update role key as the account "0x5bd2...ccea" is already role-based account to update this account
Recovering the sender's address from the signed transaction
If you want to see the RLP-encoded signed tx, use the decode_transaction util
Sending the signed transaction to the network and waiting receipt until it is completely executed in the blockchain