solana-go-sdk
solana-go-sdk copied to clipboard
Can I call the smart contract directly? How should I call it
Can I call the smart contract directly? How should I call it
sure. It depends which program you are interacting with.
The main idea is to compose transaction if you want to call smart contract (in solana we called it program
).
FYI
A transaction = many signatures + a message
A message = many instructions + recent blockhash
you can treat every instruction equals a function in the program.
you can take a look at
https://github.com/solana-labs/example-helloworld https://dev.to/cogoo/solana-how-to-send-custom-instructions-via-instruction-data-4g9g
to learn how to compose your own instruciton.
How do I call the Hello World function in rust from go-client? https://github.com/solana-labs/example-helloworld
Oh. I think I should add some examples for interacting with custom program!
Yes, that should be helpful!
Oh. I think I should add some examples for interacting with custom program!
That would be amazing thanks.