From d6c165c814d62ffb1ce5755c8bdbf86c60718177 Mon Sep 17 00:00:00 2001 From: xiaoyuanxun <53613219+xiaoyuanxun@users.noreply.github.com> Date: Fri, 18 Mar 2022 16:01:40 +0800 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a24ddb2..e3a57bb 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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** @@ -176,4 +176,4 @@ YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THIS SOFTWARE IS AT YOUR SOLE RI -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! \ No newline at end of file +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!