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
copy icon
LayerZero
• version 1.0.0
Treasury
Fees
Finance
Audited

Layer Zero Treasury

Audited

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

*Visit desktop site to download or deploy

Version

1.0.0

Creator

LayerZero

Recent Use

🍞 0xf856 saved

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 Zro feature is enabled, it allows users to transfer tokens without paying any fees. When the Zro feature is disabled, users will have to pay a fee for token transfers. The function takes a boolean parameter, which is used to set the zroEnabled variable to either true or false. Finally, an event is emitted to notify users of the change in the Zro feature status. (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 used to set the nativeBP variable. The function then emits an event, NativeBP, which passes the _nativeBP parameter as an argument. (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 does this by calling the withdrawNative() function from the ULN contract, passing in the address of the recipient, the amount to be withdrawn, and a token address of 0x0 (which indicates that the native token is being withdrawn). (autogenerated documentation)

Get Cookin'
share iconShare

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

Recent Use

🍞 0xf856 saved

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.