79092983

Date: 2024-10-16 07:57:29
Score: 4.5
Natty:
Report link

Excuse me.I refer to this approach with the following code,and switched the mainnet, but it's still this error(PublishErrorNonZeroAddress in command 0). Can anyone help me? Thank you.

const contractURI = path.resolve('xxx.move');
  const { modules, dependencies } = JSON.parse(
    execSync(`sui move build --dump-bytecode-as-base64 --path ${contractURI}`, {
      encoding: 'utf-8',
    })
  );
  
   const tx = new Transaction();
  tx.setSender(keypair.toSuiAddress());
  tx.setGasBudget(10000000000);
  const upgradeCap = tx.publish({ modules, dependencies });

  tx.transferObjects([upgradeCap], keypair.toSuiAddress());

  try {
    const result = await client.signAndExecuteTransaction({
      signer: keypair,
      transaction: tx,
    });
    console.log("Transfer result:", result);
  } catch (error) {
    console.error("Error in transaction:", error);
  }

const contractURI = path.resolve('/home/wddd/SuiProjects/sui-token-mint/sources/pure_coin.move'); const { modules, dependencies } = JSON.parse( execSync(sui move build --dump-bytecode-as-base64 --path ${contractURI}, { encoding: 'utf-8', }) );

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): Can anyone help me
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: doubiwall