← Code LabSolidity0/50 solved · 0%
Cross-chain · hard

49. LayerZero OFT skeleton

Omnichain fungible tokens.

Stub the OFT V2 send interface: `setPeer(uint32 eid, bytes32 peer)` and `send(uint32 dstEid, bytes32 to, uint256 amount)` emitting an `OFTSent` event with a deterministic `guid`. In production you would inherit `@layerzerolabs/oft-evm/contracts/OFT.sol`.
Required in your answer: peers[eid] = peeremit PeerSetpeers[dstEid] != bytes32(0)emit OFTSent