@pufferfinance/puffer-sdk 1.17.2 → 1.17.3

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.
Files changed (94) hide show
  1. package/dist/api/puffer-client-helpers.cjs +1 -1
  2. package/dist/api/puffer-client-helpers.js +3 -3
  3. package/dist/api/puffer-client.cjs +1 -1
  4. package/dist/api/puffer-client.js +2 -2
  5. package/dist/{ccip-DxZd6avE.js → ccip-BJ1xqhtz.js} +3 -3
  6. package/dist/{ccip-DxZd6avE.js.map → ccip-BJ1xqhtz.js.map} +1 -1
  7. package/dist/{ccip-KTVYuImW.cjs → ccip-BxmhlmqV.cjs} +2 -2
  8. package/dist/{ccip-KTVYuImW.cjs.map → ccip-BxmhlmqV.cjs.map} +1 -1
  9. package/dist/chains/constants.cjs +1 -1
  10. package/dist/chains/constants.d.ts +2 -1
  11. package/dist/chains/constants.js +1 -1
  12. package/dist/{constants-Bsa7cnXP.cjs → constants-B96CDi8I.cjs} +9 -9
  13. package/dist/constants-B96CDi8I.cjs.map +1 -0
  14. package/dist/{constants-DtzphQjb.js → constants-Bw9JXSap.js} +478 -432
  15. package/dist/constants-Bw9JXSap.js.map +1 -0
  16. package/dist/contracts/addresses.cjs +1 -1
  17. package/dist/contracts/addresses.js +1 -1
  18. package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
  19. package/dist/contracts/handlers/carrot-staking-handler.d.ts +2 -2
  20. package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
  21. package/dist/contracts/handlers/concrete-vault-handler.cjs +1 -1
  22. package/dist/contracts/handlers/concrete-vault-handler.d.ts +2 -2
  23. package/dist/contracts/handlers/concrete-vault-handler.js +2 -2
  24. package/dist/contracts/handlers/distributor-handler.cjs +1 -1
  25. package/dist/contracts/handlers/distributor-handler.d.ts +2 -2
  26. package/dist/contracts/handlers/distributor-handler.js +2 -2
  27. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  28. package/dist/contracts/handlers/erc20-permit-handler.d.ts +2 -2
  29. package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
  30. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  31. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +2 -2
  32. package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
  33. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  34. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +2 -2
  35. package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
  36. package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
  37. package/dist/contracts/handlers/mtw-carrot-handler.d.ts +2 -2
  38. package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
  39. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  40. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +2 -2
  41. package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
  42. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  43. package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +2 -2
  44. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
  45. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  46. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +2 -2
  47. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
  48. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  49. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +2 -2
  50. package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
  51. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  52. package/dist/contracts/handlers/puf-locker-handler.d.ts +2 -2
  53. package/dist/contracts/handlers/puf-locker-handler.js +2 -2
  54. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  55. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +2 -2
  56. package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
  57. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  58. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +2 -2
  59. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
  60. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  61. package/dist/contracts/handlers/puffer-vault-handler.d.ts +2 -2
  62. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  63. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  64. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +2 -2
  65. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
  66. package/dist/contracts/tokens.cjs +1 -1
  67. package/dist/contracts/tokens.cjs.map +1 -1
  68. package/dist/contracts/tokens.js +6 -4
  69. package/dist/contracts/tokens.js.map +1 -1
  70. package/dist/contracts/vaults-addresses.cjs +1 -1
  71. package/dist/contracts/vaults-addresses.js +1 -1
  72. package/dist/{createWalletClient-DveM0zMc.js → createWalletClient-CsOHhabf.js} +4 -4
  73. package/dist/{createWalletClient-DveM0zMc.js.map → createWalletClient-CsOHhabf.js.map} +1 -1
  74. package/dist/{createWalletClient-Cxvyuh55.cjs → createWalletClient-usZXff24.cjs} +2 -2
  75. package/dist/{createWalletClient-Cxvyuh55.cjs.map → createWalletClient-usZXff24.cjs.map} +1 -1
  76. package/dist/{getContract-Ck0plC0s.js → getContract-8WqQMpYW.js} +2 -2
  77. package/dist/{getContract-Ck0plC0s.js.map → getContract-8WqQMpYW.js.map} +1 -1
  78. package/dist/{getContract-Z5RjOH18.cjs → getContract-Bzdkp3oE.cjs} +2 -2
  79. package/dist/{getContract-Z5RjOH18.cjs.map → getContract-Bzdkp3oE.cjs.map} +1 -1
  80. package/dist/main.cjs +1 -1
  81. package/dist/main.js +1 -1
  82. package/dist/{secp256k1-BWuyf2aG.cjs → secp256k1-BCRN0kWE.cjs} +2 -2
  83. package/dist/{secp256k1-BWuyf2aG.cjs.map → secp256k1-BCRN0kWE.cjs.map} +1 -1
  84. package/dist/{secp256k1-48Xl94oi.js → secp256k1-YxK0LcBT.js} +2 -2
  85. package/dist/{secp256k1-48Xl94oi.js.map → secp256k1-YxK0LcBT.js.map} +1 -1
  86. package/dist/utils/version.cjs +1 -1
  87. package/dist/utils/version.js +1 -1
  88. package/dist/{writeContract-CynQLeZV.js → writeContract-CYCoIOLc.js} +4 -4
  89. package/dist/{writeContract-CynQLeZV.js.map → writeContract-CYCoIOLc.js.map} +1 -1
  90. package/dist/{writeContract-D5BxbWBy.cjs → writeContract-D_ETLOw6.cjs} +3 -3
  91. package/dist/{writeContract-D5BxbWBy.cjs.map → writeContract-D_ETLOw6.cjs.map} +1 -1
  92. package/package.json +1 -1
  93. package/dist/constants-Bsa7cnXP.cjs.map +0 -1
  94. package/dist/constants-DtzphQjb.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../constants-Bsa7cnXP.cjs"),g=require("../createWalletClient-Cxvyuh55.cjs"),E=require("../writeContract-D5BxbWBy.cjs");function S(n,e={}){const{key:l="custom",methods:h,name:i="Custom Provider",retryDelay:w}=e;return({retryCount:p})=>g.createTransport({key:l,methods:h,name:i,request:n.request.bind(n),retryCount:e.retryCount??p,retryDelay:w,type:"custom"})}function v(n,e={}){const{key:l="fallback",name:h="Fallback",rank:i=!1,shouldThrow:w=P,retryCount:p,retryDelay:q}=e;return({chain:d,pollingInterval:_=4e3,timeout:o,...T})=>{let u=n,b=()=>{};const x=g.createTransport({key:l,name:h,async request({method:t,params:r}){let y;const f=async(a=0)=>{const m=u[a]({...T,chain:d,retryCount:0,timeout:o});try{const s=await m.request({method:t,params:r});return b({method:t,params:r,response:s,transport:m,status:"success"}),s}catch(s){if(b({error:s,method:t,params:r,transport:m,status:"error"}),w(s)||a===u.length-1||(y??(y=u.slice(a+1).some(c=>{const{include:C,exclude:M}=c({chain:d}).config.methods||{};return C?C.includes(t):M?!M.includes(t):!0})),!y))throw s;return f(a+1)}};return f()},retryCount:p,retryDelay:q,type:"fallback"},{onResponse:t=>b=t,transports:u.map(t=>t({chain:d,retryCount:0}))});if(i){const t=typeof i=="object"?i:{};W({chain:d,interval:t.interval??_,onTransports:r=>u=r,ping:t.ping,sampleCount:t.sampleCount,timeout:t.timeout,transports:u,weights:t.weights})}return x}}function P(n){return!!("code"in n&&typeof n.code=="number"&&(n.code===E.TransactionRejectedRpcError.code||n.code===E.UserRejectedRequestError.code||R.ExecutionRevertedError.nodeMessage.test(n.message)||n.code===5e3))}function W({chain:n,interval:e=4e3,onTransports:l,ping:h,sampleCount:i=10,timeout:w=1e3,transports:p,weights:q={}}){const{stability:d=.7,latency:_=.3}=q,o=[],T=async()=>{const u=await Promise.all(p.map(async t=>{const r=t({chain:n,retryCount:0,timeout:w}),y=Date.now();let f,a;try{await(h?h({transport:r}):r.request({method:"net_listening"})),a=1}catch{a=0}finally{f=Date.now()}return{latency:f-y,success:a}}));o.push(u),o.length>i&&o.shift();const b=Math.max(...o.map(t=>Math.max(...t.map(({latency:r})=>r)))),x=p.map((t,r)=>{const y=o.map(c=>c[r].latency),a=1-y.reduce((c,C)=>c+C,0)/y.length/b,m=o.map(c=>c[r].success),s=m.reduce((c,C)=>c+C,0)/m.length;return s===0?[0,r]:[_*a+d*s,r]}).sort((t,r)=>r[0]-t[0]);l(x.map(([,t])=>p[t])),await E.wait(e),T()};T()}class k{static createPublicClient(e){return g.createPublicClient({chain:R.VIEM_CHAINS[e.chain],transport:k.extractTransportConfig(e)})}static createWalletClient(e){return g.createWalletClient({chain:R.VIEM_CHAINS[e.chain],transport:k.extractTransportConfig(e)})}static extractTransportConfig(e){return"rpcUrls"in e?v(e.rpcUrls.map(l=>g.http(l))):S(e.provider,e.config)}}exports.PufferClientHelpers=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../constants-B96CDi8I.cjs"),g=require("../createWalletClient-usZXff24.cjs"),E=require("../writeContract-D_ETLOw6.cjs");function S(n,e={}){const{key:l="custom",methods:h,name:i="Custom Provider",retryDelay:w}=e;return({retryCount:p})=>g.createTransport({key:l,methods:h,name:i,request:n.request.bind(n),retryCount:e.retryCount??p,retryDelay:w,type:"custom"})}function v(n,e={}){const{key:l="fallback",name:h="Fallback",rank:i=!1,shouldThrow:w=P,retryCount:p,retryDelay:q}=e;return({chain:d,pollingInterval:_=4e3,timeout:o,...T})=>{let u=n,b=()=>{};const x=g.createTransport({key:l,name:h,async request({method:t,params:r}){let y;const f=async(a=0)=>{const m=u[a]({...T,chain:d,retryCount:0,timeout:o});try{const s=await m.request({method:t,params:r});return b({method:t,params:r,response:s,transport:m,status:"success"}),s}catch(s){if(b({error:s,method:t,params:r,transport:m,status:"error"}),w(s)||a===u.length-1||(y??(y=u.slice(a+1).some(c=>{const{include:C,exclude:M}=c({chain:d}).config.methods||{};return C?C.includes(t):M?!M.includes(t):!0})),!y))throw s;return f(a+1)}};return f()},retryCount:p,retryDelay:q,type:"fallback"},{onResponse:t=>b=t,transports:u.map(t=>t({chain:d,retryCount:0}))});if(i){const t=typeof i=="object"?i:{};W({chain:d,interval:t.interval??_,onTransports:r=>u=r,ping:t.ping,sampleCount:t.sampleCount,timeout:t.timeout,transports:u,weights:t.weights})}return x}}function P(n){return!!("code"in n&&typeof n.code=="number"&&(n.code===E.TransactionRejectedRpcError.code||n.code===E.UserRejectedRequestError.code||R.ExecutionRevertedError.nodeMessage.test(n.message)||n.code===5e3))}function W({chain:n,interval:e=4e3,onTransports:l,ping:h,sampleCount:i=10,timeout:w=1e3,transports:p,weights:q={}}){const{stability:d=.7,latency:_=.3}=q,o=[],T=async()=>{const u=await Promise.all(p.map(async t=>{const r=t({chain:n,retryCount:0,timeout:w}),y=Date.now();let f,a;try{await(h?h({transport:r}):r.request({method:"net_listening"})),a=1}catch{a=0}finally{f=Date.now()}return{latency:f-y,success:a}}));o.push(u),o.length>i&&o.shift();const b=Math.max(...o.map(t=>Math.max(...t.map(({latency:r})=>r)))),x=p.map((t,r)=>{const y=o.map(c=>c[r].latency),a=1-y.reduce((c,C)=>c+C,0)/y.length/b,m=o.map(c=>c[r].success),s=m.reduce((c,C)=>c+C,0)/m.length;return s===0?[0,r]:[_*a+d*s,r]}).sort((t,r)=>r[0]-t[0]);l(x.map(([,t])=>p[t])),await E.wait(e),T()};T()}class k{static createPublicClient(e){return g.createPublicClient({chain:R.VIEM_CHAINS[e.chain],transport:k.extractTransportConfig(e)})}static createWalletClient(e){return g.createWalletClient({chain:R.VIEM_CHAINS[e.chain],transport:k.extractTransportConfig(e)})}static extractTransportConfig(e){return"rpcUrls"in e?v(e.rpcUrls.map(l=>g.http(l))):S(e.provider,e.config)}}exports.PufferClientHelpers=k;
2
2
  //# sourceMappingURL=puffer-client-helpers.cjs.map
@@ -1,6 +1,6 @@
1
- import { E as v, V as q } from "../constants-DtzphQjb.js";
2
- import { b as E, a as D, c as M, h as U } from "../createWalletClient-DveM0zMc.js";
3
- import { T as W, U as j, l as L } from "../writeContract-CynQLeZV.js";
1
+ import { E as v, V as q } from "../constants-Bw9JXSap.js";
2
+ import { b as E, a as D, c as M, h as U } from "../createWalletClient-CsOHhabf.js";
3
+ import { T as W, U as j, l as L } from "../writeContract-CYCoIOLc.js";
4
4
  function P(s, e = {}) {
5
5
  const { key: l = "custom", methods: h, name: i = "Custom Provider", retryDelay: w } = e;
6
6
  return ({ retryCount: p }) => E({
@@ -1,2 +1,2 @@
1
- "use strict";var s=Object.defineProperty;var u=(r,e,l)=>e in r?s(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l;var t=(r,e,l)=>u(r,typeof e!="symbol"?e+"":e,l);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../constants-Bsa7cnXP.cjs"),o=require("../contracts/handlers/puffer-vault-handler.cjs"),d=require("../contracts/handlers/puffer-depositor-handler.cjs"),h=require("../contracts/handlers/puffer-l2-depositor-handler.cjs"),w=require("../contracts/handlers/erc20-permit-handler.cjs"),C=require("../contracts/handlers/puf-locker-handler.cjs"),p=require("../contracts/handlers/l2-reward-manager-handler.cjs"),_=require("../contracts/handlers/l1-reward-manager-handler.cjs"),H=require("../contracts/handlers/puffer-withdrawal-manager-handler.cjs"),f=require("../contracts/handlers/nucleus-boring-vault-handler.cjs"),b=require("../contracts/handlers/nucleus-teller-handler.cjs"),g=require("../contracts/handlers/nucleus-accountant-handler.cjs"),q=require("../contracts/handlers/nucleus-atomic-queue-handler.cjs"),M=require("../contracts/handlers/mtw-carrot-handler.cjs"),m=require("../contracts/handlers/carrot-staking-handler.cjs"),P=require("../contracts/handlers/distributor-handler.cjs"),A=require("../contracts/handlers/concrete-vault-handler.cjs"),n=require("../createWalletClient-Cxvyuh55.cjs");class V{constructor(e,l,a){t(this,"walletClient");t(this,"publicClient");t(this,"erc20Permit");t(this,"vault");t(this,"depositor");t(this,"l2Depositor");t(this,"pufLocker");t(this,"l2RewardManager");t(this,"l1RewardManager");t(this,"pufferWithdrawalManager");t(this,"nucleusBoringVault");t(this,"nucleusTeller");t(this,"nucleusAccountant");t(this,"nucleusAtomicQueue");t(this,"mtwCarrot");t(this,"carrotStaker");t(this,"distributor");t(this,"concreteVault");const i=c.VIEM_CHAINS[e];this.walletClient=l??n.createWalletClient({chain:i,transport:n.http()}),this.publicClient=a??n.createPublicClient({chain:i,transport:n.http()}),this.erc20Permit=new w.ERC20PermitHandler(e,this.walletClient,this.publicClient),this.vault=new o.PufferVaultHandler(e,this.walletClient,this.publicClient),this.depositor=new d.PufferDepositorHandler(e,this.walletClient,this.publicClient),this.l2Depositor=new h.PufferL2DepositorHandler(e,this.walletClient,this.publicClient),this.pufLocker=new C.PufLockerHandler(e,this.walletClient,this.publicClient),this.l2RewardManager=new p.L2RewardManagerHandler(e,this.walletClient,this.publicClient),this.l1RewardManager=new _.L1RewardManagerHandler(e,this.walletClient,this.publicClient),this.pufferWithdrawalManager=new H.PufferWithdrawalManagerHandler(e,this.walletClient,this.publicClient),this.nucleusBoringVault=new f.NucleusBoringVaultHandler(e,this.walletClient,this.publicClient),this.nucleusTeller=new b.NucleusTellerHandler(e,this.walletClient,this.publicClient),this.nucleusAccountant=new g.NucleusAccountantHandler(e,this.walletClient,this.publicClient),this.nucleusAtomicQueue=new q.NucleusAtomicQueueHandler(e,this.walletClient,this.publicClient),this.mtwCarrot=new M.MtwCarrotHandler(e,this.walletClient,this.publicClient),this.carrotStaker=new m.CarrotStakingHandler(e,this.walletClient,this.publicClient),this.distributor=new P.DistributorHandler(e,this.walletClient,this.publicClient),this.concreteVault=new A.ConcreteVaultHandler(e,this.walletClient,this.publicClient)}async requestAddresses(){return await this.walletClient.requestAddresses()}}exports.PufferClient=V;
1
+ "use strict";var s=Object.defineProperty;var u=(r,e,l)=>e in r?s(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l;var t=(r,e,l)=>u(r,typeof e!="symbol"?e+"":e,l);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../constants-B96CDi8I.cjs"),o=require("../contracts/handlers/puffer-vault-handler.cjs"),d=require("../contracts/handlers/puffer-depositor-handler.cjs"),h=require("../contracts/handlers/puffer-l2-depositor-handler.cjs"),w=require("../contracts/handlers/erc20-permit-handler.cjs"),C=require("../contracts/handlers/puf-locker-handler.cjs"),p=require("../contracts/handlers/l2-reward-manager-handler.cjs"),_=require("../contracts/handlers/l1-reward-manager-handler.cjs"),H=require("../contracts/handlers/puffer-withdrawal-manager-handler.cjs"),f=require("../contracts/handlers/nucleus-boring-vault-handler.cjs"),b=require("../contracts/handlers/nucleus-teller-handler.cjs"),g=require("../contracts/handlers/nucleus-accountant-handler.cjs"),q=require("../contracts/handlers/nucleus-atomic-queue-handler.cjs"),M=require("../contracts/handlers/mtw-carrot-handler.cjs"),m=require("../contracts/handlers/carrot-staking-handler.cjs"),P=require("../contracts/handlers/distributor-handler.cjs"),A=require("../contracts/handlers/concrete-vault-handler.cjs"),n=require("../createWalletClient-usZXff24.cjs");class V{constructor(e,l,a){t(this,"walletClient");t(this,"publicClient");t(this,"erc20Permit");t(this,"vault");t(this,"depositor");t(this,"l2Depositor");t(this,"pufLocker");t(this,"l2RewardManager");t(this,"l1RewardManager");t(this,"pufferWithdrawalManager");t(this,"nucleusBoringVault");t(this,"nucleusTeller");t(this,"nucleusAccountant");t(this,"nucleusAtomicQueue");t(this,"mtwCarrot");t(this,"carrotStaker");t(this,"distributor");t(this,"concreteVault");const i=c.VIEM_CHAINS[e];this.walletClient=l??n.createWalletClient({chain:i,transport:n.http()}),this.publicClient=a??n.createPublicClient({chain:i,transport:n.http()}),this.erc20Permit=new w.ERC20PermitHandler(e,this.walletClient,this.publicClient),this.vault=new o.PufferVaultHandler(e,this.walletClient,this.publicClient),this.depositor=new d.PufferDepositorHandler(e,this.walletClient,this.publicClient),this.l2Depositor=new h.PufferL2DepositorHandler(e,this.walletClient,this.publicClient),this.pufLocker=new C.PufLockerHandler(e,this.walletClient,this.publicClient),this.l2RewardManager=new p.L2RewardManagerHandler(e,this.walletClient,this.publicClient),this.l1RewardManager=new _.L1RewardManagerHandler(e,this.walletClient,this.publicClient),this.pufferWithdrawalManager=new H.PufferWithdrawalManagerHandler(e,this.walletClient,this.publicClient),this.nucleusBoringVault=new f.NucleusBoringVaultHandler(e,this.walletClient,this.publicClient),this.nucleusTeller=new b.NucleusTellerHandler(e,this.walletClient,this.publicClient),this.nucleusAccountant=new g.NucleusAccountantHandler(e,this.walletClient,this.publicClient),this.nucleusAtomicQueue=new q.NucleusAtomicQueueHandler(e,this.walletClient,this.publicClient),this.mtwCarrot=new M.MtwCarrotHandler(e,this.walletClient,this.publicClient),this.carrotStaker=new m.CarrotStakingHandler(e,this.walletClient,this.publicClient),this.distributor=new P.DistributorHandler(e,this.walletClient,this.publicClient),this.concreteVault=new A.ConcreteVaultHandler(e,this.walletClient,this.publicClient)}async requestAddresses(){return await this.walletClient.requestAddresses()}}exports.PufferClient=V;
2
2
  //# sourceMappingURL=puffer-client.cjs.map
@@ -1,7 +1,7 @@
1
1
  var a = Object.defineProperty;
2
2
  var o = (l, t, i) => t in l ? a(l, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : l[t] = i;
3
3
  var e = (l, t, i) => o(l, typeof t != "symbol" ? t + "" : t, i);
4
- import { V as u } from "../constants-DtzphQjb.js";
4
+ import { V as u } from "../constants-Bw9JXSap.js";
5
5
  import { PufferVaultHandler as p } from "../contracts/handlers/puffer-vault-handler.js";
6
6
  import { PufferDepositorHandler as w } from "../contracts/handlers/puffer-depositor-handler.js";
7
7
  import { PufferL2DepositorHandler as C } from "../contracts/handlers/puffer-l2-depositor-handler.js";
@@ -18,7 +18,7 @@ import { MtwCarrotHandler as P } from "../contracts/handlers/mtw-carrot-handler.
18
18
  import { CarrotStakingHandler as A } from "../contracts/handlers/carrot-staking-handler.js";
19
19
  import { DistributorHandler as V } from "../contracts/handlers/distributor-handler.js";
20
20
  import { ConcreteVaultHandler as R } from "../contracts/handlers/concrete-vault-handler.js";
21
- import { c as k, h as n, a as L } from "../createWalletClient-DveM0zMc.js";
21
+ import { c as k, h as n, a as L } from "../createWalletClient-CsOHhabf.js";
22
22
  class K {
23
23
  /**
24
24
  * Create the Puffer Client.
@@ -1,5 +1,5 @@
1
- import { d as m, f as y, h as k, i as b, j as L, k as O, H as h } from "./writeContract-CynQLeZV.js";
2
- import { B as l, c as E, i as x } from "./constants-DtzphQjb.js";
1
+ import { d as m, f as y, h as k, i as b, j as L, k as O, H as h } from "./writeContract-CYCoIOLc.js";
2
+ import { B as l, c as E, i as x } from "./constants-Bw9JXSap.js";
3
3
  class M extends l {
4
4
  constructor({ callbackSelector: r, cause: a, data: o, extraData: i, sender: d, urls: t }) {
5
5
  var n;
@@ -145,4 +145,4 @@ export {
145
145
  $ as offchainLookupAbiItem,
146
146
  A as offchainLookupSignature
147
147
  };
148
- //# sourceMappingURL=ccip-DxZd6avE.js.map
148
+ //# sourceMappingURL=ccip-BJ1xqhtz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ccip-DxZd6avE.js","sources":["../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/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 name: '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 name: '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 name: '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 const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\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","headers","response","HttpRequestError","isHex"],"mappings":"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","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ccip-BJ1xqhtz.js","sources":["../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/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 name: '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 name: '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 name: '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 const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\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","headers","response","HttpRequestError","isHex"],"mappings":"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","x_google_ignoreList":[0,1]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./writeContract-D5BxbWBy.cjs"),p=require("./constants-Bsa7cnXP.cjs");class k extends p.BaseError{constructor({callbackSelector:s,cause:t,data:n,extraData:f,sender:u,urls:a}){var c;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(c=t.metaMessages)!=null&&c.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(d=>` ${o.getUrl(d)}`)],` Sender: ${u}`,` Data: ${n}`,` Callback selector: ${s}`,` Extra data: ${f}`].flat(),name:"OffchainLookupError"})}}class b extends p.BaseError{constructor({result:s,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${o.getUrl(t)}`,`Response: ${o.stringify(s)}`],name:"OffchainLookupResponseMalformedError"})}}class L extends p.BaseError{constructor({sender:s,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}const E="0x556f1830",y={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 O(i,{blockNumber:s,blockTag:t,data:n,to:f}){const{args:u}=o.decodeErrorResult({data:n,abi:[y]}),[a,c,d,l,r]=u,{ccipRead:e}=i,g=e&&typeof(e==null?void 0:e.request)=="function"?e.request:m;try{if(!o.isAddressEqual(f,a))throw new L({sender:a,to:f});const h=await g({data:d,sender:a,urls:c}),{data:w}=await o.call(i,{blockNumber:s,blockTag:t,data:p.concat([l,o.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[h,r])]),to:f});return w}catch(h){throw new k({callbackSelector:l,cause:h,data:n,extraData:r,sender:a,urls:c})}}async function m({data:i,sender:s,urls:t}){var f;let n=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],c=a.includes("{data}")?"GET":"POST",d=c==="POST"?{data:i,sender:s}:void 0,l=c==="POST"?{"Content-Type":"application/json"}:{};try{const r=await fetch(a.replace("{sender}",s.toLowerCase()).replace("{data}",i),{body:JSON.stringify(d),headers:l,method:c});let e;if((f=r.headers.get("Content-Type"))!=null&&f.startsWith("application/json")?e=(await r.json()).data:e=await r.text(),!r.ok){n=new o.HttpRequestError({body:d,details:e!=null&&e.error?o.stringify(e.error):r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!p.isHex(e)){n=new b({result:e,url:a});continue}return e}catch(r){n=new o.HttpRequestError({body:d,details:r.message,url:a})}}throw n}exports.ccipRequest=m;exports.offchainLookup=O;exports.offchainLookupAbiItem=y;exports.offchainLookupSignature=E;
2
- //# sourceMappingURL=ccip-KTVYuImW.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./writeContract-D_ETLOw6.cjs"),p=require("./constants-B96CDi8I.cjs");class k extends p.BaseError{constructor({callbackSelector:s,cause:t,data:n,extraData:f,sender:u,urls:a}){var c;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(c=t.metaMessages)!=null&&c.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(d=>` ${o.getUrl(d)}`)],` Sender: ${u}`,` Data: ${n}`,` Callback selector: ${s}`,` Extra data: ${f}`].flat(),name:"OffchainLookupError"})}}class b extends p.BaseError{constructor({result:s,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${o.getUrl(t)}`,`Response: ${o.stringify(s)}`],name:"OffchainLookupResponseMalformedError"})}}class L extends p.BaseError{constructor({sender:s,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}const E="0x556f1830",y={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 O(i,{blockNumber:s,blockTag:t,data:n,to:f}){const{args:u}=o.decodeErrorResult({data:n,abi:[y]}),[a,c,d,l,r]=u,{ccipRead:e}=i,g=e&&typeof(e==null?void 0:e.request)=="function"?e.request:m;try{if(!o.isAddressEqual(f,a))throw new L({sender:a,to:f});const h=await g({data:d,sender:a,urls:c}),{data:w}=await o.call(i,{blockNumber:s,blockTag:t,data:p.concat([l,o.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[h,r])]),to:f});return w}catch(h){throw new k({callbackSelector:l,cause:h,data:n,extraData:r,sender:a,urls:c})}}async function m({data:i,sender:s,urls:t}){var f;let n=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],c=a.includes("{data}")?"GET":"POST",d=c==="POST"?{data:i,sender:s}:void 0,l=c==="POST"?{"Content-Type":"application/json"}:{};try{const r=await fetch(a.replace("{sender}",s.toLowerCase()).replace("{data}",i),{body:JSON.stringify(d),headers:l,method:c});let e;if((f=r.headers.get("Content-Type"))!=null&&f.startsWith("application/json")?e=(await r.json()).data:e=await r.text(),!r.ok){n=new o.HttpRequestError({body:d,details:e!=null&&e.error?o.stringify(e.error):r.statusText,headers:r.headers,status:r.status,url:a});continue}if(!p.isHex(e)){n=new b({result:e,url:a});continue}return e}catch(r){n=new o.HttpRequestError({body:d,details:r.message,url:a})}}throw n}exports.ccipRequest=m;exports.offchainLookup=O;exports.offchainLookupAbiItem=y;exports.offchainLookupSignature=E;
2
+ //# sourceMappingURL=ccip-BxmhlmqV.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ccip-KTVYuImW.cjs","sources":["../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/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 name: '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 name: '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 name: '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 const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\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","headers","response","HttpRequestError","isHex"],"mappings":"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","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"ccip-BxmhlmqV.cjs","sources":["../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.23.13_typescript@5.8.2_zod@3.24.2/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 name: '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 name: '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 name: '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 const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\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","headers","response","HttpRequestError","isHex"],"mappings":"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","x_google_ignoreList":[0,1]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-Bsa7cnXP.cjs");exports.Chain=e.Chain;exports.VIEM_CHAINS=e.VIEM_CHAINS;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-B96CDi8I.cjs");exports.Chain=e.Chain;exports.VIEM_CHAINS=e.VIEM_CHAINS;
2
2
  //# sourceMappingURL=constants.cjs.map
@@ -9,7 +9,8 @@ export declare enum Chain {
9
9
  Soneium,
10
10
  Sepolia,
11
11
  OptimismSepolia,
12
- BaseSepolia
12
+ BaseSepolia,
13
+ Zircuit
13
14
  }
14
15
  export declare const VIEM_CHAINS: {
15
16
  [key in Chain]: ViemChain;
@@ -1,4 +1,4 @@
1
- import { C as o, V as r } from "../constants-DtzphQjb.js";
1
+ import { C as o, V as r } from "../constants-Bw9JXSap.js";
2
2
  export {
3
3
  o as Chain,
4
4
  r as VIEM_CHAINS
@@ -1,9 +1,9 @@
1
- "use strict";function O(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function w(e){return O(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Oe="2.23.13";let V={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Oe}`};class u extends Error{constructor(t,n={}){var a;const s=(()=>{var c;return n.cause instanceof u?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),r=n.cause instanceof u&&n.cause.docsPath||n.docsPath,i=(a=V.getDocsUrl)==null?void 0:a.call(V,{...n,docsPath:r}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...s?[`Details: ${s}`]:[],...V.version?[`Version: ${V.version}`]:[]].join(`
2
- `);super(o,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=s,this.docsPath=r,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Oe}walk(t){return Ne(this,t)}}function Ne(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Ne(e.cause,t):t?null:e}class Me extends u{constructor({offset:t,position:n,size:s}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}class _e extends u{constructor({size:t,targetSize:n,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}class Nt extends u{constructor({size:t,targetSize:n,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${n} ${s} long, but is ${t} ${s} long.`,{name:"InvalidBytesLengthError"})}}function N(e,{dir:t,size:n=32}={}){return typeof e=="string"?Ve(e,{dir:t,size:n}):Mt(e,{dir:t,size:n})}function Ve(e,{dir:t,size:n=32}={}){if(n===null)return e;const s=e.replace("0x","");if(s.length>n*2)throw new _e({size:Math.ceil(s.length/2),targetSize:n,type:"hex"});return`0x${s[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Mt(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new _e({size:e.length,targetSize:n,type:"bytes"});const s=new Uint8Array(n);for(let r=0;r<n;r++){const i=t==="right";s[i?r:n-r-1]=e[i?r:e.length-r-1]}return s}class De extends u{constructor({max:t,min:n,signed:s,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${r*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class _t extends u{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class Vt extends u{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class Dt extends u{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function $(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,s=0;for(let r=0;r<n.length-1&&n[t==="left"?r:n.length-r-1].toString()==="0";r++)s++;return n=t==="left"?n.slice(s):n.slice(0,n.length-s),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function z(e,{size:t}){if(w(e)>t)throw new Dt({givenSize:w(e),maxSize:t})}function k(e,t={}){const{signed:n}=t;t.size&&z(e,{size:t.size});const s=BigInt(e);if(!n)return s;const r=(e.length-2)/2,i=(1n<<BigInt(r)*8n-1n)-1n;return s<=i?s:s-BigInt(`0x${"f".padStart(r*2,"f")}`)-1n}function Rt(e,t={}){let n=e;if(t.size&&(z(n,{size:t.size}),n=$(n)),$(n)==="0x00")return!1;if($(n)==="0x01")return!0;throw new Vt(n)}function X(e,t={}){return Number(k(e,t))}const jt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function f(e,t={}){return typeof e=="number"||typeof e=="bigint"?le(e,t):typeof e=="string"?je(e,t):typeof e=="boolean"?Re(e,t):T(e,t)}function Re(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(z(n,{size:t.size}),N(n,{size:t.size})):n}function T(e,t={}){let n="";for(let r=0;r<e.length;r++)n+=jt[e[r]];const s=`0x${n}`;return typeof t.size=="number"?(z(s,{size:t.size}),N(s,{dir:"right",size:t.size})):s}function le(e,t={}){const{signed:n,size:s}=t,r=BigInt(e);let i;s?n?i=(1n<<BigInt(s)*8n-1n)-1n:i=2n**(BigInt(s)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof i=="bigint"&&n?-i-1n:0;if(i&&r>i||r<o){const c=typeof e=="bigint"?"n":"";throw new De({max:i?`${i}${c}`:void 0,min:`${o}${c}`,signed:n,size:s,value:`${e}${c}`})}const a=`0x${(n&&r<0?(1n<<BigInt(s*8))+BigInt(r):r).toString(16)}`;return s?N(a,{size:s}):a}const Kt=new TextEncoder;function je(e,t={}){const n=Kt.encode(e);return T(n,t)}const Wt=new TextEncoder;function de(e,t={}){return typeof e=="number"||typeof e=="bigint"?qt(e,t):typeof e=="boolean"?Xt(e,t):O(e)?A(e,t):fe(e,t)}function Xt(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(z(n,{size:t.size}),N(n,{size:t.size})):n}const y={zero:48,nine:57,A:65,F:70,a:97,f:102};function Ae(e){if(e>=y.zero&&e<=y.nine)return e-y.zero;if(e>=y.A&&e<=y.F)return e-(y.A-10);if(e>=y.a&&e<=y.f)return e-(y.a-10)}function A(e,t={}){let n=e;t.size&&(z(n,{size:t.size}),n=N(n,{dir:"right",size:t.size}));let s=n.slice(2);s.length%2&&(s=`0${s}`);const r=s.length/2,i=new Uint8Array(r);for(let o=0,a=0;o<r;o++){const c=Ae(s.charCodeAt(a++)),l=Ae(s.charCodeAt(a++));if(c===void 0||l===void 0)throw new u(`Invalid byte sequence ("${s[a-2]}${s[a-1]}" in "${s}").`);i[o]=c*16+l}return i}function qt(e,t){const n=le(e,t);return A(n)}function fe(e,t={}){const n=Wt.encode(e);return typeof t.size=="number"?(z(n,{size:t.size}),N(n,{dir:"right",size:t.size})):n}function te(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Yt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Y(e,...t){if(!Yt(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Jt(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");te(e.outputLen),te(e.blockLen)}function q(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ke(e,t){Y(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}const ee=BigInt(2**32-1),Fe=BigInt(32);function Qt(e,t=!1){return t?{h:Number(e&ee),l:Number(e>>Fe&ee)}:{h:Number(e>>Fe&ee)|0,l:Number(e&ee)|0}}function Zt(e,t=!1){let n=new Uint32Array(e.length),s=new Uint32Array(e.length);for(let r=0;r<e.length;r++){const{h:i,l:o}=Qt(e[r],t);[n[r],s[r]]=[i,o]}return[n,s]}const en=(e,t,n)=>e<<n|t>>>32-n,tn=(e,t,n)=>t<<n|e>>>32-n,nn=(e,t,n)=>t<<n-32|e>>>64-n,sn=(e,t,n)=>e<<n-32|t>>>64-n,G=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function rn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ae(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function x(e,t){return e<<32-t|e>>>t}const Ue=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function on(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function ze(e){for(let t=0;t<e.length;t++)e[t]=on(e[t])}function an(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function ne(e){return typeof e=="string"&&(e=an(e)),Y(e),e}function cn(...e){let t=0;for(let s=0;s<e.length;s++){const r=e[s];Y(r),t+=r.length}const n=new Uint8Array(t);for(let s=0,r=0;s<e.length;s++){const i=e[s];n.set(i,r),r+=i.length}return n}class he{clone(){return this._cloneInto()}}function We(e){const t=s=>e().update(ne(s)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function un(e=32){if(G&&typeof G.getRandomValues=="function")return G.getRandomValues(new Uint8Array(e));if(G&&typeof G.randomBytes=="function")return G.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}const Xe=[],qe=[],Ye=[],ln=BigInt(0),D=BigInt(1),dn=BigInt(2),fn=BigInt(7),hn=BigInt(256),pn=BigInt(113);for(let e=0,t=D,n=1,s=0;e<24;e++){[n,s]=[s,(2*n+3*s)%5],Xe.push(2*(5*s+n)),qe.push((e+1)*(e+2)/2%64);let r=ln;for(let i=0;i<7;i++)t=(t<<D^(t>>fn)*pn)%hn,t&dn&&(r^=D<<(D<<BigInt(i))-D);Ye.push(r)}const[bn,mn]=Zt(Ye,!0),Se=(e,t,n)=>n>32?nn(e,t,n):en(e,t,n),ke=(e,t,n)=>n>32?sn(e,t,n):tn(e,t,n);function xn(e,t=24){const n=new Uint32Array(10);for(let s=24-t;s<24;s++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=n[c],h=n[c+1],d=Se(l,h,1)^n[a],b=ke(l,h,1)^n[a+1];for(let p=0;p<50;p+=10)e[o+p]^=d,e[o+p+1]^=b}let r=e[2],i=e[3];for(let o=0;o<24;o++){const a=qe[o],c=Se(r,i,a),l=ke(r,i,a),h=Xe[o];r=e[h],i=e[h+1],e[h]=c,e[h+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=bn[s],e[1]^=mn[s]}n.fill(0)}class pe extends he{constructor(t,n,s,r=!1,i=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,te(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=rn(this.state)}keccak(){Ue||ze(this.state32),xn(this.state32,this.rounds),Ue||ze(this.state32),this.posOut=0,this.pos=0}update(t){q(this);const{blockLen:n,state:s}=this;t=ne(t);const r=t.length;for(let i=0;i<r;){const o=Math.min(n-this.pos,r-i);for(let a=0;a<o;a++)s[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:s,blockLen:r}=this;t[s]^=n,(n&128)!==0&&s===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){q(this,!1),Y(t),this.finish();const n=this.state,{blockLen:s}=this;for(let r=0,i=t.length;r<i;){this.posOut>=s&&this.keccak();const o=Math.min(s-this.posOut,i-r);t.set(n.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return te(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Ke(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:s,outputLen:r,rounds:i,enableXOF:o}=this;return t||(t=new pe(n,s,r,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=s,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}}const gn=(e,t,n)=>We(()=>new pe(t,e,n)),Je=gn(1,136,256/8);function Qe(e,t){const n=t||"hex",s=Je(O(e,{strict:!1})?de(e):e);return n==="bytes"?s:f(s)}class E extends u{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class be extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const s=this.keys().next().value;s&&this.delete(s)}return this}}const ce=new be(8192);function me(e,t){if(ce.has(`${e}.${t}`))return ce.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),s=Qe(fe(n),"bytes"),r=n.split("");for(let o=0;o<40;o+=2)s[o>>1]>>4>=8&&r[o]&&(r[o]=r[o].toUpperCase()),(s[o>>1]&15)>=8&&r[o+1]&&(r[o+1]=r[o+1].toUpperCase());const i=`0x${r.join("")}`;return ce.set(`${e}.${t}`,i),i}function yn(e,t){if(!B(e,{strict:!1}))throw new E({address:e});return me(e,t)}const wn=/^0x[a-fA-F0-9]{40}$/,ue=new be(8192);function B(e,t){const{strict:n=!0}=t??{},s=`${e}.${n}`;if(ue.has(s))return ue.get(s);const r=wn.test(e)?e.toLowerCase()===e?!0:n?me(e)===e:!0:!1;return ue.set(s,r),r}function En(e){return typeof e[0]=="string"?L(e):Bn(e)}function Bn(e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);let s=0;for(const r of e)n.set(r,s),s+=r.length;return n}function L(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Ze(e,t,n,{strict:s}={}){return O(e,{strict:!1})?st(e,t,n,{strict:s}):nt(e,t,n,{strict:s})}function et(e,t){if(typeof t=="number"&&t>0&&t>w(e)-1)throw new Me({offset:t,position:"start",size:w(e)})}function tt(e,t,n){if(typeof t=="number"&&typeof n=="number"&&w(e)!==n-t)throw new Me({offset:n,position:"end",size:w(e)})}function nt(e,t,n,{strict:s}={}){et(e,t);const r=e.slice(t,n);return s&&tt(r,t,n),r}function st(e,t,n,{strict:s}={}){et(e,t);const r=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&tt(r,t,n),r}class Le extends u{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class rt extends u{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class Tn extends u{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Pn={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Tn({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new rt({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Le({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Le({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function xe(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Pn);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}const In={gwei:9,wei:18},vn={ether:-9,wei:9};function it(e,t){let n=e.toString();const s=n.startsWith("-");s&&(n=n.slice(1)),n=n.padStart(t,"0");let[r,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${s?"-":""}${r||"0"}${i?`.${i}`:""}`}function ot(e,t="wei"){return it(e,In[t])}function C(e,t="wei"){return it(e,vn[t])}function ge(e){const t=Object.entries(e).map(([s,r])=>r===void 0||r===!1?null:[s,r]).filter(Boolean),n=t.reduce((s,[r])=>Math.max(s,r.length),0);return t.map(([s,r])=>` ${`${s}:`.padEnd(n+1)} ${r}`).join(`
3
- `)}class $n extends u{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
4
- `),{name:"FeeConflictError"})}}class Cn extends u{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class An extends u{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",ge(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class Fn extends u{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class Un extends u{constructor(t,{account:n,docsPath:s,chain:r,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:h,to:d,value:b}){var P;const p=ge({chain:r&&`${r==null?void 0:r.name} (id: ${r==null?void 0:r.id})`,from:n==null?void 0:n.address,to:d,value:typeof b<"u"&&`${ot(b)} ${((P=r==null?void 0:r.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${C(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${C(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${C(l)} gwei`,nonce:h});super(t.shortMessage,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",p].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class zn extends u{constructor({blockHash:t,blockNumber:n,blockTag:s,hash:r,index:i}){let o="Transaction";s&&i!==void 0&&(o=`Transaction at block time "${s}" at index "${i}"`),t&&i!==void 0&&(o=`Transaction at block hash "${t}" at index "${i}"`),n&&i!==void 0&&(o=`Transaction at block number "${n}" at index "${i}"`),r&&(o=`Transaction with hash "${r}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class Sn extends u{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class kn extends u{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function F(e,t="hex"){const n=at(e),s=xe(new Uint8Array(n.length));return n.encode(s),t==="hex"?T(s.bytes):s.bytes}function at(e){return Array.isArray(e)?Ln(e.map(t=>at(t))):Hn(e)}function Ln(e){const t=e.reduce((r,i)=>r+i.length,0),n=ct(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),n===1?r.pushUint8(t):n===2?r.pushUint16(t):n===3?r.pushUint24(t):r.pushUint32(t));for(const{encode:i}of e)i(r)}}}function Hn(e){const t=typeof e=="string"?A(e):e,n=ct(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(r){t.length===1&&t[0]<128?r.pushBytes(t):t.length<=55?(r.pushByte(128+t.length),r.pushBytes(t)):(r.pushByte(183+n),n===1?r.pushUint8(t.length):n===2?r.pushUint16(t.length):n===3?r.pushUint24(t.length):r.pushUint32(t.length),r.pushBytes(t))}}}function ct(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new u("Length is too large.")}class ye extends u{constructor({cause:t,message:n}={}){var r;const s=(r=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:r.replace("execution reverted","");super(`Execution reverted ${s?`with reason: ${s}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(ye,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(ye,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class J extends u{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${C(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(J,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class ut extends u{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${C(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(ut,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class lt extends u{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(lt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class dt extends u{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
5
- `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(dt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class ft extends u{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(ft,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class ht extends u{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
6
- `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(ht,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class pt extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(pt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class bt extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(bt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class mt extends u{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(mt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class we extends u{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:s}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${C(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s?` = ${C(s)} gwei`:""}).`].join(`
7
- `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(we,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Gn extends u{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Ee(e,t){return({exclude:n,format:s})=>({exclude:n,format:r=>{const i=t(r);if(n)for(const o of n)delete i[o];return{...i,...s(r)}},type:e})}const se=2n**256n-1n,xt={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function re(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?X(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?X(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?xt[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=Nn(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}const On=Ee("transaction",re);function Nn(e){return e.map(t=>({contractAddress:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function gt(e){const t=(e.transactions??[]).map(n=>typeof n=="string"?n:re(n));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Mn=Ee("block",gt);function Be(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),s=typeof e.blobs[0]=="string"?e.blobs.map(i=>A(i)):e.blobs,r=[];for(const i of s)r.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?r:r.map(i=>T(i))}function Te(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),s=typeof e.blobs[0]=="string"?e.blobs.map(o=>A(o)):e.blobs,r=typeof e.commitments[0]=="string"?e.commitments.map(o=>A(o)):e.commitments,i=[];for(let o=0;o<s.length;o++){const a=s[o],c=r[o];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?i:i.map(o=>T(o))}function _n(e,t,n,s){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,s);const r=BigInt(32),i=BigInt(4294967295),o=Number(n>>r&i),a=Number(n&i),c=s?4:0,l=s?0:4;e.setUint32(t+c,o,s),e.setUint32(t+l,a,s)}function Vn(e,t,n){return e&t^~e&n}function Dn(e,t,n){return e&t^e&n^t&n}class Rn extends he{constructor(t,n,s,r){super(),this.blockLen=t,this.outputLen=n,this.padOffset=s,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ae(this.buffer)}update(t){q(this);const{view:n,buffer:s,blockLen:r}=this;t=ne(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(r-this.pos,i-o);if(a===r){const c=ae(t);for(;r<=i-o;o+=r)this.process(c,o);continue}s.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===r&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){q(this),Ke(t,this),this.finished=!0;const{buffer:n,view:s,blockLen:r,isLE:i}=this;let{pos:o}=this;n[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(s,0),o=0);for(let d=o;d<r;d++)n[d]=0;_n(s,r-8,BigInt(this.length*8),i),this.process(s,0);const a=ae(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,h[d],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:s,length:r,finished:i,destroyed:o,pos:a}=this;return t.length=r,t.pos=a,t.finished=i,t.destroyed=o,r%n&&t.buffer.set(s),t}}const jn=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),I=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),v=new Uint32Array(64);class Kn extends Rn{constructor(){super(64,32,8,!1),this.A=I[0]|0,this.B=I[1]|0,this.C=I[2]|0,this.D=I[3]|0,this.E=I[4]|0,this.F=I[5]|0,this.G=I[6]|0,this.H=I[7]|0}get(){const{A:t,B:n,C:s,D:r,E:i,F:o,G:a,H:c}=this;return[t,n,s,r,i,o,a,c]}set(t,n,s,r,i,o,a,c){this.A=t|0,this.B=n|0,this.C=s|0,this.D=r|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let d=0;d<16;d++,n+=4)v[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const b=v[d-15],p=v[d-2],P=x(b,7)^x(b,18)^b>>>3,H=x(p,17)^x(p,19)^p>>>10;v[d]=H+v[d-7]+P+v[d-16]|0}let{A:s,B:r,C:i,D:o,E:a,F:c,G:l,H:h}=this;for(let d=0;d<64;d++){const b=x(a,6)^x(a,11)^x(a,25),p=h+b+Vn(a,c,l)+jn[d]+v[d]|0,H=(x(s,2)^x(s,13)^x(s,22))+Dn(s,r,i)|0;h=l,l=c,c=a,a=o+p|0,o=i,i=r,r=s,s=p+H|0}s=s+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(s,r,i,o,a,c,l,h)}roundClean(){v.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const yt=We(()=>new Kn);function Wn(e,t){return yt(O(e,{strict:!1})?de(e):e)}function Xn(e){const{commitment:t,version:n=1}=e,s=e.to??(typeof t=="string"?"hex":"bytes"),r=Wn(t);return r.set([n],0),s==="bytes"?r:T(r)}function wt(e){const{commitments:t,version:n}=e,s=e.to??(typeof t[0]=="string"?"hex":"bytes"),r=[];for(const i of t)r.push(Xn({commitment:i,to:s,version:n}));return r}const He=6,Et=32,Pe=4096,Bt=Et*Pe,Ge=Bt*He-1-1*Pe*He,Tt=1;class qn extends u{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Pt extends u{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Yn extends u{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Jn extends u{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Tt}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function Qn(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?A(e.data):e.data,s=w(n);if(!s)throw new Pt;if(s>Ge)throw new qn({maxSize:Ge,size:s});const r=[];let i=!0,o=0;for(;i;){const a=xe(new Uint8Array(Bt));let c=0;for(;c<Pe;){const l=n.slice(o,o+(Et-1));if(a.pushByte(0),a.pushBytes(l),l.length<31){a.pushByte(128),i=!1;break}c++,o+=31}r.push(a)}return t==="bytes"?r.map(a=>a.bytes):r.map(a=>T(a.bytes))}function It(e){const{data:t,kzg:n,to:s}=e,r=e.blobs??Qn({data:t,to:s}),i=e.commitments??Be({blobs:r,kzg:n,to:s}),o=e.proofs??Te({blobs:r,commitments:i,kzg:n,to:s}),a=[];for(let c=0;c<r.length;c++)a.push({blob:r[c],commitment:i[c],proof:o[c]});return a}function vt(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new An({transaction:e})}function $t(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}class Zn extends u{constructor({blockNumber:t,chain:n,contract:s}){super(`Chain "${n.name}" does not support contract "${s.name}".`,{metaMessages:["This could be due to any of the following:",...t&&s.blockCreated&&s.blockCreated>t?[`- The contract "${s.name}" was not deployed until block ${s.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${s.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class es extends u{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class ts extends u{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
8
- `),{name:"ChainNotFoundError"})}}class ns extends u{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class ie extends u{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function g(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const ss={"0x0":"reverted","0x1":"success"};function Ct(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(n=>$t(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?X(e.transactionIndex):null,status:e.status?ss[e.status]:null,type:e.type?xt[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const rs=Ee("transactionReceipt",Ct);function is(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:s,chainId:r}=n;if(!B(s))throw new E({address:s});if(r<0)throw new ie({chainId:r})}Ie(e)}function os(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Pt;for(const n of t){const s=w(n),r=X(Ze(n,0,1));if(s!==32)throw new Yn({hash:n,size:s});if(r!==Tt)throw new Jn({hash:n,version:r})}}Ie(e)}function Ie(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:s,to:r}=e;if(t<=0)throw new ie({chainId:t});if(r&&!B(r))throw new E({address:r});if(s&&s>se)throw new J({maxFeePerGas:s});if(n&&s&&n>s)throw new we({maxFeePerGas:s,maxPriorityFeePerGas:n})}function as(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:s,maxFeePerGas:r,to:i}=e;if(t<=0)throw new ie({chainId:t});if(i&&!B(i))throw new E({address:i});if(n||r)throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(s&&s>se)throw new J({maxFeePerGas:s})}function cs(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:s,maxFeePerGas:r,to:i}=e;if(i&&!B(i))throw new E({address:i});if(typeof t<"u"&&t<=0)throw new ie({chainId:t});if(n||r)throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(s&&s>se)throw new J({maxFeePerGas:s})}function us(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:s,chainId:r,nonce:i,...o}=n;t.push([r?f(r):"0x",s,i?f(i):"0x",...Q({},o)])}return t}function oe(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:s,storageKeys:r}=e[n];for(let i=0;i<r.length;i++)if(r[i].length-2!==64)throw new Fn({storageKey:r[i]});if(!B(s,{strict:!1}))throw new E({address:s});t.push([s,r])}return t}function ls(e,t){const n=vt(e);return n==="eip1559"?hs(e,t):n==="eip2930"?ps(e,t):n==="eip4844"?fs(e,t):n==="eip7702"?ds(e,t):bs(e,t)}function ds(e,t){const{authorizationList:n,chainId:s,gas:r,nonce:i,to:o,value:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:h,data:d}=e;is(e);const b=oe(h),p=us(n);return L(["0x04",F([f(s),i?f(i):"0x",l?f(l):"0x",c?f(c):"0x",r?f(r):"0x",o??"0x",a?f(a):"0x",d??"0x",b,p,...Q(e,t)])])}function fs(e,t){const{chainId:n,gas:s,nonce:r,to:i,value:o,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:h,data:d}=e;os(e);let b=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(typeof b>"u"||typeof p>"u")){const S=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(_=>T(_)),Z=e.kzg,M=Be({blobs:S,kzg:Z});if(typeof b>"u"&&(b=wt({commitments:M})),typeof p>"u"){const _=Te({blobs:S,commitments:M,kzg:Z});p=It({blobs:S,commitments:M,proofs:_})}}const P=oe(h),H=[f(n),r?f(r):"0x",l?f(l):"0x",c?f(c):"0x",s?f(s):"0x",i??"0x",o?f(o):"0x",d??"0x",P,a?f(a):"0x",b??[],...Q(e,t)],ve=[],$e=[],Ce=[];if(p)for(let S=0;S<p.length;S++){const{blob:Z,commitment:M,proof:_}=p[S];ve.push(Z),$e.push(M),Ce.push(_)}return L(["0x03",F(p?[H,ve,$e,Ce]:H)])}function hs(e,t){const{chainId:n,gas:s,nonce:r,to:i,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,data:h}=e;Ie(e);const d=oe(l),b=[f(n),r?f(r):"0x",c?f(c):"0x",a?f(a):"0x",s?f(s):"0x",i??"0x",o?f(o):"0x",h??"0x",d,...Q(e,t)];return L(["0x02",F(b)])}function ps(e,t){const{chainId:n,gas:s,data:r,nonce:i,to:o,value:a,accessList:c,gasPrice:l}=e;as(e);const h=oe(c),d=[f(n),i?f(i):"0x",l?f(l):"0x",s?f(s):"0x",o??"0x",a?f(a):"0x",r??"0x",h,...Q(e,t)];return L(["0x01",F(d)])}function bs(e,t){const{chainId:n=0,gas:s,data:r,nonce:i,to:o,value:a,gasPrice:c}=e;cs(e);let l=[i?f(i):"0x",c?f(c):"0x",s?f(s):"0x",o??"0x",a?f(a):"0x",r??"0x"];if(t){const h=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const p=27n+(t.v===27n?0n:1n);if(t.v!==p)throw new Cn({v:t.v});return p})(),d=$(t.r),b=$(t.s);l=[...l,f(h),d==="0x00"?"0x":d,b==="0x00"?"0x":b]}else n>0&&(l=[...l,f(n),"0x","0x"]);return F(l)}function Q(e,t){const n=t??e,{v:s,yParity:r}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof s>"u"&&typeof r>"u")return[];const i=$(n.r),o=$(n.s);return[typeof r=="number"?r?f(1):"0x":s===0n?"0x":s===1n?f(1):s===27n?"0x":f(1),i==="0x00"?"0x":i,o==="0x00"?"0x":o]}const ms={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},xs={block:Mn({format(e){var n;return{transactions:(n=e.transactions)==null?void 0:n.map(s=>{if(typeof s=="string")return s;const r=re(s);return r.typeHex==="0x7e"&&(r.isSystemTx=s.isSystemTx,r.mint=s.mint?k(s.mint):void 0,r.sourceHash=s.sourceHash,r.type="deposit"),r}),stateRoot:e.stateRoot}}}),transaction:On({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?k(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:rs({format(e){return{l1GasPrice:e.l1GasPrice?k(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?k(e.l1GasUsed):null,l1Fee:e.l1Fee?k(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function gs(e,t){return Es(e)?ws(e):ls(e,t)}const ys={transaction:gs};function ws(e){Bs(e);const{sourceHash:t,data:n,from:s,gas:r,isSystemTx:i,mint:o,to:a,value:c}=e,l=[t,s,a??"0x",o?f(o):"0x",c?f(c):"0x",r?f(r):"0x",i?"0x1":"0x",n??"0x"];return L(["0x7e",F(l)])}function Es(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function Bs(e){const{from:t,to:n}=e;if(t&&!B(t))throw new E({address:t});if(n&&!B(n))throw new E({address:n})}const U={contracts:ms,formatters:xs,serializers:ys},Ts=42161,At=g({id:33139,name:"Ape Chain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:Ts}),Ft=g({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),R=1,Ut=g({...U,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...U.contracts,disputeGameFactory:{[R]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[R]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[R]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[R]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:R}),j=11155111,zt=g({...U,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...U.contracts,disputeGameFactory:{[j]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[j]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[j]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[j]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:j}),St=g({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),kt=g({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),Lt=g({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),K=11155111,Ht=g({...U,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...U.contracts,disputeGameFactory:{[K]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[K]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[K]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[K]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:K}),Gt=g({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),W=1,Ot=g({...U,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...U.contracts,disputeGameFactory:{[W]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[W]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[W]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[W]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:W});var m=(e=>(e[e.Mainnet=Lt.id]="Mainnet",e[e.Holesky=kt.id]="Holesky",e[e.Base=Ut.id]="Base",e[e.Bsc=St.id]="Bsc",e[e.Arbitrum=Ft.id]="Arbitrum",e[e.ApeChain=At.id]="ApeChain",e[e.Soneium=Ot.id]="Soneium",e[e.Sepolia=Gt.id]="Sepolia",e[e.OptimismSepolia=Ht.id]="OptimismSepolia",e[e.BaseSepolia=zt.id]="BaseSepolia",e))(m||{});const Ps={[m.Mainnet]:Lt,[m.Holesky]:kt,[m.Base]:Ut,[m.Bsc]:St,[m.Arbitrum]:Ft,[m.ApeChain]:At,[m.Soneium]:Ot,[m.Sepolia]:Gt,[m.OptimismSepolia]:Ht,[m.BaseSepolia]:zt};exports.BaseError=u;exports.Chain=m;exports.ChainDoesNotSupportContract=Zn;exports.ChainMismatchError=es;exports.ChainNotFoundError=ts;exports.ClientChainNotConfiguredError=ns;exports.ExecutionRevertedError=ye;exports.FeeCapTooHighError=J;exports.FeeCapTooLowError=ut;exports.FeeConflictError=$n;exports.Hash=he;exports.InsufficientFundsError=ht;exports.IntegerOutOfRangeError=De;exports.IntrinsicGasTooHighError=pt;exports.IntrinsicGasTooLowError=bt;exports.InvalidAddressError=E;exports.InvalidBytesBooleanError=_t;exports.InvalidBytesLengthError=Nt;exports.LruMap=be;exports.NonceMaxValueError=ft;exports.NonceTooHighError=lt;exports.NonceTooLowError=dt;exports.PositionOutOfBoundsError=rt;exports.TipAboveFeeCapError=we;exports.TransactionExecutionError=Un;exports.TransactionNotFoundError=zn;exports.TransactionReceiptNotFoundError=Sn;exports.TransactionTypeNotSupportedError=mt;exports.UnknownNodeError=Gn;exports.VIEM_CHAINS=Ps;exports.WaitForTransactionReceiptTimeoutError=kn;exports.abytes=Y;exports.aexists=q;exports.ahash=Jt;exports.assertSize=z;exports.blobsToCommitments=Be;exports.blobsToProofs=Te;exports.boolToHex=Re;exports.bytesToHex=T;exports.checksumAddress=me;exports.commitmentsToVersionedHashes=wt;exports.concat=En;exports.concatBytes=cn;exports.concatHex=L;exports.createCursor=xe;exports.formatBlock=gt;exports.formatEther=ot;exports.formatGwei=C;exports.formatLog=$t;exports.formatTransaction=re;exports.formatTransactionReceipt=Ct;exports.getAddress=yn;exports.getTransactionType=vt;exports.hexToBigInt=k;exports.hexToBool=Rt;exports.hexToBytes=A;exports.hexToNumber=X;exports.isAddress=B;exports.isHex=O;exports.keccak256=Qe;exports.keccak_256=Je;exports.maxUint256=se;exports.numberToHex=le;exports.padHex=Ve;exports.prettyPrint=ge;exports.randomBytes=un;exports.sha256=yt;exports.size=w;exports.slice=Ze;exports.sliceBytes=nt;exports.sliceHex=st;exports.stringToBytes=fe;exports.stringToHex=je;exports.toBlobSidecars=It;exports.toBytes=ne;exports.toBytes$1=de;exports.toHex=f;exports.toRlp=F;exports.trim=$;
9
- //# sourceMappingURL=constants-Bsa7cnXP.cjs.map
1
+ "use strict";function O(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function w(e){return O(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Ne="2.23.13";let V={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Ne}`};class u extends Error{constructor(t,n={}){var a;const s=(()=>{var c;return n.cause instanceof u?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),r=n.cause instanceof u&&n.cause.docsPath||n.docsPath,i=(a=V.getDocsUrl)==null?void 0:a.call(V,{...n,docsPath:r}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...s?[`Details: ${s}`]:[],...V.version?[`Version: ${V.version}`]:[]].join(`
2
+ `);super(o,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=s,this.docsPath=r,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Ne}walk(t){return Me(this,t)}}function Me(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Me(e.cause,t):t?null:e}class _e extends u{constructor({offset:t,position:n,size:s}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}class Ve extends u{constructor({size:t,targetSize:n,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}class _t extends u{constructor({size:t,targetSize:n,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${n} ${s} long, but is ${t} ${s} long.`,{name:"InvalidBytesLengthError"})}}function N(e,{dir:t,size:n=32}={}){return typeof e=="string"?De(e,{dir:t,size:n}):Vt(e,{dir:t,size:n})}function De(e,{dir:t,size:n=32}={}){if(n===null)return e;const s=e.replace("0x","");if(s.length>n*2)throw new Ve({size:Math.ceil(s.length/2),targetSize:n,type:"hex"});return`0x${s[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Vt(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Ve({size:e.length,targetSize:n,type:"bytes"});const s=new Uint8Array(n);for(let r=0;r<n;r++){const i=t==="right";s[i?r:n-r-1]=e[i?r:e.length-r-1]}return s}class Re extends u{constructor({max:t,min:n,signed:s,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${r*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Dt extends u{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class Rt extends u{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class jt extends u{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function A(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,s=0;for(let r=0;r<n.length-1&&n[t==="left"?r:n.length-r-1].toString()==="0";r++)s++;return n=t==="left"?n.slice(s):n.slice(0,n.length-s),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function z(e,{size:t}){if(w(e)>t)throw new jt({givenSize:w(e),maxSize:t})}function k(e,t={}){const{signed:n}=t;t.size&&z(e,{size:t.size});const s=BigInt(e);if(!n)return s;const r=(e.length-2)/2,i=(1n<<BigInt(r)*8n-1n)-1n;return s<=i?s:s-BigInt(`0x${"f".padStart(r*2,"f")}`)-1n}function Kt(e,t={}){let n=e;if(t.size&&(z(n,{size:t.size}),n=A(n)),A(n)==="0x00")return!1;if(A(n)==="0x01")return!0;throw new Rt(n)}function X(e,t={}){return Number(k(e,t))}const Wt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function f(e,t={}){return typeof e=="number"||typeof e=="bigint"?de(e,t):typeof e=="string"?Ke(e,t):typeof e=="boolean"?je(e,t):P(e,t)}function je(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(z(n,{size:t.size}),N(n,{size:t.size})):n}function P(e,t={}){let n="";for(let r=0;r<e.length;r++)n+=Wt[e[r]];const s=`0x${n}`;return typeof t.size=="number"?(z(s,{size:t.size}),N(s,{dir:"right",size:t.size})):s}function de(e,t={}){const{signed:n,size:s}=t,r=BigInt(e);let i;s?n?i=(1n<<BigInt(s)*8n-1n)-1n:i=2n**(BigInt(s)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof i=="bigint"&&n?-i-1n:0;if(i&&r>i||r<o){const c=typeof e=="bigint"?"n":"";throw new Re({max:i?`${i}${c}`:void 0,min:`${o}${c}`,signed:n,size:s,value:`${e}${c}`})}const a=`0x${(n&&r<0?(1n<<BigInt(s*8))+BigInt(r):r).toString(16)}`;return s?N(a,{size:s}):a}const Xt=new TextEncoder;function Ke(e,t={}){const n=Xt.encode(e);return P(n,t)}const Zt=new TextEncoder;function fe(e,t={}){return typeof e=="number"||typeof e=="bigint"?Yt(e,t):typeof e=="boolean"?qt(e,t):O(e)?F(e,t):he(e,t)}function qt(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(z(n,{size:t.size}),N(n,{size:t.size})):n}const y={zero:48,nine:57,A:65,F:70,a:97,f:102};function Fe(e){if(e>=y.zero&&e<=y.nine)return e-y.zero;if(e>=y.A&&e<=y.F)return e-(y.A-10);if(e>=y.a&&e<=y.f)return e-(y.a-10)}function F(e,t={}){let n=e;t.size&&(z(n,{size:t.size}),n=N(n,{dir:"right",size:t.size}));let s=n.slice(2);s.length%2&&(s=`0${s}`);const r=s.length/2,i=new Uint8Array(r);for(let o=0,a=0;o<r;o++){const c=Fe(s.charCodeAt(a++)),l=Fe(s.charCodeAt(a++));if(c===void 0||l===void 0)throw new u(`Invalid byte sequence ("${s[a-2]}${s[a-1]}" in "${s}").`);i[o]=c*16+l}return i}function Yt(e,t){const n=de(e,t);return F(n)}function he(e,t={}){const n=Zt.encode(e);return typeof t.size=="number"?(z(n,{size:t.size}),N(n,{dir:"right",size:t.size})):n}function te(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Jt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function q(e,...t){if(!Jt(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Qt(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");te(e.outputLen),te(e.blockLen)}function Z(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function We(e,t){q(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}const ee=BigInt(2**32-1),Ue=BigInt(32);function en(e,t=!1){return t?{h:Number(e&ee),l:Number(e>>Ue&ee)}:{h:Number(e>>Ue&ee)|0,l:Number(e&ee)|0}}function tn(e,t=!1){let n=new Uint32Array(e.length),s=new Uint32Array(e.length);for(let r=0;r<e.length;r++){const{h:i,l:o}=en(e[r],t);[n[r],s[r]]=[i,o]}return[n,s]}const nn=(e,t,n)=>e<<n|t>>>32-n,sn=(e,t,n)=>t<<n|e>>>32-n,rn=(e,t,n)=>t<<n-32|e>>>64-n,on=(e,t,n)=>e<<n-32|t>>>64-n,G=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function an(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ae(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function g(e,t){return e<<32-t|e>>>t}const ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function cn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Se(e){for(let t=0;t<e.length;t++)e[t]=cn(e[t])}function un(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function ne(e){return typeof e=="string"&&(e=un(e)),q(e),e}function ln(...e){let t=0;for(let s=0;s<e.length;s++){const r=e[s];q(r),t+=r.length}const n=new Uint8Array(t);for(let s=0,r=0;s<e.length;s++){const i=e[s];n.set(i,r),r+=i.length}return n}class pe{clone(){return this._cloneInto()}}function Xe(e){const t=s=>e().update(ne(s)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function dn(e=32){if(G&&typeof G.getRandomValues=="function")return G.getRandomValues(new Uint8Array(e));if(G&&typeof G.randomBytes=="function")return G.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}const Ze=[],qe=[],Ye=[],fn=BigInt(0),D=BigInt(1),hn=BigInt(2),pn=BigInt(7),bn=BigInt(256),mn=BigInt(113);for(let e=0,t=D,n=1,s=0;e<24;e++){[n,s]=[s,(2*n+3*s)%5],Ze.push(2*(5*s+n)),qe.push((e+1)*(e+2)/2%64);let r=fn;for(let i=0;i<7;i++)t=(t<<D^(t>>pn)*mn)%bn,t&hn&&(r^=D<<(D<<BigInt(i))-D);Ye.push(r)}const[xn,gn]=tn(Ye,!0),ke=(e,t,n)=>n>32?rn(e,t,n):nn(e,t,n),Le=(e,t,n)=>n>32?on(e,t,n):sn(e,t,n);function yn(e,t=24){const n=new Uint32Array(10);for(let s=24-t;s<24;s++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=n[c],h=n[c+1],d=ke(l,h,1)^n[a],b=Le(l,h,1)^n[a+1];for(let p=0;p<50;p+=10)e[o+p]^=d,e[o+p+1]^=b}let r=e[2],i=e[3];for(let o=0;o<24;o++){const a=qe[o],c=ke(r,i,a),l=Le(r,i,a),h=Ze[o];r=e[h],i=e[h+1],e[h]=c,e[h+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=xn[s],e[1]^=gn[s]}n.fill(0)}class be extends pe{constructor(t,n,s,r=!1,i=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,te(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=an(this.state)}keccak(){ze||Se(this.state32),yn(this.state32,this.rounds),ze||Se(this.state32),this.posOut=0,this.pos=0}update(t){Z(this);const{blockLen:n,state:s}=this;t=ne(t);const r=t.length;for(let i=0;i<r;){const o=Math.min(n-this.pos,r-i);for(let a=0;a<o;a++)s[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:s,blockLen:r}=this;t[s]^=n,(n&128)!==0&&s===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){Z(this,!1),q(t),this.finish();const n=this.state,{blockLen:s}=this;for(let r=0,i=t.length;r<i;){this.posOut>=s&&this.keccak();const o=Math.min(s-this.posOut,i-r);t.set(n.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return te(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(We(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:s,outputLen:r,rounds:i,enableXOF:o}=this;return t||(t=new be(n,s,r,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=s,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}}const wn=(e,t,n)=>Xe(()=>new be(t,e,n)),Je=wn(1,136,256/8);function Qe(e,t){const n=t||"hex",s=Je(O(e,{strict:!1})?fe(e):e);return n==="bytes"?s:f(s)}class E extends u{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class me extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const s=this.keys().next().value;s&&this.delete(s)}return this}}const ce=new me(8192);function xe(e,t){if(ce.has(`${e}.${t}`))return ce.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),s=Qe(he(n),"bytes"),r=n.split("");for(let o=0;o<40;o+=2)s[o>>1]>>4>=8&&r[o]&&(r[o]=r[o].toUpperCase()),(s[o>>1]&15)>=8&&r[o+1]&&(r[o+1]=r[o+1].toUpperCase());const i=`0x${r.join("")}`;return ce.set(`${e}.${t}`,i),i}function En(e,t){if(!B(e,{strict:!1}))throw new E({address:e});return xe(e,t)}const Bn=/^0x[a-fA-F0-9]{40}$/,ue=new me(8192);function B(e,t){const{strict:n=!0}=t??{},s=`${e}.${n}`;if(ue.has(s))return ue.get(s);const r=Bn.test(e)?e.toLowerCase()===e?!0:n?xe(e)===e:!0:!1;return ue.set(s,r),r}function Tn(e){return typeof e[0]=="string"?L(e):Pn(e)}function Pn(e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);let s=0;for(const r of e)n.set(r,s),s+=r.length;return n}function L(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function et(e,t,n,{strict:s}={}){return O(e,{strict:!1})?rt(e,t,n,{strict:s}):st(e,t,n,{strict:s})}function tt(e,t){if(typeof t=="number"&&t>0&&t>w(e)-1)throw new _e({offset:t,position:"start",size:w(e)})}function nt(e,t,n){if(typeof t=="number"&&typeof n=="number"&&w(e)!==n-t)throw new _e({offset:n,position:"end",size:w(e)})}function st(e,t,n,{strict:s}={}){tt(e,t);const r=e.slice(t,n);return s&&nt(r,t,n),r}function rt(e,t,n,{strict:s}={}){tt(e,t);const r=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&nt(r,t,n),r}class He extends u{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class it extends u{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class In extends u{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const vn={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new In({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new it({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new He({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new He({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function ge(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(vn);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}const $n={gwei:9,wei:18},An={ether:-9,wei:9};function ot(e,t){let n=e.toString();const s=n.startsWith("-");s&&(n=n.slice(1)),n=n.padStart(t,"0");let[r,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${s?"-":""}${r||"0"}${i?`.${i}`:""}`}function at(e,t="wei"){return ot(e,$n[t])}function C(e,t="wei"){return ot(e,An[t])}function ye(e){const t=Object.entries(e).map(([s,r])=>r===void 0||r===!1?null:[s,r]).filter(Boolean),n=t.reduce((s,[r])=>Math.max(s,r.length),0);return t.map(([s,r])=>` ${`${s}:`.padEnd(n+1)} ${r}`).join(`
3
+ `)}class Cn extends u{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
4
+ `),{name:"FeeConflictError"})}}class Fn extends u{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class Un extends u{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",ye(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class zn extends u{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class Sn extends u{constructor(t,{account:n,docsPath:s,chain:r,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:h,to:d,value:b}){var I;const p=ye({chain:r&&`${r==null?void 0:r.name} (id: ${r==null?void 0:r.id})`,from:n==null?void 0:n.address,to:d,value:typeof b<"u"&&`${at(b)} ${((I=r==null?void 0:r.nativeCurrency)==null?void 0:I.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${C(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${C(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${C(l)} gwei`,nonce:h});super(t.shortMessage,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",p].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class kn extends u{constructor({blockHash:t,blockNumber:n,blockTag:s,hash:r,index:i}){let o="Transaction";s&&i!==void 0&&(o=`Transaction at block time "${s}" at index "${i}"`),t&&i!==void 0&&(o=`Transaction at block hash "${t}" at index "${i}"`),n&&i!==void 0&&(o=`Transaction at block number "${n}" at index "${i}"`),r&&(o=`Transaction with hash "${r}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class Ln extends u{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class Hn extends u{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function U(e,t="hex"){const n=ct(e),s=ge(new Uint8Array(n.length));return n.encode(s),t==="hex"?P(s.bytes):s.bytes}function ct(e){return Array.isArray(e)?Gn(e.map(t=>ct(t))):On(e)}function Gn(e){const t=e.reduce((r,i)=>r+i.length,0),n=ut(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),n===1?r.pushUint8(t):n===2?r.pushUint16(t):n===3?r.pushUint24(t):r.pushUint32(t));for(const{encode:i}of e)i(r)}}}function On(e){const t=typeof e=="string"?F(e):e,n=ut(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(r){t.length===1&&t[0]<128?r.pushBytes(t):t.length<=55?(r.pushByte(128+t.length),r.pushBytes(t)):(r.pushByte(183+n),n===1?r.pushUint8(t.length):n===2?r.pushUint16(t.length):n===3?r.pushUint24(t.length):r.pushUint32(t.length),r.pushBytes(t))}}}function ut(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new u("Length is too large.")}class we extends u{constructor({cause:t,message:n}={}){var r;const s=(r=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:r.replace("execution reverted","");super(`Execution reverted ${s?`with reason: ${s}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(we,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(we,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Y extends u{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${C(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Y,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class lt extends u{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${C(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(lt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class dt extends u{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(dt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class ft extends u{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
5
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(ft,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class ht extends u{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(ht,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class pt extends u{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
6
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(pt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class bt extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(bt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class mt extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(mt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class xt extends u{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(xt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ee extends u{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:s}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${C(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s?` = ${C(s)} gwei`:""}).`].join(`
7
+ `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Nn extends u{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Be(e,t){return({exclude:n,format:s})=>({exclude:n,format:r=>{const i=t(r);if(n)for(const o of n)delete i[o];return{...i,...s(r)}},type:e})}const se=2n**256n-1n,gt={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function re(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?X(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?X(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?gt[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=_n(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}const Mn=Be("transaction",re);function _n(e){return e.map(t=>({contractAddress:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function yt(e){const t=(e.transactions??[]).map(n=>typeof n=="string"?n:re(n));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Vn=Be("block",yt);function Te(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),s=typeof e.blobs[0]=="string"?e.blobs.map(i=>F(i)):e.blobs,r=[];for(const i of s)r.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?r:r.map(i=>P(i))}function Pe(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),s=typeof e.blobs[0]=="string"?e.blobs.map(o=>F(o)):e.blobs,r=typeof e.commitments[0]=="string"?e.commitments.map(o=>F(o)):e.commitments,i=[];for(let o=0;o<s.length;o++){const a=s[o],c=r[o];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?i:i.map(o=>P(o))}function Dn(e,t,n,s){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,s);const r=BigInt(32),i=BigInt(4294967295),o=Number(n>>r&i),a=Number(n&i),c=s?4:0,l=s?0:4;e.setUint32(t+c,o,s),e.setUint32(t+l,a,s)}function Rn(e,t,n){return e&t^~e&n}function jn(e,t,n){return e&t^e&n^t&n}class Kn extends pe{constructor(t,n,s,r){super(),this.blockLen=t,this.outputLen=n,this.padOffset=s,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ae(this.buffer)}update(t){Z(this);const{view:n,buffer:s,blockLen:r}=this;t=ne(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(r-this.pos,i-o);if(a===r){const c=ae(t);for(;r<=i-o;o+=r)this.process(c,o);continue}s.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===r&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Z(this),We(t,this),this.finished=!0;const{buffer:n,view:s,blockLen:r,isLE:i}=this;let{pos:o}=this;n[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(s,0),o=0);for(let d=o;d<r;d++)n[d]=0;Dn(s,r-8,BigInt(this.length*8),i),this.process(s,0);const a=ae(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,h[d],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:s,length:r,finished:i,destroyed:o,pos:a}=this;return t.length=r,t.pos=a,t.finished=i,t.destroyed=o,r%n&&t.buffer.set(s),t}}const Wn=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),v=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$=new Uint32Array(64);class Xn extends Kn{constructor(){super(64,32,8,!1),this.A=v[0]|0,this.B=v[1]|0,this.C=v[2]|0,this.D=v[3]|0,this.E=v[4]|0,this.F=v[5]|0,this.G=v[6]|0,this.H=v[7]|0}get(){const{A:t,B:n,C:s,D:r,E:i,F:o,G:a,H:c}=this;return[t,n,s,r,i,o,a,c]}set(t,n,s,r,i,o,a,c){this.A=t|0,this.B=n|0,this.C=s|0,this.D=r|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let d=0;d<16;d++,n+=4)$[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const b=$[d-15],p=$[d-2],I=g(b,7)^g(b,18)^b>>>3,H=g(p,17)^g(p,19)^p>>>10;$[d]=H+$[d-7]+I+$[d-16]|0}let{A:s,B:r,C:i,D:o,E:a,F:c,G:l,H:h}=this;for(let d=0;d<64;d++){const b=g(a,6)^g(a,11)^g(a,25),p=h+b+Rn(a,c,l)+Wn[d]+$[d]|0,H=(g(s,2)^g(s,13)^g(s,22))+jn(s,r,i)|0;h=l,l=c,c=a,a=o+p|0,o=i,i=r,r=s,s=p+H|0}s=s+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(s,r,i,o,a,c,l,h)}roundClean(){$.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const wt=Xe(()=>new Xn);function Zn(e,t){return wt(O(e,{strict:!1})?fe(e):e)}function qn(e){const{commitment:t,version:n=1}=e,s=e.to??(typeof t=="string"?"hex":"bytes"),r=Zn(t);return r.set([n],0),s==="bytes"?r:P(r)}function Et(e){const{commitments:t,version:n}=e,s=e.to??(typeof t[0]=="string"?"hex":"bytes"),r=[];for(const i of t)r.push(qn({commitment:i,to:s,version:n}));return r}const Ge=6,Bt=32,Ie=4096,Tt=Bt*Ie,Oe=Tt*Ge-1-1*Ie*Ge,Pt=1;class Yn extends u{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class It extends u{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Jn extends u{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Qn extends u{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Pt}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function es(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?F(e.data):e.data,s=w(n);if(!s)throw new It;if(s>Oe)throw new Yn({maxSize:Oe,size:s});const r=[];let i=!0,o=0;for(;i;){const a=ge(new Uint8Array(Tt));let c=0;for(;c<Ie;){const l=n.slice(o,o+(Bt-1));if(a.pushByte(0),a.pushBytes(l),l.length<31){a.pushByte(128),i=!1;break}c++,o+=31}r.push(a)}return t==="bytes"?r.map(a=>a.bytes):r.map(a=>P(a.bytes))}function vt(e){const{data:t,kzg:n,to:s}=e,r=e.blobs??es({data:t,to:s}),i=e.commitments??Te({blobs:r,kzg:n,to:s}),o=e.proofs??Pe({blobs:r,commitments:i,kzg:n,to:s}),a=[];for(let c=0;c<r.length;c++)a.push({blob:r[c],commitment:i[c],proof:o[c]});return a}function $t(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Un({transaction:e})}function At(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}class ts extends u{constructor({blockNumber:t,chain:n,contract:s}){super(`Chain "${n.name}" does not support contract "${s.name}".`,{metaMessages:["This could be due to any of the following:",...t&&s.blockCreated&&s.blockCreated>t?[`- The contract "${s.name}" was not deployed until block ${s.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${s.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class ns extends u{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class ss extends u{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
8
+ `),{name:"ChainNotFoundError"})}}class rs extends u{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class ie extends u{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function x(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const is={"0x0":"reverted","0x1":"success"};function Ct(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(n=>At(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?X(e.transactionIndex):null,status:e.status?is[e.status]:null,type:e.type?gt[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const os=Be("transactionReceipt",Ct);function as(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:s,chainId:r}=n;if(!B(s))throw new E({address:s});if(r<0)throw new ie({chainId:r})}ve(e)}function cs(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new It;for(const n of t){const s=w(n),r=X(et(n,0,1));if(s!==32)throw new Jn({hash:n,size:s});if(r!==Pt)throw new Qn({hash:n,version:r})}}ve(e)}function ve(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:s,to:r}=e;if(t<=0)throw new ie({chainId:t});if(r&&!B(r))throw new E({address:r});if(s&&s>se)throw new Y({maxFeePerGas:s});if(n&&s&&n>s)throw new Ee({maxFeePerGas:s,maxPriorityFeePerGas:n})}function us(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:s,maxFeePerGas:r,to:i}=e;if(t<=0)throw new ie({chainId:t});if(i&&!B(i))throw new E({address:i});if(n||r)throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(s&&s>se)throw new Y({maxFeePerGas:s})}function ls(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:s,maxFeePerGas:r,to:i}=e;if(i&&!B(i))throw new E({address:i});if(typeof t<"u"&&t<=0)throw new ie({chainId:t});if(n||r)throw new u("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(s&&s>se)throw new Y({maxFeePerGas:s})}function ds(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:s,chainId:r,nonce:i,...o}=n;t.push([r?f(r):"0x",s,i?f(i):"0x",...J({},o)])}return t}function oe(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:s,storageKeys:r}=e[n];for(let i=0;i<r.length;i++)if(r[i].length-2!==64)throw new zn({storageKey:r[i]});if(!B(s,{strict:!1}))throw new E({address:s});t.push([s,r])}return t}function fs(e,t){const n=$t(e);return n==="eip1559"?bs(e,t):n==="eip2930"?ms(e,t):n==="eip4844"?ps(e,t):n==="eip7702"?hs(e,t):xs(e,t)}function hs(e,t){const{authorizationList:n,chainId:s,gas:r,nonce:i,to:o,value:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:h,data:d}=e;as(e);const b=oe(h),p=ds(n);return L(["0x04",U([f(s),i?f(i):"0x",l?f(l):"0x",c?f(c):"0x",r?f(r):"0x",o??"0x",a?f(a):"0x",d??"0x",b,p,...J(e,t)])])}function ps(e,t){const{chainId:n,gas:s,nonce:r,to:i,value:o,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:h,data:d}=e;cs(e);let b=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(typeof b>"u"||typeof p>"u")){const S=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(_=>P(_)),Q=e.kzg,M=Te({blobs:S,kzg:Q});if(typeof b>"u"&&(b=Et({commitments:M})),typeof p>"u"){const _=Pe({blobs:S,commitments:M,kzg:Q});p=vt({blobs:S,commitments:M,proofs:_})}}const I=oe(h),H=[f(n),r?f(r):"0x",l?f(l):"0x",c?f(c):"0x",s?f(s):"0x",i??"0x",o?f(o):"0x",d??"0x",I,a?f(a):"0x",b??[],...J(e,t)],$e=[],Ae=[],Ce=[];if(p)for(let S=0;S<p.length;S++){const{blob:Q,commitment:M,proof:_}=p[S];$e.push(Q),Ae.push(M),Ce.push(_)}return L(["0x03",U(p?[H,$e,Ae,Ce]:H)])}function bs(e,t){const{chainId:n,gas:s,nonce:r,to:i,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,data:h}=e;ve(e);const d=oe(l),b=[f(n),r?f(r):"0x",c?f(c):"0x",a?f(a):"0x",s?f(s):"0x",i??"0x",o?f(o):"0x",h??"0x",d,...J(e,t)];return L(["0x02",U(b)])}function ms(e,t){const{chainId:n,gas:s,data:r,nonce:i,to:o,value:a,accessList:c,gasPrice:l}=e;us(e);const h=oe(c),d=[f(n),i?f(i):"0x",l?f(l):"0x",s?f(s):"0x",o??"0x",a?f(a):"0x",r??"0x",h,...J(e,t)];return L(["0x01",U(d)])}function xs(e,t){const{chainId:n=0,gas:s,data:r,nonce:i,to:o,value:a,gasPrice:c}=e;ls(e);let l=[i?f(i):"0x",c?f(c):"0x",s?f(s):"0x",o??"0x",a?f(a):"0x",r??"0x"];if(t){const h=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const p=27n+(t.v===27n?0n:1n);if(t.v!==p)throw new Fn({v:t.v});return p})(),d=A(t.r),b=A(t.s);l=[...l,f(h),d==="0x00"?"0x":d,b==="0x00"?"0x":b]}else n>0&&(l=[...l,f(n),"0x","0x"]);return U(l)}function J(e,t){const n=t??e,{v:s,yParity:r}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof s>"u"&&typeof r>"u")return[];const i=A(n.r),o=A(n.s);return[typeof r=="number"?r?f(1):"0x":s===0n?"0x":s===1n?f(1):s===27n?"0x":f(1),i==="0x00"?"0x":i,o==="0x00"?"0x":o]}const gs={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},ys={block:Vn({format(e){var n;return{transactions:(n=e.transactions)==null?void 0:n.map(s=>{if(typeof s=="string")return s;const r=re(s);return r.typeHex==="0x7e"&&(r.isSystemTx=s.isSystemTx,r.mint=s.mint?k(s.mint):void 0,r.sourceHash=s.sourceHash,r.type="deposit"),r}),stateRoot:e.stateRoot}}}),transaction:Mn({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?k(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:os({format(e){return{l1GasPrice:e.l1GasPrice?k(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?k(e.l1GasUsed):null,l1Fee:e.l1Fee?k(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function ws(e,t){return Ts(e)?Bs(e):fs(e,t)}const Es={transaction:ws};function Bs(e){Ps(e);const{sourceHash:t,data:n,from:s,gas:r,isSystemTx:i,mint:o,to:a,value:c}=e,l=[t,s,a??"0x",o?f(o):"0x",c?f(c):"0x",r?f(r):"0x",i?"0x1":"0x",n??"0x"];return L(["0x7e",U(l)])}function Ts(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function Ps(e){const{from:t,to:n}=e;if(t&&!B(t))throw new E({address:t});if(n&&!B(n))throw new E({address:n})}const T={contracts:gs,formatters:ys,serializers:Es},Is=42161,Ft=x({id:33139,name:"Ape Chain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:Is}),Ut=x({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),R=1,zt=x({...T,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...T.contracts,disputeGameFactory:{[R]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[R]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[R]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[R]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:R}),j=11155111,St=x({...T,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...T.contracts,disputeGameFactory:{[j]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[j]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[j]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[j]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:j}),kt=x({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),Lt=x({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),Ht=x({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),K=11155111,Gt=x({...T,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...T.contracts,disputeGameFactory:{[K]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[K]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[K]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[K]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:K}),Ot=x({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),W=1,Nt=x({...T,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...T.contracts,disputeGameFactory:{[W]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[W]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[W]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[W]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:W}),le=1,Mt=x({...T,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://zircuit1-mainnet.p2pify.com","https://zircuit1-mainnet.liquify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[le]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[le]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[le]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1});var m=(e=>(e[e.Mainnet=Ht.id]="Mainnet",e[e.Holesky=Lt.id]="Holesky",e[e.Base=zt.id]="Base",e[e.Bsc=kt.id]="Bsc",e[e.Arbitrum=Ut.id]="Arbitrum",e[e.ApeChain=Ft.id]="ApeChain",e[e.Soneium=Nt.id]="Soneium",e[e.Sepolia=Ot.id]="Sepolia",e[e.OptimismSepolia=Gt.id]="OptimismSepolia",e[e.BaseSepolia=St.id]="BaseSepolia",e[e.Zircuit=Mt.id]="Zircuit",e))(m||{});const vs={[m.Mainnet]:Ht,[m.Holesky]:Lt,[m.Base]:zt,[m.Bsc]:kt,[m.Arbitrum]:Ut,[m.ApeChain]:Ft,[m.Soneium]:Nt,[m.Sepolia]:Ot,[m.OptimismSepolia]:Gt,[m.BaseSepolia]:St,[m.Zircuit]:Mt};exports.BaseError=u;exports.Chain=m;exports.ChainDoesNotSupportContract=ts;exports.ChainMismatchError=ns;exports.ChainNotFoundError=ss;exports.ClientChainNotConfiguredError=rs;exports.ExecutionRevertedError=we;exports.FeeCapTooHighError=Y;exports.FeeCapTooLowError=lt;exports.FeeConflictError=Cn;exports.Hash=pe;exports.InsufficientFundsError=pt;exports.IntegerOutOfRangeError=Re;exports.IntrinsicGasTooHighError=bt;exports.IntrinsicGasTooLowError=mt;exports.InvalidAddressError=E;exports.InvalidBytesBooleanError=Dt;exports.InvalidBytesLengthError=_t;exports.LruMap=me;exports.NonceMaxValueError=ht;exports.NonceTooHighError=dt;exports.NonceTooLowError=ft;exports.PositionOutOfBoundsError=it;exports.TipAboveFeeCapError=Ee;exports.TransactionExecutionError=Sn;exports.TransactionNotFoundError=kn;exports.TransactionReceiptNotFoundError=Ln;exports.TransactionTypeNotSupportedError=xt;exports.UnknownNodeError=Nn;exports.VIEM_CHAINS=vs;exports.WaitForTransactionReceiptTimeoutError=Hn;exports.abytes=q;exports.aexists=Z;exports.ahash=Qt;exports.assertSize=z;exports.blobsToCommitments=Te;exports.blobsToProofs=Pe;exports.boolToHex=je;exports.bytesToHex=P;exports.checksumAddress=xe;exports.commitmentsToVersionedHashes=Et;exports.concat=Tn;exports.concatBytes=ln;exports.concatHex=L;exports.createCursor=ge;exports.formatBlock=yt;exports.formatEther=at;exports.formatGwei=C;exports.formatLog=At;exports.formatTransaction=re;exports.formatTransactionReceipt=Ct;exports.getAddress=En;exports.getTransactionType=$t;exports.hexToBigInt=k;exports.hexToBool=Kt;exports.hexToBytes=F;exports.hexToNumber=X;exports.isAddress=B;exports.isHex=O;exports.keccak256=Qe;exports.keccak_256=Je;exports.maxUint256=se;exports.numberToHex=de;exports.padHex=De;exports.prettyPrint=ye;exports.randomBytes=dn;exports.sha256=wt;exports.size=w;exports.slice=et;exports.sliceBytes=st;exports.sliceHex=rt;exports.stringToBytes=he;exports.stringToHex=Ke;exports.toBlobSidecars=vt;exports.toBytes=ne;exports.toBytes$1=fe;exports.toHex=f;exports.toRlp=U;exports.trim=A;
9
+ //# sourceMappingURL=constants-B96CDi8I.cjs.map