Solana: Yito Package Transactions with only V2. Parameter?
===================================================== ============ = =================
Because Sorana 1.13, you can send more events together within the bundle as long as certain conditions are met. In this article, we will see how the Bundleonly = True
is used to send events with salt.
What is the Yito event?
———————————
A jito event is an optimized type of transaction that allows you to effectively and safely transfer funds to several accounts. It was introduced in Solana 1.8 as an old “transfer” fee. The Yito event consists of several events, each has its own information group.
Package Transactions
————————-
The package event is optimized to send multiple events at one event. This allows significant efficiency compared to sending individual transactions in a row.
Bulleonly -parameter
——————————-
When you send an event with a salt packet, you can determine the Bundleonly
Professor ‘True’. Here’s an example:
`Salt
Use Sorara-Program :: Account_info;
// Create two accounts of an account for the sender and the recipient account
Anna Sender_account_info = Accord_info :: NEW (
“Sender” .to_string (),
0,
1, // Director of the Consignment Account
)
Enter the receiver_account_info = Account_info :: new (
“receiver” .to_string (),
0,
1, // Directory of the receiver account
)
// Create a jito event for Bundleonly = True and Thip
Let Jito_transation = Soan_rogram :: Event :: Builder :: New ()
.Set_account_info (Sender_account_info)
.Set_account_info (receiver_account_info)
.Te_tag (“Yitotransation”)
.Set_tag (“Bundleonly = True”)
.
Soan_rogram :: Paked_array :: Array (
// add jito events as individual syllables
Soan_rogram :: Paked_array :: Nova (
Account_info :: NEW (
“Transaction1″ .to_string (),
0,
1, // transaction index
, ,,
Account_info :: NEW (
“Transaction2″ .to_string (),
0,
1, // transaction index
IN
, ,,
IN
)
// Send a jito event as a bouquet
Let the result = society :: program :: Sand_jito_transation (& jito_transation);
`
MeV Protection
---------------------
According to the default settings, the events of Soran do not provide protection against MEV (maximum ether). However, you can download the MeV protection to your jito event by addingMev_protection in transaction information:
`Salt
Let Jito_transation = Soan_rogram :: Event :: Builder :: New ()
.Set_account_info (Sender_account_info)
.Set_account_info (receiver_account_info)
.Te_tag (“Yitotransation”)
.Set_tag (“Bundleonly = True”)
.
Soan_rogram :: Paked_array :: Array (
// add jito events as individual syllables
Soan_rogram :: Paked_array :: Nova (
Account_info :: NEW (
“Transaction1″ .to_string (),
0,
1, // transaction index
, ,,
Account_info :: NEW (
“Transaction2″ .to_string (),
0,
1, // transaction index
IN
, ,,
// Add MeV protective outflow
Soan_rogram :: Paked_array :: Nova (
Account_info :: NEW (
“Mev_protection_bytes”.
Leave a Reply