Untitled

 avatar
unknown
javascript
3 years ago
323 B
4
Indexable
 const getAllTransactions = async (web3) => {
      if (web3) {
        try {
          const txList = await contract.methods.getAllTransactions().call() // --> calling struct in smart contract
       
          console.log(txList)
        } catch (error) {
          console.log("No Transactions");
        }
      }
    }
Editor is loading...