initialize(address) :
This function is used to initialize the contract. It sets the address of the ILayerZeroUltraLightNodeV1 contract to the variable uln, and sets the approved address of the contract to itself. The __Ownable_init() function is called to initialize the Ownable contract, which is used to manage the contract's ownership. (autogenerated documentation)
validateTransactionProofV2(uint16,address,bytes32,address) :
This function is used to validate a transaction proof on the Ethereum blockchain. It takes in a source chain ID, destination address, gas limit, block hash, and transaction proof as parameters. It then calls the uln.validateTransactionProof() function, which checks the validity of the transaction proof. If the proof is valid, it sends the ether to the specified address. (autogenerated documentation)
validateTransactionProofV1(uint16,address,bytes32) :
This function is used to validate a transaction proof from a source chain to a destination address on a different chain. It takes in the source chain ID, the destination address, the gas limit, the block hash, and the transaction proof as parameters. It then calls the validateTransactionProof function from the Universal Linker Network (uln) contract, which verifies that the transaction proof is valid and that the transaction was successful. (autogenerated documentation)
setDstPrice(uint16,uint128,uint128) :
This function sets the price of a destination chain (identified by its chain ID) for the purpose of cross-chain transactions. The function takes three parameters: the chain ID, the destination price ratio, and the destination gas price in Wei. The function stores the parameters in a mapping called dstPriceLookup, which is used to look up the destination price when a cross-chain transaction is initiated. (autogenerated documentation)
setDstConfig(uint16,uint16,uint128,uint64,uint64) :
This function sets the configuration parameters for a given destination chain and outbound proof type. The parameters are the maximum native amount cap, the base gas, and the gas per byte. These parameters are stored in the dstConfigLookup mapping, which is indexed by the chain ID and outbound proof type. (autogenerated documentation)
withdrawQuotedFromULN(address) :
This function allows an approved user to withdraw a specified amount of quoted tokens from the ULN contract. It does this by calling the withdrawNative() function of the ULN contract, passing in the token ID (2), a zero address, the address of the recipient, and the amount to be withdrawn. (autogenerated documentation)
setApprovedAddress(address,bool) :
This function allows the owner of the contract to approve or disapprove a given address as a relayer. It takes two parameters, an address and a boolean value. If the boolean value is set to true, the address is approved as a relayer, and if it is set to false, the address is disapproved as a relayer. The function then emits an event, ApproveAddress, which contains the address and the boolean value. (autogenerated documentation)
_getPrices(uint16,uint16) :
This function is used to calculate the base price and price per byte for a transaction on a destination chain. It takes in the destination chain ID, outbound proof type, address, and adapter parameters as inputs. It then checks that the adapter parameters are of the correct length and that the transaction type is supported. It then calculates the total remote token amount by adding the native amount (if applicable) and the total remote gas. It then calculates the base price and price per byte by multiplying the total remote token amount by the destination price ratio and dividing by 10^10. Finally, it calculates the price per byte by multiplying the destination gas price in wei, the gas per byte, and the destination price ratio and dividing by 10^10 (autogenerated documentation)
notifyRelayer(uint16,uint16) :
This function is used to notify a relayer of a transaction that needs to be relayed to another chain. It takes in three parameters: the destination chain ID, the outbound proof type, and adapter parameters. The function then uses this information to notify the relayer of the transaction, which will then be responsible for relaying the transaction to the destination chain. (autogenerated documentation)
getPrice(uint16,uint16,address) :
This function calculates the total price for a transaction on a given blockchain. It takes in the destination chain ID, the type of outbound proof, the user application address, the payload size, and adapter parameters as inputs. It then calls the _getPrices() function to get the base price and price per byte for the transaction. Finally, it returns the total price by adding the base price to the product of the payload size and the price per byte. (autogenerated documentation)
isApproved(address) :
This function checks if a given address is approved to act as a relayer. It does this by accessing the approvedAddresses mapping, which stores a boolean value for each address. If the address is found in the mapping and the boolean value is true, the function returns true, indicating that the address is approved. (autogenerated documentation)