mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-25 04:20:33 +00:00
3439dd4041
* Add test for mapping with address keys and struct value. * Implement getting value for nested array. Co-authored-by: nikugogoi <95nikass@gmail.com>
18 lines
430 B
Solidity
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;
|
|
}
|
|
}
|