tonkeeper / tonapi-go

TonAPI SDK allows developers to build decentralized applications on top of the TON blockchain without having to deal with the complexity of the underlying technology.

Home Page:https://tonapi.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExecGetMethodForBlockchainAccount always faild

mrtnetwork opened this issue · comments

How do I execute a method with multiple parameters?

I want to useExecGetMethodForBlockchainAccount with multiple parameters, but it always fails. However, when I use TonCenter, I get a successful result.

func TestExcMultipleParam(t *testing.T) {

	client, err := tonapi.NewClient(tonapi.TestnetTonApiURL)
		if err != nil {
			log.Fatal(err)
		}
		account, err := client.ExecGetMethodForBlockchainAccount(context.Background(), tonapi.ExecGetMethodForBlockchainAccountParams{
			AccountID: "Ef9eHhGCu4PS8M7MIoTcIbFFlja5j5u__jwW3BHLUEqlk2Wx",
			MethodName: "get_nft_content",
			Args: []string{"0","te6cckEBAQEAFAAAJD9maWxlbmFtZT1pcGYuanNvbsJcy/s="},
		})
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println("Account:", account.ExitCode,account.Stack)
}