일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
Tags
- 스마트 컨트렉트 함수이름 중복
- cloud hsm 서명
- SBT표준
- 오블완
- 러스트 기초 학습
- Vue.js
- erc4337
- cloud hsm
- 스마트컨트렉트 함수이름 중복 호출
- ambiguous function description
- 체인의정석
- Vue
- 컨트렉트 동일한 함수이름 호출
- 계정추상화
- git rebase
- 러스트기초
- vue기초
- redux toolkit 설명
- 스마트컨트렉트 예약어 함수이름 중복
- ethers websocket
- redux 기초
- 머신러닝기초
- ethers type
- erc4337 contract
- cloud hsm 사용하기
- 티스토리챌린지
- ethers v6
- ethers typescript
- rust 기초
- 러스트 기초
Archives
- Today
- Total
체인의정석
Internal compiler error: Accessors for mapping with dynamically-sized keys not yet implemented 오류 해결 본문
블록체인/Solidity
Internal compiler error: Accessors for mapping with dynamically-sized keys not yet implemented 오류 해결
체인의정석 2022. 6. 22. 15:11728x90
0.4.24 버전의 솔리디티를 업그레이드 가능한 컨트렉트로 바꾸는 과정에서 위의 에러가 났다.
Internal compiler error: Accessors for mapping with dynamically-sized keys not yet implemented
I have a mapping(string => Person) public map: struct Person { string name; string description; address primaryAddress; string linkToWebsite; string
ethereum.stackexchange.com
위의 글에서와 같이 mapping 이 public으로 두면 안된다고 한다. 더 낮은 버전으로 포팅 시에 public mapping을 private 으로 바꾸고 조회 함수를 넣어주어야 한다고 한다.
다른 mapping은 public으로 잘 작동하는 걸로 봐서 업그레이트 프록시 형태의 컨트렉트를 0.4.24 버전에 적용할 경우 나는 에러 같다.
원래코드는
mapping(string => bool) public testMapping;
위와 같다.
이를 아래와 같이 변경하였다.
// SPDX-License-Identifier: MIT
/*
<< Project Wyvern Exchange >>
*/
pragma solidity 0.4.23;
import "../Exchange.sol";
/**
* @title WyvernExchange
* @author Project Wyvern Developers
*/
contract ExchangeUpgradeV2 is Exchange {
mapping(string => bool) private testMapping;
function getTestMapping(string _key) public view returns (bool) {
return testMapping[_key];
}
// /**
// * @dev Initialize a WyvernExchange instance
// */
function createTest(string memory _name) public {
testMapping[_name] = true;
}
}
이렇게 하고 실행하니 해결이 되었다.
728x90
반응형
'블록체인 > Solidity' 카테고리의 다른 글
Solidity 코드 분리하기 , 분리하며 나오는 Contract should be marked as abstract 에러 해결 (0) | 2022.07.06 |
---|---|
이더리움에서 데이터 서명관련 EIP 정리 (EIP1271 & EIP2098) (0) | 2022.06.27 |
web3.utils.soliditySha3 와 ethers.utils.solidityKeccak256 (0) | 2022.06.22 |
기존 소스를 실행 시킬 경우 오래된 오픈 제플린 코드 버전 맞추기 (0) | 2022.06.22 |
스마트컨트렉트 가스비 손쉽게 측정하기 (0) | 2022.05.30 |
Comments