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 perform two operations in the same tx: execute Movecall and send the result of Movecall to the specified address #40

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

Comments

@Dylanma1994
Copy link

Dylanma1994 commented Oct 17, 2024

Below is js sdk code example:

const tx = new suidouble.Transaction();
        const args = [
            tx.pure('u64', nonce),
            tx.object(bus.id), // bus
            tx.object(miner.id), // miner
            tx.object('0x0000000000000000000000000000000000000000000000000000000000000006'), // clock
        ];
const moveCallResult = tx.moveCall({
      target: `${this._packageId}::fomo::mine`,
      arguments: args
});

tx.transferObjects([moveCallResult], this._suiMaster.address);

const r = await this._suiMaster.signAndExecuteTransaction({ 
       transaction: tx, 
       // requestType: 'WaitForLocalExecution',
       sender: this._suiMaster.address, 
       options: {
       "showEffects": true,
       },
});

How can i do it by sui-go-sdk?

@Dylanma1994 Dylanma1994 changed the title How can i transfer objects (move call return)? How can I perform two operations in the same tx: execute Movecall and send the result of Movecall to the specified address Oct 17, 2024
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