일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- vue기초
- 오블완
- cloud hsm
- cloud hsm 서명
- 스마트 컨트렉트 함수이름 중복
- 스마트컨트렉트 함수이름 중복 호출
- rust 기초
- redux 기초
- Vue
- ethers websocket
- erc4337
- ethers v6
- 티스토리챌린지
- ethers type
- 스마트컨트렉트 예약어 함수이름 중복
- cloud hsm 사용하기
- 컨트렉트 동일한 함수이름 호출
- redux toolkit 설명
- git rebase
- 체인의정석
- erc4337 contract
- SBT표준
- 계정추상화
- 러스트기초
- ethers typescript
- 머신러닝기초
- ambiguous function description
- 러스트 기초
- Vue.js
- 러스트 기초 학습
Archives
- Today
- Total
체인의정석
Solidity 0.5.0 버젼 오류해결 ) TypeError: Data location must be "calldata" for parameter in external function, but "memory" was given. 본문
블록체인/Solidity
Solidity 0.5.0 버젼 오류해결 ) TypeError: Data location must be "calldata" for parameter in external function, but "memory" was given.
체인의정석 2022. 1. 24. 14:01728x90
Solidity 에서는 input값을 스토리지가 아닌 memory에 넣는다.
string, bytes, struct에서는 이러한 표시를 해주지 않으면 컴파일 에러가 나게 된다.
다만 0.5.0 버전의 external에서는 솔리디티 컴파일러가 external 함수의 파라미터로 memory를 받지 않는다.
Note that external functions require parameters with a data location of calldata.
그 이유는 external 함수가 아니라면 내부적으로만 호출되므로 calldata를 사용할 일이 없기 때문이다.
따라서 external의 인자값에는 memory가 아닌 calldata를 사용한다.
Data location must be “calldata” for parameter in external function, but none was given
I'm trying to compile my code in Remix and I try to fix it but I keep getting the same error: Data location must be “calldata” for parameter in external function, but none was given". The probl...
ethereum.stackexchange.com
728x90
반응형
'블록체인 > Solidity' 카테고리의 다른 글
Solidity 0.5.0 버젼 오류해결 ) TypeError: Variables cannot be declared in interfaces. (0) | 2022.01.24 |
---|---|
Solidity 0.5.0 버젼 오류해결 ) TypeError: Functions in interfaces must be declared external (0) | 2022.01.24 |
Solidity 0.5.0 버젼 오류해결 ) More than 3 indexed arguments for event. (0) | 2022.01.24 |
컨트렉트 작성시 인터페이스와 상속 순서 (0) | 2022.01.21 |
ERC-165에 대하여 (0) | 2022.01.18 |
Comments