@@ -23,6 +23,7 @@ Simple WalletConnect v2 integration package for Vue3 apps.
2323 - [ FetchToken] ( #fetchtoken )
2424 - [ ReadContract] ( #readcontract )
2525 - [ WriteContract] ( #writecontract )
26+ - [ WatchContractEvent] ( #watchcontractevent )
2627 - [ EstimateWriteContractGas] ( #estimatewritecontractgas )
2728- [ Demo] ( #demo )
2829- [ Example] ( #example )
@@ -36,7 +37,6 @@ Simple WalletConnect v2 integration package for Vue3 apps.
3637# Getting started
3738
3839## Installation
39-
4040Use yarn or npm to install the package ` @kolirt/vue-web3-auth ` .
4141
4242``` bash
@@ -46,7 +46,6 @@ yarn add @kolirt/vue-web3-auth
4646```
4747
4848## Setup
49-
5049Add dependencies to your ` main.js ` :
5150
5251``` javascript
@@ -231,7 +230,6 @@ let data = await fetchToken({
231230```
232231
233232## ReadContract
234-
235233``` ts
236234import {erc20ABI , readContract } from ' @kolirt/vue-web3-auth'
237235
@@ -250,7 +248,6 @@ let data = await readContract({
250248```
251249
252250## WriteContract
253-
254251``` ts
255252import {erc20ABI , writeContract } from ' @kolirt/vue-web3-auth'
256253
@@ -262,8 +259,21 @@ let data = await writeContract({
262259})
263260```
264261
265- ## EstimateWriteContractGas
262+ ## WatchContractEvent
263+ The function works on the basis of pooling, not on the websockets
264+ ``` js
265+ import {erc20ABI , watchContractEvent } from ' @kolirt/vue-web3-auth'
266266
267+ const unwatch = watchContractEvent ({
268+ address: ' 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c' ,
269+ abi: erc20ABI,
270+ eventName: ' Transfer'
271+ }, (log ) => {
272+ console .log (log)
273+ })
274+ ```
275+
276+ ## EstimateWriteContractGas
267277``` ts
268278import {erc20ABI , estimateWriteContractGas } from ' @kolirt/vue-web3-auth'
269279
0 commit comments