Open lolosj opened 3 years ago
Hey, amazing piece of code. But something I don't understand : what is the proper way to use it if I don't need to "subscribe" to any update ? I just need the data once. Thank's !
I also want to ask this question, does it support such a function at present
Hey, amazing piece of code. But something I don't understand : what is the proper way to use it if I don't need to "subscribe" to any update ? I just need the data once. Thank's !
I also want to ask this question, does it support such a function at present
Yes. You can import the aggregate function instead of the createWatcher. The watcher uses the aggregate function internally. I import it with a require const { aggregate } = require('@makerdao/multicall')
and then call it like you would the createWatcher but with an await since it's async await aggregate(calls, config)
Hey, amazing piece of code. But something I don't understand : what is the proper way to use it if I don't need to "subscribe" to any update ? I just need the data once. Thank's !