Related magazines and inrinurnstracts from non -tested data instruction on Solana with Python
Solana – a fast and scale blockchain platform, which allows the stretching of the Intellectual counteracts with a low precipitation. However, at work with unproven and instruction, the association of magazines and inrinstocity can be a difficult task. In this state, we disperse the different spreads of these values from the transaction in the Solana.
WHY WHY UNDERSED DATA ATTURE WORT WORK CO
Unpublished data instruction content of transaction, which are transformed on the blockchain. It is not possible on the fact that he gives a shadow information about the tom, as the transaction is not intended for that to be easily monolored and accessed by the strokes. The RPC GetTransaction method can only make transaction, but non -tested instructions.
Magazines
Magazines are meta -resistant about each transaction, included her instruction of the vicinity, instruction on the removal and related magazines. To get the magazines, you can use the RPC "GetTransactions" method for all transaction transactions on the blockchain, and the prefecting the resilts with the indicative perception.
Here's the primer of the Python code fragment, which demonstrats how to get magazines:
Python
OT solana.web3 Import Web3
Initiative client solana web3
W3 = Web3 (Web3.httpprovider ("
Get all the transaction on the blockchain
All_transactions = w3.get_account_info (
"Solon-key",
"Polish"
) .Result [0] .transactions
logs = [tx.transaction.Log for TX in All_transaction]
#Most magazines (unobtrusive)
For I, Wojesty in the Sishem Retire (Magazines):
Print (F "Log {I+1}: {Log}")
Innurntocity
Innerinstruction is a special type of instruction, which is assigned to the instruction of the transaction of the vicin and output. To get the interstitus, you need to know how transaction is.
Here’s the primer fragments of the Python code, which demonstrats how to get the inherent structure:
`Python
OT solana.web3 Import Web3
Initiative client solana web3
W3 = Web3 (Web3.httpprovider ("
Get all the transaction on the blockchain
All_transactions = w3.get_account_info (
"Solon-key",
"Polish"
) .Result [0] .transactions
transaction_index = 0
In Time as transaction_index
Filtry transaction with the identification of the Ucotic Records or Identifier transaction
transaction_with_innerinstruction = [
TX for TX in All_trancations IF TX.Transaction_id == 'Some_trancation_id'
]
Concepted Innerginstroection from the first transaction with innernuity
Inner_instruction = transaction_with_innerinstruction [0] .transaction.inner_instruction
PRINT (F "Innerinstruct transaction {all_transactions [transaction_index] .transaction_id}:")
Pack (Inner_instruction)
transaction_index += 1
Entertainment : Are highlighted by the predatory that you have unwavering resolutions and ucerels for access to the blockchain of the solan. The cruming of that, Immed in the view that the unproven data of the instruction is not obligatory in the edge of the magazines on the blockchain; This is a decipity.
I hope that this helps you to start journalisms and innurnstroctions from unproven data instruction on solana with Python!
发表回复