Comments (7)
there is an example https://portto.github.io/solana-go-sdk/nft/mint-a-nft.html
seems you deploy a token program on GxhenTpDpvFWdVkiaoCd3W1RMpCVzswe9mLnRexMNUbb
basically we will use the official ones TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
from solana-go-sdk.
If that is the case. I want to write my own smart contract and then deploy it to the devnet .How can that be done
from solana-go-sdk.
If you would like to use your custom token program. you should also deploy your own metadata program. Even you need to modify logic in the origin program if needed. I don't really recommend you do this. You may
- most of wallet don't support you due to they all only recognize official ones
- you may need to do a lot of modification to original code and maintain it
I'll suggest you only use official programs for these stuff.
from solana-go-sdk.
Thanks for the prompt reply..
I have deployed the token metadata of metaplex-program-library and put the deployed address.
But still getting the same error
failed to send tx, err: rpc response error: {
"code": -32002,
"message": "Transaction simulation failed: Error processing Instruction 2: custom program error: 0x39",
"data": {
"accounts": null,
"err": {
"InstructionError": [
2,
{
"Custom": 57
}
]
},
"logs": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success",
"Program GxhenTpDpvFWdVkiaoCd3W1RMpCVzswe9mLnRexMNUbb invoke [1]",
"Program log: Instruction: InitializeMint",
"Program GxhenTpDpvFWdVkiaoCd3W1RMpCVzswe9mLnRexMNUbb consumed 2923 of 1400000 compute units",
"Program GxhenTpDpvFWdVkiaoCd3W1RMpCVzswe9mLnRexMNUbb success",
"Program AyUX9DuAZVro5MWCW7S1jSv5zioAiMGxu9ZNHaah2vzE invoke [1]",
"Program log: Instruction: Create Metadata Accounts",
"Program log: Incorrect account owner",
"Program AyUX9DuAZVro5MWCW7S1jSv5zioAiMGxu9ZNHaah2vzE consumed 4014 of 1397077 compute units",
"Program AyUX9DuAZVro5MWCW7S1jSv5zioAiMGxu9ZNHaah2vzE failed: custom program error: 0x39"
],
"unitsConsumed": 2923
}
}
from solana-go-sdk.
as I said, you will need to modify origin program to suit your current situation. The program don't expect you use your own own program.
Also, this error isn't related to this SDK.
from solana-go-sdk.
After the modification we are getting this error :failed to send tx, err: rpc response error: {
"code": -32002,
"message": "Transaction simulation failed: Error processing Instruction 0: custom program error: 0x0",
"data": {
"accounts": null,
"err": {
"InstructionError": [
0,
{
"Custom": 0
}
]
},
"logs": [
"Program 11111111111111111111111111111111 invoke [1]",
"Create Account: account Address { address: AyUX9DuAZVro5MWCW7S1jSv5zioAiMGxu9ZNHaah2vzE, base: None } already in use",
"Program 11111111111111111111111111111111 failed: custom program error: 0x0"
],
"unitsConsumed": 0
}
}
exit status 1
from solana-go-sdk.
I think you have already highlighted the error. Don't create an account twice.
Also, I'm going to close this issue. Your issue isn't related to this SDK.
from solana-go-sdk.
Related Issues (20)
- how to decode the instruction.data? HOT 1
- how to getTokenAccountOwner HOT 3
- how to get the mint name of 7i5KKsX2weiTkry7jA4ZwSuXGhs5eJBEjY8vVxR4pfRx HOT 3
- How to get SOL transfers from a response getTransaction() HOT 2
- creating a new wallet and other things HOT 1
- Cant understand how to give instructions for Launchmynft.io
- Cant understand how to give instructions for raydium swap HOT 2
- How to create stake account? HOT 2
- [HELP] Deserializing AccountData data field into address lookup tables
- UpdateMetadataAccount returning deprecated error HOT 2
- Any plan to support anchor? HOT 3
- Websocket API support
- How do I initiate a USDT SPL transfer transaction? HOT 4
- Add Priority Fee to Transaction
- How do I initiate a USDT SPL transfer transaction? HOT 3
- An optimization suggestion about transaction serialization
- Add unitsConsumed field to RPC simulateTransaction response HOT 1
- GetSlotLeader HOT 2
- Add GetSlotLeaders HOT 1
- Add GetProgramAccounts method to the client folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solana-go-sdk.