Created
March 19, 2018 20:06
-
-
Save riordant/a09ec182884f5100b83439d1755ecd26 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//to accompany ethers_structs.js | |
pragma solidity 0.4.21; | |
pragma experimental ABIEncoderV2; | |
contract TestContract { | |
struct SubStruct { | |
uint256 id; | |
string description; | |
} | |
struct TestStruct { | |
uint256 id; | |
string description; | |
SubStruct subStruct1; | |
} | |
TestStruct[] public tests; | |
function addTestStruct(TestStruct testStruct) public { | |
tests.push(testStruct); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment