pragma solidity ^0.4.18; interface IDataTypes { function getUint256() external view returns (uint256); function getInt256() external view returns (int256); function getUint8() external view returns (uint8); function getInt8() external view returns (int8); function getBool() external view returns (bool); function getAddress() external view returns (address); function getBytes32() external view returns (bytes32); function getArrayUint5() external view returns (uint256[5] memory); function getString() external view returns (string); function getBigUint() external view returns (uint256); } contract DataTypes is IDataTypes { uint256 private uint256Value = 123456; int256 private int256Value = -123456; uint8 private uint8Value = 12; int8 private int8Value = -12; bool private boolValue = true; address private addressValue = 0x000000000000000000000000000000000000dEaD; bytes32 private bytes32Value = "HelloBytes32"; uint256[5] private arrayUint5Value = [1, 2, 3, 4, 5]; string private stringValue = "Hello World!"; function getUint256() external view returns (uint256) { return uint256Value; } function getInt256() external view returns (int256) { return int256Value; } function getUint8() external view returns (uint8) { return uint8Value; } function getInt8() external view returns (int8) { return int8Value; } function getBool() external view returns (bool) { return boolValue; } function getAddress() external view returns (address) { return addressValue; } function getBytes32() external view returns (bytes32) { return bytes32Value; } function getArrayUint5() external view returns (uint256[5] memory) { return arrayUint5Value; } function getString() external view returns (string) { return stringValue; } function getBigUint() external view returns (uint256) { uint256 v1 = 1; uint256 v2 = 2; // Возвращаем результат, превышающий 1,000,000 return (v1 + v2) * 500001; } }
0.4.18