Skip to content

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

Description

@queenmoon-bot

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions