Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
323 B
1
Indexable
Never
 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");
        }
      }
    }