Git Product home page Git Product logo

Comments (7)

yihau avatar yihau commented on July 19, 2024

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.

rahulanand20 avatar rahulanand20 commented on July 19, 2024

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.

yihau avatar yihau commented on July 19, 2024

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

  1. most of wallet don't support you due to they all only recognize official ones
  2. 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.

rahulanand20 avatar rahulanand20 commented on July 19, 2024

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.

yihau avatar yihau commented on July 19, 2024

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.

https://github.com/metaplex-foundation/metaplex-program-library/blob/master/token-metadata/program/src/utils.rs#L864

Also, this error isn't related to this SDK.

from solana-go-sdk.

rahulanand20 avatar rahulanand20 commented on July 19, 2024

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.

yihau avatar yihau commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.