Ethers.js

근상·2024년 12월 27일

Ether.js를 이용해

import {ethers} from 'ethers';
.
.
.
.
.
.
.
.
.
.
.
.
.
.
// Balance 조회 후 단위를 wei에서 eth로 바꾸려고 했다.
// 그래서
ethers.utils.formatEther(balance);
//를 했는데.... 오류가 떴다.

이 오류화면이 나왔다.

그래서 찾아본 결과
.utils가 사라졌다.

그래서

ethers.formatEther(balance);

로 해결할 수 있다..

0개의 댓글