Inflearn brand logo image

Inflearn Community Q&A

ncm41143210's profile image
ncm41143210

asked

Blockchain and Solidity

Livecoding 3

argument 넣을 때 memory or calldata 지정

Written on

·

345

0

function addCandidator(string _name) 에서

error message가 뜹니다.

string calldata _name 또는 string memory _name 으로 넣으면 에러 안 뜨는데,

memory / calldata 어떤 구분으로 넣으면 되나요 ?

solidityblockchain

Answer 1

0

검색해 보니 강의 당시 버전에선 memory 에 데이터를 추가하는 것이 일반적이 였으나 데이터를 추가할 영역을 지정하는 것으로 변경된 것 같습니다.

 

참고 : https://ethereum.stackexchange.com/questions/77211/data-location-must-be-calldata-for-parameter-in-external-function-but-none-wa

ncm41143210's profile image
ncm41143210

asked

Ask a question