preloader

Group Buzz

Solana: What is native account in Solana?

Understanding Native Accounts in Solana

In Solana, a native account is an account that exists on the Solana network itself. As opposed to non-native accounts, which are external entities that use a smart contract or token on the network. Here’s what we need to know about native accounts and how they differ.

What is a native account in Solana?

A native account is a customized account on the Solana blockchain. It can hold assets, tokens, or even be used as the basis for other contracts. Native accounts are unique because they can interact with each other and the Solana network without any external references.

Key Features of Native Accounts

Native accounts have some distinct features:

  • Ownership

    Solana: What is native account in Solana?

    : A native account is owned by a single entity, which can be a user or another contract.

  • Customization: Native accounts are not created from scratch. They inherit properties and functionality from existing contracts or the Solana network itself.
  • Interoperability: Native accounts can interact with each other and with external contracts using Solana’s native APIs.

What happens when an account is marked as native?

When a contract marks an account as native, it means that the account has been customized to meet its specific needs. The “account.is_native()” in your code snippet serves this purpose:

if (account.is_native()) {

account.close_authority = COption::None;

}

This line of code checks whether the user account is native, and if so, closes any authorizations it may have had on behalf of another contract.

Non-native accounts in Solana

Non-native accounts, on the other hand, are external entities that use a smart contract or token on the Solana network. They do not exist on the blockchain itself, and they function properly through an external reference.

Key differences between native and non-native accounts

Here are some key differences between native and non-native accounts:

  • Customization: Native accounts are custom-made, while non-native accounts are created using an external smart contract or token.
  • Ownership: Native accounts are owned by a single entity, while non-native accounts are owned by users or other contracts on the network.
  • Interoperability: Non-native accounts require additional interaction with external contracts and APIs to function properly.

Conclusion

In summary, Solana native accounts are customized, unique entities that interact with each other and the network without external references. Marking an account as native allows it to delegate authority on behalf of another contract, enabling its custom functionality. While non-native accounts exist outside the blockchain, they require additional interaction with external contracts to function properly.

This knowledge can help developers create more efficient and effective solutions for their applications on the Solana network.

CRYPTOCURRENCY ALTCOIN SPEED

Leave a Reply

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

User Login

Lost your password?
Cart 0