Telegram

Discord

X (Twitter)

Medium

Social Media

Documentation

Whitepaper

Resources

LayerZero V2 Github

LayerZero Scan

Developer Assistance

For the developers

Submission Form

Application

Ecosystem

Careers

[12]

We’re hiring

© 2024 LayerZero

Media Kit

Terms of Use

Privacy Policy

Cookie Policy

code examples

[06

/ 06

]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

}

}

return_amountToCreditLD;

_mint(_to,_amountToCreditLD);

internalvirtual overridereturns

(uint256amountReceivedLD)

{

)

/*_srcEid*/

uint32

uint256_amountToCreditLD,

address_to,

_credit(

function

}

_burn(address(this),amountDebitedLD);

(amountDebitedLD,amountToCreditLD)

=

_debitView(balanceOf(address(this)),_minAmountToReceiveLD,_dstEid);

internalvirtual overridereturns

(uint256amountDebitedLD,

uint256amountToCreditLD)

{

)

_dstEid

uint32

uint256_minAmountToReceiveLD,

_debitThis(

function

// @dev similar to how you can push tokens to the endpoint to pay the msg fee, vs the endpoint needing approval

// @dev allows anyone to send tokens that have been sent to this contract

// @dev burn the tokens that someone has sent into this contract in a push method

}

_burn(msg.sender,amountDebitedLD);

(amountDebitedLD,amountToCreditLD)

=

_debitView(_amountToSendLD,_minAmountToReceiveLD,_dstEid);

internalvirtual overridereturns

(uint256amountDebitedLD,

uint256amountToCreditLD)

{

)

_dstEid

uint32

uint256_minAmountToReceiveLD,

uint256_amountToSendLD,

_debitSender(

function

// @dev burn the tokens from the users specified balance

}

address(this);

return

token()

external

viewvirtualreturns

(address)

{

function

}

(1,

1);

return

oftVersion()

external

pure

returns

(uint64major,

uint64minor)

{

function

// @dev minor indicates a varying version, eg. OFTAdapter vs. OFT

// @dev major indicates they shared a compatible msg payload format and CAN communicate between one another

ERC20(_name,_symbol)

OFTCore(decimals(),_lzEndpoint,_owner)

{}

)

_owner

address

address_lzEndpoint,

memory_symbol,

string

memory_name,

string

constructor(

isOFTCore,ERC20{

OFT

contract

{OFTCore}

from

"./OFTCore.sol";

import

{ERC20}

from

"@openzeppelin/contracts/token/ERC20/ERC20.sol";

import

^0.8.22;

solidity

pragma

// SPDX-License-Identifier: MIT

Token

liquidity pools.

without asset wrapping, middlechains, or

transferred across multiple blockchains

OFTs allow fungible tokens to be

[Hover]

[OFT.SOL]

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

}

}

receiverVersion=RECEIVER_VERSION;

senderVersion=SENDER_VERSION;

oAppVersion()

public

purevirtualreturns

(uint64senderVersion,

uint64receiverVersion)

{

function

}

endpoint=

ILayerZeroEndpointV2(_endpoint);

_transferOwnership(_owner);

constructor(address_endpoint,

address_owner)

{

abstractcontract

OApp

isIOApp,OAppSender,OAppReceiver{

{OAppReceiver,Origin}

from

"./OAppReceiver.sol";

import

// @dev import the origin so its exposed to OApp implementers

{OAppSender}

from

"./OAppSender.sol";

import

{IOApp,ILayerZeroEndpointV2}

from

"./interfaces/IOApp.sol";

import

^0.8.22;

solidity

pragma

// SPDX-License-Identifier: MIT

Application

blockchain networks.

contracts existing on different

receive arbitrary pieces of data between

message passing interface to send and

Provides developers with a generic

[Hover]

[OAPP.SOL]

LayerZero protocol provides developers with the

necessary tools to send messages across

blockchains while retaining ownership of

security. Move data, issue tokens, and build

dApps on any blockchain through omnichain

contract standards like OApp, OFT, and ONFT.

Learn more

Infrastructure

Clusters

Infrastructure

Testnet Bridge

Infrastructure

Aragon

Infrastructure

Decent

Infrastructure

Paladin

Infrastructure

Gas.zip

DeFi

Infrastructure

NFT

Gaming

View more

Ecosystem Overview

[05

/ 06

]

Learn more

Message Lifecycle

[04

/ 06

]

Visit LayerZERO SCAN

LayerZero By the numbers

[03

/ 06

]

LIVE

/ 01

Censorship-Resistant

The protocol ensures all messages

are delivered without selective

interference.

/ 02

Immutable

The underlying technology framework

for sending and receiving messages

will never change in perpetuity.

/ 03

Permissionless

Anyone can run the required

infrastructure to service

applications that use the protocol.

Principles

[02

/ 06

]

LayerZero is a technology that enables applications to

move data across blockchains, uniquely supporting

censorship-resistant messages and permissionless

development through immutable smart contracts

Documentation

Github

Medium

Positioning

[01

/ 06

]

Scroll to explore

Omnichain

counter(index, decimal-leading-zero) " /

counter(index, decimal-leading-zero) " /

counter(index, decimal-leading-zero) " /

counter(index, decimal-leading-zero) " /

counter(index, decimal-leading-zero) " /

counter(index, decimal-leading-zero) " /

Start building

/// one protocol.any Blockchain.

Build

How It Works

Ecosystem