Omnichain fungible tokens.
peers[eid] = peeremit PeerSetpeers[dstEid] != bytes32(0)emit OFTSent// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract MyOFT {
mapping(uint32 => bytes32) public peers;
event PeerSet(uint32 eid, bytes32 peer);
event OFTSent(bytes32 guid, uint32 dstEid, address from, uint256 amount);
function setPeer(uint32 eid, bytes32 peer) external { /* TODO */ }
function send(uint32 dstEid, bytes32 to, uint256 amount) external payable returns (bytes32 guid) {
// TODO require peer set, compute guid, emit
}
}