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

ExecGetMethodForBlockchainAccount always faild #28

Open
mrtnetwork opened this issue Jun 20, 2024 · 1 comment
Open

ExecGetMethodForBlockchainAccount always faild #28

mrtnetwork opened this issue Jun 20, 2024 · 1 comment

Comments

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

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

}



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

2 participants