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

Can't let Gas field empty in MoveCall #19

Open
howjmay opened this issue Apr 17, 2024 · 2 comments
Open

Can't let Gas field empty in MoveCall #19

howjmay opened this issue Apr 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@howjmay
Copy link

howjmay commented Apr 17, 2024

Provide Your Environment

the latest

Describe the bug

When calling MoveCall, we should be able ignore the Gas field. In this way the fullnode should assign the proper gas object. But we met AccountAddressParseError in the current impl

Steps or screenshots to reproduce the behavior

rsp, err := cli.MoveCall(ctx, models.MoveCallRequest{
		Signer:          account.Address,
		PackageObjectId: "d9b08c0d6ae77a37074d5bd53ac58da86a479f462037606346f2a7c3204f165f",
		Module:          "object_basics",
		Function:        "create",
		TypeArguments:   []interface{}{},
		Arguments: []interface{}{
			123,
			account.Address,
		},
		GasBudget: "100000000",
	})

Expected behavior

A clear and concise description of what you expected to happen.

Additional context

Add any other context about the problem here.

@howjmay howjmay added the bug Something isn't working label Apr 17, 2024
@cybercent
Copy link

Got the same error.

@itpika
Copy link

itpika commented Jul 11, 2024

Modify the source code to the following format
Gas: string => any

type MoveCallRequest struct {
// the transaction signer's Sui address
Signer string json:"signer"
// the package containing the module and function
PackageObjectId string json:"packageObjectId"
// the specific module in the package containing the function
Module string json:"module"
// the function to be called
Function string json:"function"
// the type arguments to the function
TypeArguments []interface{} json:"typeArguments"
// the arguments to the function
Arguments []interface{} json:"arguments"
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas any json:"gas"
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string json:"gasBudget"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants