LayerZero-Labs / LayerZero-v2

Other
492 stars 312 forks source link

Missing `verify` function in `DVN.sol` #65

Closed abhi3700 closed 15 hours ago

abhi3700 commented 2 months ago

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)?

bholcomb8 commented 15 hours ago

Contracts can definitely call other contracts, not sure what you mean here. There is no need for DVN.sol to have this verify function because after verification the payload hash is sent to the messagelib (ReceiveUln302) and can be verified at this point in the flow.