Here is an article based on your problem:

Name:

Solana: Address Table Lookups not added to VesionnedTransaction message

Solana: Searching for the address table is not attached to ownership report

Introduction

As a development and optimization of various messages used in the solana protocol. Recently, I have encountered a problem that is depressed in my development process.

** Problem: Searching for the address table is not attached to ownership report

Tables (alt) related to the address. However, when using “ownership forward”, the “AddingTablelokup” table is not included by default.

Question:

“Westingtransaction” or related functions. “Report to the WaltSingtransaction is a necessary step.

Solution: AddressStabloookup Add

. “Westingtransaction”

Deal:

`Solana

Use solana program :: {account_info :: accountinfo, program_arror};

Use solana_transaction_builder :: transactionbuilder;

the ownership of the structure {

Account0: & Accountinfo,

Account1: & Accountinfo,

}

Fn Main () -> Result <(), String> {

Let the mut builder = transactionbuilder :: new ();

Let Rights = Builder

.Create_account (

& [

Accountinfo :: No_hash (& Leging.account0.key.hash),

Accountinfo :: No_hash (& Leging.account1.key.hash),

]

10_000,

);

Builder.apply (builder.finish ()). Unwrap ();

// Create a Transaction with Ownership

Allow ownership

Account0: Leging.account1.count (),

Account1: Leging.account0.count () ,,

};

// Define the feature that will be called when the property is assigned

fn on_vesting_complete (assignment: and littingtransactionvesting) -> result <(), series> {

Let's Address_table_lookup = Addressetablelelocup :: New ();

// Search Solana Blockchain Addresses

for (index, account_info) at leging.account0.keys.iter (). inumerge () {

If the index == 1 {

// Find the address that matches the Account Information Hash

Shake the address_table_lookup.find (& Account_info.key.hash) {

Some (address) => Println! ("Found Address}", Address),

None => return err ("Address Not Found" .into ()),

}

} Else {

Println! ("Found another account {}", index);

}

}

Ok (())

}

// Call the On_Vesting_Complete Function When The Allocation is Complete

Builder.call_function (

& [

"On_vesting_complete",

Accountinfo :: No_hash (& Leging.account0.key.hash),

Accountinfo :: No_hash (& Leging.account1.key.hash),

]

100,

)

.unwrap ();

}

Conclusion

“Feature to the report” westingtransaction “”

Bitcoin Allowed Address

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *