Skip to content

Commit

Permalink
Merge pull request #20 from CosmWasm/storage-skeleton
Browse files Browse the repository at this point in the history
Set up `cw-storage-plus` outline
  • Loading branch information
uint authored Jun 4, 2024
2 parents 38fe113 + 3e4d4c8 commit 52ae97b
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"core": "CosmWasm Core",
"ibc": "IBC",
"sylvia": "Sylvia",
"cw-storage-plus": "cw-storage-plus",
"cw-multi-test": "MultiTest",
"how-to-doc": "How to doc",
"tags": {
Expand Down
4 changes: 4 additions & 0 deletions src/pages/cw-storage-plus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Introduction

TODO: Describe what low-level interface `cw-storage-plus` builds on, and how it
provides typed abstractions on top of it
8 changes: 8 additions & 0 deletions src/pages/cw-storage-plus/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"basics": "Basics",
"containers": "Containers",
"key-collisions": "Key collisions",
"iteration": "Iteration",
"snapshots": "Snapshots",
"multi-indexes": "Multi index collections"
}
4 changes: 4 additions & 0 deletions src/pages/cw-storage-plus/basics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Basics

TODO: Describe the way storage containers generally work, how prefixes provide a
"slice" of the whole namespace, etc
5 changes: 5 additions & 0 deletions src/pages/cw-storage-plus/containers/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"item": "Item",
"map": "Map",
"deque": "Deque"
}
7 changes: 7 additions & 0 deletions src/pages/cw-storage-plus/containers/deque.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `Deque`

## Overview

## Examples

### ?
9 changes: 9 additions & 0 deletions src/pages/cw-storage-plus/containers/item.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `Item`

## Overview

## Examples

### Saving an admin address

### Saving a config structure
7 changes: 7 additions & 0 deletions src/pages/cw-storage-plus/containers/map.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `Map`

## Overview

## Examples

### Keeping users' balances
9 changes: 9 additions & 0 deletions src/pages/cw-storage-plus/iteration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Iteration

TODO: how to generally take advantage of iteration

TODO: bounds, inclusive-exclusive

TODO: `Map` iteration - surprising behavior with order and bounds?

TODO: how to use `Prefix` and such
12 changes: 12 additions & 0 deletions src/pages/cw-storage-plus/key-collisions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Callout } from "nextra/components";

# Key collisions

TODO: Explain how key collisions shouldn't generally happen as long as unique
prefixes are chosen

<Callout type="warning">
Warning here about a potential nefarious key collision below
</Callout>

https://confio.slack.com/archives/C06A73TKXST/p1709815517501709
3 changes: 3 additions & 0 deletions src/pages/cw-storage-plus/multi-indexes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Multi index collections

TODO: bonus section, maybe flesh out, maybe remove
3 changes: 3 additions & 0 deletions src/pages/cw-storage-plus/snapshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Snapshots

TODO: bonus section, maybe flesh out, maybe remove

0 comments on commit 52ae97b

Please sign in to comment.