Untitled

mail@pastecode.io avatar
unknown
typescript
a year ago
824 B
9
Indexable
Never
const n = async () => {
  const tx = new TransactionBlock();

  const coin1 = tx.moveCall({
    target: "0x2::coin::zero",
    typeArguments: ["0x2::sui::SUI"]
  });

  const coin2 = tx.moveCall({
    target: "0x2::coin::zero",
    typeArguments: ["0x2::sui::SUI"]
  });

  const coin3 = tx.moveCall({
    target: "0x2::coin::zero",
    typeArguments: ["0x2::sui::SUI"]
  });

  const coin4 = tx.moveCall({
    target: "0x2::coin::zero",
    typeArguments: ["0x2::sui::SUI"]
  });

  tx.mergeCoins(coin1, [coin2, coin3, coin4]);

  tx.transferObjects([coin1], tx.pure("0x6f2d5e80dd21cb2c87c80b227d662642c688090dc81adbd9c4ae1fe889dfaf71"));

  const response = await signer.signAndExecuteTransactionBlock({
    transactionBlock: tx,
    requestType: "WaitForLocalExecution",
    options: {
      showEffects: true
    }
  });