Skip to content

Commit

Permalink
Fix: add missing storage listing (#119)
Browse files Browse the repository at this point in the history
* feat: Storage minimal + fixes

* fix: add missing storage listing
  • Loading branch information
julio4 authored Nov 20, 2023
1 parent 3890c7b commit 964c6b6
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions listings/ch00-getting-started/storage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
6 changes: 6 additions & 0 deletions listings/ch00-getting-started/storage/Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "storage"
version = "0.1.0"
8 changes: 8 additions & 0 deletions listings/ch00-getting-started/storage/Scarb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "storage"
version = "0.1.0"

[dependencies]
starknet = ">=2.3.0"

[[target.starknet-contract]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"sierra_program": [
"0x1",
"0x3",
"0x0",
"0x2",
"0x3",
"0x0",
"0x1",
"0xff",
"0x0",
"0x4",
"0x0"
],
"sierra_program_debug_info": {
"type_names": [],
"libfunc_names": [],
"user_func_names": []
},
"contract_class_version": "0.1.0",
"entry_points_by_type": {
"EXTERNAL": [],
"L1_HANDLER": [],
"CONSTRUCTOR": []
},
"abi": [
{
"type": "event",
"name": "storage::minimal_contract::MinimalContract::Event",
"kind": "enum",
"variants": []
}
]
}
9 changes: 9 additions & 0 deletions listings/ch00-getting-started/storage/src/contract.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#[starknet::contract]
mod Contract {
#[storage]
struct Storage {
a: u128,
b: u8,
c: u256
}
}
2 changes: 2 additions & 0 deletions listings/ch00-getting-started/storage/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mod minimal_contract;
mod contract;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#[starknet::contract]
mod Contract {
#[storage]
struct Storage {}
}

0 comments on commit 964c6b6

Please sign in to comment.