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 |
5
votes
Accepted
How can I use @solana/spl-token's createMint() and mintTo() functions with solana wallet ada...
in your frontend
const wallet = useAnchorWallet()
const payer = (wallet as NodeWallet).payer
then
const mint = await splToken.createMint(program.provider.connection, payer, payer.publicKe …
5
votes
How to get USDC balance in a Phantom Wallet?
You can fetch the balance for your USDC associated token account (ATA)
First, you have to get the USDC ATA address. Use getAssociatedTokenAccount that is provided with the @solana/spl-token library.
f …
2
votes
How to use solana-wallet-adapter with metaplex-foundation/js
using walletAdapterIdentity rather than keypairIdentity will solve this issue.
import { walletAdapterIdentity, Metaplex } from '@metaplex-foundation/js'
const metaplex = Metaplex.make(connection).use …
1
vote
How to call a smart contract function multiple times but signing only once through phantom a...
you need to build a custom Transaction that calls the program multiple times. Calling that transaction will produce multiple cpi calls. But you have to keep in mind the computation limit.
2
votes
Accepted
Connect Phantom Wallet on Page Load with solana-wallet-adaper
You have to add autoConnect in your <WalletProvider .. >
<ConnectionProvider endpoint={endpoint}>
<WalletProvider wallets={wallets} autoConnect>
<WalletModalProvide …
2
votes
I need help with changing the contents of a page once a wallet has been connected
If you are using Solana Wallet Adapter. You can use useWallet() which returns null when you are not connected.
const HomePage = () => {
const wallet = useWallet();
...
if (!wallet) return < …
0
votes
How to check what network your wallet is on, ReactJs
You can set the network you are currently on by using WalletAdapterNetwork
example
export const Wallet: FC = () => {
// The network can be set to 'devnet', 'testnet', or 'mainnet-beta'.
const …