vendor: 2,778 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9862],{49862:function(e,a,t){t.d(a,{offchainLookup:function(){return g},offchainLookupSignature:function(){return w}});var s=t(65409),r=t(50636),n=t(98840),o=t(80125);class c extends n.G{constructor({callbackSelector:e,cause:a,data:t,extraData:s,sender:r,urls:n}){super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],a.metaMessages?.length?"":[],"Offchain Gateway Call:",n&&[" Gateway URL(s):",...n.map(e=>` ${(0,o.G)(e)}`)],` Sender: ${r}`,` Data: ${t}`,` Callback selector: ${e}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class d extends n.G{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,o.G)(a)}`,`Response: ${(0,r.P)(e)}`],name:"OffchainLookupResponseMalformedError"})}}class u extends n.G{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}var l=t(92925),i=t(28392),f=t(7127),p=t(37627),h=t(50121),y=t(92735),m=t(48738);let w="0x556f1830",b={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 g(e,{blockNumber:a,blockTag:t,data:r,to:n}){let{args:o}=(0,i.p)({data:r,abi:[b]}),[d,l,y,w,g]=o,{ccipRead:x}=e,G=x&&"function"==typeof x?.request?x.request:k;try{if(!(0,p.E)(n,d))throw new u({sender:d,to:n});let r=l.includes(m.M)?await (0,m.w)({data:y,ccipRequest:G}):await G({data:y,sender:d,urls:l}),{data:o}=await (0,s.R)(e,{blockNumber:a,blockTag:t,data:(0,h.zo)([w,(0,f.E)([{type:"bytes"},{type:"bytes"}],[r,g])]),to:n});return o}catch(e){throw new c({callbackSelector:w,cause:e,data:r,extraData:g,sender:d,urls:l})}}async function k({data:e,sender:a,urls:t}){let s=Error("An unknown error occurred.");for(let n=0;n<t.length;n++){let o=t[n],c=o.includes("{data}")?"GET":"POST",u="POST"===c?{data:e,sender:a}:void 0,i="POST"===c?{"Content-Type":"application/json"}:{};try{let t;let n=await fetch(o.replace("{sender}",a.toLowerCase()).replace("{data}",e),{body:JSON.stringify(u),headers:i,method:c});if(t=n.headers.get("Content-Type")?.startsWith("application/json")?(await n.json()).data:await n.text(),!n.ok){s=new l.Gg({body:u,details:t?.error?(0,r.P)(t.error):n.statusText,headers:n.headers,status:n.status,url:o});continue}if(!(0,y.v)(t)){s=new d({result:t,url:o});continue}return t}catch(e){s=new l.Gg({body:u,details:e.message,url:o})}}throw s}}}]);
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.