Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
0
votes
Accepted
spl-token-2022 PodMint and Mint or PodAccount and Account usage
The concept of PodMint vs Mint is to allow for in-place / zero-copy deserialization, which uses much fewer compute units on-chain. If you want to do things in-place, then you can use the Pod variants. …
1
vote
How to use Confidentical transfer USDT?
USDT and USDC do not support confidential transfers. You will have to create a new mint with confidential transfers enabled and wrap USDC or USDT with a separate smart contract yourself if you want th …
1
vote
How to upgrade token-2022 version from 0.6.0 to 0.9.0 for private node
There's a couple of questions here, so to separate them out:
The account data too small for instruction error probably comes from trying to deploy a larger program than the default one provided. The g …
2
votes
How to create transfer hook program for an existing Token-22 Program?
Once a token mint is initialized, it's not possible to add a transfer hook. Almost all extensions must be configured prior to initialization.
But once you're ready to create your next token, you can l …
4
votes
Accepted
Create a real InterestBearing Token
The big difference between Ethereum and Solana is how account data is read. On Ethereum, you have view functions, so the amount can be calculated by the smart contract, whereas on Solana, programs and …
1
vote
How do equality proofs work mathematically?
Your best bet is to read through the confidential token documentation, which provides all of the required proofs and further documentation.
Here's the documentation on the equality proofs: https://spl …
2
votes
Accepted
How can I mint a non-transferrable token using Token-2022 in JS/TS?
It roughly boils down to:
import {
clusterApiUrl,
sendAndConfirmTransaction,
Connection,
Keypair,
SystemProgram,
Transaction,
} from '@solana/web3.js';
import {
createIniti …
1
vote
Can I set up the Token extensions (Token 2022) on a Solana spl-token I already made?
If you want to use token-2022 to create your token, you'll need to do a few things during your call to create-token:
specify --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
add any flags for …
2
votes
Accepted
How to deserialize all the extension data for mint account?
You have three different options:
requesting the account with jsonParsed encoding should parse all of the extension data for you
in Rust:
use spl_token_2022::{
extension::{BaseStateWithExtension …
1
vote
Accepted
How do I initialize the transfer-hook account using the provided CLI?
You've figured it all out! The CLI will create the extra-metas account at the proper address, and the whole point of the [<ACCOUNT_PUBKEY>:<ROLE> ...] is to specify the additional accounts required by …
3
votes
Accepted
How do I get the new SPL token-metadata interface to work with SPL token-2022's metadata-poi...
If you want your program to work with the metadata-pointer extension, there's no requirements at all! It's just a dumb pointer that can point anywhere.
The concept is that it points to a metadata acco …
2
votes
transfer hook in token 2022 - how to actually transfer?
In order to create a correct transfer instruction, you must fetch all of the additional required accounts and add them to the instruction. The Rust crates currently expose some helpers to make this ea …
1
vote
Accepted
Modify sent amount on Transfer hook
This won't be possible with a transfer hook.
Remember that only a program that owns an account can modify its contents. In the case of token-2022, this means that only token-2022 can modify the balanc …
1
vote
Transferring WSOL from inside transfer hook - how do you let wallets know that they need to ...
There's no mechanism to make that obvious at the moment, but perhaps a standard will emerge for "tokens that require additional approval before transferring", along with some tooling for using these k …
2
votes
Accepted
Are some of the confidential transfer instructions like transfer, withdraw, deposit cross pr...
It's a bit tricky -- this is only possible if you have access to the secret key for the ElGamal key on the account owned by the PDA. By default, the ElGamal key is derived from the owner, so you'll h …