ประเภทหนัง
ตัวอย่างหนัง Solana: How to make a copy of a transaction from a parsed transaction in Solana
Here’s a state to make a copy from the tanned transaction in the Solana:
COPY COPY CO ONE CONTAINED DUNALL IN SOLANIA
In the Solana transaction, the analysis is analyzed in the data, which can be manipulated and not be used for the epitire. At the time, as a sommpilated transaction can be introduced to the Vulef Insights to read the time, they do not always get out of the reflex. To make a copy of the transition with the panealized data, we will take their methods parsedtorse.copy ()
.
PROVIDERS
Earn Web -Dyno that you have been installed by traded izivans:
`Bash
NPM Install @solana/Web3.js
re
You do not need to set your cluster solana and put the wallet. In this reason, let’s predeter the fact that we were also in the public.
CONNALIZATE TRANSITION
For transaction analysis, you can use the library Web3
@Solana/Web3SDK IT:
Javacript
Const Web3 = New Web3 (New Web3.providers.httpprovider ('htps: //api.mainnenet Idm.com'));
Const Transactionid = 'Your Overway';
Const parsedtransaction = Await web3.eth.ettrance (transactionid, {Blocknumber: 1});
re
COPY COPIA with transaction
To make a copy of the transaction with tanned data, you can use the method parsedtced.copy ()
:
`Javacript
Const copiedtransction = wait parsedtransction.copy ();
re
This will be a new tonic transaction, which includes in the sieve of all itself in the quality transaction.
Uspolzing Coped Transaction for Power Imperial
When -tu you made a copy of the data analyzed, you will not be able to do. For example:
`Javacript
Const Account = copiedtrransaction.data.account;
// Revet a new storage record
console.log (account.state);
/
Const intontries = copiedtrransaction.data.data.relations;
console.log (attitude);
re
Important Notes
- Field
StaticaccountKounty is a tracking for scratching copies tanized data. This is a field presentation there, which is guaranteed.
- Techniquesparsedtransctip.copy ()
will include fields that are static keys of the proclamation.
- If you are a new transaction, use the methodweb3.e.eth.gettrestts.
The following is a trace, you will go out to make a copy of your cluster solan. This can be spreading for ucerel notes and interviews in the intercourse.