mirror of
https://github.com/cerc-io/watcher-ts
synced 2024-11-20 04:46:20 +00:00
b243025ca8
* Add tests for getStorageInfo and getEventNameTopics. * Lint solidity-mapper package code. * Add test for contract type. * Add test for fixed size byte arrays. * Add test for Enum types. * Add tests for variables packed together and using single slot. * Fix comments in test contracts. Co-authored-by: nikugogoi <95nikass@gmail.com>
21 lines
504 B
Solidity
21 lines
504 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.7.0;
|
|
|
|
contract TestAddress {
|
|
// Address type need 20 bytes for storage.
|
|
address address1;
|
|
|
|
// Address type uses the next slot as there is not enough space in previous slot.
|
|
address payable address2;
|
|
|
|
// Set variable address1.
|
|
function setAddress1(address value) external {
|
|
address1 = value;
|
|
}
|
|
|
|
// Set variable address2.
|
|
function setAddress2(address payable value) external {
|
|
address2 = value;
|
|
}
|
|
}
|