mirror of
https://github.com/cerc-io/watcher-ts
synced 2024-11-20 04:46:20 +00:00
909242a827
* Tests for fixed size array of enum type. * Tests for fixed size array of reference type values. Co-authored-by: nikugogoi <95nikass@gmail.com>
20 lines
519 B
Solidity
20 lines
519 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.7.6;
|
|
|
|
// https://docs.soliditylang.org/en/v0.8.5/layout-of-source-files.html#abi-coder-pragma
|
|
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;
|
|
}
|
|
}
|