This is the code in v6 of "@web3-react/core"
package
const { chainId, library } = useWeb3ReactCore<Web3Provider>()
In v8 library doesn’t exist, how can I get it?
I need to use following methods:
await library.getBlockNumber()
const result = await library.call({
to: call.address,
data: call.callData,
})
2
Answers
I found the answer:
This worked for me.
I replaced all
library
withprovider
, and it works for me.