updateHash(uint16,bytes32,bytes32) :
This function allows an approved address to update the hash of a block on a remote chain. It takes four parameters: the remote chain ID, the block hash, the number of confirmations, and the data associated with the block. The function then calls the updateHash() function of the underlying layer network (uln) to update the hash of the block on the remote chain. (autogenerated documentation)
notifyOracle(uint16,uint16,uint64) :
This function is used to notify an oracle of a block confirmation on a different chain. It takes in three parameters: the destination chain ID, the outbound proof type, and the outbound block confirmations. It then builds a Chainlink request with the given parameters and sends it to the oracle. The job's calledInBlock is then set to the current block number. (autogenerated documentation)
approveToken(address,address) :
This function allows the owner of a contract to approve a certain amount of tokens to be spent by a specified spender. It does this by calling the safeApprove() function of the IERC20 token contract, which sets the allowance of the spender to the specified amount. This allows the spender to transfer the approved amount of tokens from the owner's account. (autogenerated documentation)
withdraw(address) :
This function allows the owner of the contract to withdraw a specified amount of funds from the contract to a specified address. It does this by calling the call function on the specified address, passing in the amount to be withdrawn as the value parameter. If the call is successful, the Withdraw event is emitted. (autogenerated documentation)
setUln(address) :
This function sets the address of an ILayerZeroUltraLightNodeV1 contract as the "uln" address. It can only be called by the contract's owner, and it does not return any values. (autogenerated documentation)
withdrawTokens(address,address) :
This function allows the owner of the contract to withdraw tokens from a specified address. It takes three parameters: the address of the token, the address of the recipient, and the amount of tokens to be withdrawn. The function then uses the safeTransfer() function from the IERC20 interface to transfer the specified amount of tokens from the specified address to the recipient address. Finally, it emits an event to log the transaction. (autogenerated documentation)
withdrawOracleQuotedFee() :
This function allows the owner of the contract to withdraw a specified amount of funds from the contract. It does this by calling the uln.withdrawNative() function, which transfers the specified amount of funds from the contract to the owner's address. (autogenerated documentation)
setJob(uint16,address,bytes32) :
This function sets a job on the specified blockchain (_chain). It takes in the address of the oracle (_oracle), a unique identifier for the job (_id), and the fee for the job (_fee). The job is stored in the jobs mapping, with the blockchain as the key. The job is set with the block number minus one, which is the block number of the previous block. (autogenerated documentation)
setDeliveryAddress(uint16,address) :
This function allows the owner of the contract to set the delivery address for a given destination chain ID. The function takes two parameters, a uint16 _dstChainId and an address _deliveryAddress. The function stores the delivery address in a mapping called deliveryAddressLookup, using the _dstChainId as the key and the _deliveryAddress as the value. The value is stored as a CachedAddressString, which is a struct containing a boolean and a string representation of the address. (autogenerated documentation)
setPrice(uint16,uint16) :
This function sets the price for a given outbound proof type and destination chain ID. It is only accessible to the contract owner, and requires three parameters: the destination chain ID, the outbound proof type, and the price. The function stores the price in a mapping of chain ID and outbound proof type. (autogenerated documentation)
setApprovedAddress(address,bool) :
This function allows the owner of the contract to set the approval status of a given address. It takes two parameters, an address and a boolean value. If the boolean value is set to true, the address is approved, and if it is set to false, the address is not approved. The approved status of the address is stored in a mapping of addresses to booleans. (autogenerated documentation)
fulfillNotificationOfBlock(bytes32,bytes32) :
This function is used to fulfill a notification request for a block. It takes two parameters, a request ID and a result, and emits a Result event with the request ID and result. This allows the caller to track the fulfillment of the request and access the result. (autogenerated documentation)
checkUtfUint8(uint8) :
This function checks a given 8-bit unsigned integer and returns the same integer with an added 7 if it is greater than 0x39. This is used to convert a character from ASCII to UTF-8 encoding. (autogenerated documentation)
byte2UtfInts(bytes1) :
This function takes in a single byte as an argument and returns two uint8 values. It does this by first shifting the byte 4 bits to the right and then using a bitwise AND operation to get the first uint8 value. The second uint8 value is obtained by using a bitwise AND operation on the original byte. The two uint8 values are then checked to make sure they are valid UTF-8 characters. (autogenerated documentation)
addr2str(address) :
This function takes an address as an input and returns a string representation of the address. It does this by first converting the address into a bytes20 type, then creating a new bytes array of length 42. It then iterates through the bytes20 array, converting each byte into two UTF-8 integers and adding them to the bytes array. Finally, it returns a string representation of the bytes array. (autogenerated documentation)
getPrice(uint16,uint16) :
This function retrieves the price of a given destination chain and outbound proof type from a chainPriceLookup mapping. The function requires that the price is greater than 0, and if not, it will throw an error. (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)