0
transfer() {
      const tx = {
        from: "0x57B1c15E83A87bF856e3eDb8765ac2d2b3CaA94C", // Required
        to: "0x1C6B45866aff7Ac71628bd93F0307e28E783EB76", // Required (for non contract deployments)
        data: "0x00", // Required
        gasPrice: "0x02540be400", // Optional
        gas: "0x9c40", // Optional
        value: "0x0", // Optional
        nonce: "0x0114", // Optional
      };
      this.$wc
          .sendTransaction(tx)
          .then((result) => {
            // Returns transaction id (hash)
            console.log(result);
          })
          .catch((error) => {
            // Error returned when rejected
            console.error(error);
          });
    },
  • 以上代码默认转账币种为BNB。如果我想通过合约地址设置转账其他BEP20币种怎么办?

钱包连接文档

4

0 回答 0