Skip to content

Commit 6f524e9

Browse files
committed
docs: 64-bit balance note
1 parent 3bf90c2 commit 6f524e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ The crate `build.rs` file reads two environment values `DWB_CAPACITY` and `BTBE_
2121

2222
A second consideration is how many bytes to use to store user balances in the DWB and BTBE. The default value used in the master branch code is 8 bytes (u64 size). Using only 8 bytes to store balance saves gas when writing the balances in the DWB and BTBE. 8 bytes translates to a maximum token balance in base denomination for a single account equal to approximately 18 quadrillion. For most tokens with 6 decimals, this is more than sufficient. However, some tokens such as secret wrapped ERC-20 tokens can have 18 decimals and this upper bound might not be enough. In that case, you will want to store balances with 16 bytes (u128 size).
2323

24-
There are two tagged releases that we recommend using, depending on the requirements of your token:
25-
26-
- Tokens with 64-bit balances, e.g. sSCRT: [Release-64-bit-balance]() TODO
27-
- Tokens with 128-bit balances, e.g. wrapped ERC-20 : [Release-128-bit-balance]() TODO
24+
> [!IMPORTANT]
25+
> The version in this branch has 64-bit balances and is recommended for tokens with 6 decimals only.
2826
2927
## <a name="instantiation"></a>Token instantiation
3028

0 commit comments

Comments
 (0)