Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial-commits #140

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
45 changes: 45 additions & 0 deletions contracts/token/oft/latest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## Endpoint V1 OFT: Latest

> **NOTE:** This document should be read in conjunction with the <a href="https://layerzero.gitbook.io/docs/evm-guides/oft-walkthrough">LayerZero V1 OFT Docs</a>.

This set of interfaces, contracts, and utilities are all related to the OFT (Omnichain Fungible Token) Endpoint V1 implementation, designed for seamless fungible token transfers across multiple blockchains.

There are a few core contracts that implement the behavior specified in the OFT V2:

* **{OFTV2}**: the main contract that combines `BaseOFTV2` with `ERC20`, implementing the OFT functionalities.
* {BaseOFTV2}: the base abstract contract that provides the essential functionality for omnichain token transfer.
* {{OFTCoreV2}}: the core contract that implements baseline logic for debiting and crediting tokens across multiple chains.
* {{NonblockingLzApp}}: the generic message passing standard to send and receive arbitrary pieces of data between LayerZero contracts.
* {ERC20}: the standard ERC-20 implementation from OpenZeppelin, providing basic token functionalities like transfer, balance tracking, and allowances.

Additionally there are multiple custom extensions, including:

* **{ProxyOFTV2}**: an implementation that allows an already deployed ERC20 to expand to any supported chain as a native token.
* {NativeOFTV2}: support for native gas token transfers.
* {OFTWithFee}: support for custom fees on token transfer.

### Core

{{OFTV2}}

{{BaseOFTV2}}

{{OFTCoreV2}}

{{IOFTV2}}

{{ERC20}}

> **NOTE:** This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in `OFTV2.sol`, `BaseOFTV2.sol`, and `OFTCoreV2.sol`, and expose them as external functions in the way they prefer.

### Extensions

{{OFTWithFee}}

{{ProxyOFTWithFee}}

{{NativeOFTV2}}

{{NativeOFTWithFee}}

> **NOTE:** We encourage developers to explore the internal workings of the `OFTV2` contract to fully utilize its capabilities in omnichain environments.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./OFTV2.sol";
import "../OFTV2.sol";

contract NativeOFTV2 is OFTV2, ReentrancyGuard {
uint public outboundAmount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.0;

import "../OFTCoreV2.sol";
import "../../OFTCoreV2.sol";
import "./IOFTWithFee.sol";
import "./Fee.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity >=0.5.0;

import "../interfaces/ICommonOFT.sol";
import "../../interfaces/ICommonOFT.sol";

/**
* @dev Interface of the IOFT core standard
Expand Down
File renamed without changes.
5 changes: 0 additions & 5 deletions contracts/token/oft/v2/README.md

This file was deleted.

Loading