mirror of
https://github.com/cerc-io/watcher-ts
synced 2024-11-20 04:46:20 +00:00
a7ec3d8da8
* Add license & copyright declarations for add-watcher. * Add copyright declarations for cache. * Add copyright declarations for erc20-watcher. * Add copyright declarations for ipld-eth-client. * Add copyright declarations for tracing-client. * Add copyright declarations for uni-watcher. * Add copyright declarations for solidity-mapper. * Add copyright declarations for uni-info-watcher. * Add copyright declarations for util. * Add copyright declarations for lighthouse-watcher. * Change license identifier in .sol files. Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
17 lines
486 B
Solidity
17 lines
486 B
Solidity
// SPDX-License-Identifier: AGPL-3.0
|
|
pragma solidity ^0.7.0;
|
|
|
|
contract TestEnums {
|
|
// Variables of this enum type will need 1 byte for storage.
|
|
enum Choices { Choice0, Choice1, Choice2, Choice3 }
|
|
|
|
// Enum type variables are packed together in a slot as they occupy less than 32 bytes together.
|
|
Choices choicesEnum1;
|
|
Choices choicesEnum2;
|
|
|
|
// Set variable choicesEnum1.
|
|
function setChoicesEnum1(Choices value) external {
|
|
choicesEnum1 = value;
|
|
}
|
|
}
|