LayerZero-v2
LayerZero-v2 copied to clipboard
Missing `verify` function in `DVN.sol`
I see there is a function missing in DVN.sol
which should call verify
function of ReceiveUln302.sol
contract.
Only then an EOA can call the DVN's function to call upon the verify
function so that DVN is msg.sender
.
I see this code in tests:
// dvn verify
vm.prank(address(fixtureV2.dvn));
receiveUln302.verify(header, payloadHash, 1);
which I don't think it's gonna work in real. How can a contract (DVN
) call another contract (ReceiveUln302
)?
- [ ] Add this function in
DVN.sol
:
/// @dev for dvn to verify the payload by calling `verify` fn of ReceiveUln302 contract
/// @param _receiveLibRemote the receiveUln302 address on other side (mostly from src chain) as the message (to be verified)
/// is sent from src chain. DVN has to be the one deployed on the chain (src chain from where the message is sent).
/// E.g. If message is sent from Ethereum to Polygon, then DVN (on Ethereum) has to verify the sent message by calling `ReceiveUln302`
/// (on Polygon).
function verify(
address _receiveLibRemote,
bytes calldata _packetHeader,
bytes32 _payloadHash,
uint64 _confirmations
) external onlySelfOrAdmin(ADMIN_ROLE) {
IReceiveUlnE2(_receiveLibRemote).verify(_packetHeader, _payloadHash, _confirmations);
}