getBalance 해서 갖고 오면
{ _hex: 0x~, _isBigNumber: true } 같은 형태로 잔고가 반환된다.
ethers.utils.formatEther()
위 함수를 써서 이더로 변환!
ethers 깃헙에 있는 조언
참고문서링크
https://github.com/ethers-io/ethers.js/issues/1310
how to get number form ethers.getBalance(addres)? · Issue #1310 · ethers-io/ethers.js
how to get number form ethers.getBalance(addres)? when i write ethers.getBalance(addres) in js file. Then, i compile it. it result show "BigNumber { _hex: '0x056bab21836e634000', _isBi...
github.com
'블록체인' 카테고리의 다른 글
22.03.16 tokenURI 를 고정값으로 하는 방법 찾기 (0) | 2022.03.16 |
---|---|
22.03.16 [IPFS] IPFS CLI for Mac 설치 (0) | 2022.03.16 |
21.12.21 소프트캡 하드캡 (0) | 2021.12.21 |
21.12.19 익명 송금 zkopru (0) | 2021.12.19 |
21.09.27 Fabric 트랜잭션 정렬 [정리 중!] (0) | 2021.09.27 |