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);
          });
    },
  • The default transfer currency of the above code is BNB. What should I do if I want to transfer other BEP20 currencies through the contract address settings?

walletconnect docs

ka a
  • 1
  • 1
  • Does this answer your question? [How to send some custom tokens with MetaMask API?](https://stackoverflow.com/questions/70846974/how-to-send-some-custom-tokens-with-metamask-api) – Petr Hejda Feb 06 '22 at 09:07
  • I'm aware you're asking about WalletConnect (and not MetaMask). However the transaction object is the same. You need to send the transaction to the token contract, and populate the `data` field with correct value. – Petr Hejda Feb 06 '22 at 09:08
  • give me time to verify – ka a Feb 06 '22 at 13:10

0 Answers0