Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Layer Zero Treasury V2
copy icon
LayerZero
• version 1.0.0
Treasury
Fees
Finance
Audited

Layer Zero Treasury V2

Audited

The treasury and fee receiver for the LayerZero protocol. Supports many fee types. V2 supports UltraLightNodeV2.

*Visit desktop site to download or deploy

Version

1.0.0

Creator

LayerZero

Recent Use

🍞 0x77CA downloaded

Last Publish

11/25/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
getFees(bool) :
This function is used to calculate the fees associated with a transaction. It takes in three parameters: a boolean indicating whether the payment is in ZRO, the relayer fee, and the oracle fee. If the fee is enabled, the function will check if the payment is in ZRO. If it is, it will return the ZRO fee. Otherwise, it will return the sum of the relayer fee and the oracle fee multiplied by the nativeBP and divided by 10000. If the fee is not enabled, the function will return 0. (autogenerated documentation)
setFeeEnabled(bool) :
This function allows the owner of the contract to enable or disable a fee for transactions. When the fee is enabled, a fee will be charged for each transaction. The function sets the boolean variable feeEnabled to the value of the parameter _feeEnabled, and then emits an event FeeEnabled with the same value. (autogenerated documentation)
setZroEnabled(bool) :
This function allows the owner of the contract to enable or disable the Zro feature. When the function is called, it sets the boolean variable zroEnabled to the value passed in as an argument and emits an event to notify other contracts that the Zro feature has been enabled or disabled. (autogenerated documentation)
setNativeBP() :
This function allows the owner of the contract to set the nativeBP variable to a specified value. The function takes in a uint parameter, _nativeBP, which is then set to the nativeBP variable. An event, NativeBP, is then emitted with the new value of nativeBP as the parameter. (autogenerated documentation)
setZroFee() :
This function allows the owner of the contract to set the zroFee, which is a fee charged for transactions on the contract. It takes an input of a uint (unsigned integer) and sets the zroFee to that value. It then emits an event, ZroFee, with the new zroFee value as the parameter. (autogenerated documentation)
withdrawZROFromULN(address) :
This function allows the owner of the contract to withdraw ZRO tokens from the ULN contract. It takes two parameters, an address to send the tokens to and an amount of tokens to withdraw. The function then calls the withdrawZRO function from the ULN contract, passing in the address and amount as parameters. This will transfer the specified amount of ZRO tokens from the ULN contract to the specified address. (autogenerated documentation)
withdrawNativeFromULN(address) :
This function allows the owner of the contract to withdraw a specified amount of native tokens from the Uniswap Liquidity Network (ULN) to a specified address. It works by calling the withdrawNative() function from the ULN contract, passing in the address to which the tokens should be sent and the amount of tokens to be withdrawn. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i layer-zero-treasury-v2
copy icon

Recent Use

🍞 0x77CA downloaded

Last Publish

11/25/2022

Version

1.0.0

Creator

LayerZero

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.