Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I execute a method with multiple parameters? #505

Open
queenmoon-bot opened this issue Oct 5, 2024 · 0 comments
Open

How do I execute a method with multiple parameters? #505

queenmoon-bot opened this issue Oct 5, 2024 · 0 comments

Comments

@queenmoon-bot
Copy link

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)
}

Originally posted by @mrtnetwork in tonkeeper/tonapi-go#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant