PageSourceSearch

https://inferno0x.com/assets/ccip-d8af78e6.js

js inferno0x.com collected 2026-10-08 23:03:43 UTC 2,845 bytes, 1 lines download raw bytes

1import{a$ as f,b0 as m,b1 as w,b2 as p,b3 as h,b4 as g,b5 as k,b6 as O,b7 as L,b8 as b,b9 as E}from"./index-fcdc5867.js";class x extends f{constructor({callbackSelector:e,cause:t,data:n,extraData:c,sender:d,urls:a}){var i;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(i=t.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",a&&["  Gateway URL(s):",...a.map(u=>`    ${m(u)}`)],`  Sender: ${d}`,`  Data: ${n}`,`  Callback selector: ${e}`,`  Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends f{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(t)}`,`Response: ${w(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class $ extends f{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function R(s,e){if(!p(s))throw new h({address:s});if(!p(e))throw new h({address:e});return s.toLowerCase()===e.toLowerCase()}const C="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function P(s,{blockNumber:e,blockTag:t,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[a,i,u,r,o]=d;try{if(!R(c,a))throw new $({sender:a,to:c});const l=await A({data:u,sender:a,urls:i}),{data:y}=await k(s,{blockNumber:e,blockTag:t,data:O([r,L([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return y}catch(l){throw new x({callbackSelector:r,cause:l,data:n,extraData:o,sender:a,urls:i})}}async function A({data:s,sender:e,urls:t}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d<t.length;d++){const a=t[d],i=a.includes("{sender}")||a.includes("{data}")?"GET":"POST",u=i==="POST"?{data:s,sender:e}:void 0;try{const r=await fetch(a.replace("{sender}",e).replace("{data}",s),{body:JSON.stringify(u),method:i});let o;if((c=r.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?o=(await r.json()).data:o=await r.text(),!r.ok){n=new b({body:u,details:w(o.error)||r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!E(o)){n=new M({result:o,url:a});continue}return o}catch(r){n=new b({body:u,details:r.message,url:a})}}throw n}export{A as ccipFetch,P as offchainLookup,S as offchainLookupAbiItem,C as offchainLookupSignature};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.