kandi X-RAY | solana Summary
kandi X-RAY | solana Summary
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
Top functions reviewed by kandi - BETA
solana Key Features
solana Examples and Code Snippets
Trending Discussions on solana
curl https://release.solana.com/v1.8.3/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs
It seemed like it installed - so then I did
solana --version and this is what happened:
'solana' is not recognized as an internal or external command, operable program or batch file.
solana --version in Powershell, Git Bash, VS Code Terminal, and Command Prompt and it gives the same output.
How do I install Solana?
ANSWERAnswered 2021-Nov-16 at 04:15
you can try :
More details on:https://docs.solana.com/cli/install-solana-cli-tools
I'm trying to validate that the input text I get from a user is a valid Solana address.
According to the web3.js documentation, the method .isOnCurve() does that:
I've managed to make it work with this code:...
ANSWERAnswered 2022-Feb-21 at 04:02
To validate a Solana public key may be a wallet address, you should both use
isOnCurve() and the
PublicKey constructor like you are doing.
The error thrown makes sense. If the address is not a public key, it should not be able to be instantiated.
Perhaps there could be another function made native to @solana/web3.js that takes care of validating wallet addresses for you in the future.
ANSWERAnswered 2021-Oct-12 at 09:35
All credits goes to the author of this simple lib which you can find here https://gist.github.com/diafygi/90a3e80ca1c2793220e5/
This is my situation:
I have created a wallet
I have created my own custom SPL Token
Then I created an Account for this SPL Token
The SPL token is now in my wallet A
In the Solana Program, I would like to programmatically transfer the custom SPL token from Wallet A to Alice(user) wallet when certain conditions are met (for example, when Alice answered a quiz correctly, she will be awarded some custom SPL token).
How do I authorise the Solana Program to deduct from Wallet A (which I had created) and transfer the tokens to Alice wallet?
Please advise me how to go about doing this. Really appreciate this....
ANSWERAnswered 2022-Mar-10 at 16:02
To transfer an SPL token within a program, your best option is to have wallet A owned by a program-derived address, and then your program can transfer the tokens from wallet A based on any logic it wants.
So first, transfer the ownership to your program-derived address:
I am trying to write a script to pull NFTs by candy machine id, but it is either failing or returning an empty array each time.
I am using the genesysgo mainnet rpc.
Here is the relevant code....
ANSWERAnswered 2022-Mar-07 at 08:30
You are probably using the wrong CMID. Find one of your NFTs on solscan and use the first verified creator ID in the metadata as your CMID. (as seen below).
This would explain why the ID also returns an empty array on the magic eden and pentacles sites.
Uncaught (in promise) WalletSignTransactionError: Transaction recentBlockhash required at PhantomWalletAdapter.signTransaction (adapter.ts:215:1) at async WalletProvider.tsx:247:1 at async mintNFT (luckoo.tsx:100:1)
ANSWERAnswered 2022-Mar-04 at 14:48
You need to provide a
recentBlockhash in your transaction in order for it to be signed. Most likely, you need to fetch a blockhash and add it before signing the transaction using
I am trying to understand the
solana/example-helloworld by re-writing the rust lib myself. I have done this and from the package.json file, to generate the
.so file, following is what is run:
ANSWERAnswered 2022-Feb-28 at 11:09
.so file are signifies solana files, right?
so stand for shared object, also known as a dynamically relocatable library or
dylib in Cargo.toml.
What do we mean by cargo build-bpf?
BPF is a virtual machine inside the kernel, so this should instruct cargo to build for that target.
Is there any reason, why 2021 edition didn't work for the solana example?
I don't know, but I suspect it's a simple fix.
Finally, why does the above command not output my .so file?
Could it be that you are missing the lib section in Cargo.toml:
I am trying to run anchor build and am receiving the following response:...
ANSWERAnswered 2022-Jan-13 at 17:27
It looks like your solana install is quite out of date. I would install either
1.8.11 or just run
I'm building a Solana program to manage payments to multiple accounts, however the compiler fails whenever a
.send() call is made within a loop. For example, the following code compiles just fine:
ANSWERAnswered 2022-Feb-25 at 18:36
This is an issue in solang v0.1.9. It should compile fine with solang latest main.
We should be release solang v0.1.10 shortly.
No vulnerabilities reported
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page