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 can i use transferObject func to transfer move call result? #39

Open
Dylanma1994 opened this issue Oct 19, 2024 · 0 comments
Open

Comments

@Dylanma1994
Copy link

	ptb := sui_types.NewProgrammableTransactionBuilder()
	nonceBytes := FomoUtils.Uint64ToBytes(nonce)
	err := ptb.MoveCall(m.cfg.PackageId, move_types.Identifier("fomo"), move_types.Identifier("mine"), []move_types.TypeTag{}, []sui_types.CallArg{
		sui_types.CallArg{Pure: &nonceBytes}, // nonce
		sui_types.CallArg{Object: &sui_types.ObjectArg{SharedObject: &struct {
			Id                   move_types.AccountAddress
			InitialSharedVersion uint64
			Mutable              bool
		}{Id: m.field.busId}}}, // bus id
		sui_types.CallArg{Object: &sui_types.ObjectArg{SharedObject: &struct {
			Id                   move_types.AccountAddress
			InitialSharedVersion uint64
			Mutable              bool
		}{Id: m.field.minerId}}}, // miner id
		sui_types.CallArg{Object: &sui_types.ObjectArg{SharedObject: &struct {
			Id                   move_types.AccountAddress
			InitialSharedVersion uint64
			Mutable              bool
		}{Id: m.cfg.Clock}}}, // clock
	})
	if err != nil {
		fmt.Println("Move call error, ", err)
		return
	}
	
	// seee here!!! need to do this
	ptb.TransferObject(m.address, [movecall result object])
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