Consensys / eth-lightwallet

Lightweight JS Wallet for Node and the browser
MIT License
1.46k stars 501 forks source link

How can I call the write function in the ERC-20 contract with eth-lightwallet? #234

Open leonidlewis opened 2 years ago

leonidlewis commented 2 years ago

I create my wallet with eth-lightwallet. I am going to make the mobile app the same as the web app. But in the app, when I call the write contract function on the website, the Metamask opens and I click the confirm and reject button.

result = await instance.methods.exampleContractfunction(p).send({
        from: accounts[0],
      });

Here, exampleContractFunction is the write function in the contract. How can I use this module to call the write contract in the app?