Skip to main content
added 22 characters in body; edited title
Source Link

Create Token Account only if not Initialized yet in program (Native Rust)

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well without using Anchor.

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement the program side as well?

Create Token Account only if not Initialized yet in program

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well.

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement the program side as well?

Create Token Account only if not Initialized yet in program (Native Rust)

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well without using Anchor.

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement the program side as well?

typos and titles
Source Link
vicyyn
  • 4.3k
  • 6
  • 31

What's the easiest way to check Create Token Account only if a specific token account has already been creatednot Initialized yet in a Rust program?

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well?.

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement the program side as well?

What's the easiest way to check if a specific token account has already been created in a Rust program?

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well?

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement program side as well?

Create Token Account only if not Initialized yet in program

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well.

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement the program side as well?

Source Link

What's the easiest way to check if a specific token account has already been created in a Rust program?

Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount, but I am wondering if there is a way to do this program side as well?

For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement program side as well?