How to scroll to line with codemirror-react

This is for “@uiw/react-codemirror”: “^4.20.2” capture the ref to the codemirror objects 2. on each new ref callback, call the dispatch with the new selection and scrollIntoView note: I used MUI accordion, and for that the useRef didn’t seem to update when I collapsed and expanded the Accordion. Therefore I needed to update the object […]

Crypto react typescript web3

How to use web3-react

Tutorial about how to use web3-react and hardhat to read and execute Solidity contracts.

Crypto hardhat

How to use ethereum-multicall on a local hardhat node

ethers-multicall actually uses MakerDAO multicall contracts for multicall functionality. On a local chain this contract is not deployed, therefore the request fails with To fix this issue, the MakerDAO-s multicall contract needs to be deployed on the local node. Copy the Multicall.sol contract to your local project. The contract is available in MakerDAO repository Add […]

typescript Uncategorized

vscode-jest doesn’t work for a react app in a yarn workspace/monorepo

I have created a simple yarn workspace with a single package. This package is the default CRA Typescript app. Repository code is on Github. In this repo: Jest works in command line (yarn workspace frontend test) Jest doesn’t work when clicking the button in vscode or on startup. Tests fail with: I can fix the […]