We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
BatchTransaction
Hello team! I am trying to make a BatchTransaction call, but I am getting some errors.
Here's how I do a MoveCall which works fine:
MoveCall
func MoveCall( ctx context.Context, sender types.Address, ) (*types.TransactionBytes, error) { client, err := client.Dial(types.TestnetRpcUrl) if err != nil { return nil, err } packageIDHex, err := types.NewHexData("0xd8f042479dcb0028d868051bd53f0d3a41c600db7b14241674db1c2e60124975") if err != nil { return nil, err } txBytes, err := client.MoveCall( ctx, sender, *packageIDHex, "math", "add", []string{}, []interface{}{"1", "1"}, nil, types.NewSafeSuiBigInt(uint64(2000000)), ) if err != nil { return nil, err } return txBytes, nil }
However, when trying to do the same for a BatchTransaction, I am getting
Error: invalid type: integer `2000000`, expected a string at line 1 column 7
Here's my code invoking BatchTransaction:
func MoveCallBatch( ctx context.Context, sender types.Address, ) (*types.TransactionBytes, error) { client, err := client.Dial(types.TestnetRpcUrl) if err != nil { return nil, err } txnParams := []map[string]interface{}{ { "moveCallRequestParams": []interface{}{ "0xd8f042479dcb0028d868051bd53f0d3a41c600db7b14241674db1c2e60124975", "math", "add", []string{}, []interface{}{"1", "1"}, }, }, } txBytes, err := client.BatchTransaction(ctx, sender, txnParams, nil, uint64(2000000)) if err != nil { return nil, err } return txBytes, nil }
Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
ended up just using programmable transactions from v2.
v2
Sorry, something went wrong.
No branches or pull requests
Hello team! I am trying to make a
BatchTransaction
call, but I am getting some errors.Here's how I do a
MoveCall
which works fine:However, when trying to do the same for a
BatchTransaction
, I am gettingHere's my code invoking
BatchTransaction
:Any help would be appreciated!
The text was updated successfully, but these errors were encountered: