@pufferfinance/puffer-sdk 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { B as p, g as m, s as y, d as w, i as k, c as O, a as E, e as L, H as h, b as x } from "./main-Cl9ZFxdC.js";
1
+ import { B as p, g as m, s as y, d as w, i as k, c as O, a as E, e as L, H as h, b as x } from "./main-DXvt8xU1.js";
2
2
  class M extends p {
3
3
  constructor({ callbackSelector: s, cause: e, data: n, extraData: c, sender: u, urls: t }) {
4
4
  var i;
@@ -155,4 +155,4 @@ export {
155
155
  S as offchainLookupAbiItem,
156
156
  j as offchainLookupSignature
157
157
  };
158
- //# sourceMappingURL=ccip-CzWPognK.js.map
158
+ //# sourceMappingURL=ccip-D9sqjqG8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ccip-CzWPognK.js","sources":["../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","data_","call","concat","encodeAbiParameters","err","error","i","method","body","response","HttpRequestError","isHex"],"mappings":";AAGO,MAAMA,UAA4BC,EAAU;AAAA,EAC/C,YAAY,EAAE,kBAAAC,GAAkB,OAAAC,GAAO,MAAAC,GAAM,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AACD;AAAA,MACH;AACD,UAAI,CAAC+B,EAAM5B,CAAM,GAAG;AAChB,QAAAsB,IAAQ,IAAIvB,EAAqC;AAAA,UAC7C,QAAAC;AAAA,UACA,KAAAH;AAAA,QACpB,CAAiB;AACD;AAAA,MACH;AACD,aAAOG;AAAA,IACV,SACMqB,GAAK;AACR,MAAAC,IAAQ,IAAIK,EAAiB;AAAA,QACzB,MAAAF;AAAA,QACA,SAASJ,EAAI;AAAA,QACb,KAAAxB;AAAA,MAChB,CAAa;AAAA,IACJ;AAAA,EACJ;AACD,QAAMyB;AACV;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ccip-D9sqjqG8.js","sources":["../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","data_","call","concat","encodeAbiParameters","err","error","i","method","body","response","HttpRequestError","isHex"],"mappings":";AAGO,MAAMA,UAA4BC,EAAU;AAAA,EAC/C,YAAY,EAAE,kBAAAC,GAAkB,OAAAC,GAAO,MAAAC,GAAM,WAAAC,GAAW,QAAAC,GAAQ,MAAAC,KAAS;;AACrE,UAAMJ,EAAM,gBACR,4DAA4D;AAAA,MAC5D,OAAAA;AAAA,MACA,cAAc;AAAA,QACV,GAAIA,EAAM,gBAAgB,CAAE;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D;AAAA,MACH;AACD,aAAOG;AAAA,IACV,SACMqB,GAAK;AACR,MAAAC,IAAQ,IAAIK,EAAiB;AAAA,QACzB,MAAAF;AAAA,QACA,SAASJ,EAAI;AAAA,QACb,KAAAxB;AAAA,MAChB,CAAa;AAAA,IACJ;AAAA,EACJ;AACD,QAAMyB;AACV;","x_google_ignoreList":[0,1]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main--Ww95s5e.cjs");class g extends e.BaseError{constructor({callbackSelector:o,cause:t,data:n,extraData:i,sender:f,urls:r}){var u;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(u=t.metaMessages)!=null&&u.length?"":[],"Offchain Gateway Call:",r&&[" Gateway URL(s):",...r.map(l=>` ${e.getUrl(l)}`)],` Sender: ${f}`,` Data: ${n}`,` Callback selector: ${o}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:o,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(o)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class k extends e.BaseError{constructor({sender:o,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${o}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}const O="0x556f1830",h={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 E(c,{blockNumber:o,blockTag:t,data:n,to:i}){const{args:f}=e.decodeErrorResult({data:n,abi:[h]}),[r,u,l,a,s]=f,{ccipRead:d}=c,y=d&&typeof(d==null?void 0:d.request)=="function"?d.request:m;try{if(!e.isAddressEqual(i,r))throw new k({sender:r,to:i});const p=await y({data:l,sender:r,urls:u}),{data:b}=await e.call(c,{blockNumber:o,blockTag:t,data:e.concat([a,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return b}catch(p){throw new g({callbackSelector:a,cause:p,data:n,extraData:s,sender:r,urls:u})}}async function m({data:c,sender:o,urls:t}){var i;let n=new Error("An unknown error occurred.");for(let f=0;f<t.length;f++){const r=t[f],u=r.includes("{data}")?"GET":"POST",l=u==="POST"?{data:c,sender:o}:void 0;try{const a=await fetch(r.replace("{sender}",o).replace("{data}",c),{body:JSON.stringify(l),method:u});let s;if((i=a.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await a.json()).data:s=await a.text(),!a.ok){n=new e.HttpRequestError({body:l,details:s!=null&&s.error?e.stringify(s.error):a.statusText,headers:a.headers,status:a.status,url:r});continue}if(!e.isHex(s)){n=new w({result:s,url:r});continue}return s}catch(a){n=new e.HttpRequestError({body:l,details:a.message,url:r})}}throw n}exports.ccipRequest=m;exports.offchainLookup=E;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=O;
2
- //# sourceMappingURL=ccip-DNUqn1xf.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-BqWpl7pY.cjs");class g extends e.BaseError{constructor({callbackSelector:o,cause:t,data:n,extraData:i,sender:f,urls:r}){var u;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(u=t.metaMessages)!=null&&u.length?"":[],"Offchain Gateway Call:",r&&[" Gateway URL(s):",...r.map(l=>` ${e.getUrl(l)}`)],` Sender: ${f}`,` Data: ${n}`,` Callback selector: ${o}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:o,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(o)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class k extends e.BaseError{constructor({sender:o,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${o}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}const O="0x556f1830",h={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 E(c,{blockNumber:o,blockTag:t,data:n,to:i}){const{args:f}=e.decodeErrorResult({data:n,abi:[h]}),[r,u,l,a,s]=f,{ccipRead:d}=c,y=d&&typeof(d==null?void 0:d.request)=="function"?d.request:m;try{if(!e.isAddressEqual(i,r))throw new k({sender:r,to:i});const p=await y({data:l,sender:r,urls:u}),{data:b}=await e.call(c,{blockNumber:o,blockTag:t,data:e.concat([a,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return b}catch(p){throw new g({callbackSelector:a,cause:p,data:n,extraData:s,sender:r,urls:u})}}async function m({data:c,sender:o,urls:t}){var i;let n=new Error("An unknown error occurred.");for(let f=0;f<t.length;f++){const r=t[f],u=r.includes("{data}")?"GET":"POST",l=u==="POST"?{data:c,sender:o}:void 0;try{const a=await fetch(r.replace("{sender}",o).replace("{data}",c),{body:JSON.stringify(l),method:u});let s;if((i=a.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await a.json()).data:s=await a.text(),!a.ok){n=new e.HttpRequestError({body:l,details:s!=null&&s.error?e.stringify(s.error):a.statusText,headers:a.headers,status:a.status,url:r});continue}if(!e.isHex(s)){n=new w({result:s,url:r});continue}return s}catch(a){n=new e.HttpRequestError({body:l,details:a.message,url:r})}}throw n}exports.ccipRequest=m;exports.offchainLookup=E;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=O;
2
+ //# sourceMappingURL=ccip-x56ET8k8.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ccip-DNUqn1xf.cjs","sources":["../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","data_","call","concat","encodeAbiParameters","err","error","i","method","body","response","HttpRequestError","isHex"],"mappings":"uHAGO,MAAMA,UAA4BC,EAAAA,SAAU,CAC/C,YAAY,CAAE,iBAAAC,EAAkB,MAAAC,EAAO,KAAAC,EAAM,UAAAC,EAAW,OAAAC,EAAQ,KAAAC,GAAS,OACrE,MAAMJ,EAAM,cACR,2DAA4D,CAC5D,MAAAA,EACA,aAAc,CACV,GAAIA,EAAM,cAAgB,CAAE,GAC5BK,EAAAL,EAAM,eAAN,MAAAK,EAAoB,OAAS,GAAK,CAAE,EACpC,yBACAD,GAAQ,CACJ,oBACA,GAAGA,EAAK,IAAKE,GAAQ,OAAOC,EAAM,OAACD,CAAG,CAAC,EAAE,CAC5C,EACD,aAAaH,CAAM,GACnB,WAAWF,CAAI,GACf,wBAAwBF,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IANIJ,EAAA8B,EAAS,QAAQ,IAAI,cAAc,IAAnC,MAAA9B,EAAsC,WAAW,oBACjDI,GAAU,MAAM0B,EAAS,KAAI,GAAI,KAGjC1B,EAAU,MAAM0B,EAAS,KAAI,EAE7B,CAACA,EAAS,GAAI,CACdJ,EAAQ,IAAIK,EAAAA,iBAAiB,CACzB,KAAAF,EACA,QAASzB,GAAA,MAAAA,EAAQ,MACXC,EAAS,UAACD,EAAO,KAAK,EACtB0B,EAAS,WACf,QAASA,EAAS,QAClB,OAAQA,EAAS,OACjB,IAAA7B,CACpB,CAAiB,EACD,QACH,CACD,GAAI,CAAC+B,EAAAA,MAAM5B,CAAM,EAAG,CAChBsB,EAAQ,IAAIvB,EAAqC,CAC7C,OAAAC,EACA,IAAAH,CACpB,CAAiB,EACD,QACH,CACD,OAAOG,CACV,OACMqB,EAAK,CACRC,EAAQ,IAAIK,EAAAA,iBAAiB,CACzB,KAAAF,EACA,QAASJ,EAAI,QACb,IAAAxB,CAChB,CAAa,CACJ,CACJ,CACD,MAAMyB,CACV","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ccip-x56ET8k8.cjs","sources":["../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","data_","call","concat","encod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readonly name: "";
155
155
  readonly type: "bool";
156
+ /**
157
+ * Set the token to use for executing transactions on the contract.
158
+ *
159
+ * @param token Token to use for the handler.
160
+ * @returns The handler.
161
+ */
156
162
  readonly internalType: "bool";
157
163
  }];
