//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.4.18; contract SimpleStore { AssetBytes[] assetBytes; AssetString[] assetString; struct AssetBytes { bytes32 name; bytes32 deviceType; bytes publicKey; uint256 tokenId; } struct AssetString { bytes32 name; bytes32 deviceType; bytes publicKey; uint256 tokenId; } function setBytes() public { assetBytes.push(AssetBytes("name1", "device1", "key1", 1)); assetBytes.push(AssetBytes("name2", "device2", "key2", 2)); assetBytes.push(AssetBytes("name3", "device3", "key3", 3)); assetBytes.push(AssetBytes("name4", "device4", "key4", 4)); assetBytes.push(AssetBytes("name5", "device5", "key5", 5)); } function setString() public { assetString.push(AssetString("name1", "device1", "key1", 1)); assetString.push(AssetString("name2", "device2", "key2", 2)); assetString.push(AssetString("name3", "device3", "key3", 3)); assetString.push(AssetString("name4", "device4", "key4", 4)); assetString.push(AssetString("name5", "device5", "key5", 5)); } function ChangeAssetBytes() public returns (AssetBytes[] memory) { assetBytes[2].name = "new name"; return assetBytes; } function ChangeAssetString() public returns (AssetString[] memory) { assetString[2].name = "new name"; return assetString; } }
0.4.18