Created
January 30, 2019 17:14
-
-
Save folex/1a5d9f926972e294fcc294a08b94c3c7 to your computer and use it in GitHub Desktop.
gas.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract Gas { | |
struct App { | |
uint256 id; | |
bytes32 something; | |
bytes32 andmore; | |
uint8 someSize; | |
address owner; | |
bytes32[] someArray; | |
Properties properties; | |
} | |
struct Properties { | |
uint timestamp; | |
bytes32[] someIDs; | |
uint16[] andMore; | |
} | |
mapping(uint256 => App) internal apps; | |
uint256 internal appsCount = 1; | |
function addApp(bytes32 something, bytes32 andmore, uint8 someSize, bytes32[] someIDs) | |
external | |
{ | |
apps[appsCount] = App( | |
appsCount, | |
something, | |
andmore, | |
someSize, | |
msg.sender, | |
someIDs, | |
Properties(0, new bytes32[](0), new uint16[](0)) // TODO: this is awful | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment