Git Product home page Git Product logo

Comments (5)

yihau avatar yihau commented on July 19, 2024

yes. I think you can compose it by the current SDK.

from solana-go-sdk.

Qweder93 avatar Qweder93 commented on July 19, 2024

could you please explain a bit what parameters should be changed in Create Raw Transaction so amount would be in different currency, in examples it looks like I can't configure it.

from solana-go-sdk.

yihau avatar yihau commented on July 19, 2024

you need to change the instructions in the transaction.
If you are new in Solana, I think you could take look for the account model.
It will help you to build the concept quickly.
The idea of account in Solana is totally different from Ethereum.

The instruction step will like below:

  1. use sysprog.CreateAccount instruction twice to create three accounts, one for mint and the others for token account.
  2. use tokenprog.InitializeMint and tokenprog.InitializeAccount to init mint and token account (token holder)
  3. use tokenprog.MintTo or tokenprog.MintToChecked to mint some test token to your token account.
  4. now you can use tokenprog.Transfer or tokenprog.TransferChecked to transfer token

from solana-go-sdk.

Qweder93 avatar Qweder93 commented on July 19, 2024

thanks, now it's a bit more clear, still there's 4-5 methods to call with lot of values, which I'm not sure what some of them should mean, there's no comments about what should it be in methods. Maybe you have some sort of example? Would appreciate much :)

from solana-go-sdk.

yihau avatar yihau commented on July 19, 2024

I write some example in the gitbook.
feel free to open another issue for question. 💪💪💪

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.