Skip to content

How can i use transferObject func to transfer move call result? #39

@Dylanma1994

Description

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

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