0
현재 ethereumdapp에서 작업 중입니다. 나는 아래와 같은 견고성 파일을 가지고있다.전역으로 배열 요소를 변경할 수 없습니다.
pragma solidity ^0.4.11;
contract ArrayOfBytes32 {
address creator;
bytes32[10] bytesArray; // size must be fixed
function getArray() constant returns (bytes32[10])
{uint8 x = 0;
while(x < bytesArray.length)
{
bytesArray[x] = "myString";
x++;
}
return bytesArray;
}
function getValue(uint8 x) constant returns (bytes32)
{
return bytesArray[x];
}
}
이 함수에서 getArray()는 정확하게 반환한다. 그러나 getValue() 함수는 항상 기본값 0000000을 반환합니다. getArray()에서 변경된 변경 사항은 반영되지 않았습니다! 모든 솔루션
감사합니다. adam kipnis –