일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- chainlink 설명
- ethers websocket
- 컨트렉트 동일한 함수이름 호출
- git rebase
- 러스트 기초 학습
- erc4337 contract
- multicall
- SBT표준
- 스마트컨트렉트 함수이름 중복 호출
- 계정추상화
- 스마트컨트렉트테스트
- 스마트컨트렉트 예약어 함수이름 중복
- 러스트 기초
- ethers
- rust 기초
- ethers v6
- 티스토리챌린지
- 오블완
- 컨트렉트 배포 자동화
- Vue
- Vue.js
- erc4337
- 체인의정석
- ambiguous function description
- 러스트기초
- 스마트 컨트렉트 함수이름 중복
- ethers typescript
- ethers type
- 머신러닝기초
- vue기초
Archives
- Today
- Total
체인의정석
Solidity에서 bytes, bytes32 console.log로 찍는법 본문
728x90
반응형
https://github.com/NomicFoundation/hardhat/issues/2043
hardhat/console.sol `bytes` and `uint256[]` typed arguments support · Issue #2043 · NomicFoundation/hardhat
Hardhat doesn't support logging bytes object to console via hardhat/console.sol though it might be useful in a huge amount of cases. I'd suggest printing bytes and uint256[] object as an array of n...
github.com
console.logBytes
console.logBytes32
해당 2개를 이용하면 bytes 타입도 console.log로 찍어볼 수 있다.
다만 console.logBytes(bytes) 안의 bytes에는 bytes 타입빼고 다른게 오면 안된다. 일반 console.log는 문자열과 함께 사용했지만 여기서는 logBytes앞에 문자열 log를 따로 작성한 후에 디버깅을 진행하였다.
728x90
반응형
'블록체인 > Solidity' 카테고리의 다른 글
ERC721,1155 receiver (0) | 2024.04.05 |
---|---|
create2 & create3에서의 Owner msg.sender 처리 (0) | 2024.03.28 |
solidity error : reverted with panic code 0x32, 동적 배열 사용시 발생하는에러 (0) | 2024.01.12 |
SyntaxError: Identifier expected. 'const' is a reserved word that cannot be used here. 에러 해결 (1) | 2024.01.08 |
Solidity Create와 Create2 (0) | 2024.01.08 |
Comments