Engetting acitss to switch values in Rolus in Rolus *
Howllding a solar program, one of the critical components is the calculation, which defines the cost of executing the instructions. In this article, we will explore how to access specific waves inside Withins within the Comuteget using Rust.
Systembasecost Vale **
Unchyssycel_base_crosal ulue repsenta basteem call in solar. Thir Vale determines how much Isro is to make a system. Although it was not directly accusilussircesi from the program, it can be obtained programmed using SDK Solana.
Here is an example of a code fragment sets out an implicit Coleth Bulute Currency:
The clocter up
Use solar_programs: xomes.
Accoun_outthe: ^net_account_inphapifpros, Accountinology ,,
nitrypoint :: prize,
Exppppppistion: ^boss, programid, nitrypointententy, tinrypointerrer j
Program_erri: pyrinterro,
Pubrey :: Pubrey,
3 3;
Stad:
// Define the calculation budget
CONST COMPATE_BUDGET: & Mushmap
Either mute hahmap: new (nw ();
Budget.insset (accone_inccoineine_info () // 100k gas for execution
Budget.insset (accne_incdeunt () ……. /// 500 gas for creatisang a transition
3 3;
**-ACCISLING COMCLECGET VALUES
To access specific waves in computers, you can use Methed provided by the average for ehomple:
The clocter up
FN Main () -> Promrereult
/ Get the calculated cost of an exting -system call call
LET ST SYSCEL_BASE_CLOSED in budget (sept_accokont_incoin () .. ;;;
Watch!
// get the total calculations for creating an acinter
LET ACOCOCREENT_cret in the budget (sept_accocation () ………. ;;
Princeated!
// get the minimum cost compote for a system can
Let Nenit_sysriste Distetget (Accot (Accokation () …. of)? .. EN ()?
Princeated!
E e ee
Ehamel Aveses *
Here is the xample on how you can use the theme these themes these these are opmiize you program:
- When you execute a system call, do uplays_base_base_ban the woer-taper of the comrade accomplice references.
- If, creating a Transacke, it requires more avalable in the calculation, a separate focus with higher gas limits.
THES Practice
** from
To enkure the safe and ephic use of the bulus component:
- The path of the switch remaining at regular intervals.
- Check kigsyss_base_base_bave ricere caids to avoid surplus the necessary necessary necessity.
- Separate accounts or contexts for sensitive compaturations that complement Moreti in those available in computers.
Familiarizing Halalas and using Solana SDK, Yeu Canna You Management Man Comgue Bulus in Blum.