Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyuanxun authored Mar 18, 2022
1 parent ca9580a commit d6c165c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ You can use this as simple as using the TireMap.

- Second, you need to declare a Bucket

**upgrade** :This means that you can upgrade your canister without discarding files stored in the stablememory. Meanwhile available stablememory will become **aval_stablememory = 8G - heap memory **
**upgrade** :This means that you can upgrade your canister without discarding files stored in the stablememory. Meanwhile available stablememory will become **aval_stablememory** = **8G - heap memory**

```motoko
let bucket = Bucket.Bucket(true); // true : upgradable, false : unupgradable
```

You have a few more things to do below:
You have a few more things to do below:

1. you should use a stable entries to store your key-value pairs during upgrade

Expand All @@ -54,12 +54,12 @@ You can use this as simple as using the TireMap.
bucket_entries := [];
};
```
**unupgradable** : This means that if you upgrade your canister, you will discard files stored in the stablememory
```motoko
let bucket = Bucket.Bucket(false); // true : upgradable, false : unupgradabl
```

**unupgradable** : This means that if you upgrade your canister, you will discard files stored in the stablememory
```motoko
let bucket = Bucket.Bucket(false); // true : upgradable, false : unupgradabl
```

- Third,configure the **dfx.json**

Expand Down Expand Up @@ -176,4 +176,4 @@ YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THIS SOFTWARE IS AT YOUR SOLE RI

<span id="hh"></span>

We'd like to collaborate with the community to provide better data storage standard implementation for the developers on the IC, if you have some ideas you'd like to discuss, submit an issue, if you want to improve the code or you made a different implementation, make a pull request!
We'd like to collaborate with the community to provide better data storage standard implementation for the developers on the IC, if you have some ideas you'd like to discuss, submit an issue, if you want to improve the code or you made a different implementation, make a pull request!

0 comments on commit d6c165c

Please sign in to comment.