158
164
  readonly stateMutability: "nonpayable";
@@ -549,6 +555,12 @@ export declare class ERC20PermitHandler {
549
555
  readonly outputs: readonly [{
550
556
  readonly name: "";
551
557
  readonly type: "bool";
558
+ /**
559
+ * Set the token to use for executing transactions on the contract.
560
+ *
561
+ * @param token Token to use for the handler.
562
+ * @returns The handler.
563
+ */
552
564
  readonly internalType: "bool";
553
565
  }];
554
566
  readonly stateMutability: "nonpayable";
@@ -945,6 +957,12 @@ export declare class ERC20PermitHandler {
945
957
  readonly outputs: readonly [{
946
958
  readonly name: "";
947
959
  readonly type: "bool";
960
+ /**
961
+ * Set the token to use for executing transactions on the contract.
962
+ *
963
+ * @param token Token to use for the handler.
964
+ * @returns The handler.
965
+ */
948
966
  readonly internalType: "bool";
949
967
  }];
950
968
  readonly stateMutability: "nonpayable";
@@ -1341,6 +1359,12 @@ export declare class ERC20PermitHandler {
1341
1359
  readonly outputs: readonly [{
1342
1360
  readonly name: "";
1343
1361
  readonly type: "bool";
1362
+ /**
1363
+ * Set the token to use for executing transactions on the contract.
1364
+ *
1365
+ * @param token Token to use for the handler.
1366
+ * @returns The handler.
1367
+ */
1344
1368
  readonly internalType: "bool";
1345
1369
  }];
1346
1370
  readonly stateMutability: "nonpayable";
@@ -1738,6 +1762,12 @@ export declare class ERC20PermitHandler {
1738
1762
  readonly outputs: readonly [{
1739
1763
  readonly name: "";
1740
1764
  readonly type: "bool";
1765
+ /**
1766
+ * Set the token to use for executing transactions on the contract.
1767
+ *
1768
+ * @param token Token to use for the handler.
1769
+ * @returns The handler.
1770
+ */
1741
1771
  readonly internalType: "bool";
1742
1772
  }];
1743
1773
  readonly stateMutability: "nonpayable";
@@ -2134,6 +2164,12 @@ export declare class ERC20PermitHandler {
2134
2164
  readonly outputs: readonly [{
2135
2165
  readonly name: "";
2136
2166
  readonly type: "bool";
2167
+ /**
2168
+ * Set the token to use for executing transactions on the contract.
2169
+ *
2170
+ * @param token Token to use for the handler.
2171
+ * @returns The handler.
2172
+ */
2137
2173
  readonly internalType: "bool";
2138
2174
  }];
2139
2175
  readonly stateMutability: "nonpayable";
@@ -2530,6 +2566,12 @@ export declare class ERC20PermitHandler {
2530
2566
  readonly outputs: readonly [{
2531
2567
  readonly name: "";
2532
2568
  readonly type: "bool";
2569
+ /**
2570
+ * Set the token to use for executing transactions on the contract.
2571
+ *
2572
+ * @param token Token to use for the handler.
2573
+ * @returns The handler.
2574
+ */
2533
2575
  readonly internalType: "bool";
2534
2576
  }];
2535
2577
  readonly stateMutability: "nonpayable";
@@ -2926,6 +2968,12 @@ export declare class ERC20PermitHandler {
2926
2968
  readonly outputs: readonly [{
2927
2969
  readonly name: "";
2928
2970
  readonly type: "bool";
2971
+ /**
2972
+ * Set the token to use for executing transactions on the contract.
2973
+ *
2974
+ * @param token Token to use for the handler.
2975
+ * @returns The handler.
2976
+ */
2929
2977
  readonly internalType: "bool";
2930
2978
  }];
2931
2979
  readonly stateMutability: "nonpayable";
@@ -3324,6 +3372,12 @@ export declare class ERC20PermitHandler {
3324
3372
  readonly outputs: readonly [{
3325
3373
  readonly name: "";
3326
3374
  readonly type: "bool";
3375
+ /**
3376
+ * Set the token to use for executing transactions on the contract.
3377
+ *
3378
+ * @param token Token to use for the handler.
3379
+ * @returns The handler.
3380
+ */
3327
3381
  readonly internalType: "bool";
3328
3382
  }];
3329
3383
  readonly stateMutability: "nonpayable";
@@ -3719,6 +3773,12 @@ export declare class ERC20PermitHandler {
3719
3773
  readonly outputs: readonly [{
3720
3774
  readonly name: "";
3721
3775
  readonly type: "bool";
3776
+ /**
3777
+ * Set the token to use for executing transactions on the contract.
3778
+ *
3779
+ * @param token Token to use for the handler.
3780
+ * @returns The handler.
3781
+ */
3722
3782
  readonly internalType: "bool";
3723
3783
  }];
3724
3784
  readonly stateMutability: "nonpayable";
@@ -4115,6 +4175,12 @@ export declare class ERC20PermitHandler {
4115
4175
  readonly outputs: readonly [{
4116
4176
  readonly name: "";
4117
4177
  readonly type: "bool";
4178
+ /**
4179
+ * Set the token to use for executing transactions on the contract.
4180
+ *
4181
+ * @param token Token to use for the handler.
4182
+ * @returns The handler.
4183
+ */
4118
4184
  readonly internalType: "bool";
4119
4185
  }];
4120
4186
  readonly stateMutability: "nonpayable";
@@ -4510,6 +4576,12 @@ export declare class ERC20PermitHandler {
4510
4576
  readonly outputs: readonly [{
4511
4577
  readonly name: "";
4512
4578
  readonly type: "bool";
4579
+ /**
4580
+ * Set the token to use for executing transactions on the contract.
4581
+ *
4582
+ * @param token Token to use for the handler.
4583
+ * @returns The handler.
4584
+ */
4513
4585
  readonly internalType: "bool";
4514
4586
  }];
4515
4587
  readonly stateMutability: "nonpayable";
@@ -4906,6 +4978,12 @@ export declare class ERC20PermitHandler {
4906
4978
  readonly outputs: readonly [{
4907
4979
  readonly name: "";
4908
4980
  readonly type: "bool";
4981
+ /**
4982
+ * Set the token to use for executing transactions on the contract.
4983
+ *
4984
+ * @param token Token to use for the handler.
4985
+ * @returns The handler.
4986
+ */
4909
4987
  readonly internalType: "bool";
4910
4988
  }];
4911
4989
  readonly stateMutability: "nonpayable";
@@ -5301,6 +5379,12 @@ export declare class ERC20PermitHandler {
5301
5379
  readonly outputs: readonly [{
5302
5380
  readonly name: "";
5303
5381
  readonly type: "bool";
5382
+ /**
5383
+ * Set the token to use for executing transactions on the contract.
5384
+ *
5385
+ * @param token Token to use for the handler.
5386
+ * @returns The handler.
5387
+ */
5304
5388
  readonly internalType: "bool";
5305
5389
  }];
5306
5390
  readonly stateMutability: "nonpayable";
@@ -5697,6 +5781,12 @@ export declare class ERC20PermitHandler {
5697
5781
  readonly outputs: readonly [{
5698
5782
  readonly name: "";
5699
5783
  readonly type: "bool";
5784
+ /**
5785
+ * Set the token to use for executing transactions on the contract.
5786
+ *
5787
+ * @param token Token to use for the handler.
5788
+ * @returns The handler.
5789
+ */
5700
5790
  readonly internalType: "bool";
5701
5791
  }];
5702
5792
  readonly stateMutability: "nonpayable";
@@ -6092,6 +6182,12 @@ export declare class ERC20PermitHandler {
6092
6182
  readonly outputs: readonly [{
6093
6183
  readonly name: "";
6094
6184
  readonly type: "bool";
6185
+ /**
6186
+ * Set the token to use for executing transactions on the contract.
6187
+ *
6188
+ * @param token Token to use for the handler.
6189
+ * @returns The handler.
6190
+ */
6095
6191
  readonly internalType: "bool";
6096
6192
  }];
6097
6193
  readonly stateMutability: "nonpayable";
@@ -6507,6 +6603,12 @@ export declare class ERC20PermitHandler {
6507
6603
  readonly outputs: readonly [{
6508
6604
  readonly name: "";
6509
6605
  readonly type: "bool";
6606
+ /**
6607
+ * Set the token to use for executing transactions on the contract.
6608
+ *
6609
+ * @param token Token to use for the handler.
6610
+ * @returns The handler.
6611
+ */
6510
6612
  readonly internalType: "bool";
6511
6613
  }];
6512
6614
  readonly stateMutability: "nonpayable";
@@ -6908,6 +7010,12 @@ export declare class ERC20PermitHandler {
6908
7010
  readonly outputs: readonly [{
6909
7011
  readonly name: "";
6910
7012
  readonly type: "bool";
7013
+ /**
7014
+ * Set the token to use for executing transactions on the contract.
7015
+ *
7016
+ * @param token Token to use for the handler.
7017
+ * @returns The handler.
7018
+ */
6911
7019
  readonly internalType: "bool";
6912
7020
  }];
6913
7021
  readonly stateMutability: "nonpayable";
@@ -7321,6 +7429,12 @@ export declare class ERC20PermitHandler {
7321
7429
  readonly outputs: readonly [{
7322
7430
  readonly name: "";
7323
7431
  readonly type: "bool";
7432
+ /**
7433
+ * Set the token to use for executing transactions on the contract.
7434
+ *
7435
+ * @param token Token to use for the handler.
7436
+ * @returns The handler.
7437
+ */
7324
7438
  readonly internalType: "bool";
7325
7439
  }];
7326
7440
  readonly stateMutability: "nonpayable";
@@ -7727,6 +7841,12 @@ export declare class ERC20PermitHandler {
7727
7841
  readonly outputs: readonly [{
7728
7842
  readonly name: "";
7729
7843
  readonly type: "bool";
7844
+ /**
7845
+ * Set the token to use for executing transactions on the contract.
7846
+ *
7847
+ * @param token Token to use for the handler.
7848
+ * @returns The handler.
7849
+ */
7730
7850
  readonly internalType: "bool";
7731
7851
  }];
7732
7852
  readonly stateMutability: "nonpayable";
@@ -8128,6 +8248,12 @@ export declare class ERC20PermitHandler {
8128
8248
  readonly outputs: readonly [{
8129
8249
  readonly name: "";
8130
8250
  readonly type: "bool";
8251
+ /**
8252
+ * Set the token to use for executing transactions on the contract.
8253
+ *
8254
+ * @param token Token to use for the handler.
8255
+ * @returns The handler.
8256
+ */
8131
8257
  readonly internalType: "bool";
8132
8258
  }];
8133
8259
  readonly stateMutability: "nonpayable";
@@ -8532,6 +8658,12 @@ export declare class ERC20PermitHandler {
8532
8658
  readonly outputs: readonly [{
8533
8659
  readonly name: "";
8534
8660
  readonly type: "bool";
8661
+ /**
8662
+ * Set the token to use for executing transactions on the contract.
8663
+ *
8664
+ * @param token Token to use for the handler.
8665
+ * @returns The handler.
8666
+ */
8535
8667
  readonly internalType: "bool";
8536
8668
  }];
8537
8669
  readonly stateMutability: "nonpayable";
@@ -8939,6 +9071,12 @@ export declare class ERC20PermitHandler {
8939
9071
  readonly outputs: readonly [{
8940
9072
  readonly name: "";
8941
9073
  readonly type: "bool";
9074
+ /**
9075
+ * Set the token to use for executing transactions on the contract.
9076
+ *
9077
+ * @param token Token to use for the handler.
9078
+ * @returns The handler.
9079
+ */
8942
9080
  readonly internalType: "bool";
8943
9081
  }];
8944
9082
  readonly stateMutability: "nonpayable";
@@ -9343,6 +9481,12 @@ export declare class ERC20PermitHandler {
9343
9481
  readonly outputs: readonly [{
9344
9482
  readonly name: "";
9345
9483
  readonly type: "bool";
9484
+ /**
9485
+ * Set the token to use for executing transactions on the contract.
9486
+ *
9487
+ * @param token Token to use for the handler.
9488
+ * @returns The handler.
9489
+ */
9346
9490
  readonly internalType: "bool";
9347
9491
  }];
9348
9492
  readonly stateMutability: "nonpayable";
@@ -9750,6 +9894,12 @@ export declare class ERC20PermitHandler {
9750
9894
  readonly outputs: readonly [{
9751
9895
  readonly name: "";
9752
9896
  readonly type: "bool";
9897
+ /**
9898
+ * Set the token to use for executing transactions on the contract.
9899
+ *
9900
+ * @param token Token to use for the handler.
9901
+ * @returns The handler.
9902
+ */
9753
9903
  readonly internalType: "bool";
9754
9904
  }];
9755
9905
  readonly stateMutability: "nonpayable";
@@ -10150,6 +10300,12 @@ export declare class ERC20PermitHandler {
10150
10300
  readonly outputs: readonly [{
10151
10301
  readonly name: "";
10152
10302
  readonly type: "bool";
10303
+ /**
10304
+ * Set the token to use for executing transactions on the contract.
10305
+ *
10306
+ * @param token Token to use for the handler.
10307
+ * @returns The handler.
10308
+ */
10153
10309
  readonly internalType: "bool";
10154
10310
  }];
10155
10311
  readonly stateMutability: "nonpayable";
@@ -10545,6 +10701,12 @@ export declare class ERC20PermitHandler {
10545
10701
  readonly outputs: readonly [{
10546
10702
  readonly name: "";
10547
10703
  readonly type: "bool";
10704
+ /**
10705
+ * Set the token to use for executing transactions on the contract.
10706
+ *
10707
+ * @param token Token to use for the handler.
10708
+ * @returns The handler.
10709
+ */
10548
10710
  readonly internalType: "bool";
10549
10711
  }];
10550
10712
  readonly stateMutability: "nonpayable";
@@ -10941,6 +11103,12 @@ export declare class ERC20PermitHandler {
10941
11103
  readonly outputs: readonly [{
10942
11104
  readonly name: "";
10943
11105
  readonly type: "bool";
11106
+ /**
11107
+ * Set the token to use for executing transactions on the contract.
11108
+ *
11109
+ * @param token Token to use for the handler.
11110
+ * @returns The handler.
11111
+ */
10944
11112
  readonly internalType: "bool";
10945
11113
  }];
10946
11114
  readonly stateMutability: "nonpayable";
@@ -11336,6 +11504,12 @@ export declare class ERC20PermitHandler {
11336
11504
  readonly outputs: readonly [{
11337
11505
  readonly name: "";
11338
11506
  readonly type: "bool";
11507
+ /**
11508
+ * Set the token to use for executing transactions on the contract.
11509
+ *
11510
+ * @param token Token to use for the handler.
11511
+ * @returns The handler.
11512
+ */
11339
11513
  readonly internalType: "bool";
11340
11514
  }];
11341
11515
  readonly stateMutability: "nonpayable";
@@ -11732,6 +11906,12 @@ export declare class ERC20PermitHandler {
11732
11906
  readonly outputs: readonly [{
11733
11907
  readonly name: "";
11734
11908
  readonly type: "bool";
11909
+ /**
11910
+ * Set the token to use for executing transactions on the contract.
11911
+ *
11912
+ * @param token Token to use for the handler.
11913
+ * @returns The handler.
11914
+ */
11735
11915
  readonly internalType: "bool";
11736
11916
  }];
11737
11917
  readonly stateMutability: "nonpayable";
@@ -12127,6 +12307,12 @@ export declare class ERC20PermitHandler {
12127
12307
  readonly outputs: readonly [{
12128
12308
  readonly name: "";
12129
12309
  readonly type: "bool";
12310
+ /**
12311
+ * Set the token to use for executing transactions on the contract.
12312
+ *
12313
+ * @param token Token to use for the handler.
12314
+ * @returns The handler.
12315
+ */
12130
12316
  readonly internalType: "bool";
12131
12317
  }];
12132
12318
  readonly stateMutability: "nonpayable";
@@ -12523,6 +12709,12 @@ export declare class ERC20PermitHandler {
12523
12709
  readonly outputs: readonly [{
12524
12710
  readonly name: "";
12525
12711
  readonly type: "bool";
12712
+ /**
12713
+ * Set the token to use for executing transactions on the contract.
12714
+ *
12715
+ * @param token Token to use for the handler.
12716
+ * @returns The handler.
12717
+ */
12526
12718
  readonly internalType: "bool";
12527
12719
  }];
12528
12720
  readonly stateMutability: "nonpayable";
@@ -12918,6 +13110,12 @@ export declare class ERC20PermitHandler {
12918
13110
  readonly outputs: readonly [{
12919
13111
  readonly name: "";
12920
13112
  readonly type: "bool";
13113
+ /**
13114
+ * Set the token to use for executing transactions on the contract.
13115
+ *
13116
+ * @param token Token to use for the handler.
13117
+ * @returns The handler.
13118
+ */
12921
13119
  readonly internalType: "bool";
12922
13120
  }];
12923
13121
  readonly stateMutability: "nonpayable";
@@ -13316,6 +13514,12 @@ export declare class ERC20PermitHandler {
13316
13514
  readonly outputs: readonly [{
13317
13515
  readonly name: "";
13318
13516
  readonly type: "bool";
13517
+ /**
13518
+ * Set the token to use for executing transactions on the contract.
13519
+ *
13520
+ * @param token Token to use for the handler.
13521
+ * @returns The handler.
13522
+ */
13319
13523
  readonly internalType: "bool";
13320
13524
  }];
13321
13525
  readonly stateMutability: "nonpayable";