[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"\u002Fprotocol\u002Flimit-order-protocol":260,"\u002Fprotocol\u002Flimit-order-protocol-surround":2409},[4,22,105,148,177,186,243],{"title":5,"path":6,"stem":7,"children":8,"page":21},"Agents","\u002Fagents","agents",[9,13,17],{"title":10,"path":11,"stem":12},"LLMs.txt","\u002Fagents\u002Fllms-txt","agents\u002Fllms-txt",{"title":14,"path":15,"stem":16},"MCP Server","\u002Fagents\u002Fmcp-server","agents\u002Fmcp-server",{"title":18,"path":19,"stem":20},"Skills","\u002Fagents\u002Fskills","agents\u002Fskills",false,{"title":23,"path":24,"stem":25,"children":26,"page":21},"Api Reference","\u002Fapi-reference","api-reference",[27,31,35,68],{"title":28,"path":29,"stem":30},"Authentication","\u002Fapi-reference\u002Fauthentication","api-reference\u002Fauthentication",{"title":32,"path":33,"stem":34},"API Reference","\u002Fapi-reference\u002Fintroduction","api-reference\u002Fintroduction",{"title":36,"path":37,"stem":38,"children":39,"page":21},"Orchestration","\u002Fapi-reference\u002Forchestration","api-reference\u002Forchestration",[40,44,48,52,56,60,64],{"title":41,"path":42,"stem":43},"POST \u002Fcancel-order","\u002Fapi-reference\u002Forchestration\u002Fcancel-order","api-reference\u002Forchestration\u002Fcancel-order",{"title":45,"path":46,"stem":47},"GET \u002Forder-status\u002F{orderId}","\u002Fapi-reference\u002Forchestration\u002Forder-status","api-reference\u002Forchestration\u002Forder-status",{"title":49,"path":50,"stem":51},"GET \u002Forders","\u002Fapi-reference\u002Forchestration\u002Forders","api-reference\u002Forchestration\u002Forders",{"title":53,"path":54,"stem":55},"Orchestration API","\u002Fapi-reference\u002Forchestration\u002Foverview","api-reference\u002Forchestration\u002Foverview",{"title":57,"path":58,"stem":59},"POST \u002Fquote","\u002Fapi-reference\u002Forchestration\u002Fquote","api-reference\u002Forchestration\u002Fquote",{"title":61,"path":62,"stem":63},"GET \u002Fsupported-assets","\u002Fapi-reference\u002Forchestration\u002Fsupported-assets","api-reference\u002Forchestration\u002Fsupported-assets",{"title":65,"path":66,"stem":67},"TypeScript Type Generation","\u002Fapi-reference\u002Forchestration\u002Ftype-generation","api-reference\u002Forchestration\u002Ftype-generation",{"title":69,"path":70,"stem":71,"children":72,"page":21},"Recipes","\u002Fapi-reference\u002Frecipes","api-reference\u002Frecipes",[73,77,81,85,89,93,97,101],{"title":74,"path":75,"stem":76},"Collateral Composition","\u002Fapi-reference\u002Frecipes\u002Fcollateral-composition","api-reference\u002Frecipes\u002Fcollateral-composition",{"title":78,"path":79,"stem":80},"Daily Yields","\u002Fapi-reference\u002Frecipes\u002Fdaily-yields","api-reference\u002Frecipes\u002Fdaily-yields",{"title":82,"path":83,"stem":84},"Earner Rate History","\u002Fapi-reference\u002Frecipes\u002Fearner-rate-history","api-reference\u002Frecipes\u002Fearner-rate-history",{"title":86,"path":87,"stem":88},"Minter Daily Expenses","\u002Fapi-reference\u002Frecipes\u002Fminter-daily-expenses","api-reference\u002Frecipes\u002Fminter-daily-expenses",{"title":90,"path":91,"stem":92},"Network Supply","\u002Fapi-reference\u002Frecipes\u002Fnetwork-supply","api-reference\u002Frecipes\u002Fnetwork-supply",{"title":94,"path":95,"stem":96},"Protocol Configuration","\u002Fapi-reference\u002Frecipes\u002Fprotocol-config","api-reference\u002Frecipes\u002Fprotocol-config",{"title":98,"path":99,"stem":100},"Token Holders","\u002Fapi-reference\u002Frecipes\u002Ftoken-holders","api-reference\u002Frecipes\u002Ftoken-holders",{"title":102,"path":103,"stem":104},"Token Overview","\u002Fapi-reference\u002Frecipes\u002Ftoken-overview","api-reference\u002Frecipes\u002Ftoken-overview",{"title":106,"path":107,"stem":108,"children":109,"page":21},"Build","\u002Fbuild","build",[110,114,118,122,126,130,134,138,142,145],{"title":111,"path":112,"stem":113},"Integrating with the M0 Portals","\u002Fbuild\u002Fbridging-developer","build\u002Fbridging-developer",{"title":115,"path":116,"stem":117},"Bridging M And wM Tokens","\u002Fbuild\u002Fbridging-user","build\u002Fbridging-user",{"title":119,"path":120,"stem":121},"Stablecoin Extension Templates","\u002Fbuild\u002Fchoosing-your-model","build\u002Fchoosing-your-model",{"title":123,"path":124,"stem":125},"How to Design Your Stablecoin","\u002Fbuild\u002Foverview","build\u002Foverview",{"title":127,"path":128,"stem":129},"Implementation Guide: NoYield","\u002Fbuild\u002Fsvm-noyield-guide","build\u002Fsvm-noyield-guide",{"title":131,"path":132,"stem":133},"Getting started","\u002Fbuild\u002Fsvm-noyield-guide-overview","build\u002Fsvm-noyield-guide-overview",{"title":135,"path":136,"stem":137},"Implementation Guide: MYieldToOne (Onshore)","\u002Fbuild\u002Ftreasury-guide","build\u002Ftreasury-guide",{"title":139,"path":140,"stem":141},"Implementation Guide: JMI (Offshore)","\u002Fbuild\u002Ftreasury-jmi-guide","build\u002Ftreasury-jmi-guide",{"title":131,"path":143,"stem":144},"\u002Fbuild\u002Ftreasury-jmi-overview","build\u002Ftreasury-jmi-overview",{"title":131,"path":146,"stem":147},"\u002Fbuild\u002Ftreasury-model","build\u002Ftreasury-model",{"title":149,"path":150,"stem":151,"children":152,"page":21},"Get Started","\u002Fget-started","get-started",[153,157,161,165,169,173],{"title":154,"path":155,"stem":156},"Accessing Liquidity","\u002Fget-started\u002Faccessing-liquidity","get-started\u002Faccessing-liquidity",{"title":158,"path":159,"stem":160},"Cross Chain Interoperability","\u002Fget-started\u002Fcross-chain","get-started\u002Fcross-chain",{"title":162,"path":163,"stem":164},"Architecture Overview","\u002Fget-started\u002Fhow-it-works","get-started\u002Fhow-it-works",{"title":166,"path":167,"stem":168},"Overview","\u002Fget-started\u002Foverview","get-started\u002Foverview",{"title":170,"path":171,"stem":172},"Platform Mechanics & Reward Programmability","\u002Fget-started\u002Fprotocol-mechanics","get-started\u002Fprotocol-mechanics",{"title":174,"path":175,"stem":176},"Stablecoin Features","\u002Fget-started\u002Fstablecoin-features","get-started\u002Fstablecoin-features",{"title":178,"path":179,"stem":180,"children":181,"page":21},"Issuers","\u002Fissuers","issuers",[182],{"title":183,"path":184,"stem":185},"Issue Your Stablecoin","\u002Fissuers\u002Foverview","issuers\u002Foverview",{"title":187,"path":188,"stem":189,"children":190,"page":21},"Protocol","\u002Fprotocol","protocol",[191,195,199,203,207,211,215,219,223,227,231,235,239],{"title":192,"path":193,"stem":194},"Distribution Vault","\u002Fprotocol\u002Fdistribution-vault","protocol\u002Fdistribution-vault",{"title":196,"path":197,"stem":198},"M0 Extensions","\u002Fprotocol\u002Fextensions","protocol\u002Fextensions",{"title":200,"path":201,"stem":202},"Limit Order Protocol","\u002Fprotocol\u002Flimit-order-protocol","protocol\u002Flimit-order-protocol",{"title":204,"path":205,"stem":206},"M0 Portals","\u002Fprotocol\u002Fm-portals","protocol\u002Fm-portals",{"title":208,"path":209,"stem":210},"M Token","\u002Fprotocol\u002Fm-token","protocol\u002Fm-token",{"title":212,"path":213,"stem":214},"M Token Specification","\u002Fprotocol\u002Fm-token-spec","protocol\u002Fm-token-spec",{"title":216,"path":217,"stem":218},"Minting & Burning (MinterGateway)","\u002Fprotocol\u002Fminting-burning","protocol\u002Fminting-burning",{"title":220,"path":221,"stem":222},"Portal V2","\u002Fprotocol\u002Fportal-v2","protocol\u002Fportal-v2",{"title":224,"path":225,"stem":226},"Rate Models & Yield","\u002Fprotocol\u002Frate-models","protocol\u002Frate-models",{"title":228,"path":229,"stem":230},"Roles","\u002Fprotocol\u002Froles","protocol\u002Froles",{"title":232,"path":233,"stem":234},"M0 On Solana","\u002Fprotocol\u002Fsolana","protocol\u002Fsolana",{"title":236,"path":237,"stem":238},"Wrapped M (wM)","\u002Fprotocol\u002Fwrapped-m","protocol\u002Fwrapped-m",{"title":240,"path":241,"stem":242},"Wrapped M Specification","\u002Fprotocol\u002Fwrapped-m-spec","protocol\u002Fwrapped-m-spec",{"title":244,"path":245,"stem":246,"children":247,"page":21},"Resources","\u002Fresources","resources",[248,252,256],{"title":249,"path":250,"stem":251},"Deployments","\u002Fresources\u002Faddresses","resources\u002Faddresses",{"title":253,"path":254,"stem":255},"Audits","\u002Fresources\u002Faudits","resources\u002Faudits",{"title":257,"path":258,"stem":259},"Glossary","\u002Fresources\u002Fglossary","resources\u002Fglossary",{"id":261,"title":200,"body":262,"description":2403,"extension":2404,"links":2405,"meta":2406,"navigation":942,"path":201,"seo":2407,"stem":202,"__hash__":2408},"docs\u002Fprotocol\u002Flimit-order-protocol.md",{"type":263,"value":264,"toc":2359},"minimark",[265,269,273,276,281,324,328,331,357,361,368,380,385,399,403,407,417,515,586,589,609,613,622,652,657,675,681,687,698,702,709,720,724,730,739,742,751,766,809,812,822,826,839,852,856,859,884,887,890,981,985,988,1063,1066,1070,1076,1131,1135,1144,1148,1151,1155,1161,1165,1169,1172,1175,1189,1193,1206,1318,1322,1332,1352,1367,1375,1378,1382,1385,1396,1400,1406,1410,1422,1426,1538,1542,1647,1651,1655,1689,1693,1696,1768,1771,1774,1840,1843,1867,1871,1908,1912,1935,1939,2128,2132,2315,2319,2350,2355],[266,267,268],"p",{},"The Limit Order Protocol is the onchain settlement layer for M0's Liquidity Delivery Network. It provides a trustless, intent-based protocol for exchanging tokens across chains with support for partial fills, gasless orders, and secure cancellation.",[270,271,166],"h2",{"id":272},"overview",[266,274,275],{},"The Limit Order Protocol allows users to submit same-chain or cross-chain limit orders to exchange one token for another. While the primary use case is stablecoin orchestration - swapping between USDC\u002FUSDT and M0 extensions - the protocol is asset-agnostic.",[277,278,280],"h3",{"id":279},"key-design-principles","Key Design Principles",[282,283,284,292,298,312,318],"ul",{},[285,286,287,291],"li",{},[288,289,290],"strong",{},"Trustless execution"," - No trust assumptions on users or solvers; only bridge contracts and messaging protocols are trusted parties",[285,293,294,297],{},[288,295,296],{},"Partial fills"," - Orders can be filled incrementally, allowing solvers to cycle inventory for large orders",[285,299,300,303,304,308,309],{},[288,301,302],{},"Deterministic pricing"," - Users specify exact ",[305,306,307],"code",{},"amountIn"," and ",[305,310,311],{},"amountOut",[285,313,314,317],{},[288,315,316],{},"Cross-chain native"," - Orders are created on the source chain but can be filled on any configured destination",[285,319,320,323],{},[288,321,322],{},"Secure order cancellations"," - Refunds respect finality buffers to prevent race conditions between cancellations and fills",[270,325,327],{"id":326},"architecture","Architecture",[266,329,330],{},"The system consists of:",[282,332,333,342,351],{},[285,334,335,341],{},[288,336,337,340],{},[305,338,339],{},"OrderBook"," contracts"," deployed on each supported chain",[285,343,344,347,348],{},[288,345,346],{},"Portal\u002FMessenger"," for cross-chain communication via ",[349,350,220],"a",{"href":221},[285,352,353,356],{},[288,354,355],{},"Solvers"," that monitor and fill orders",[277,358,360],{"id":359},"chain-interactions","Chain Interactions",[266,362,363,364,367],{},"For ",[288,365,366],{},"same-chain orders",":",[369,370,371,374,377],"ol",{},[285,372,373],{},"User opens order on Chain A",[285,375,376],{},"Solver fills order on Chain A",[285,378,379],{},"Tokens are exchanged atomically",[266,381,363,382,367],{},[288,383,384],{},"cross-chain orders",[369,386,387,390,393,396],{},[285,388,389],{},"User opens order on Chain A (origin), locking input tokens",[285,391,392],{},"Solver fills order on Chain B (destination), delivering output tokens to recipient",[285,394,395],{},"Fill report is sent back to Chain A via the messaging layer",[285,397,398],{},"Solver receives input tokens on Chain A",[270,400,402],{"id":401},"order-lifecycle","Order Lifecycle",[277,404,406],{"id":405},"_1-order-creation","1. Order Creation",[266,408,409,410,413,414,416],{},"Users create orders by calling ",[305,411,412],{},"openOrder()"," on the ",[305,415,339],{}," contract on the origin chain. The order specifies:",[418,419,420,433],"table",{},[421,422,423],"thead",{},[424,425,426,430],"tr",{},[427,428,429],"th",{},"Parameter",[427,431,432],{},"Description",[434,435,436,447,457,467,476,485,495,505],"tbody",{},[424,437,438,444],{},[439,440,441],"td",{},[305,442,443],{},"destChainId",[439,445,446],{},"Destination chain where tokens will be delivered",[424,448,449,454],{},[439,450,451],{},[305,452,453],{},"tokenIn",[439,455,456],{},"Input token address on origin chain",[424,458,459,464],{},[439,460,461],{},[305,462,463],{},"tokenOut",[439,465,466],{},"Output token address on destination chain",[424,468,469,473],{},[439,470,471],{},[305,472,307],{},[439,474,475],{},"Amount of input token to exchange",[424,477,478,482],{},[439,479,480],{},[305,481,311],{},[439,483,484],{},"Expected amount of output token",[424,486,487,492],{},[439,488,489],{},[305,490,491],{},"recipient",[439,493,494],{},"Address to receive tokens on destination chain",[424,496,497,502],{},[439,498,499],{},[305,500,501],{},"fillDeadline",[439,503,504],{},"Timestamp by which order must be filled",[424,506,507,512],{},[439,508,509],{},[305,510,511],{},"solver",[439,513,514],{},"(Optional) Exclusive solver address, or zero for any solver",[516,517,522],"pre",{"className":518,"code":519,"language":520,"meta":521,"style":521},"language-solidity shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","struct OrderParams {\n    uint32 destChainId;\n    uint32 fillDeadline;\n    address tokenIn;\n    bytes32 tokenOut;      \u002F\u002F bytes32 supports non-EVM destinations\n    uint128 amountIn;\n    uint128 amountOut;\n    bytes32 recipient;\n    bytes32 solver;\n}\n","solidity","",[305,523,524,532,538,544,550,556,562,568,574,580],{"__ignoreMap":521},[525,526,529],"span",{"class":527,"line":528},"line",1,[525,530,531],{},"struct OrderParams {\n",[525,533,535],{"class":527,"line":534},2,[525,536,537],{},"    uint32 destChainId;\n",[525,539,541],{"class":527,"line":540},3,[525,542,543],{},"    uint32 fillDeadline;\n",[525,545,547],{"class":527,"line":546},4,[525,548,549],{},"    address tokenIn;\n",[525,551,553],{"class":527,"line":552},5,[525,554,555],{},"    bytes32 tokenOut;      \u002F\u002F bytes32 supports non-EVM destinations\n",[525,557,559],{"class":527,"line":558},6,[525,560,561],{},"    uint128 amountIn;\n",[525,563,565],{"class":527,"line":564},7,[525,566,567],{},"    uint128 amountOut;\n",[525,569,571],{"class":527,"line":570},8,[525,572,573],{},"    bytes32 recipient;\n",[525,575,577],{"class":527,"line":576},9,[525,578,579],{},"    bytes32 solver;\n",[525,581,583],{"class":527,"line":582},10,[525,584,585],{},"}\n",[266,587,588],{},"When an order is created:",[282,590,591,596,603],{},[285,592,593,594],{},"Input tokens are transferred from the user to the ",[305,595,339],{},[285,597,598,599,602],{},"A unique ",[305,600,601],{},"orderId"," is generated from the order parameters",[285,604,605,606],{},"The order is stored with status ",[305,607,608],{},"Created",[277,610,612],{"id":611},"_2-order-filling","2. Order Filling",[266,614,615,616,619,620,367],{},"Solvers fill orders by calling ",[305,617,618],{},"fillOrder()"," on the destination chain's ",[305,621,339],{},[516,623,625],{"className":518,"code":624,"language":520,"meta":521,"style":521},"function fillOrder(\n    bytes32 orderId_,\n    OrderData calldata orderData_,\n    FillParams calldata fillerParams_\n) external;\n",[305,626,627,632,637,642,647],{"__ignoreMap":521},[525,628,629],{"class":527,"line":528},[525,630,631],{},"function fillOrder(\n",[525,633,634],{"class":527,"line":534},[525,635,636],{},"    bytes32 orderId_,\n",[525,638,639],{"class":527,"line":540},[525,640,641],{},"    OrderData calldata orderData_,\n",[525,643,644],{"class":527,"line":546},[525,645,646],{},"    FillParams calldata fillerParams_\n",[525,648,649],{"class":527,"line":552},[525,650,651],{},") external;\n",[266,653,654,656],{},[288,655,296],{}," are supported - solvers can fill any portion of an order:",[282,658,659,666,672],{},[285,660,661,662,665],{},"The solver specifies ",[305,663,664],{},"amountOutToFill"," in their fill parameters",[285,667,668,669,671],{},"A proportional amount of ",[305,670,453],{}," is released to the solver",[285,673,674],{},"Multiple solvers can fill the same order until it's complete",[266,676,677,680],{},[288,678,679],{},"Same-chain fills"," release input tokens immediately to the solver.",[266,682,683,686],{},[288,684,685],{},"Cross-chain fills"," trigger a fill report sent back to the origin chain:",[282,688,689,692],{},[285,690,691],{},"The messenger delivers the fill report",[285,693,694,695],{},"Input tokens are released to the solver's specified ",[305,696,697],{},"originRecipient",[277,699,701],{"id":700},"_3-order-completion","3. Order Completion",[266,703,704,705,708],{},"An order reaches ",[305,706,707],{},"Completed"," status when:",[282,710,711,717],{},[285,712,713,714,716],{},"The full ",[305,715,311],{}," has been filled, OR",[285,718,719],{},"The user claims a refund after cancellation or deadline expiry",[277,721,723],{"id":722},"_4-cancellation-and-refunds","4. Cancellation and Refunds",[266,725,726,727,367],{},"Users can cancel orders before the fill deadline by calling ",[305,728,729],{},"requestCancelOrder()",[516,731,733],{"className":518,"code":732,"language":520,"meta":521,"style":521},"function requestCancelOrder(bytes32 orderId_) external;\n",[305,734,735],{"__ignoreMap":521},[525,736,737],{"class":527,"line":528},[525,738,732],{},[266,740,741],{},"For gasless cancellation, users can sign an EIP-712 message and have a relayer submit it:",[516,743,745],{"className":518,"code":744,"language":520,"meta":521,"style":521},"function requestCancelOrderFor(bytes32 orderId_, bytes calldata signature_) external;\n",[305,746,747],{"__ignoreMap":521},[525,748,749],{"class":527,"line":528},[525,750,744],{},[752,753,754,759],"warning",{},[266,755,756],{},[288,757,758],{},"Cross-chain refund delays",[266,760,761,762,765],{},"For cross-chain orders, refunds cannot be claimed immediately. A ",[288,763,764],{},"finality\nbuffer"," must pass to ensure no in-flight fills arrive after cancellation.",[418,767,768,778],{},[421,769,770],{},[424,771,772,775],{},[427,773,774],{},"Scenario",[427,776,777],{},"Refund Available",[434,779,780,788,799],{},[424,781,782,785],{},[439,783,784],{},"Same-chain order cancelled",[439,786,787],{},"Immediately",[424,789,790,793],{},[439,791,792],{},"Cross-chain order cancelled",[439,794,795,796],{},"After ",[305,797,798],{},"cancelRequestedAt + finalityBuffer",[424,800,801,804],{},[439,802,803],{},"Order deadline expired",[439,805,795,806],{},[305,807,808],{},"fillDeadline + finalityBuffer",[266,810,811],{},"The finality buffer is configured per destination chain and accounts for messaging latency and potential reorgs.",[813,814,815],"note",{},[266,816,817,818,821],{},"Orders in ",[305,819,820],{},"CancelRequested"," status can still receive fills until the refund is\nclaimed. This protects solvers who submitted fills before seeing the\ncancellation request.",[277,823,825],{"id":824},"edge-cases","Edge Cases",[266,827,828,831,832,834,835,838],{},[288,829,830],{},"Late fill reports:"," If a cross-chain fill is not reported within the finality buffer, the user can claim a refund after ",[305,833,808],{},". Late ",[305,836,837],{},"reportFill()"," calls will fail if the refund was already claimed - the solver bears the loss in this scenario. This can occur when messaging networks experience delays, fill transactions are stuck in the destination chain mempool, or bridge relays are slower than expected.",[266,840,841,844,845,847,848,851],{},[288,842,843],{},"Concurrent cancel and fill:"," If a user requests cancellation while a fill is in-flight, the fill can still succeed until the refund is claimed. ",[305,846,820],{}," status does ",[288,849,850],{},"not"," block fills. Fill reports received before the refund claim are processed normally.",[270,853,855],{"id":854},"gasless-orders","Gasless Orders",[266,857,858],{},"Users can create orders without paying gas using EIP-712 signatures:",[516,860,862],{"className":518,"code":861,"language":520,"meta":521,"style":521},"function openOrderFor(\n    GaslessOrderParams calldata orderParams_,\n    bytes calldata orderSignature_\n) external returns (bytes32);\n",[305,863,864,869,874,879],{"__ignoreMap":521},[525,865,866],{"class":527,"line":528},[525,867,868],{},"function openOrderFor(\n",[525,870,871],{"class":527,"line":534},[525,872,873],{},"    GaslessOrderParams calldata orderParams_,\n",[525,875,876],{"class":527,"line":540},[525,877,878],{},"    bytes calldata orderSignature_\n",[525,880,881],{"class":527,"line":546},[525,882,883],{},") external returns (bytes32);\n",[266,885,886],{},"A relayer (often the solver) submits the order on behalf of the user. The signature includes all order parameters, the user's nonce (to prevent replay attacks), and the origin chain ID (to prevent cross-chain replay).",[266,888,889],{},"Permit signatures can also be combined with gasless orders to allow token approval in the same transaction:",[516,891,893],{"className":518,"code":892,"language":520,"meta":521,"style":521},"\u002F\u002F With split signature (v, r, s)\nfunction openOrderForWithPermit(\n    GaslessOrderParams calldata orderParams_,\n    bytes calldata orderSignature_,\n    uint256 deadline_,\n    uint8 v_,\n    bytes32 r_,\n    bytes32 s_\n) external returns (bytes32);\n\n\u002F\u002F With packed signature\nfunction openOrderForWithPermit(\n    GaslessOrderParams calldata orderParams_,\n    bytes calldata orderSignature_,\n    uint256 deadline_,\n    bytes memory permitSignature_\n) external returns (bytes32);\n",[305,894,895,900,905,909,914,919,924,929,934,938,944,950,955,960,965,970,976],{"__ignoreMap":521},[525,896,897],{"class":527,"line":528},[525,898,899],{},"\u002F\u002F With split signature (v, r, s)\n",[525,901,902],{"class":527,"line":534},[525,903,904],{},"function openOrderForWithPermit(\n",[525,906,907],{"class":527,"line":540},[525,908,873],{},[525,910,911],{"class":527,"line":546},[525,912,913],{},"    bytes calldata orderSignature_,\n",[525,915,916],{"class":527,"line":552},[525,917,918],{},"    uint256 deadline_,\n",[525,920,921],{"class":527,"line":558},[525,922,923],{},"    uint8 v_,\n",[525,925,926],{"class":527,"line":564},[525,927,928],{},"    bytes32 r_,\n",[525,930,931],{"class":527,"line":570},[525,932,933],{},"    bytes32 s_\n",[525,935,936],{"class":527,"line":576},[525,937,883],{},[525,939,940],{"class":527,"line":582},[525,941,943],{"emptyLinePlaceholder":942},true,"\n",[525,945,947],{"class":527,"line":946},11,[525,948,949],{},"\u002F\u002F With packed signature\n",[525,951,953],{"class":527,"line":952},12,[525,954,904],{},[525,956,958],{"class":527,"line":957},13,[525,959,873],{},[525,961,963],{"class":527,"line":962},14,[525,964,913],{},[525,966,968],{"class":527,"line":967},15,[525,969,918],{},[525,971,973],{"class":527,"line":972},16,[525,974,975],{},"    bytes memory permitSignature_\n",[525,977,979],{"class":527,"line":978},17,[525,980,883],{},[270,982,984],{"id":983},"order-identification","Order Identification",[266,986,987],{},"Each order has a unique ID derived from hashing its parameters:",[516,989,991],{"className":518,"code":990,"language":520,"meta":521,"style":521},"orderId = keccak256(abi.encodePacked(\n    version,\n    sender,\n    nonce,\n    originChainId,\n    destChainId,\n    fillDeadline,\n    tokenIn,\n    tokenOut,\n    amountIn,\n    amountOut,\n    recipient,\n    solver\n))\n",[305,992,993,998,1003,1008,1013,1018,1023,1028,1033,1038,1043,1048,1053,1058],{"__ignoreMap":521},[525,994,995],{"class":527,"line":528},[525,996,997],{},"orderId = keccak256(abi.encodePacked(\n",[525,999,1000],{"class":527,"line":534},[525,1001,1002],{},"    version,\n",[525,1004,1005],{"class":527,"line":540},[525,1006,1007],{},"    sender,\n",[525,1009,1010],{"class":527,"line":546},[525,1011,1012],{},"    nonce,\n",[525,1014,1015],{"class":527,"line":552},[525,1016,1017],{},"    originChainId,\n",[525,1019,1020],{"class":527,"line":558},[525,1021,1022],{},"    destChainId,\n",[525,1024,1025],{"class":527,"line":564},[525,1026,1027],{},"    fillDeadline,\n",[525,1029,1030],{"class":527,"line":570},[525,1031,1032],{},"    tokenIn,\n",[525,1034,1035],{"class":527,"line":576},[525,1036,1037],{},"    tokenOut,\n",[525,1039,1040],{"class":527,"line":582},[525,1041,1042],{},"    amountIn,\n",[525,1044,1045],{"class":527,"line":946},[525,1046,1047],{},"    amountOut,\n",[525,1049,1050],{"class":527,"line":952},[525,1051,1052],{},"    recipient,\n",[525,1054,1055],{"class":527,"line":957},[525,1056,1057],{},"    solver\n",[525,1059,1060],{"class":527,"line":962},[525,1061,1062],{},"))\n",[266,1064,1065],{},"This ensures orders are globally unique across all chains, solvers can verify order authenticity without trusting the origin chain, and the same order parameters always produce the same ID.",[270,1067,1069],{"id":1068},"solver-integration","Solver Integration",[266,1071,1072,1073,1075],{},"Solvers monitor ",[305,1074,339],{}," events to discover fillable orders:",[516,1077,1079],{"className":518,"code":1078,"language":520,"meta":521,"style":521},"event OrderOpened(\n    bytes32 indexed orderId,\n    address sender,\n    address tokenIn,\n    uint128 amountIn,\n    uint32 indexed destChainId,\n    bytes32 tokenOut,\n    uint128 amountOut,\n    bytes32 indexed solver\n);\n",[305,1080,1081,1086,1091,1096,1101,1106,1111,1116,1121,1126],{"__ignoreMap":521},[525,1082,1083],{"class":527,"line":528},[525,1084,1085],{},"event OrderOpened(\n",[525,1087,1088],{"class":527,"line":534},[525,1089,1090],{},"    bytes32 indexed orderId,\n",[525,1092,1093],{"class":527,"line":540},[525,1094,1095],{},"    address sender,\n",[525,1097,1098],{"class":527,"line":546},[525,1099,1100],{},"    address tokenIn,\n",[525,1102,1103],{"class":527,"line":552},[525,1104,1105],{},"    uint128 amountIn,\n",[525,1107,1108],{"class":527,"line":558},[525,1109,1110],{},"    uint32 indexed destChainId,\n",[525,1112,1113],{"class":527,"line":564},[525,1114,1115],{},"    bytes32 tokenOut,\n",[525,1117,1118],{"class":527,"line":570},[525,1119,1120],{},"    uint128 amountOut,\n",[525,1122,1123],{"class":527,"line":576},[525,1124,1125],{},"    bytes32 indexed solver\n",[525,1127,1128],{"class":527,"line":582},[525,1129,1130],{},");\n",[277,1132,1134],{"id":1133},"exclusive-solvers","Exclusive Solvers",[266,1136,1137,1138,1140,1141,1143],{},"If an order specifies a ",[305,1139,511],{}," address, only that address can fill the order. Setting ",[305,1142,511],{}," to zero allows any solver to fill (permissionless racing).",[277,1145,1147],{"id":1146},"fill-strategy","Fill Strategy",[266,1149,1150],{},"Solvers determine their own fill strategy - fill entire orders when inventory allows, partially fill large orders to manage risk, or prioritize orders by profitability or deadline urgency.",[277,1152,1154],{"id":1153},"receiving-tokens","Receiving Tokens",[266,1156,1157,1158,1160],{},"For cross-chain fills, solvers specify an ",[305,1159,697],{}," in their fill parameters. This address receives the input tokens on the origin chain after the fill report is processed.",[270,1162,1164],{"id":1163},"security-considerations","Security Considerations",[277,1166,1168],{"id":1167},"finality-buffers","Finality Buffers",[266,1170,1171],{},"Each destination chain has a configured finality buffer that determines how long to wait before processing refunds and protection against reorgs causing double-spends.",[266,1173,1174],{},"Finality buffer changes are time-delayed to protect existing orders:",[282,1176,1177,1183],{},[285,1178,1179,1182],{},[288,1180,1181],{},"Increases"," take effect immediately (more conservative)",[285,1184,1185,1188],{},[288,1186,1187],{},"Decreases"," take effect after the old buffer duration passes",[277,1190,1192],{"id":1191},"token-compatibility","Token Compatibility",[752,1194,1195,1200],{},[266,1196,1197],{},[288,1198,1199],{},"Non-standard token risks",[266,1201,1202,1203,1205],{},"The ",[305,1204,339],{}," has known edge cases with non-standard tokens. Review this\nsection carefully before whitelisting tokens.",[418,1207,1208,1224],{},[421,1209,1210],{},[424,1211,1212,1215,1218,1221],{},[427,1213,1214],{},"Token Type",[427,1216,1217],{},"Behavior",[427,1219,1220],{},"Severity",[427,1222,1223],{},"Recommendation",[434,1225,1226,1245,1269,1293],{},[424,1227,1228,1234,1237,1242],{},[439,1229,1230,1233],{},[288,1231,1232],{},"Pausable tokens"," (USDC\u002FUSDT)",[439,1235,1236],{},"If paused during cross-chain fill, user may receive destination tokens AND claim origin refund (double-spend)",[439,1238,1239],{},[288,1240,1241],{},"CRITICAL",[439,1243,1244],{},"Avoid for cross-chain orders or implement pause monitoring",[424,1246,1247,1252,1261,1266],{},[439,1248,1249],{},[288,1250,1251],{},"Rebase tokens",[439,1253,1254,1255,308,1257,1260],{},"If token rebases downward after order creation, ",[305,1256,837],{},[305,1258,1259],{},"claimRefund()"," may revert permanently, locking funds",[439,1262,1263],{},[288,1264,1265],{},"HIGH",[439,1267,1268],{},"Do not use",[424,1270,1271,1276,1282,1287],{},[439,1272,1273],{},[288,1274,1275],{},"Yield-bearing tokens",[439,1277,1278,1279,1281],{},"Yield accrues to ",[305,1280,339],{}," contract, not recoverable by user or solver",[439,1283,1284],{},[288,1285,1286],{},"MEDIUM",[439,1288,1289,1290],{},"Use short order lifetimes; configure fee recovery via ",[305,1291,1292],{},"MEarnerManager",[424,1294,1295,1300,1312,1316],{},[439,1296,1297],{},[288,1298,1299],{},"Fee-on-transfer tokens",[439,1301,1302,1304,1305,1308,1309,1311],{},[305,1303,618],{}," reverts via ",[305,1306,1307],{},"safeTransferExact","; ",[305,1310,1259],{}," may lose fee amount",[439,1313,1314],{},[288,1315,1286],{},[439,1317,1268],{},[277,1319,1321],{"id":1320},"solver-safety","Solver Safety",[752,1323,1324,1329],{},[266,1325,1326],{},[288,1327,1328],{},"Solver fund loss risks",[266,1330,1331],{},"The following behaviors can cause fund loss for solvers.",[266,1333,1334,1337,1338,1341,1342,1344,1345,1348,1349,1351],{},[288,1335,1336],{},"Invalid recipient address:"," Passing ",[305,1339,1340],{},"address(0)"," as ",[305,1343,697],{}," in ",[305,1346,1347],{},"FillParams"," will silently burn tokens. The contract does not validate this address. Always verify ",[305,1350,697],{}," is a valid, non-zero address before submitting fills.",[266,1353,1354,1357,1358,1360,1361,1363,1364,1366],{},[288,1355,1356],{},"Dust fills with decimal mismatch:"," When ",[305,1359,453],{}," has fewer decimals than ",[305,1362,463],{},", very small fills can round to zero ",[305,1365,307],{},". The pro-rata formula is:",[516,1368,1373],{"className":1369,"code":1371,"language":1372},[1370],"language-text","amountInToRelease = (amountIn * amountOutToFill) \u002F amountOut\n","text",[305,1374,1371],{"__ignoreMap":521},[266,1376,1377],{},"Solvers should validate minimum fill amounts to avoid zero-value releases.",[277,1379,1381],{"id":1380},"rounding-behavior","Rounding Behavior",[266,1383,1384],{},"Pro-rata calculations for partial fills always round down (floor):",[282,1386,1387,1390,1393],{},[285,1388,1389],{},"Users receive at least their proportional share",[285,1391,1392],{},"Solvers may receive slightly less than the theoretical maximum",[285,1394,1395],{},"Very small fills relative to decimal differences may round to zero",[277,1397,1399],{"id":1398},"messenger-trust","Messenger Trust",[266,1401,1402,1403,1405],{},"The only trusted component is the messenger contract that relays fill reports between chains. M0 uses its ",[349,1404,220],{"href":221}," infrastructure for secure cross-chain messaging.",[270,1407,1409],{"id":1408},"contract-reference","Contract Reference",[266,1411,1412,1413,1421],{},"The Limit Order Protocol is implemented in the ",[349,1414,1418],{"href":1415,"rel":1416},"https:\u002F\u002Fgithub.com\u002Fm0-foundation\u002Fliquidity-delivery\u002Fblob\u002Fmain\u002Fevm\u002Fsrc\u002FOrderBook.sol",[1417],"nofollow",[305,1419,1420],{},"OrderBook.sol"," contract.",[277,1423,1425],{"id":1424},"key-functions","Key Functions",[418,1427,1428,1437],{},[421,1429,1430],{},[424,1431,1432,1435],{},[427,1433,1434],{},"Function",[427,1436,432],{},[434,1438,1439,1448,1458,1468,1478,1487,1496,1506,1515,1524],{},[424,1440,1441,1445],{},[439,1442,1443],{},[305,1444,412],{},[439,1446,1447],{},"Create a new limit order",[424,1449,1450,1455],{},[439,1451,1452],{},[305,1453,1454],{},"openOrderWithPermit()",[439,1456,1457],{},"Create order with EIP-2612 permit (2 overloads)",[424,1459,1460,1465],{},[439,1461,1462],{},[305,1463,1464],{},"openOrderFor()",[439,1466,1467],{},"Create gasless order on behalf of user",[424,1469,1470,1475],{},[439,1471,1472],{},[305,1473,1474],{},"openOrderForWithPermit()",[439,1476,1477],{},"Create gasless order with permit (2 overloads)",[424,1479,1480,1484],{},[439,1481,1482],{},[305,1483,618],{},[439,1485,1486],{},"Fill an order (full or partial, 2 overloads)",[424,1488,1489,1493],{},[439,1490,1491],{},[305,1492,729],{},[439,1494,1495],{},"Request order cancellation",[424,1497,1498,1503],{},[439,1499,1500],{},[305,1501,1502],{},"requestCancelOrderFor()",[439,1504,1505],{},"Request gasless order cancellation",[424,1507,1508,1512],{},[439,1509,1510],{},[305,1511,1259],{},[439,1513,1514],{},"Claim refund for cancelled\u002Fexpired order",[424,1516,1517,1521],{},[439,1518,1519],{},[305,1520,837],{},[439,1522,1523],{},"Report a cross-chain fill (messenger only)",[424,1525,1526,1531],{},[439,1527,1528],{},[305,1529,1530],{},"setDestinationConfig()",[439,1532,1533,1534,1537],{},"Configure destination chain (requires ",[305,1535,1536],{},"DEFAULT_ADMIN_ROLE",")",[277,1539,1541],{"id":1540},"view-functions","View Functions",[418,1543,1544,1552],{},[421,1545,1546],{},[424,1547,1548,1550],{},[427,1549,1434],{},[427,1551,432],{},[434,1553,1554,1564,1577,1587,1597,1607,1617,1627,1637],{},[424,1555,1556,1561],{},[439,1557,1558],{},[305,1559,1560],{},"getOrder()",[439,1562,1563],{},"Get order details by ID",[424,1565,1566,1571],{},[439,1567,1568],{},[305,1569,1570],{},"getOrderId()",[439,1572,1573,1574],{},"Compute order ID from ",[305,1575,1576],{},"OrderData",[424,1578,1579,1584],{},[439,1580,1581],{},[305,1582,1583],{},"getFilledAmounts()",[439,1585,1586],{},"Get filled amounts for an order",[424,1588,1589,1594],{},[439,1590,1591],{},[305,1592,1593],{},"getSenderNonce()",[439,1595,1596],{},"Get next nonce for gasless orders",[424,1598,1599,1604],{},[439,1600,1601],{},[305,1602,1603],{},"isDestinationSupported()",[439,1605,1606],{},"Check if chain is supported",[424,1608,1609,1614],{},[439,1610,1611],{},[305,1612,1613],{},"getDestinationFinalityBuffer()",[439,1615,1616],{},"Get finality buffer for chain",[424,1618,1619,1624],{},[439,1620,1621],{},[305,1622,1623],{},"getDestinationConfig()",[439,1625,1626],{},"Get full destination configuration",[424,1628,1629,1634],{},[439,1630,1631],{},[305,1632,1633],{},"getGaslessOrderDigest()",[439,1635,1636],{},"Get EIP-712 digest for gasless order",[424,1638,1639,1644],{},[439,1640,1641],{},[305,1642,1643],{},"getCancelRequestDigest()",[439,1645,1646],{},"Get EIP-712 digest for gasless cancellation",[270,1648,1650],{"id":1649},"data-structures","Data Structures",[277,1652,1654],{"id":1653},"orderstatus","OrderStatus",[516,1656,1658],{"className":518,"code":1657,"language":520,"meta":521,"style":521},"enum OrderStatus {\n    DoesNotExist,    \u002F\u002F Order has never been created\n    Created,         \u002F\u002F Order is active and fillable\n    CancelRequested, \u002F\u002F User requested cancellation (fills still accepted)\n    Completed        \u002F\u002F Order fully filled or refund claimed\n}\n",[305,1659,1660,1665,1670,1675,1680,1685],{"__ignoreMap":521},[525,1661,1662],{"class":527,"line":528},[525,1663,1664],{},"enum OrderStatus {\n",[525,1666,1667],{"class":527,"line":534},[525,1668,1669],{},"    DoesNotExist,    \u002F\u002F Order has never been created\n",[525,1671,1672],{"class":527,"line":540},[525,1673,1674],{},"    Created,         \u002F\u002F Order is active and fillable\n",[525,1676,1677],{"class":527,"line":546},[525,1678,1679],{},"    CancelRequested, \u002F\u002F User requested cancellation (fills still accepted)\n",[525,1681,1682],{"class":527,"line":552},[525,1683,1684],{},"    Completed        \u002F\u002F Order fully filled or refund claimed\n",[525,1686,1687],{"class":527,"line":558},[525,1688,585],{},[277,1690,1692],{"id":1691},"order","Order",[266,1694,1695],{},"Complete data about an order originated on this chain (stored on origin chain only):",[516,1697,1699],{"className":518,"code":1698,"language":520,"meta":521,"style":521},"struct Order {\n    OrderStatus status;\n    uint16 version;\n    address sender;\n    uint64 nonce;\n    uint32 destChainId;\n    uint32 fillDeadline;\n    uint32 cancelRequestedAt;\n    address tokenIn;\n    bytes32 tokenOut;\n    uint128 amountIn;\n    uint128 amountOut;\n    bytes32 recipient;\n    bytes32 solver;\n}\n",[305,1700,1701,1706,1711,1716,1721,1726,1730,1734,1739,1743,1748,1752,1756,1760,1764],{"__ignoreMap":521},[525,1702,1703],{"class":527,"line":528},[525,1704,1705],{},"struct Order {\n",[525,1707,1708],{"class":527,"line":534},[525,1709,1710],{},"    OrderStatus status;\n",[525,1712,1713],{"class":527,"line":540},[525,1714,1715],{},"    uint16 version;\n",[525,1717,1718],{"class":527,"line":546},[525,1719,1720],{},"    address sender;\n",[525,1722,1723],{"class":527,"line":552},[525,1724,1725],{},"    uint64 nonce;\n",[525,1727,1728],{"class":527,"line":558},[525,1729,537],{},[525,1731,1732],{"class":527,"line":564},[525,1733,543],{},[525,1735,1736],{"class":527,"line":570},[525,1737,1738],{},"    uint32 cancelRequestedAt;\n",[525,1740,1741],{"class":527,"line":576},[525,1742,549],{},[525,1744,1745],{"class":527,"line":582},[525,1746,1747],{},"    bytes32 tokenOut;\n",[525,1749,1750],{"class":527,"line":946},[525,1751,561],{},[525,1753,1754],{"class":527,"line":952},[525,1755,567],{},[525,1757,1758],{"class":527,"line":957},[525,1759,573],{},[525,1761,1762],{"class":527,"line":962},[525,1763,579],{},[525,1765,1766],{"class":527,"line":967},[525,1767,585],{},[277,1769,1576],{"id":1770},"orderdata",[266,1772,1773],{},"Used to identify and fill orders on the destination chain:",[516,1775,1777],{"className":518,"code":1776,"language":520,"meta":521,"style":521},"struct OrderData {\n    uint16 version;\n    bytes32 sender;\n    uint64 nonce;\n    uint32 originChainId;\n    uint32 destChainId;\n    uint64 fillDeadline;\n    bytes32 tokenIn;\n    bytes32 tokenOut;\n    uint128 amountIn;\n    uint128 amountOut;\n    bytes32 recipient;\n    bytes32 solver;\n}\n",[305,1778,1779,1784,1788,1793,1797,1802,1806,1811,1816,1820,1824,1828,1832,1836],{"__ignoreMap":521},[525,1780,1781],{"class":527,"line":528},[525,1782,1783],{},"struct OrderData {\n",[525,1785,1786],{"class":527,"line":534},[525,1787,1715],{},[525,1789,1790],{"class":527,"line":540},[525,1791,1792],{},"    bytes32 sender;\n",[525,1794,1795],{"class":527,"line":546},[525,1796,1725],{},[525,1798,1799],{"class":527,"line":552},[525,1800,1801],{},"    uint32 originChainId;\n",[525,1803,1804],{"class":527,"line":558},[525,1805,537],{},[525,1807,1808],{"class":527,"line":564},[525,1809,1810],{},"    uint64 fillDeadline;\n",[525,1812,1813],{"class":527,"line":570},[525,1814,1815],{},"    bytes32 tokenIn;\n",[525,1817,1818],{"class":527,"line":576},[525,1819,1747],{},[525,1821,1822],{"class":527,"line":582},[525,1823,561],{},[525,1825,1826],{"class":527,"line":946},[525,1827,567],{},[525,1829,1830],{"class":527,"line":952},[525,1831,573],{},[525,1833,1834],{"class":527,"line":957},[525,1835,579],{},[525,1837,1838],{"class":527,"line":962},[525,1839,585],{},[277,1841,1347],{"id":1842},"fillparams",[516,1844,1846],{"className":518,"code":1845,"language":520,"meta":521,"style":521},"struct FillParams {\n    uint128 amountOutToFill;\n    bytes32 originRecipient;\n}\n",[305,1847,1848,1853,1858,1863],{"__ignoreMap":521},[525,1849,1850],{"class":527,"line":528},[525,1851,1852],{},"struct FillParams {\n",[525,1854,1855],{"class":527,"line":534},[525,1856,1857],{},"    uint128 amountOutToFill;\n",[525,1859,1860],{"class":527,"line":540},[525,1861,1862],{},"    bytes32 originRecipient;\n",[525,1864,1865],{"class":527,"line":546},[525,1866,585],{},[277,1868,1870],{"id":1869},"fillreport","FillReport",[516,1872,1874],{"className":518,"code":1873,"language":520,"meta":521,"style":521},"struct FillReport {\n    bytes32 orderId;\n    uint128 amountInToRelease;\n    uint128 amountOutFilled;\n    bytes32 originRecipient;\n    bytes32 tokenIn;\n}\n",[305,1875,1876,1881,1886,1891,1896,1900,1904],{"__ignoreMap":521},[525,1877,1878],{"class":527,"line":528},[525,1879,1880],{},"struct FillReport {\n",[525,1882,1883],{"class":527,"line":534},[525,1884,1885],{},"    bytes32 orderId;\n",[525,1887,1888],{"class":527,"line":540},[525,1889,1890],{},"    uint128 amountInToRelease;\n",[525,1892,1893],{"class":527,"line":546},[525,1894,1895],{},"    uint128 amountOutFilled;\n",[525,1897,1898],{"class":527,"line":552},[525,1899,1862],{},[525,1901,1902],{"class":527,"line":558},[525,1903,1815],{},[525,1905,1906],{"class":527,"line":564},[525,1907,585],{},[277,1909,1911],{"id":1910},"filledamounts","FilledAmounts",[516,1913,1915],{"className":518,"code":1914,"language":520,"meta":521,"style":521},"struct FilledAmounts {\n    uint128 amountInReleased;\n    uint128 amountOutFilled;\n}\n",[305,1916,1917,1922,1927,1931],{"__ignoreMap":521},[525,1918,1919],{"class":527,"line":528},[525,1920,1921],{},"struct FilledAmounts {\n",[525,1923,1924],{"class":527,"line":534},[525,1925,1926],{},"    uint128 amountInReleased;\n",[525,1928,1929],{"class":527,"line":540},[525,1930,1895],{},[525,1932,1933],{"class":527,"line":546},[525,1934,585],{},[270,1936,1938],{"id":1937},"events","Events",[516,1940,1942],{"className":518,"code":1941,"language":520,"meta":521,"style":521},"\u002F\u002F Order lifecycle\nevent OrderOpened(\n    bytes32 indexed orderId,\n    address sender,\n    address tokenIn,\n    uint128 amountIn,\n    uint32 indexed destChainId,\n    bytes32 tokenOut,\n    uint128 amountOut,\n    bytes32 indexed solver\n);\n\nevent OrderFilled(\n    bytes32 indexed orderId,\n    address indexed solver,\n    uint128 amountInToRelease,\n    uint128 amountOutFilled\n);\n\nevent OrderCompleted(bytes32 orderId);\n\n\u002F\u002F Cancellation\nevent CancelRequested(bytes32 indexed orderId, uint32 cancelRequestedAt);\n\nevent RefundClaimed(\n    bytes32 indexed orderId,\n    address indexed sender,\n    uint128 amountInRefunded\n);\n\n\u002F\u002F Configuration\nevent DestinationConfigUpdated(\n    uint32 indexed destChainId,\n    bool newIsSupported,\n    uint32 newFinalityBuffer,\n    uint64 newFinalityBufferEffectiveTimestamp\n);\n",[305,1943,1944,1949,1953,1957,1961,1965,1969,1973,1977,1981,1985,1989,1993,1998,2002,2007,2012,2017,2022,2027,2033,2038,2044,2050,2055,2061,2066,2072,2078,2083,2088,2094,2100,2105,2111,2117,2123],{"__ignoreMap":521},[525,1945,1946],{"class":527,"line":528},[525,1947,1948],{},"\u002F\u002F Order lifecycle\n",[525,1950,1951],{"class":527,"line":534},[525,1952,1085],{},[525,1954,1955],{"class":527,"line":540},[525,1956,1090],{},[525,1958,1959],{"class":527,"line":546},[525,1960,1095],{},[525,1962,1963],{"class":527,"line":552},[525,1964,1100],{},[525,1966,1967],{"class":527,"line":558},[525,1968,1105],{},[525,1970,1971],{"class":527,"line":564},[525,1972,1110],{},[525,1974,1975],{"class":527,"line":570},[525,1976,1115],{},[525,1978,1979],{"class":527,"line":576},[525,1980,1120],{},[525,1982,1983],{"class":527,"line":582},[525,1984,1125],{},[525,1986,1987],{"class":527,"line":946},[525,1988,1130],{},[525,1990,1991],{"class":527,"line":952},[525,1992,943],{"emptyLinePlaceholder":942},[525,1994,1995],{"class":527,"line":957},[525,1996,1997],{},"event OrderFilled(\n",[525,1999,2000],{"class":527,"line":962},[525,2001,1090],{},[525,2003,2004],{"class":527,"line":967},[525,2005,2006],{},"    address indexed solver,\n",[525,2008,2009],{"class":527,"line":972},[525,2010,2011],{},"    uint128 amountInToRelease,\n",[525,2013,2014],{"class":527,"line":978},[525,2015,2016],{},"    uint128 amountOutFilled\n",[525,2018,2020],{"class":527,"line":2019},18,[525,2021,1130],{},[525,2023,2025],{"class":527,"line":2024},19,[525,2026,943],{"emptyLinePlaceholder":942},[525,2028,2030],{"class":527,"line":2029},20,[525,2031,2032],{},"event OrderCompleted(bytes32 orderId);\n",[525,2034,2036],{"class":527,"line":2035},21,[525,2037,943],{"emptyLinePlaceholder":942},[525,2039,2041],{"class":527,"line":2040},22,[525,2042,2043],{},"\u002F\u002F Cancellation\n",[525,2045,2047],{"class":527,"line":2046},23,[525,2048,2049],{},"event CancelRequested(bytes32 indexed orderId, uint32 cancelRequestedAt);\n",[525,2051,2053],{"class":527,"line":2052},24,[525,2054,943],{"emptyLinePlaceholder":942},[525,2056,2058],{"class":527,"line":2057},25,[525,2059,2060],{},"event RefundClaimed(\n",[525,2062,2064],{"class":527,"line":2063},26,[525,2065,1090],{},[525,2067,2069],{"class":527,"line":2068},27,[525,2070,2071],{},"    address indexed sender,\n",[525,2073,2075],{"class":527,"line":2074},28,[525,2076,2077],{},"    uint128 amountInRefunded\n",[525,2079,2081],{"class":527,"line":2080},29,[525,2082,1130],{},[525,2084,2086],{"class":527,"line":2085},30,[525,2087,943],{"emptyLinePlaceholder":942},[525,2089,2091],{"class":527,"line":2090},31,[525,2092,2093],{},"\u002F\u002F Configuration\n",[525,2095,2097],{"class":527,"line":2096},32,[525,2098,2099],{},"event DestinationConfigUpdated(\n",[525,2101,2103],{"class":527,"line":2102},33,[525,2104,1110],{},[525,2106,2108],{"class":527,"line":2107},34,[525,2109,2110],{},"    bool newIsSupported,\n",[525,2112,2114],{"class":527,"line":2113},35,[525,2115,2116],{},"    uint32 newFinalityBuffer,\n",[525,2118,2120],{"class":527,"line":2119},36,[525,2121,2122],{},"    uint64 newFinalityBufferEffectiveTimestamp\n",[525,2124,2126],{"class":527,"line":2125},37,[525,2127,1130],{},[270,2129,2131],{"id":2130},"error-codes","Error Codes",[418,2133,2134,2143],{},[421,2135,2136],{},[424,2137,2138,2141],{},[427,2139,2140],{},"Error",[427,2142,432],{},[434,2144,2145,2155,2165,2175,2185,2195,2205,2215,2225,2235,2245,2255,2265,2275,2285,2295,2305],{},[424,2146,2147,2152],{},[439,2148,2149],{},[305,2150,2151],{},"AmountInZero",[439,2153,2154],{},"Order input amount cannot be zero",[424,2156,2157,2162],{},[439,2158,2159],{},[305,2160,2161],{},"AmountOutZero",[439,2163,2164],{},"Order output amount cannot be zero",[424,2166,2167,2172],{},[439,2168,2169],{},[305,2170,2171],{},"FillAmountZero",[439,2173,2174],{},"Fill amount must be greater than zero",[424,2176,2177,2182],{},[439,2178,2179],{},[305,2180,2181],{},"FinalityPending",[439,2183,2184],{},"Finality buffer has not elapsed; cannot claim refund yet",[424,2186,2187,2192],{},[439,2188,2189],{},[305,2190,2191],{},"InvalidDeadline",[439,2193,2194],{},"Fill deadline is in the past or invalid",[424,2196,2197,2202],{},[439,2198,2199],{},[305,2200,2201],{},"InvalidDestinationChain",[439,2203,2204],{},"Destination chain is not supported",[424,2206,2207,2212],{},[439,2208,2209],{},[305,2210,2211],{},"InvalidFinalityBuffer",[439,2213,2214],{},"Finality buffer value is invalid",[424,2216,2217,2222],{},[439,2218,2219],{},[305,2220,2221],{},"InvalidNonce",[439,2223,2224],{},"Nonce doesn't match sender's expected nonce",[424,2226,2227,2232],{},[439,2228,2229],{},[305,2230,2231],{},"InvalidOrderStatus",[439,2233,2234],{},"Order is not in a valid status for this operation",[424,2236,2237,2242],{},[439,2238,2239],{},[305,2240,2241],{},"InvalidOrderVersion",[439,2243,2244],{},"Order version doesn't match contract version",[424,2246,2247,2252],{},[439,2248,2249],{},[305,2250,2251],{},"InvalidOriginChain",[439,2253,2254],{},"Origin chain ID doesn't match this chain",[424,2256,2257,2262],{},[439,2258,2259],{},[305,2260,2261],{},"InvalidRecipient",[439,2263,2264],{},"Recipient address is invalid",[424,2266,2267,2272],{},[439,2268,2269],{},[305,2270,2271],{},"InvalidReport",[439,2273,2274],{},"Fill report data is invalid",[424,2276,2277,2282],{},[439,2278,2279],{},[305,2280,2281],{},"NotAuthorized",[439,2283,2284],{},"Caller is not authorized for this operation",[424,2286,2287,2292],{},[439,2288,2289],{},[305,2290,2291],{},"OrderExpired",[439,2293,2294],{},"Order fill deadline has passed",[424,2296,2297,2302],{},[439,2298,2299],{},[305,2300,2301],{},"OrderAlreadyFilled",[439,2303,2304],{},"Order has already been completely filled",[424,2306,2307,2312],{},[439,2308,2309],{},[305,2310,2311],{},"OrderIdMismatch",[439,2313,2314],{},"Computed order ID doesn't match provided ID",[270,2316,2318],{"id":2317},"related","Related",[282,2320,2321,2326,2331,2337,2342],{},[285,2322,2323,2325],{},[349,2324,154],{"href":155}," - Overview of M0's liquidity infrastructure",[285,2327,2328,2330],{},[349,2329,220],{"href":221}," - Cross-chain bridge and messaging system",[285,2332,2333,2336],{},[349,2334,2335],{"href":205},"M Portals (V1)"," - Previous portal architecture reference",[285,2338,2339,2341],{},[349,2340,53],{"href":54}," - API for requesting quotes and transaction payloads",[285,2343,2344,2349],{},[349,2345,2348],{"href":2346,"rel":2347},"https:\u002F\u002Fgithub.com\u002Fm0-foundation\u002Fliquidity-delivery",[1417],"Source Code"," - Smart contract repository",[516,2351,2353],{"className":2352,"code":521,"language":1372},[1370],[305,2354,521],{"__ignoreMap":521},[2356,2357,2358],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":521,"searchDepth":528,"depth":534,"links":2360},[2361,2364,2367,2374,2375,2376,2381,2388,2392,2400,2401,2402],{"id":272,"depth":534,"text":166,"children":2362},[2363],{"id":279,"depth":540,"text":280},{"id":326,"depth":534,"text":327,"children":2365},[2366],{"id":359,"depth":540,"text":360},{"id":401,"depth":534,"text":402,"children":2368},[2369,2370,2371,2372,2373],{"id":405,"depth":540,"text":406},{"id":611,"depth":540,"text":612},{"id":700,"depth":540,"text":701},{"id":722,"depth":540,"text":723},{"id":824,"depth":540,"text":825},{"id":854,"depth":534,"text":855},{"id":983,"depth":534,"text":984},{"id":1068,"depth":534,"text":1069,"children":2377},[2378,2379,2380],{"id":1133,"depth":540,"text":1134},{"id":1146,"depth":540,"text":1147},{"id":1153,"depth":540,"text":1154},{"id":1163,"depth":534,"text":1164,"children":2382},[2383,2384,2385,2386,2387],{"id":1167,"depth":540,"text":1168},{"id":1191,"depth":540,"text":1192},{"id":1320,"depth":540,"text":1321},{"id":1380,"depth":540,"text":1381},{"id":1398,"depth":540,"text":1399},{"id":1408,"depth":534,"text":1409,"children":2389},[2390,2391],{"id":1424,"depth":540,"text":1425},{"id":1540,"depth":540,"text":1541},{"id":1649,"depth":534,"text":1650,"children":2393},[2394,2395,2396,2397,2398,2399],{"id":1653,"depth":540,"text":1654},{"id":1691,"depth":540,"text":1692},{"id":1770,"depth":540,"text":1576},{"id":1842,"depth":540,"text":1347},{"id":1869,"depth":540,"text":1870},{"id":1910,"depth":540,"text":1911},{"id":1937,"depth":534,"text":1938},{"id":2130,"depth":534,"text":2131},{"id":2317,"depth":534,"text":2318},"Technical deep dive into M0's onchain settlement layer for trustless, intent-based token exchanges across chains with partial fills, gasless orders, and secure cancellation.","md",null,{},{"title":200,"description":2403},"OAAY30L4dR2K58IzDDd4KmrzE8t2yxLOnnT8AVaWs64",[2410,2412],{"title":196,"path":197,"stem":198,"description":2411,"children":-1},"Documentation of M0 Extensions, the application layer for building custom stablecoins on the M0 platform, including the SwapFacility for seamless 1:1 conversions.",{"title":204,"path":205,"stem":206,"description":2413,"children":-1},"Documentation of M0's cross-chain architecture, including the M Portal (Wormhole) and M Portal Lite (Hyperlane) implementations for bridging M across blockchains."]