Skip to content

Commit

Permalink
Update serialization-of-cairo-types.adoc (starknet-io#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkawula authored and raizo07 committed Jul 9, 2024
1 parent 6104c44 commit c65f21f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ Consider the following definition of an enum named `Week`:
[source,cairo]
----
enum Week {
Sunday: (), // Index=1. The variant type is the unit type.
Monday: u256, // Index=2. The variant type is u256.
Sunday: (), // Index=0. The variant type is the unit type.
Monday: u256, // Index=1. The variant type is u256.
}
----

Expand All @@ -162,8 +162,8 @@ Now consider instantiations of the `Week` enum's variants as shown in the table
|===
|Instance |Description |Serialization

|`Week::Sunday` | Index=`1`. The variant's type is the unit type. | `[1]`
|`Week::Monday(5)` a| Index=`2`. The variant's type is `u256`.| `[2,5,0]`
|`Week::Sunday` | Index=`0`. The variant's type is the unit type. | `[1]`
|`Week::Monday(5)` a| Index=`1`. The variant's type is `u256`.| `[2,5,0]`
|===

.Enum serialization example 2
Expand Down

0 comments on commit c65f21f

Please sign in to comment.