watcher-ts/packages/solidity-mapper/test/contracts/TestNestedArrays.sol
Ashwin Phatak 3439dd4041
Get value for nested array, mapping with address keys and struct value (#64)
* Add test for mapping with address keys and struct value.

* Implement getting value for nested array.

Co-authored-by: nikugogoi <95nikass@gmail.com>
2021-06-15 15:46:39 +05:30

18 lines
430 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
pragma abicoder v2;
contract TestNestedArrays {
struct TestStruct {
uint256 uint1;
address address1;
}
TestStruct[3][5] nestedStructArray;
// Set variable nestedStructArray.
function setNestedStructArray(uint index, uint nestedIndex, TestStruct calldata value) external {
nestedStructArray[index][nestedIndex] = value;
}
}