Skip to content

Commit

Permalink
Update README.md to OFTV1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
St0rmBr3w authored Feb 19, 2024
1 parent 2d68d81 commit 1401c14
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions contracts/token/oft/v2/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
## IMPORTANT: OFTV2
## Clarification on OFT Versions

In order to make the token balance compatible on Aptos e.g. using uint64 to represent balance, OFTV2 has a shared decimal point setting to normalize the data type difference.
### OFTV1.2

It is recommended to use a smaller shared decimal point on all chains so that your token can have a larger balance. For example, if the decimal point is 18, then you can not have more than approximately 18 * 10^18 tokens bounded by the uint64.max
> [!IMPORTANT]
> Please note that this repo contains OFTV1.2, and is NOT the LayerZero V2 OFT Standard, but rather a second version of OFT built on Endpoint V1.
We recommend new developers use the [LayerZero V2 OFT Standard](https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/oapp/contracts/oft/OFT.sol) (found in the LayerZero V2 repo) over both the Endpoint V1 OFT V1 and Endpoint V1 OFT V1.2 implementations, as the protocol update comes with improved interfaces, gas optimizations, and greater composability.

#### When to use LayerZero V2 OFT

With the release of LayerZero V2, you should consider only using this V2 OFT Standard for your deployments. LayerZero V2 offers developers a smoother developer experience and optimizations to core protocol contracts.

Read the full [LayerZero V2 Overview](https://docs.layerzero.network/contracts/oft) to learn more.

#### When to use LayerZero V1 OFT V1.2

What if you want to build an Omnichain Fungible Token that supports EVMs and non-EVMs (e.g., Aptos)? In this case, you should use our Endpoint V1 OFT V1.2 which supports both. This version has fees, shared decimals, and composability built in. This Endpoint V1 version of OFT is currently being used in projects such as BTCb.

0 comments on commit 1401c14

Please sign in to comment.