edge-currency-accountbased 2.11.2 → 2.12.0

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 (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/src/main/assets/edge-currency-accountbased/1964.chunk.js +2 -0
  3. package/android/src/main/assets/edge-currency-accountbased/2784.chunk.js +2 -0
  4. package/android/src/main/assets/edge-currency-accountbased/5336.chunk.js +2 -2
  5. package/android/src/main/assets/edge-currency-accountbased/5836.chunk.js +1 -1
  6. package/android/src/main/assets/edge-currency-accountbased/6642.chunk.js +4 -0
  7. package/android/src/main/assets/edge-currency-accountbased/7202.chunk.js +20 -0
  8. package/android/src/main/assets/edge-currency-accountbased/7481.chunk.js +3 -3
  9. package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +2 -2
  10. package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +9 -9
  11. package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -1
  12. package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
  13. package/lib/ethereum/EthereumEngine.js +16 -16
  14. package/lib/ethereum/EthereumNetwork.js +126 -1543
  15. package/lib/ethereum/ethereumInfos.js +4 -0
  16. package/lib/ethereum/ethereumTypes.js +1 -8
  17. package/lib/ethereum/fees/feeProviders.js +13 -2
  18. package/lib/ethereum/info/avalancheInfo.js +9 -10
  19. package/lib/ethereum/info/binancesmartchainInfo.js +13 -14
  20. package/lib/ethereum/info/celoInfo.js +10 -11
  21. package/lib/ethereum/info/ethDevInfo.js +6 -8
  22. package/lib/ethereum/info/ethereumInfo.js +40 -22
  23. package/lib/ethereum/info/ethereumclassicInfo.js +14 -8
  24. package/lib/ethereum/info/ethereumpowInfo.js +12 -10
  25. package/lib/ethereum/info/fantomInfo.js +13 -11
  26. package/lib/ethereum/info/filecoinFevmCalibrationInfo.js +125 -0
  27. package/lib/ethereum/info/filecoinFevmInfo.js +124 -0
  28. package/lib/ethereum/info/goerliInfo.js +12 -10
  29. package/lib/ethereum/info/kovanInfo.js +13 -12
  30. package/lib/ethereum/info/optimismInfo.js +10 -8
  31. package/lib/ethereum/info/polygonInfo.js +18 -16
  32. package/lib/ethereum/info/pulsechainInfo.js +10 -8
  33. package/lib/ethereum/info/rinkebyInfo.js +12 -11
  34. package/lib/ethereum/info/ropstenInfo.js +16 -13
  35. package/lib/ethereum/info/rskInfo.js +10 -8
  36. package/lib/ethereum/info/zksyncInfo.js +6 -8
  37. package/lib/ethereum/networkAdapters/AmberdataAdapter.js +104 -0
  38. package/lib/ethereum/networkAdapters/BlockbookAdapter.js +136 -0
  39. package/lib/ethereum/networkAdapters/BlockchairAdapter.js +99 -0
  40. package/lib/ethereum/networkAdapters/BlockcypherAdapter.js +73 -0
  41. package/lib/ethereum/networkAdapters/EvmScanAdapter.js +439 -0
  42. package/lib/ethereum/networkAdapters/FilfoxAdapter.js +311 -0
  43. package/lib/ethereum/networkAdapters/RpcAdapter.js +416 -0
  44. package/lib/ethereum/networkAdapters/types.js +136 -0
  45. package/lib/filecoin/FilecoinEngine.js +1 -1
  46. package/lib/filecoin/FilecoinTools.js +31 -4
  47. package/lib/filecoin/filecoinInfo.js +0 -1
  48. package/package.json +1 -1
  49. package/android/src/main/assets/edge-currency-accountbased/3666.chunk.js +0 -18
  50. package/android/src/main/assets/edge-currency-accountbased/4013.chunk.js +0 -4
  51. package/android/src/main/assets/edge-currency-accountbased/4336.chunk.js +0 -2
  52. package/android/src/main/assets/edge-currency-accountbased/8882.chunk.js +0 -4
package/CHANGELOG.md CHANGED
@@ -2,9 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.12.0 (2023-11-14)
6
+
5
7
  ## 2.11.2 (2023-11-13)
6
8
 
7
9
  - fixed: EVM balance sync failure if missing API key for one node type
10
+ - added: Filecoin FEVM
11
+ - added: Filecoin FEVM Testnet (Calibration)
12
+ - added: Filecoin wallets can send to 0x addresses for FEVM interop
13
+ - fixed: Removed unsafeBroadcastTx configuration for Filecoin
8
14
 
9
15
  ## 2.11.1 (2023-11-10)
10
16
 
@@ -0,0 +1,2 @@
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[1964],{21964:function(s,n,w){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=w(95811),m=w(17221),y=w(69282),h=w(51675),f=w(13550),l=w(23482),g=w(89509).Buffer;Object.assign(n,w(80884)),n.MAX_INTEGER=new f("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),n.TWO_POW256=new f("10000000000000000000000000000000000000000000000000000000000000000",16),n.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.SHA3_NULL_S=n.KECCAK256_NULL_S,n.KECCAK256_NULL=g.from(n.KECCAK256_NULL_S,"hex"),n.SHA3_NULL=n.KECCAK256_NULL,n.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.SHA3_RLP_ARRAY_S=n.KECCAK256_RLP_ARRAY_S,n.KECCAK256_RLP_ARRAY=g.from(n.KECCAK256_RLP_ARRAY_S,"hex"),n.SHA3_RLP_ARRAY=n.KECCAK256_RLP_ARRAY,n.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.SHA3_RLP_S=n.KECCAK256_RLP_S,n.KECCAK256_RLP=g.from(n.KECCAK256_RLP_S,"hex"),n.SHA3_RLP=n.KECCAK256_RLP,n.BN=f,n.rlp=h,n.secp256k1=m,n.zeros=function(e){return g.allocUnsafe(e).fill(0)},n.zeroAddress=function(){var e=20,i=n.zeros(e);return n.bufferToHex(i)},n.setLengthLeft=n.setLength=function(e,i,v){var u=n.zeros(i);return e=n.toBuffer(e),v?e.length<i?(e.copy(u),u):e.slice(0,i):e.length<i?(e.copy(u,i-e.length),u):e.slice(-i)},n.setLengthRight=function(e,i){return n.setLength(e,i,!0)},n.unpad=n.stripZeros=function(e){e=n.stripHexPrefix(e);for(var i=e[0];e.length>0&&i.toString()==="0";)e=e.slice(1),i=e[0];return e},n.toBuffer=function(e){if(!g.isBuffer(e))if(Array.isArray(e))e=g.from(e);else if(typeof e=="string")n.isHexString(e)?e=g.from(n.padToEven(n.stripHexPrefix(e)),"hex"):e=g.from(e);else if(typeof e=="number")e=n.intToBuffer(e);else if(e==null)e=g.allocUnsafe(0);else if(f.isBN(e))e=e.toArrayLike(g);else if(e.toArray)e=g.from(e.toArray());else throw new Error("invalid type");return e},n.bufferToInt=function(e){return new f(n.toBuffer(e)).toNumber()},n.bufferToHex=function(e){return e=n.toBuffer(e),"0x"+e.toString("hex")},n.fromSigned=function(e){return new f(e).fromTwos(256)},n.toUnsigned=function(e){return g.from(e.toTwos(256).toArray())},n.keccak=function(e,i){return e=n.toBuffer(e),i||(i=256),S("keccak"+i).update(e).digest()},n.keccak256=function(e){return n.keccak(e)},n.sha3=n.keccak,n.sha256=function(e){return e=n.toBuffer(e),l("sha256").update(e).digest()},n.ripemd160=function(e,i){e=n.toBuffer(e);var v=l("rmd160").update(e).digest();return i===!0?n.setLength(v,32):v},n.rlphash=function(e){return n.keccak(h.encode(e))},n.isValidPrivate=function(e){return m.privateKeyVerify(e)},n.isValidPublic=function(e,i){return e.length===64?m.publicKeyVerify(g.concat([g.from([4]),e])):i?m.publicKeyVerify(e):!1},n.pubToAddress=n.publicToAddress=function(e,i){return e=n.toBuffer(e),i&&e.length!==64&&(e=m.publicKeyConvert(e,!1).slice(1)),y(e.length===64),n.keccak(e).slice(-20)};var A=n.privateToPublic=function(e){return e=n.toBuffer(e),m.publicKeyCreate(e,!1).slice(1)};n.importPublic=function(e){return e=n.toBuffer(e),e.length!==64&&(e=m.publicKeyConvert(e,!1).slice(1)),e},n.ecsign=function(e,i){var v=m.sign(e,i),u={};return u.r=v.signature.slice(0,32),u.s=v.signature.slice(32,64),u.v=v.recovery+27,u},n.hashPersonalMessage=function(e){var i=n.toBuffer(`Ethereum Signed Message:
2
+ `+e.length.toString());return n.keccak(g.concat([i,e]))},n.ecrecover=function(e,i,v,u){var a=g.concat([n.setLength(v,32),n.setLength(u,32)],64),o=i-27;if(o!==0&&o!==1)throw new Error("Invalid signature v value");var t=m.recover(e,a,o);return m.publicKeyConvert(t,!1).slice(1)},n.toRpcSig=function(e,i,v){if(e!==27&&e!==28)throw new Error("Invalid recovery id");return n.bufferToHex(g.concat([n.setLengthLeft(i,32),n.setLengthLeft(v,32),n.toBuffer(e-27)]))},n.fromRpcSig=function(e){if(e=n.toBuffer(e),e.length!==65)throw new Error("Invalid signature length");var i=e[64];return i<27&&(i+=27),{v:i,r:e.slice(0,32),s:e.slice(32,64)}},n.privateToAddress=function(e){return n.publicToAddress(A(e))},n.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},n.isZeroAddress=function(e){var i=n.zeroAddress();return i===n.addHexPrefix(e)},n.toChecksumAddress=function(e){e=n.stripHexPrefix(e).toLowerCase();for(var i=n.keccak(e).toString("hex"),v="0x",u=0;u<e.length;u++)parseInt(i[u],16)>=8?v+=e[u].toUpperCase():v+=e[u];return v},n.isValidChecksumAddress=function(e){return n.isValidAddress(e)&&n.toChecksumAddress(e)===e},n.generateAddress=function(e,i){return e=n.toBuffer(e),i=new f(i),i.isZero()?i=null:i=g.from(i.toArray()),n.rlphash([e,i]).slice(-20)},n.isPrecompiled=function(e){var i=n.unpad(e);return i.length===1&&i[0]>=1&&i[0]<=8},n.addHexPrefix=function(e){return typeof e!="string"||n.isHexPrefixed(e)?e:"0x"+e},n.isValidSignature=function(e,i,v,u){var a=new f("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new f("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(i.length!==32||v.length!==32||e!==27&&e!==28||(i=new f(i),v=new f(v),i.isZero()||i.gt(o)||v.isZero()||v.gt(o))||u===!1&&new f(v).cmp(a)===1)},n.baToJSON=function(e){if(g.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var i=[],v=0;v<e.length;v++)i.push(n.baToJSON(e[v]));return i}},n.defineProperties=function(e,i,v){if(e.raw=[],e._fields=[],e.toJSON=function(a){if(a){var o={};return e._fields.forEach(function(t){o[t]="0x"+e[t].toString("hex")}),o}return n.baToJSON(this.raw)},e.serialize=function(){return h.encode(e.raw)},i.forEach(function(a,o){e._fields.push(a.name);function t(){return e.raw[o]}function c(d){d=n.toBuffer(d),d.toString("hex")==="00"&&!a.allowZero&&(d=g.allocUnsafe(0)),a.allowLess&&a.length?(d=n.stripZeros(d),y(a.length>=d.length,"The field "+a.name+" must not have more "+a.length+" bytes")):!(a.allowZero&&d.length===0)&&a.length&&y(a.length===d.length,"The field "+a.name+" must have byte length of "+a.length),e.raw[o]=d}Object.defineProperty(e,a.name,{enumerable:!0,configurable:!0,get:t,set:c}),a.default&&(e[a.name]=a.default),a.alias&&Object.defineProperty(e,a.alias,{enumerable:!1,configurable:!0,set:c,get:t})}),v)if(typeof v=="string"&&(v=g.from(n.stripHexPrefix(v),"hex")),g.isBuffer(v)&&(v=h.decode(v)),Array.isArray(v)){if(v.length>e._fields.length)throw new Error("wrong number of fields in data");v.forEach(function(a,o){e[e._fields[o]]=n.toBuffer(a)})}else if((typeof v>"u"?"undefined":r(v))==="object"){var u=Object.keys(v);i.forEach(function(a){u.indexOf(a.name)!==-1&&(e[a.name]=v[a.name]),u.indexOf(a.alias)!==-1&&(e[a.alias]=v[a.alias])})}else throw new Error("invalid data")}},80884:function(s,n,w){"use strict";var r=w(48764).Buffer,S=w(23944),m=w(49604);function y(o){var t=o;if(typeof t!="string")throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function h(o){var t=o.toString(16);return"0x"+t}function f(o){var t=h(o);return new r(y(t.slice(2)),"hex")}function l(o){if(typeof o!="string")throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof o+"'.");return r.byteLength(o,"utf8")}function g(o,t,c){if(Array.isArray(o)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof o+"'");if(Array.isArray(t)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(c)&&"some"||"every"](function(d){return o.indexOf(d)>=0})}function A(o){var t=new r(y(m(o).replace(/^0+|0+$/g,"")),"hex");return t.toString("utf8")}function e(o){var t="",c=0,d=o.length;for(o.substring(0,2)==="0x"&&(c=2);c<d;c+=2){var _=parseInt(o.substr(c,2),16);t+=String.fromCharCode(_)}return t}function i(o){var t=new r(o,"utf8");return"0x"+y(t.toString("hex")).replace(/^0+|0+$/g,"")}function v(o){for(var t="",c=0;c<o.length;c++){var d=o.charCodeAt(c),_=d.toString(16);t+=_.length<2?"0"+_:_}return"0x"+t}function u(o,t,c){if(!Array.isArray(o))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof o+"'");if(typeof t!="string")throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof t+"'.");for(var d=[],_=0;_<o.length;_++){var b=o[_][t];if(c&&!b)b="";else if(typeof b!="string")throw new Error("invalid abi");d.push(b)}return d}function a(o,t){return!(typeof o!="string"||!o.match(/^0x[0-9A-Fa-f]*$/)||t&&o.length!==2+2*t)}s.exports={arrayContainsArray:g,intToBuffer:f,getBinarySize:l,isHexPrefixed:S,stripHexPrefix:m,padToEven:y,intToHex:h,fromAscii:v,fromUtf8:i,toAscii:e,toUtf8:A,getKeys:u,isHexString:a}},23944:function(s){s.exports=function(w){if(typeof w!="string")throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof w+", while checking isHexPrefixed.");return w.slice(0,2)==="0x"}},95811:function(s,n,w){"use strict";s.exports=w(26066)(w(79653))},26066:function(s,n,w){"use strict";var r=w(37016),S=w(5675);s.exports=function(m){var y=r(m),h=S(m);return function(f,l){var g=typeof f=="string"?f.toLowerCase():f;switch(g){case"keccak224":return new y(1152,448,null,224,l);case"keccak256":return new y(1088,512,null,256,l);case"keccak384":return new y(832,768,null,384,l);case"keccak512":return new y(576,1024,null,512,l);case"sha3-224":return new y(1152,448,6,224,l);case"sha3-256":return new y(1088,512,6,256,l);case"sha3-384":return new y(832,768,6,384,l);case"sha3-512":return new y(576,1024,6,512,l);case"shake128":return new h(1344,256,31,l);case"shake256":return new h(1088,512,31,l);default:throw new Error("Invald algorithm: "+f)}}}},37016:function(s,n,w){"use strict";var r=w(89509).Buffer,S=w(42830).Transform,m=w(35717);s.exports=function(y){function h(f,l,g,A,e){S.call(this,e),this._rate=f,this._capacity=l,this._delimitedSuffix=g,this._hashBitLength=A,this._options=e,this._state=new y,this._state.initialize(f,l),this._finalized=!1}return m(h,S),h.prototype._transform=function(f,l,g){var A=null;try{this.update(f,l)}catch(e){A=e}g(A)},h.prototype._flush=function(f){var l=null;try{this.push(this.digest())}catch(g){l=g}f(l)},h.prototype.update=function(f,l){if(!r.isBuffer(f)&&typeof f!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return r.isBuffer(f)||(f=r.from(f,l)),this._state.absorb(f),this},h.prototype.digest=function(f){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var l=this._state.squeeze(this._hashBitLength/8);return f!==void 0&&(l=l.toString(f)),this._resetState(),l},h.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},h.prototype._clone=function(){var f=new h(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(f._state),f._finalized=this._finalized,f},h}},5675:function(s,n,w){"use strict";var r=w(89509).Buffer,S=w(42830).Transform,m=w(35717);s.exports=function(y){function h(f,l,g,A){S.call(this,A),this._rate=f,this._capacity=l,this._delimitedSuffix=g,this._options=A,this._state=new y,this._state.initialize(f,l),this._finalized=!1}return m(h,S),h.prototype._transform=function(f,l,g){var A=null;try{this.update(f,l)}catch(e){A=e}g(A)},h.prototype._flush=function(){},h.prototype._read=function(f){this.push(this.squeeze(f))},h.prototype.update=function(f,l){if(!r.isBuffer(f)&&typeof f!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return r.isBuffer(f)||(f=r.from(f,l)),this._state.absorb(f),this},h.prototype.squeeze=function(f,l){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var g=this._state.squeeze(f);return l!==void 0&&(g=g.toString(l)),g},h.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},h.prototype._clone=function(){var f=new h(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(f._state),f._finalized=this._finalized,f},h}},34040:function(s,n){"use strict";var w=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];n.p1600=function(r){for(var S=0;S<24;++S){var m=r[0]^r[10]^r[20]^r[30]^r[40],y=r[1]^r[11]^r[21]^r[31]^r[41],h=r[2]^r[12]^r[22]^r[32]^r[42],f=r[3]^r[13]^r[23]^r[33]^r[43],l=r[4]^r[14]^r[24]^r[34]^r[44],g=r[5]^r[15]^r[25]^r[35]^r[45],A=r[6]^r[16]^r[26]^r[36]^r[46],e=r[7]^r[17]^r[27]^r[37]^r[47],i=r[8]^r[18]^r[28]^r[38]^r[48],v=r[9]^r[19]^r[29]^r[39]^r[49],u=i^(h<<1|f>>>31),a=v^(f<<1|h>>>31),o=r[0]^u,t=r[1]^a,c=r[10]^u,d=r[11]^a,_=r[20]^u,b=r[21]^a,L=r[30]^u,B=r[31]^a,E=r[40]^u,z=r[41]^a;u=m^(l<<1|g>>>31),a=y^(g<<1|l>>>31);var Ee=r[2]^u,Le=r[3]^a,Be=r[12]^u,ze=r[13]^a,Ce=r[22]^u,Pe=r[23]^a,ke=r[32]^u,Te=r[33]^a,Re=r[42]^u,He=r[43]^a;u=h^(A<<1|e>>>31),a=f^(e<<1|A>>>31);var Ke=r[4]^u,pe=r[5]^a,Ne=r[14]^u,xe=r[15]^a,Ue=r[24]^u,Oe=r[25]^a,Ie=r[34]^u,Ve=r[35]^a,je=r[44]^u,De=r[45]^a;u=l^(i<<1|v>>>31),a=g^(v<<1|i>>>31);var Ze=r[6]^u,Ye=r[7]^a,Fe=r[16]^u,Me=r[17]^a,Je=r[26]^u,$e=r[27]^a,We=r[36]^u,Ge=r[37]^a,Xe=r[46]^u,Qe=r[47]^a;u=A^(m<<1|y>>>31),a=e^(y<<1|m>>>31);var qe=r[8]^u,er=r[9]^a,rr=r[18]^u,nr=r[19]^a,tr=r[28]^u,fr=r[29]^a,ir=r[38]^u,ar=r[39]^a,ur=r[48]^u,cr=r[49]^a,C=o,P=t,k=d<<4|c>>>28,T=c<<4|d>>>28,R=_<<3|b>>>29,H=b<<3|_>>>29,K=B<<9|L>>>23,p=L<<9|B>>>23,N=E<<18|z>>>14,x=z<<18|E>>>14,U=Ee<<1|Le>>>31,O=Le<<1|Ee>>>31,I=ze<<12|Be>>>20,V=Be<<12|ze>>>20,j=Ce<<10|Pe>>>22,D=Pe<<10|Ce>>>22,Z=Te<<13|ke>>>19,Y=ke<<13|Te>>>19,F=Re<<2|He>>>30,M=He<<2|Re>>>30,J=pe<<30|Ke>>>2,$=Ke<<30|pe>>>2,W=Ne<<6|xe>>>26,G=xe<<6|Ne>>>26,X=Oe<<11|Ue>>>21,Q=Ue<<11|Oe>>>21,q=Ie<<15|Ve>>>17,ee=Ve<<15|Ie>>>17,re=De<<29|je>>>3,ne=je<<29|De>>>3,te=Ze<<28|Ye>>>4,fe=Ye<<28|Ze>>>4,ie=Me<<23|Fe>>>9,ae=Fe<<23|Me>>>9,ue=Je<<25|$e>>>7,ce=$e<<25|Je>>>7,oe=We<<21|Ge>>>11,ve=Ge<<21|We>>>11,he=Qe<<24|Xe>>>8,de=Xe<<24|Qe>>>8,ge=qe<<27|er>>>5,le=er<<27|qe>>>5,ye=rr<<20|nr>>>12,we=nr<<20|rr>>>12,me=fr<<7|tr>>>25,_e=tr<<7|fr>>>25,be=ir<<8|ar>>>24,Se=ar<<8|ir>>>24,Ae=ur<<14|cr>>>18,se=cr<<14|ur>>>18;r[0]=C^~I&X,r[1]=P^~V&Q,r[10]=te^~ye&R,r[11]=fe^~we&H,r[20]=U^~W&ue,r[21]=O^~G&ce,r[30]=ge^~k&j,r[31]=le^~T&D,r[40]=J^~ie&me,r[41]=$^~ae&_e,r[2]=I^~X&oe,r[3]=V^~Q&ve,r[12]=ye^~R&Z,r[13]=we^~H&Y,r[22]=W^~ue&be,r[23]=G^~ce&Se,r[32]=k^~j&q,r[33]=T^~D&ee,r[42]=ie^~me&K,r[43]=ae^~_e&p,r[4]=X^~oe&Ae,r[5]=Q^~ve&se,r[14]=R^~Z&re,r[15]=H^~Y&ne,r[24]=ue^~be&N,r[25]=ce^~Se&x,r[34]=j^~q&he,r[35]=D^~ee&de,r[44]=me^~K&F,r[45]=_e^~p&M,r[6]=oe^~Ae&C,r[7]=ve^~se&P,r[16]=Z^~re&te,r[17]=Y^~ne&fe,r[26]=be^~N&U,r[27]=Se^~x&O,r[36]=q^~he&ge,r[37]=ee^~de&le,r[46]=K^~F&J,r[47]=p^~M&$,r[8]=Ae^~C&I,r[9]=se^~P&V,r[18]=re^~te&ye,r[19]=ne^~fe&we,r[28]=N^~U&W,r[29]=x^~O&G,r[38]=he^~ge&k,r[39]=de^~le&T,r[48]=F^~J&ie,r[49]=M^~$&ae,r[0]^=w[S*2],r[1]^=w[S*2+1]}}},79653:function(s,n,w){"use strict";var r=w(89509).Buffer,S=w(34040);function m(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}m.prototype.initialize=function(y,h){for(var f=0;f<50;++f)this.state[f]=0;this.blockSize=y/8,this.count=0,this.squeezing=!1},m.prototype.absorb=function(y){for(var h=0;h<y.length;++h)this.state[~~(this.count/4)]^=y[h]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(S.p1600(this.state),this.count=0)},m.prototype.absorbLastFewBits=function(y){this.state[~~(this.count/4)]^=y<<8*(this.count%4),(y&128)!==0&&this.count===this.blockSize-1&&S.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),S.p1600(this.state),this.count=0,this.squeezing=!0},m.prototype.squeeze=function(y){this.squeezing||this.absorbLastFewBits(1);for(var h=r.alloc(y),f=0;f<y;++f)h[f]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(S.p1600(this.state),this.count=0);return h},m.prototype.copy=function(y){for(var h=0;h<50;++h)y.state[h]=this.state[h];y.blockSize=this.blockSize,y.count=this.count,y.squeezing=this.squeezing},s.exports=m},51675:function(s,n,w){"use strict";var r=w(48764).Buffer,S=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.getLength=n.decode=n.encode=void 0;var m=S(w(13550));function y(t){if(Array.isArray(t)){for(var c=[],d=0;d<t.length;d++)c.push(y(t[d]));var _=r.concat(c);return r.concat([f(_.length,192),_])}else{var b=o(t);return b.length===1&&b[0]<128?b:r.concat([f(b.length,128),b])}}n.encode=y;function h(t,c){if(t[0]==="0"&&t[1]==="0")throw new Error("invalid RLP: extra zeros");return parseInt(t,c)}function f(t,c){if(t<56)return r.from([t+c]);var d=v(t),_=d.length/2,b=v(c+55+_);return r.from(b+d,"hex")}function l(t,c){if(c===void 0&&(c=!1),!t||t.length===0)return r.from([]);var d=o(t),_=A(d);if(c)return _;if(_.remainder.length!==0)throw new Error("invalid remainder");return _.data}n.decode=l;function g(t){if(!t||t.length===0)return r.from([]);var c=o(t),d=c[0];if(d<=127)return c.length;if(d<=183)return d-127;if(d<=191)return d-182;if(d<=247)return d-191;var _=d-246,b=h(c.slice(1,_).toString("hex"),16);return _+b}n.getLength=g;function A(t){var c,d,_,b,L,B=[],E=t[0];if(E<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(E<=183){if(c=E-127,E===128?_=r.from([]):_=t.slice(1,c),c===2&&_[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:_,remainder:t.slice(c)}}else if(E<=191){if(d=E-182,t.length-1<d)throw new Error("invalid RLP: not enough bytes for string length");if(c=h(t.slice(1,d).toString("hex"),16),c<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(_=t.slice(d,c+d),_.length<c)throw new Error("invalid RLP: not enough bytes for string");return{data:_,remainder:t.slice(c+d)}}else if(E<=247){for(c=E-191,b=t.slice(1,c);b.length;)L=A(b),B.push(L.data),b=L.remainder;return{data:B,remainder:t.slice(c)}}else{d=E-246,c=h(t.slice(1,d).toString("hex"),16);var z=d+c;if(z>t.length)throw new Error("invalid rlp: total length is larger than the data");if(b=t.slice(d,z),b.length===0)throw new Error("invalid rlp, List has a invalid length");for(;b.length;)L=A(b),B.push(L.data),b=L.remainder;return{data:B,remainder:t.slice(z)}}}function e(t){return t.slice(0,2)==="0x"}function i(t){return typeof t!="string"?t:e(t)?t.slice(2):t}function v(t){if(t<0)throw new Error("Invalid integer as argument, must be unsigned!");var c=t.toString(16);return c.length%2?"0"+c:c}function u(t){return t.length%2?"0"+t:t}function a(t){var c=v(t);return r.from(c,"hex")}function o(t){if(!r.isBuffer(t)){if(typeof t=="string")return e(t)?r.from(u(i(t)),"hex"):r.from(t);if(typeof t=="number"||typeof t=="bigint")return t?a(t):r.from([]);if(t==null)return r.from([]);if(t instanceof Uint8Array)return r.from(t);if(m.default.isBN(t))return r.from(t.toArray());throw new Error("invalid type")}return t}},49604:function(s,n,w){var r=w(23944);s.exports=function(m){return typeof m!="string"?m:r(m)?m.slice(2):m}}}]);
@@ -0,0 +1,2 @@
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[2784],{50144:function(xt,_,se){"use strict";var T=se(48764).Buffer,a=this&&this.__createBinding||(Object.create?function(b,w,I,S){S===void 0&&(S=I),Object.defineProperty(b,S,{enumerable:!0,get:function(){return w[I]}})}:function(b,w,I,S){S===void 0&&(S=I),b[S]=w[I]}),ce=this&&this.__setModuleDefault||(Object.create?function(b,w){Object.defineProperty(b,"default",{enumerable:!0,value:w})}:function(b,w){b.default=w}),G=this&&this.__importStar||function(b){if(b&&b.__esModule)return b;var w={};if(b!=null)for(var I in b)I!=="default"&&Object.prototype.hasOwnProperty.call(b,I)&&a(w,b,I);return ce(w,b),w};Object.defineProperty(_,"__esModule",{value:!0}),_.recoverTypedSignature_v4=_.recoverTypedSignature=_.signTypedData_v4=_.signTypedData=_.recoverTypedMessage=_.signTypedMessage=_.getEncryptionPublicKey=_.decryptSafely=_.decrypt=_.encryptSafely=_.encrypt=_.recoverTypedSignatureLegacy=_.signTypedDataLegacy=_.typedSignatureHash=_.extractPublicKey=_.recoverPersonalSignature=_.personalSign=_.normalize=_.concatSig=_.TypedDataUtils=_.TYPED_MESSAGE_SCHEMA=void 0;const P=G(se(21964)),V=G(se(68142)),C=G(se(50780)),be=G(se(16885)),Fe={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]};_.TYPED_MESSAGE_SCHEMA=Fe;const de={encodeData(b,w,I,S=!0){const R=["bytes32"],N=[this.hashType(b,I)];if(S){const Z=(z,q,oe)=>{if(I[q]!==void 0)return["bytes32",oe==null?"0x0000000000000000000000000000000000000000000000000000000000000000":P.keccak(this.encodeData(q,oe,I,S))];if(oe===void 0)throw new Error(`missing value for field ${z} of type ${q}`);if(q==="bytes")return["bytes32",P.keccak(oe)];if(q==="string")return typeof oe=="string"&&(oe=T.from(oe,"utf8")),["bytes32",P.keccak(oe)];if(q.lastIndexOf("]")===q.length-1){const vt=q.slice(0,q.lastIndexOf("[")),Et=oe.map(Me=>Z(z,vt,Me));return["bytes32",P.keccak(V.rawEncode(Et.map(([Me])=>Me),Et.map(([,Me])=>Me)))]}return[q,oe]};for(const z of I[b]){const[q,oe]=Z(z.name,z.type,w[z.name]);R.push(q),N.push(oe)}}else for(const Z of I[b]){let z=w[Z.name];if(z!==void 0)if(Z.type==="bytes")R.push("bytes32"),z=P.keccak(z),N.push(z);else if(Z.type==="string")R.push("bytes32"),typeof z=="string"&&(z=T.from(z,"utf8")),z=P.keccak(z),N.push(z);else if(I[Z.type]!==void 0)R.push("bytes32"),z=P.keccak(this.encodeData(Z.type,z,I,S)),N.push(z);else{if(Z.type.lastIndexOf("]")===Z.type.length-1)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");R.push(Z.type),N.push(z)}}return V.rawEncode(R,N)},encodeType(b,w){let I="",S=this.findTypeDependencies(b,w).filter(R=>R!==b);S=[b].concat(S.sort());for(const R of S){if(!w[R])throw new Error(`No type definition specified: ${R}`);I+=`${R}(${w[R].map(({name:Z,type:z})=>`${z} ${Z}`).join(",")})`}return I},findTypeDependencies(b,w,I=[]){if([b]=b.match(/^\w*/u),I.includes(b)||w[b]===void 0)return I;I.push(b);for(const S of w[b])for(const R of this.findTypeDependencies(S.type,w,I))!I.includes(R)&&I.push(R);return I},hashStruct(b,w,I,S=!0){return P.keccak(this.encodeData(b,w,I,S))},hashType(b,w){return P.keccak(this.encodeType(b,w))},sanitizeData(b){const w={};for(const I in Fe.properties)b[I]&&(w[I]=b[I]);return"types"in w&&(w.types=Object.assign({EIP712Domain:[]},w.types)),w},sign(b,w=!0){const I=this.sanitizeData(b),S=[T.from("1901","hex")];return S.push(this.hashStruct("EIP712Domain",I.domain,I.types,w)),I.primaryType!=="EIP712Domain"&&S.push(this.hashStruct(I.primaryType,I.message,I.types,w)),P.keccak(T.concat(S))}};_.TypedDataUtils=de;function ye(b,w,I){const S=P.fromSigned(w),R=P.fromSigned(I),N=P.bufferToInt(b),Z=Ee(P.toUnsigned(S).toString("hex"),64),z=Ee(P.toUnsigned(R).toString("hex"),64),q=P.stripHexPrefix(P.intToHex(N));return P.addHexPrefix(Z.concat(z,q)).toString("hex")}_.concatSig=ye;function Re(b){if(!!b){if(typeof b=="number"){const w=P.toBuffer(b);b=P.bufferToHex(w)}if(typeof b!="string"){let w="eth-sig-util.normalize() requires hex string or integer input.";throw w+=` received ${typeof b}: ${b}`,new Error(w)}return P.addHexPrefix(b.toLowerCase())}}_.normalize=Re;function _e(b,w){const I=P.toBuffer(w.data),S=P.hashPersonalMessage(I),R=P.ecsign(S,b);return P.bufferToHex(ye(R.v,R.r,R.s))}_.personalSign=_e;function je(b){const w=yt(b),I=P.publicToAddress(w);return P.bufferToHex(I)}_.recoverPersonalSignature=je;function ke(b){return`0x${yt(b).toString("hex")}`}_.extractPublicKey=ke;function rt(b){const w=ut(b);return P.bufferToHex(w)}_.typedSignatureHash=rt;function Te(b,w){const I=ut(w.data),S=P.ecsign(I,b);return P.bufferToHex(ye(S.v,S.r,S.s))}_.signTypedDataLegacy=Te;function st(b){const w=ut(b.data),I=Je(w,b.sig),S=P.publicToAddress(I);return P.bufferToHex(S)}_.recoverTypedSignatureLegacy=st;function Xe(b,w,I){switch(I){case"x25519-xsalsa20-poly1305":{if(typeof w.data!="string")throw new Error('Cannot detect secret message, message params should be of the form {data: "secret message"} ');const S=C.box.keyPair();let R;try{R=be.decodeBase64(b)}catch{throw new Error("Bad public key")}const N=be.decodeUTF8(w.data),Z=C.randomBytes(C.box.nonceLength),z=C.box(N,Z,R,S.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:be.encodeBase64(Z),ephemPublicKey:be.encodeBase64(S.publicKey),ciphertext:be.encodeBase64(z)}}default:throw new Error("Encryption type/version not supported")}}_.encrypt=Xe;function v(b,w,I){const{data:N}=w;if(!N)throw new Error("Cannot encrypt empty msg.data");if(typeof N=="object"&&"toJSON"in N)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const Z={data:N,padding:""},q=T.byteLength(JSON.stringify(Z),"utf-8")%2048;let oe=0;q>0&&(oe=2048-q-16),Z.padding="0".repeat(oe);const vt={data:JSON.stringify(Z)};return Xe(b,vt,I)}_.encryptSafely=v;function H(b,w){switch(b.version){case"x25519-xsalsa20-poly1305":{const I=wt(w),S=C.box.keyPair.fromSecretKey(I).secretKey,R=be.decodeBase64(b.nonce),N=be.decodeBase64(b.ciphertext),Z=be.decodeBase64(b.ephemPublicKey),z=C.box.open(N,R,Z,S);let q;try{q=be.encodeUTF8(z)}catch{throw new Error("Decryption failed.")}if(q)return q;throw new Error("Decryption failed.")}default:throw new Error("Encryption type/version not supported.")}}_.decrypt=H;function F(b,w){return JSON.parse(H(b,w)).data}_.decryptSafely=F;function j(b){const w=wt(b),I=C.box.keyPair.fromSecretKey(w).publicKey;return be.encodeBase64(I)}_.getEncryptionPublicKey=j;function te(b,w,I="V4"){switch(I){case"V1":return Te(b,w);case"V3":return Le(b,w);case"V4":default:return we(b,w)}}_.signTypedMessage=te;function xe(b,w="V4"){switch(w){case"V1":return st(b);case"V3":return Oe(b);case"V4":default:return qe(b)}}_.recoverTypedMessage=xe;function Le(b,w){const I=de.sign(w.data,!1),S=P.ecsign(I,b);return P.bufferToHex(ye(S.v,S.r,S.s))}_.signTypedData=Le;function we(b,w){const I=de.sign(w.data),S=P.ecsign(I,b);return P.bufferToHex(ye(S.v,S.r,S.s))}_.signTypedData_v4=we;function Oe(b){const w=de.sign(b.data,!1),I=Je(w,b.sig),S=P.publicToAddress(I);return P.bufferToHex(S)}_.recoverTypedSignature=Oe;function qe(b){const w=de.sign(b.data),I=Je(w,b.sig),S=P.publicToAddress(I);return P.bufferToHex(S)}_.recoverTypedSignature_v4=qe;function ut(b){const w=new Error("Expect argument to be non-empty array");if(typeof b!="object"||!("length"in b)||!b.length)throw w;const I=b.map(function(N){return N.type==="bytes"?P.toBuffer(N.value):N.value}),S=b.map(function(N){return N.type}),R=b.map(function(N){if(!N.name)throw w;return`${N.type} ${N.name}`});return V.soliditySHA3(["bytes32","bytes32"],[V.soliditySHA3(new Array(b.length).fill("string"),R),V.soliditySHA3(S,I)])}function Je(b,w){const I=P.toBuffer(w),S=P.fromRpcSig(I);return P.ecrecover(b,S.v,S.r,S.s)}function yt(b){const w=P.toBuffer(b.data),I=P.hashPersonalMessage(w);return Je(I,b.sig)}function Ee(b,w){let I=`${b}`;for(;I.length<w;)I=`0${I}`;return I}function wt(b){const w=T.from(b,"hex").toString("base64");return be.decodeBase64(w)}},16885:function(xt,_,se){var T=se(88924).Buffer;(function(a,ce){"use strict";xt.exports?xt.exports=ce():(a.nacl||(a.nacl={}),a.nacl.util=ce())})(this,function(){"use strict";var a={};function ce(G){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(G))throw new TypeError("invalid encoding")}return a.decodeUTF8=function(G){if(typeof G!="string")throw new TypeError("expected string");var P,V=unescape(encodeURIComponent(G)),C=new Uint8Array(V.length);for(P=0;P<V.length;P++)C[P]=V.charCodeAt(P);return C},a.encodeUTF8=function(G){var P,V=[];for(P=0;P<G.length;P++)V.push(String.fromCharCode(G[P]));return decodeURIComponent(escape(V.join("")))},typeof atob>"u"?typeof T.from<"u"?(a.encodeBase64=function(G){return T.from(G).toString("base64")},a.decodeBase64=function(G){return ce(G),new Uint8Array(Array.prototype.slice.call(T.from(G,"base64"),0))}):(a.encodeBase64=function(G){return new T(G).toString("base64")},a.decodeBase64=function(G){return ce(G),new Uint8Array(Array.prototype.slice.call(new T(G,"base64"),0))}):(a.encodeBase64=function(G){var P,V=[],C=G.length;for(P=0;P<C;P++)V.push(String.fromCharCode(G[P]));return btoa(V.join(""))},a.decodeBase64=function(G){ce(G);var P,V=atob(G),C=new Uint8Array(V.length);for(P=0;P<V.length;P++)C[P]=V.charCodeAt(P);return C}),a})},35742:function(xt,_,se){"use strict";se.d(_,{qo:function(){return ue},Gn:function(){return Ae}});var T=se(82090),ce=(m,d=0)=>{let f=~~d,c=0;for(let E=0;E<m.length;E++)c+=m[E];return f+=c%256,f%256},G=se(48764),V=(m,d)=>G.Buffer.from(m,d);function C(m,d){const f=(c,E)=>d(V(c),E)>>>0;return f.signed=(c,E)=>d(V(c),E),f.unsigned=f,f.model=m,f}var be=C("crc1",ce);let Fe=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];typeof Int32Array<"u"&&(Fe=new Int32Array(Fe));var ye=(m,d=0)=>{let f=~~d;for(let c=0;c<m.length;c++)f=Fe[(f^m[c])&255]&255;return f},Re=C("crc-8",ye);let _e=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];typeof Int32Array<"u"&&(_e=new Int32Array(_e));var ke=(m,d=0)=>{let f=~~d;for(let c=0;c<m.length;c++)f=_e[(f^m[c])&255]&255;return f},rt=C("dallas-1-wire",ke);let Te=[0,213,127,170,254,43,129,84,41,252,86,131,215,2,168,125,82,135,45,248,172,121,211,6,123,174,4,209,133,80,250,47,164,113,219,14,90,143,37,240,141,88,242,39,115,166,12,217,246,35,137,92,8,221,119,162,223,10,160,117,33,244,94,139,157,72,226,55,99,182,28,201,180,97,203,30,74,159,53,224,207,26,176,101,49,228,78,155,230,51,153,76,24,205,103,178,57,236,70,147,199,18,184,109,16,197,111,186,238,59,145,68,107,190,20,193,149,64,234,63,66,151,61,232,188,105,195,22,239,58,144,69,17,196,110,187,198,19,185,108,56,237,71,146,189,104,194,23,67,150,60,233,148,65,235,62,106,191,21,192,75,158,52,225,181,96,202,31,98,183,29,200,156,73,227,54,25,204,102,179,231,50,152,77,48,229,79,154,206,27,177,100,114,167,13,216,140,89,243,38,91,142,36,241,165,112,218,15,32,245,95,138,222,11,161,116,9,220,118,163,247,34,136,93,214,3,169,124,40,253,87,130,255,42,128,85,1,212,126,171,132,81,251,46,122,175,5,208,173,120,210,7,83,134,44,249];typeof Int32Array<"u"&&(Te=new Int32Array(Te));var Xe=(m,d=0)=>{let f=~~d;for(let c=0;c<m.length;c++)f=Te[(f^m[c])&255]&255;return f},v=C("crc-8-dvbs2",Xe);let H=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(H=new Int32Array(H));var j=(m,d=0)=>{let f=~~d;for(let c=0;c<m.length;c++)f=(H[(f^m[c])&255]^f>>8)&65535;return f},te=C("crc-16",j);let xe=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];typeof Int32Array<"u"&&(xe=new Int32Array(xe));var we=(m,d)=>{let f=typeof d<"u"?~~d:65535;for(let c=0;c<m.length;c++)f=(xe[(f>>8^m[c])&255]^f<<8)&65535;return f},Oe=C("ccitt",we);let qe=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];typeof Int32Array<"u"&&(qe=new Int32Array(qe));var Je=(m,d)=>{let f=typeof d<"u"?~~d:65535;for(let c=0;c<m.length;c++)f=(qe[(f^m[c])&255]^f>>8)&65535;return f},yt=C("crc-16-modbus",Je),wt=(m,d)=>{let f=typeof d<"u"?~~d:0;for(let c=0;c<m.length;c++){let E=f>>>8&255;E^=m[c]&255,E^=E>>>4,f=f<<8&65535,f^=E,E=E<<5&65535,f^=E,E=E<<7&65535,f^=E}return f},b=C("xmodem",wt);let w=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];typeof Int32Array<"u"&&(w=new Int32Array(w));var S=(m,d)=>{let f=typeof d<"u"?~~d:0;for(let c=0;c<m.length;c++)f=(w[(f^m[c])&255]^f>>8)&65535;return f},R=C("kermit",S);let N=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];typeof Int32Array<"u"&&(N=new Int32Array(N));var z=(m,d)=>{let f=typeof d<"u"?~~d:11994318;for(let c=0;c<m.length;c++)f=(N[(f>>16^m[c])&255]^f<<8)&16777215;return f},q=C("crc-24",z);let oe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(oe=new Int32Array(oe));var Et=(m,d)=>{let f=d===0?0:~~d^-1;for(let c=0;c<m.length;c++)f=oe[(f^m[c])&255]^f>>>8;return f^-1},Me=C("crc-32",Et);let At=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];typeof Int32Array<"u"&&(At=new Int32Array(At));var Ze=(m,d)=>{let f=typeof d<"u"?~~d:4294967295;for(let c=0;c<m.length;c++)f=At[(f>>24^m[c])&255]^f<<8;return f},Wt=C("crc-32-mpeg",Ze);let Se=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(Se=new Int32Array(Se));var Ut=(m,d=-1)=>{let f=d===0?0:~~d;for(let c=0;c<m.length;c++)f=Se[(f^m[c])&255]^f>>>8;return f},Mt=C("jam",Ut),Qt={crc1:be,crc8:Re,crc81wire:rt,crc8dvbs2:v,crc16:te,crc16ccitt:Oe,crc16modbus:yt,crc16xmodem:b,crc16kermit:R,crc24:q,crc32:Me,crc32mpeg2:Wt,crcjam:Mt},It=se(17187);const We={mainnet:{name:"mainnet",chainId:1,networkId:1,defaultHardfork:"shanghai",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"},{name:"arrowGlacier",block:13773e3,forkHash:"0x20c327fc"},{name:"grayGlacier",block:1505e4,forkHash:"0xf0afd0e3"},{name:"paris",ttd:"58750000000000000000000",block:15537394,forkHash:"0xf0afd0e3"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,timestamp:"1681338455",forkHash:"0xdce96c2d"},{name:"cancun",block:null,forkHash:null}],bootstrapNodes:[{ip:"18.138.108.67",port:30303,id:"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666",location:"ap-southeast-1-001",comment:"bootnode-aws-ap-southeast-1-001"},{ip:"3.209.45.79",port:30303,id:"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de",location:"us-east-1-001",comment:"bootnode-aws-us-east-1-001"},{ip:"65.108.70.101",port:30303,id:"2b252ab6a1d0f971d9722cb839a42cb81db019ba44c08754628ab4a823487071b5695317c8ccd085219c3a03af063495b2f1da8d18218da2d6a82981b45e6ffc",location:"eu-west-1-001",comment:"bootnode-hetzner-hel"},{ip:"157.90.35.166",port:30303,id:"4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052",location:"eu-central-1-001",comment:"bootnode-hetzner-fsn"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]},goerli:{name:"goerli",chainId:5,networkId:5,defaultHardfork:"shanghai",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"},{name:"paris",ttd:"10790000",block:7382819,forkHash:"0xb8c6299d"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,timestamp:"1678832736",forkHash:"0xf9843abf"},{name:"cancun",block:null,forkHash:null}],bootstrapNodes:[{ip:"51.141.78.53",port:30303,id:"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a",location:"",comment:"Upstream bootnode 1"},{ip:"13.93.54.137",port:30303,id:"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b",location:"",comment:"Upstream bootnode 2"},{ip:"94.237.54.114",port:30313,id:"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291",location:"",comment:"Upstream bootnode 3"},{ip:"18.218.250.66",port:30313,id:"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949",location:"",comment:"Upstream bootnode 4"},{ip:"3.11.147.67",port:30303,id:"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91",location:"",comment:"Ethereum Foundation bootnode"},{ip:"51.15.116.226",port:30303,id:"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:30303,id:"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:40303,id:"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd",location:"",comment:"Goerli Initiative bootnode"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]},sepolia:{name:"sepolia",chainId:11155111,networkId:11155111,defaultHardfork:"shanghai",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network to replace Ropsten",url:"https://github.com/ethereum/go-ethereum/pull/23730",genesis:{timestamp:"0x6159af19",gasLimit:3e7,difficulty:131072,nonce:"0x0000000000000000",extraData:"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfe3366e7"},{name:"homestead",block:0,forkHash:"0xfe3366e7"},{name:"tangerineWhistle",block:0,forkHash:"0xfe3366e7"},{name:"spuriousDragon",block:0,forkHash:"0xfe3366e7"},{name:"byzantium",block:0,forkHash:"0xfe3366e7"},{name:"constantinople",block:0,forkHash:"0xfe3366e7"},{name:"petersburg",block:0,forkHash:"0xfe3366e7"},{name:"istanbul",block:0,forkHash:"0xfe3366e7"},{name:"muirGlacier",block:0,forkHash:"0xfe3366e7"},{name:"berlin",block:0,forkHash:"0xfe3366e7"},{name:"london",block:0,forkHash:"0xfe3366e7"},{name:"paris",ttd:"17000000000000000",block:1450409,forkHash:"0xfe3366e7"},{name:"mergeForkIdTransition",block:1735371,forkHash:"0xb96cbd13"},{name:"shanghai",block:null,timestamp:"1677557088",forkHash:"0xf7f9bc08"},{name:"cancun",block:null,forkHash:null}],bootstrapNodes:[{ip:"18.168.182.86",port:30303,id:"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066",location:"",comment:"geth"},{ip:"52.14.151.177",port:30303,id:"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7",location:"",comment:"besu"},{ip:"165.22.196.173",port:30303,id:"ce970ad2e9daa9e14593de84a8b49da3d54ccfdf83cbc4fe519cb8b36b5918ed4eab087dedd4a62479b8d50756b492d5f762367c8d20329a7854ec01547568a6",location:"",comment:"EF"},{ip:"65.108.95.67",port:30303,id:"075503b13ed736244896efcde2a992ec0b451357d46cb7a8132c0384721742597fc8f0d91bbb40bb52e7d6e66728d36a1fda09176294e4a30cfac55dcce26bc6",location:"",comment:"lodestar"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net"]}};var ue;(function(m){m[m.Mainnet=1]="Mainnet",m[m.Goerli=5]="Goerli",m[m.Sepolia=11155111]="Sepolia"})(ue||(ue={}));const Gt={[ue.Mainnet]:{blockNumber:BigInt(0),stateRoot:(0,T.nr)("0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544")},[ue.Goerli]:{blockNumber:BigInt(0),stateRoot:(0,T.nr)("0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008")},[ue.Sepolia]:{blockNumber:BigInt(0),stateRoot:(0,T.nr)("0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494")}};var k;(function(m){m.Chainstart="chainstart",m.Homestead="homestead",m.Dao="dao",m.TangerineWhistle="tangerineWhistle",m.SpuriousDragon="spuriousDragon",m.Byzantium="byzantium",m.Constantinople="constantinople",m.Petersburg="petersburg",m.Istanbul="istanbul",m.MuirGlacier="muirGlacier",m.Berlin="berlin",m.London="london",m.ArrowGlacier="arrowGlacier",m.GrayGlacier="grayGlacier",m.MergeForkIdTransition="mergeForkIdTransition",m.Paris="paris",m.Shanghai="shanghai",m.Cancun="cancun"})(k||(k={}));var ht;(function(m){m.ProofOfStake="pos",m.ProofOfWork="pow",m.ProofOfAuthority="poa"})(ht||(ht={}));var Ue;(function(m){m.Ethash="ethash",m.Clique="clique",m.Casper="casper"})(Ue||(Ue={}));var he;(function(m){m.PolygonMainnet="polygon-mainnet",m.PolygonMumbai="polygon-mumbai",m.ArbitrumOne="arbitrum-one",m.xDaiChain="x-dai-chain",m.OptimisticKovan="optimistic-kovan",m.OptimisticEthereum="optimistic-ethereum"})(he||(he={}));var K;(function(m){m.Draft="draft",m.Review="review",m.Final="final"})(K||(K={}));const Ge={1153:{comment:"Transient storage opcodes",url:"https://eips.ethereum.org/EIPS/eip-1153",status:K.Review,minimumHardfork:k.Chainstart,requiredEIPs:[],gasPrices:{tstore:{v:100,d:"Base fee of the TSTORE opcode"},tload:{v:100,d:"Base fee of the TLOAD opcode"}}},1559:{comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:K.Final,minimumHardfork:k.Berlin,requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}}},2315:{comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:K.Draft,minimumHardfork:k.Istanbul,requiredEIPs:[],gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}}},2565:{comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:K.Final,minimumHardfork:k.Byzantium,requiredEIPs:[],gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}}},2718:{comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:K.Final,minimumHardfork:k.Chainstart,requiredEIPs:[]},2929:{comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:K.Final,minimumHardfork:k.Chainstart,requiredEIPs:[],gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}}},2930:{comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:K.Final,minimumHardfork:k.Istanbul,requiredEIPs:[2718,2929],gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}}},3074:{comment:"AUTH and AUTHCALL opcodes",url:"https://eips.ethereum.org/EIPS/eip-3074",status:K.Review,minimumHardfork:k.London,requiredEIPs:[],gasPrices:{auth:{v:3100,d:"Gas cost of the AUTH opcode"},authcall:{v:0,d:"Gas cost of the AUTHCALL opcode"},authcallValueTransfer:{v:6700,d:"Paid for CALL when the value transfer is non-zero"}}},3198:{comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:K.Final,minimumHardfork:k.London,requiredEIPs:[],gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}}},3529:{comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:K.Final,minimumHardfork:k.Berlin,requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}}},3540:{comment:"EVM Object Format (EOF) v1",url:"https://eips.ethereum.org/EIPS/eip-3540",status:K.Review,minimumHardfork:k.London,requiredEIPs:[3541]},3541:{comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:K.Final,minimumHardfork:k.Berlin,requiredEIPs:[]},3554:{comment:"Difficulty Bomb Delay to December 1st 2021",url:"https://eips.ethereum.org/EIPS/eip-3554",status:K.Final,minimumHardfork:k.MuirGlacier,requiredEIPs:[],pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}},3607:{comment:"Reject transactions from senders with deployed code",url:"https://eips.ethereum.org/EIPS/eip-3607",status:K.Final,minimumHardfork:k.Chainstart,requiredEIPs:[]},3651:{comment:"Warm COINBASE",url:"https://eips.ethereum.org/EIPS/eip-3651",status:K.Review,minimumHardfork:k.London,requiredEIPs:[2929]},3670:{comment:"EOF - Code Validation",url:"https://eips.ethereum.org/EIPS/eip-3670",status:"Review",minimumHardfork:k.London,requiredEIPs:[3540],gasConfig:{},gasPrices:{},vm:{},pow:{}},3675:{comment:"Upgrade consensus to Proof-of-Stake",url:"https://eips.ethereum.org/EIPS/eip-3675",status:K.Final,minimumHardfork:k.London,requiredEIPs:[]},3855:{comment:"PUSH0 instruction",url:"https://eips.ethereum.org/EIPS/eip-3855",status:K.Review,minimumHardfork:k.Chainstart,requiredEIPs:[],gasPrices:{push0:{v:2,d:"Base fee of the PUSH0 opcode"}}},3860:{comment:"Limit and meter initcode",url:"https://eips.ethereum.org/EIPS/eip-3860",status:K.Review,minimumHardfork:k.SpuriousDragon,requiredEIPs:[],gasPrices:{initCodeWordCost:{v:2,d:"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},vm:{maxInitCodeSize:{v:49152,d:"Maximum length of initialization code when creating a contract"}}},4345:{comment:"Difficulty Bomb Delay to June 2022",url:"https://eips.ethereum.org/EIPS/eip-4345",status:K.Final,minimumHardfork:k.London,requiredEIPs:[],pow:{difficultyBombDelay:{v:107e5,d:"the amount of blocks to delay the difficulty bomb with"}}},4399:{comment:"Supplant DIFFICULTY opcode with PREVRANDAO",url:"https://eips.ethereum.org/EIPS/eip-4399",status:K.Review,minimumHardfork:k.London,requiredEIPs:[],gasPrices:{prevrandao:{v:2,d:"Base fee of the PREVRANDAO opcode (previously DIFFICULTY)"}}},4788:{comment:"Beacon block root in the EVM",url:"https://eips.ethereum.org/EIPS/eip-4788",status:K.Draft,minimumHardfork:k.Cancun,requiredEIPs:[],gasPrices:{beaconrootCost:{v:4200,d:"Gas cost when calling the beaconroot stateful precompile"}},vm:{historicalRootsLength:{v:98304,d:"The modulo parameter of the beaconroot ring buffer in the beaconroot statefull precompile"}}},4844:{comment:"Shard Blob Transactions",url:"https://eips.ethereum.org/EIPS/eip-4844",status:K.Draft,minimumHardfork:k.Paris,requiredEIPs:[1559,2718,2930,4895],gasConfig:{blobGasPerBlob:{v:131072,d:"The base fee for blob gas per blob"},targetBlobGasPerBlock:{v:393216,d:"The target blob gas consumed per block"},maxblobGasPerBlock:{v:786432,d:"The max blob gas allowable per block"},blobGasPriceUpdateFraction:{v:3338477,d:"The denominator used in the exponential when calculating a blob gas price"}},gasPrices:{simpleGasPerBlob:{v:12e3,d:"The basic gas fee for each blob"},minBlobGasPrice:{v:1,d:"The minimum fee per blob gas"},kzgPointEvaluationGasPrecompilePrice:{v:5e4,d:"The fee associated with the point evaluation precompile"},blobhash:{v:3,d:"Base fee of the BLOBHASH opcode"}},sharding:{blobCommitmentVersionKzg:{v:1,d:"The number indicated a versioned hash is a KZG commitment"},fieldElementsPerBlob:{v:4096,d:"The number of field elements allowed per blob"}}},4895:{comment:"Beacon chain push withdrawals as operations",url:"https://eips.ethereum.org/EIPS/eip-4895",status:K.Review,minimumHardfork:k.Paris,requiredEIPs:[]},5133:{comment:"Delaying Difficulty Bomb to mid-September 2022",url:"https://eips.ethereum.org/EIPS/eip-5133",status:K.Draft,minimumHardfork:k.GrayGlacier,requiredEIPs:[],pow:{difficultyBombDelay:{v:114e5,d:"the amount of blocks to delay the difficulty bomb with"}}},5656:{comment:"MCOPY - Memory copying instruction",url:"https://eips.ethereum.org/EIPS/eip-5656",status:K.Draft,minimumHardfork:k.Shanghai,requiredEIPs:[],gasPrices:{mcopy:{v:3,d:"Base fee of the MCOPY opcode"}}},6780:{comment:"SELFDESTRUCT only in same transaction",url:"https://eips.ethereum.org/EIPS/eip-6780",status:K.Draft,minimumHardfork:k.London,requiredEIPs:[]}};var ne;(function(m){m.Draft="draft",m.Review="review",m.Final="final"})(ne||(ne={}));const Nt={chainstart:{name:"chainstart",comment:"Start of the Ethereum main chain",url:"",status:ne.Final,gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"},maxRefundQuotient:{v:2,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{base:{v:2,d:"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},exp:{v:10,d:"Base fee of the EXP opcode"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},keccak256:{v:30,d:"Base fee of the SHA3 opcode"},keccak256Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Base fee of the SLOAD opcode"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Base fee of the JUMPDEST opcode"},log:{v:375,d:"Base fee of the LOG opcode"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Base fee of the CREATE opcode"},call:{v:40,d:"Base fee of the CALL opcode"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""},stop:{v:0,d:"Base fee of the STOP opcode"},add:{v:3,d:"Base fee of the ADD opcode"},mul:{v:5,d:"Base fee of the MUL opcode"},sub:{v:3,d:"Base fee of the SUB opcode"},div:{v:5,d:"Base fee of the DIV opcode"},sdiv:{v:5,d:"Base fee of the SDIV opcode"},mod:{v:5,d:"Base fee of the MOD opcode"},smod:{v:5,d:"Base fee of the SMOD opcode"},addmod:{v:8,d:"Base fee of the ADDMOD opcode"},mulmod:{v:8,d:"Base fee of the MULMOD opcode"},signextend:{v:5,d:"Base fee of the SIGNEXTEND opcode"},lt:{v:3,d:"Base fee of the LT opcode"},gt:{v:3,d:"Base fee of the GT opcode"},slt:{v:3,d:"Base fee of the SLT opcode"},sgt:{v:3,d:"Base fee of the SGT opcode"},eq:{v:3,d:"Base fee of the EQ opcode"},iszero:{v:3,d:"Base fee of the ISZERO opcode"},and:{v:3,d:"Base fee of the AND opcode"},or:{v:3,d:"Base fee of the OR opcode"},xor:{v:3,d:"Base fee of the XOR opcode"},not:{v:3,d:"Base fee of the NOT opcode"},byte:{v:3,d:"Base fee of the BYTE opcode"},address:{v:2,d:"Base fee of the ADDRESS opcode"},balance:{v:20,d:"Base fee of the BALANCE opcode"},origin:{v:2,d:"Base fee of the ORIGIN opcode"},caller:{v:2,d:"Base fee of the CALLER opcode"},callvalue:{v:2,d:"Base fee of the CALLVALUE opcode"},calldataload:{v:3,d:"Base fee of the CALLDATALOAD opcode"},calldatasize:{v:2,d:"Base fee of the CALLDATASIZE opcode"},calldatacopy:{v:3,d:"Base fee of the CALLDATACOPY opcode"},codesize:{v:2,d:"Base fee of the CODESIZE opcode"},codecopy:{v:3,d:"Base fee of the CODECOPY opcode"},gasprice:{v:2,d:"Base fee of the GASPRICE opcode"},extcodesize:{v:20,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:20,d:"Base fee of the EXTCODECOPY opcode"},blockhash:{v:20,d:"Base fee of the BLOCKHASH opcode"},coinbase:{v:2,d:"Base fee of the COINBASE opcode"},timestamp:{v:2,d:"Base fee of the TIMESTAMP opcode"},number:{v:2,d:"Base fee of the NUMBER opcode"},difficulty:{v:2,d:"Base fee of the DIFFICULTY opcode"},gaslimit:{v:2,d:"Base fee of the GASLIMIT opcode"},pop:{v:2,d:"Base fee of the POP opcode"},mload:{v:3,d:"Base fee of the MLOAD opcode"},mstore:{v:3,d:"Base fee of the MSTORE opcode"},mstore8:{v:3,d:"Base fee of the MSTORE8 opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"},jump:{v:8,d:"Base fee of the JUMP opcode"},jumpi:{v:10,d:"Base fee of the JUMPI opcode"},pc:{v:2,d:"Base fee of the PC opcode"},msize:{v:2,d:"Base fee of the MSIZE opcode"},gas:{v:2,d:"Base fee of the GAS opcode"},push:{v:3,d:"Base fee of the PUSH opcode"},dup:{v:3,d:"Base fee of the DUP opcode"},swap:{v:3,d:"Base fee of the SWAP opcode"},callcode:{v:40,d:"Base fee of the CALLCODE opcode"},return:{v:0,d:"Base fee of the RETURN opcode"},invalid:{v:0,d:"Base fee of the INVALID opcode"},selfdestruct:{v:0,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:BigInt("5000000000000000000"),d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:0,d:"the amount of blocks to delay the difficulty bomb with"}}},homestead:{name:"homestead",comment:"Homestead hardfork with protocol and network changes",url:"https://eips.ethereum.org/EIPS/eip-606",status:ne.Final,gasPrices:{delegatecall:{v:40,d:"Base fee of the DELEGATECALL opcode"}}},dao:{name:"dao",comment:"DAO rescue hardfork",url:"https://eips.ethereum.org/EIPS/eip-779",status:ne.Final},tangerineWhistle:{name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",url:"https://eips.ethereum.org/EIPS/eip-608",status:ne.Final,gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"},extcodesize:{v:700,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:700,d:"Base fee of the EXTCODECOPY opcode"},balance:{v:400,d:"Base fee of the BALANCE opcode"},delegatecall:{v:700,d:"Base fee of the DELEGATECALL opcode"},callcode:{v:700,d:"Base fee of the CALLCODE opcode"},selfdestruct:{v:5e3,d:"Base fee of the SELFDESTRUCT opcode"}}},spuriousDragon:{name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",url:"https://eips.ethereum.org/EIPS/eip-607",status:ne.Final,gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}}},byzantium:{name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",url:"https://eips.ethereum.org/EIPS/eip-609",status:ne.Final,gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"},revert:{v:0,d:"Base fee of the REVERT opcode"},staticcall:{v:700,d:"Base fee of the STATICCALL opcode"},returndatasize:{v:2,d:"Base fee of the RETURNDATASIZE opcode"},returndatacopy:{v:3,d:"Base fee of the RETURNDATACOPY opcode"}},pow:{minerReward:{v:BigInt("3000000000000000000"),d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:3e6,d:"the amount of blocks to delay the difficulty bomb with"}}},constantinople:{name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",url:"https://eips.ethereum.org/EIPS/eip-1013",status:ne.Final,gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"},shl:{v:3,d:"Base fee of the SHL opcode"},shr:{v:3,d:"Base fee of the SHR opcode"},sar:{v:3,d:"Base fee of the SAR opcode"},extcodehash:{v:400,d:"Base fee of the EXTCODEHASH opcode"},create2:{v:32e3,d:"Base fee of the CREATE2 opcode"}},pow:{minerReward:{v:BigInt("2000000000000000000"),d:"The amount a miner gets rewarded for mining a block"},difficultyBombDelay:{v:5e6,d:"the amount of blocks to delay the difficulty bomb with"}}},petersburg:{name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",url:"https://eips.ethereum.org/EIPS/eip-1716",status:ne.Final,gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}}},istanbul:{name:"istanbul",comment:"HF targeted for December 2019 following the Constantinople/Petersburg HF",url:"https://eips.ethereum.org/EIPS/eip-1679",status:ne.Final,gasConfig:{},gasPrices:{blake2Round:{v:1,d:"Gas cost per round for the Blake2 F precompile"},ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"},txDataNonZero:{v:16,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},sstoreSentryGasEIP2200:{v:2300,d:"Minimum gas required to be present for an SSTORE call, not consumed"},sstoreNoopGasEIP2200:{v:800,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:800,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitGasEIP2200:{v:2e4,d:"Once per SSTORE operation from clean zero to non-zero"},sstoreInitRefundEIP2200:{v:19200,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanGasEIP2200:{v:5e3,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreCleanRefundEIP2200:{v:4200,d:"Once per SSTORE operation for resetting to the original non-zero value"},sstoreClearRefundEIP2200:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},balance:{v:700,d:"Base fee of the BALANCE opcode"},extcodehash:{v:700,d:"Base fee of the EXTCODEHASH opcode"},chainid:{v:2,d:"Base fee of the CHAINID opcode"},selfbalance:{v:5,d:"Base fee of the SELFBALANCE opcode"},sload:{v:800,d:"Base fee of the SLOAD opcode"}}},muirGlacier:{name:"muirGlacier",comment:"HF to delay the difficulty bomb",url:"https://eips.ethereum.org/EIPS/eip-2384",status:ne.Final,pow:{difficultyBombDelay:{v:9e6,d:"the amount of blocks to delay the difficulty bomb with"}}},berlin:{name:"berlin",comment:"HF targeted for July 2020 following the Muir Glacier HF",url:"https://eips.ethereum.org/EIPS/eip-2070",status:ne.Final,eips:[2565,2929,2718,2930]},london:{name:"london",comment:"HF targeted for July 2021 following the Berlin fork",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md",status:ne.Final,eips:[1559,3198,3529,3541]},arrowGlacier:{name:"arrowGlacier",comment:"HF to delay the difficulty bomb",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md",status:ne.Final,eips:[4345]},grayGlacier:{name:"grayGlacier",comment:"Delaying the difficulty bomb to Mid September 2022",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md",status:ne.Final,eips:[5133]},paris:{name:"paris",comment:"Hardfork to upgrade the consensus mechanism to Proof-of-Stake",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md",status:ne.Final,consensus:{type:"pos",algorithm:"casper",casper:{}},eips:[3675,4399]},mergeForkIdTransition:{name:"mergeForkIdTransition",comment:"Pre-merge hardfork to fork off non-upgraded clients",url:"https://eips.ethereum.org/EIPS/eip-3675",status:ne.Final,eips:[]},shanghai:{name:"shanghai",comment:"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md",status:ne.Final,eips:[3651,3855,3860,4895]},cancun:{name:"cancun",comment:"Next feature hardfork after the shanghai having proto-danksharding EIP 4844 blobs (still WIP hence not for production use), transient storage opcodes, parent beacon block root availability in EVM and selfdestruct only in same transaction",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md",status:ne.Final,eips:[1153,4844,4788,5656,6780]}};function lt(m){return!m||m==="0x0"?"0x0000000000000000":(0,T.Lo)(m)?"0x"+(0,T.MT)(m).padStart(16,"0"):"0x"+m.padStart(16,"0")}function ot(m,d=!0){var zt,Ie;const{name:f,config:c,difficulty:E,mixHash:L,gasLimit:W,coinbase:fe,baseFeePerGas:U,excessBlobGas:me}=m;let{extraData:ve,timestamp:D,nonce:Ce}=m;const Ye=Number(D),{chainId:it}=c;if(ve===""&&(ve="0x"),(0,T.Lo)(D)||(D=(0,T.I4)(parseInt(D))),Ce.length!==18&&(Ce=lt(Ce)),c.eip155Block!==c.eip158Block)throw new Error("EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork");const ge={name:f,chainId:it,networkId:it,genesis:{timestamp:D,gasLimit:W,difficulty:E,nonce:Ce,extraData:ve,mixHash:L,coinbase:fe,baseFeePerGas:U,excessBlobGas:me},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:c.clique!==void 0?{type:"poa",algorithm:"clique",clique:{period:(zt=c.clique.period)!=null?zt:c.clique.blockperiodseconds,epoch:(Ie=c.clique.epoch)!=null?Ie:c.clique.epochlength}}:{type:"pow",algorithm:"ethash",ethash:{}}},at={[k.Homestead]:{name:"homesteadBlock"},[k.Dao]:{name:"daoForkBlock"},[k.TangerineWhistle]:{name:"eip150Block"},[k.SpuriousDragon]:{name:"eip155Block"},[k.Byzantium]:{name:"byzantiumBlock"},[k.Constantinople]:{name:"constantinopleBlock"},[k.Petersburg]:{name:"petersburgBlock"},[k.Istanbul]:{name:"istanbulBlock"},[k.MuirGlacier]:{name:"muirGlacierBlock"},[k.Berlin]:{name:"berlinBlock"},[k.London]:{name:"londonBlock"},[k.MergeForkIdTransition]:{name:"mergeForkBlock",postMerge:d},[k.Shanghai]:{name:"shanghaiTime",postMerge:!0,isTimestamp:!0},[k.Cancun]:{name:"cancunTime",postMerge:!0,isTimestamp:!0}},Pt=Object.keys(at).reduce((re,Ne)=>(re[at[Ne].name]=Ne,re),{}),bt=Object.keys(c).filter(re=>Pt[re]!==void 0&&c[re]!==void 0&&c[re]!==null);if(ge.hardforks=bt.map(re=>({name:Pt[re],block:at[Pt[re]].isTimestamp===!0||typeof c[re]!="number"?null:c[re],timestamp:at[Pt[re]].isTimestamp===!0&&typeof c[re]=="number"?c[re]:void 0})).filter(re=>re.block!==null||re.timestamp!==void 0),ge.hardforks.sort(function(re,Ne){var He,le;return((He=re.block)!=null?He:1/0)-((le=Ne.block)!=null?le:1/0)}),ge.hardforks.sort(function(re,Ne){var He,le;return((He=re.timestamp)!=null?He:Ye)-((le=Ne.timestamp)!=null?le:Ye)}),c.terminalTotalDifficulty!==void 0){const re={name:k.Paris,ttd:c.terminalTotalDifficulty,block:null},Ne=ge.hardforks.findIndex(He=>{var le;return((le=at[He.name])==null?void 0:le.postMerge)===!0});Ne!==-1?ge.hardforks.splice(Ne,0,re):ge.hardforks.push(re)}const Tt=ge.hardforks.length>0?ge.hardforks.slice(-1)[0]:void 0;return ge.hardfork=Tt==null?void 0:Tt.name,ge.hardforks.unshift({name:k.Chainstart,block:0}),ge}function kt(m,d,f){try{if(["config","difficulty","gasLimit","alloc"].some(c=>!(c in m)))throw new Error("Invalid format, expected geth genesis fields missing");return d!==void 0&&(m.name=d),ot(m,f)}catch(c){throw new Error(`Error parsing parameters file: ${c.message}`)}}class Ae{constructor(d){var f,c;this._eips=[],this.events=new It.EventEmitter,this._customChains=(f=d.customChains)!=null?f:[],this._chainParams=this.setChain(d.chain),this.DEFAULT_HARDFORK=(c=this._chainParams.defaultHardfork)!=null?c:k.Shanghai,this.HARDFORK_CHANGES=this.hardforks().map(E=>[E.name,Nt[E.name]]),this._hardfork=this.DEFAULT_HARDFORK,d.hardfork!==void 0&&this.setHardfork(d.hardfork),d.eips&&this.setEIPs(d.eips)}static custom(d,f={}){var L;const c=(L=f.baseChain)!=null?L:"mainnet",E={...Ae._getChainParams(c)};if(E.name="custom-chain",typeof d!="string")return new Ae({chain:{...E,...d},...f});if(d===he.PolygonMainnet)return Ae.custom({name:he.PolygonMainnet,chainId:137,networkId:137},f);if(d===he.PolygonMumbai)return Ae.custom({name:he.PolygonMumbai,chainId:80001,networkId:80001},f);if(d===he.ArbitrumOne)return Ae.custom({name:he.ArbitrumOne,chainId:42161,networkId:42161},f);if(d===he.xDaiChain)return Ae.custom({name:he.xDaiChain,chainId:100,networkId:100},f);if(d===he.OptimisticKovan)return Ae.custom({name:he.OptimisticKovan,chainId:69,networkId:69},{hardfork:k.Berlin,...f});if(d===he.OptimisticEthereum)return Ae.custom({name:he.OptimisticEthereum,chainId:10,networkId:10},{hardfork:k.Berlin,...f});throw new Error(`Custom chain ${d} not supported`)}static fromGethGenesis(d,{chain:f,eips:c,genesisHash:E,hardfork:L,mergeForkIdPostMerge:W}){var me;const fe=kt(d,f,W),U=new Ae({chain:(me=fe.name)!=null?me:"custom",customChains:[fe],eips:c,hardfork:L!=null?L:fe.hardfork});return E!==void 0&&U.setForkHashes(E),U}static isSupportedChainId(d){const f=this.getInitializedChains();return Boolean(f.names[d.toString()])}static _getChainParams(d,f){const c=this.getInitializedChains(f);if(typeof d=="number"||typeof d=="bigint"){if(d=d.toString(),c.names[d]){const E=c.names[d];return c[E]}throw new Error(`Chain with ID ${d} not supported`)}if(c[d]!==void 0)return c[d];throw new Error(`Chain with name ${d} not supported`)}setChain(d){if(typeof d=="number"||typeof d=="bigint"||typeof d=="string")this._chainParams=Ae._getChainParams(d,this._customChains);else if(typeof d=="object"){if(this._customChains.length>0)throw new Error("Chain must be a string, number, or bigint when initialized with customChains passed in");const f=["networkId","genesis","hardforks","bootstrapNodes"];for(const c of f)if(!(c in d))throw new Error(`Missing required chain parameter: ${c}`);this._chainParams=d}else throw new Error("Wrong input format");for(const f of this.hardforks())if(f.block===void 0)throw new Error("Hardfork cannot have undefined block number");return this._chainParams}setHardfork(d){let f=!1;for(const c of this.HARDFORK_CHANGES)c[0]===d&&(this._hardfork!==d&&(this._hardfork=d,this.events.emit("hardforkChanged",d)),f=!0);if(!f)throw new Error(`Hardfork with name ${d} not supported`)}getHardforkBy(d){let{blockNumber:f,timestamp:c,td:E}=d;f=(0,T.Fy)(f,T.qT.BigInt),E=(0,T.Fy)(E,T.qT.BigInt),c=(0,T.Fy)(c,T.qT.BigInt);const L=this.hardforks().filter(D=>D.block!==null||D.ttd!==null&&D.ttd!==void 0||D.timestamp!==void 0),W=L.findIndex(D=>D.ttd!==null&&D.ttd!==void 0);if(L.slice(W+1).findIndex(D=>D.ttd!==null&&D.ttd!==void 0)>=0)throw Error("More than one merge hardforks found with ttd specified");let U=L.findIndex(D=>f!==void 0&&D.block!==null&&BigInt(D.block)>f||c!==void 0&&D.timestamp!==void 0&&D.timestamp>c);if(U===-1)U=L.length;else if(U===0)throw Error("Must have at least one hardfork at block 0");if(c===void 0){const D=L.slice(0,U).reverse().findIndex(Ce=>Ce.block!==null||Ce.ttd!==void 0);U=U-D}if(U=U-1,L[U].block===null&&L[U].timestamp===void 0)(E==null||BigInt(L[U].ttd)>E)&&(U-=1);else if(W>=0&&E!==void 0&&E!==null){if(U>=W&&BigInt(L[W].ttd)>E)throw Error("Maximum HF determined by total difficulty is lower than the block number HF");if(U<W&&BigInt(L[W].ttd)<=E)throw Error("HF determined by block number is lower than the minimum total difficulty HF")}const me=U;for(;U<L.length-1&&!(L[U].block!==L[U+1].block||L[U].timestamp!==L[U+1].timestamp);U++);if(c!==void 0){if(L.slice(0,me).reduce((Ye,it)=>{var ge;return Math.max(Number((ge=it.timestamp)!=null?ge:"0"),Ye)},0)>c)throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");if(L.slice(U+1).reduce((Ye,it)=>{var ge;return Math.min(Number((ge=it.timestamp)!=null?ge:c),Ye)},Number(c))<c)throw Error("Maximum HF determined by block number/ttd is lower than timestamp HF")}return L[U].name}setHardforkBy(d){const f=this.getHardforkBy(d);return this.setHardfork(f),f}_getHardfork(d){const f=this.hardforks();for(const c of f)if(c.name===d)return c;return null}setEIPs(d=[]){for(const f of d){if(!(f in Ge))throw new Error(`${f} not supported`);const c=this.gteHardfork(Ge[f].minimumHardfork);if(!c)throw new Error(`${f} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${c}`);if(Ge[f].requiredEIPs!==void 0){for(const E of Ge[f].requiredEIPs)if(!(d.includes(E)||this.isActivatedEIP(E)))throw new Error(`${f} requires EIP ${E}, but is not included in the EIP list`)}}this._eips=d}param(d,f){let c;for(const E of this._eips)if(c=this.paramByEIP(d,f,E),c!==void 0)return c;return this.paramByHardfork(d,f,this._hardfork)}paramByHardfork(d,f,c){let E=null;for(const L of this.HARDFORK_CHANGES){if("eips"in L[1]){const W=L[1].eips;for(const fe of W){const U=this.paramByEIP(d,f,fe);E=typeof U=="bigint"?U:E}}else L[1][d]!==void 0&&L[1][d][f]!==void 0&&(E=L[1][d][f].v);if(L[0]===c)break}return BigInt(E!=null?E:0)}paramByEIP(d,f,c){if(!(c in Ge))throw new Error(`${c} not supported`);const E=Ge[c];if(!(d in E)||E[d][f]===void 0)return;const L=E[d][f].v;return BigInt(L)}paramByBlock(d,f,c,E,L){const W=this.getHardforkBy({blockNumber:c,td:E,timestamp:L});return this.paramByHardfork(d,f,W)}isActivatedEIP(d){if(this.eips().includes(d))return!0;for(const f of this.HARDFORK_CHANGES){const c=f[1];if(this.gteHardfork(c.name)&&"eips"in c&&c.eips.includes(d))return!0}return!1}hardforkIsActiveOnBlock(d,f){f=(0,T.Fy)(f,T.qT.BigInt),d=d!=null?d:this._hardfork;const c=this.hardforkBlock(d);return typeof c=="bigint"&&c!==BigInt(0)&&f>=c}activeOnBlock(d){return this.hardforkIsActiveOnBlock(null,d)}hardforkGteHardfork(d,f){d=d!=null?d:this._hardfork;const c=this.hardforks();let E=-1,L=-1,W=0;for(const fe of c)fe.name===d&&(E=W),fe.name===f&&(L=W),W+=1;return E>=L&&L!==-1}gteHardfork(d){return this.hardforkGteHardfork(null,d)}hardforkBlock(d){var c;d=d!=null?d:this._hardfork;const f=(c=this._getHardfork(d))==null?void 0:c.block;return f==null?null:BigInt(f)}hardforkTimestamp(d){var c;d=d!=null?d:this._hardfork;const f=(c=this._getHardfork(d))==null?void 0:c.timestamp;return f==null?null:BigInt(f)}eipBlock(d){for(const f of this.HARDFORK_CHANGES){const c=f[1];if("eips"in c&&c.eips.includes(d))return this.hardforkBlock(f[0])}return null}hardforkTTD(d){var c;d=d!=null?d:this._hardfork;const f=(c=this._getHardfork(d))==null?void 0:c.ttd;return f==null?null:BigInt(f)}nextHardforkBlockOrTimestamp(d){var fe,U;d=d!=null?d:this._hardfork;const f=this.hardforks();let c=f.findIndex(me=>me.name===d);if(d===k.Paris&&(c-=1),c<0)return null;let E=(fe=f[c].timestamp)!=null?fe:f[c].block;E=E!=null?Number(E):null;const L=f.slice(c+1).find(me=>{var D;let ve=(D=me.timestamp)!=null?D:me.block;return ve=ve!=null?Number(ve):null,me.name!==k.Paris&&ve!==null&&ve!==void 0&&ve!==E});if(L===void 0)return null;const W=(U=L.timestamp)!=null?U:L.block;return W==null?null:BigInt(W)}_calcForkHash(d,f){let c=new Uint8Array(0),E=0;for(const fe of this.hardforks()){const{block:U,timestamp:me,name:ve}=fe;let D=me!=null?me:U;if(D=D!==null?Number(D):null,typeof D=="number"&&D!==0&&D!==E&&ve!==k.Paris){const Ce=(0,T.nr)("0x"+D.toString(16).padStart(16,"0"));c=(0,T.eV)(c,Ce),E=D}if(fe.name===d)break}const L=(0,T.eV)(f,c);return(0,T.ci)((0,T.sO)(Me(L)>>>0))}forkHash(d,f){d=d!=null?d:this._hardfork;const c=this._getHardfork(d);if(c===null||(c==null?void 0:c.block)===null&&(c==null?void 0:c.timestamp)===void 0&&(c==null?void 0:c.ttd)===void 0){const E="No fork hash calculation possible for future hardfork";throw new Error(E)}if((c==null?void 0:c.forkHash)!==null&&(c==null?void 0:c.forkHash)!==void 0)return c.forkHash;if(!f)throw new Error("genesisHash required for forkHash calculation");return this._calcForkHash(d,f)}hardforkForForkHash(d){const f=this.hardforks().filter(c=>c.forkHash===d);return f.length>=1?f[f.length-1]:null}setForkHashes(d){var f;for(const c of this.hardforks()){const E=(f=c.timestamp)!=null?f:c.block;(c.forkHash===null||c.forkHash===void 0)&&(E!=null||typeof c.ttd<"u")&&(c.forkHash=this.forkHash(c.name,d))}}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){const d=this.hardfork();let f;for(const c of this.HARDFORK_CHANGES)if("consensus"in c[1]&&(f=c[1].consensus.type),c[0]===d)break;return f!=null?f:this._chainParams.consensus.type}consensusAlgorithm(){const d=this.hardfork();let f;for(const c of this.HARDFORK_CHANGES)if("consensus"in c[1]&&(f=c[1].consensus.algorithm),c[0]===d)break;return f!=null?f:this._chainParams.consensus.algorithm}consensusConfig(){var c;const d=this.hardfork();let f;for(const E of this.HARDFORK_CHANGES){if("consensus"in E[1]){const L=E[1],W=L.consensus.algorithm;f=L.consensus[W]}if(E[0]===d)break}return(c=f!=null?f:this._chainParams.consensus[this.consensusAlgorithm()])!=null?c:{}}copy(){const d=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return d.events=new It.EventEmitter,d}static getInitializedChains(d){const f={};for(const[E,L]of Object.entries(ue))f[L]=E.toLowerCase();const c={...We};if(d)for(const E of d){const{name:L}=E;f[E.chainId.toString()]=L,c[L]=E}return c.names=f,c}}},93996:function(xt,_,se){"use strict";se.d(_,{yH:function(){return Xe}});function T(v){if(Array.isArray(v)){const F=[];let j=0;for(let te=0;te<v.length;te++){const xe=T(v[te]);F.push(xe),j+=xe.length}return ye(G(j,192),...F)}const H=Te(v);return H.length===1&&H[0]<128?H:ye(G(H.length,128),H)}function a(v,H,F){if(F>v.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return v.slice(H,F)}function ce(v){if(v[0]===0)throw new Error("invalid RLP: extra zeros");return Fe(be(v))}function G(v,H){if(v<56)return Uint8Array.from([v+H]);const F=_e(v),j=F.length/2,te=_e(H+55+j);return Uint8Array.from(de(te+F))}function P(v,H=!1){if(typeof v>"u"||v===null||v.length===0)return Uint8Array.from([]);const F=Te(v),j=V(F);if(H)return j;if(j.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return j.data}function V(v){let H,F,j,te,xe;const Le=[],we=v[0];if(we<=127)return{data:v.slice(0,1),remainder:v.slice(1)};if(we<=183){if(H=we-127,we===128?j=Uint8Array.from([]):j=a(v,1,H),H===2&&j[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:j,remainder:v.slice(H)}}else if(we<=191){if(F=we-182,v.length-1<F)throw new Error("invalid RLP: not enough bytes for string length");if(H=ce(a(v,1,F)),H<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return j=a(v,F,H+F),{data:j,remainder:v.slice(H+F)}}else if(we<=247){for(H=we-191,te=a(v,1,H);te.length;)xe=V(te),Le.push(xe.data),te=xe.remainder;return{data:Le,remainder:v.slice(H)}}else{if(F=we-246,H=ce(a(v,1,F)),H<56)throw new Error("invalid RLP: encoded list too short");const Oe=F+H;if(Oe>v.length)throw new Error("invalid RLP: total length is larger than the data");for(te=a(v,F,Oe);te.length;)xe=V(te),Le.push(xe.data),te=xe.remainder;return{data:Le,remainder:v.slice(Oe)}}}const C=Array.from({length:256},(v,H)=>H.toString(16).padStart(2,"0"));function be(v){let H="";for(let F=0;F<v.length;F++)H+=C[v[F]];return H}function Fe(v){const H=Number.parseInt(v,16);if(Number.isNaN(H))throw new Error("Invalid byte sequence");return H}function de(v){if(typeof v!="string")throw new TypeError("hexToBytes: expected string, got "+typeof v);if(v.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const H=new Uint8Array(v.length/2);for(let F=0;F<H.length;F++){const j=F*2;H[F]=Fe(v.slice(j,j+2))}return H}function ye(...v){if(v.length===1)return v[0];const H=v.reduce((j,te)=>j+te.length,0),F=new Uint8Array(H);for(let j=0,te=0;j<v.length;j++){const xe=v[j];F.set(xe,te),te+=xe.length}return F}function Re(v){return new TextEncoder().encode(v)}function _e(v){if(v<0)throw new Error("Invalid integer as argument, must be unsigned!");const H=v.toString(16);return H.length%2?`0${H}`:H}function je(v){return v.length%2?`0${v}`:v}function ke(v){return v.length>=2&&v[0]==="0"&&v[1]==="x"}function rt(v){return typeof v!="string"?v:ke(v)?v.slice(2):v}function Te(v){if(v instanceof Uint8Array)return v;if(typeof v=="string")return ke(v)?de(je(rt(v))):Re(v);if(typeof v=="number"||typeof v=="bigint")return v?de(_e(v)):Uint8Array.from([]);if(v==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof v)}const st={bytesToHex:be,concatBytes:ye,hexToBytes:de,utf8ToBytes:Re},Xe={encode:T,decode:P}},28856:function(xt,_,se){"use strict";se.d(_,{nL:function(){return mt}});var T=se(93996),a=se(82090);function ce(o){if(!Number.isSafeInteger(o)||o<0)throw new Error(`Wrong positive integer: ${o}`)}function G(o){if(typeof o!="boolean")throw new Error(`Expected boolean, not ${o}`)}function P(o,...t){if(!(o instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(o.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${o.length}`)}function V(o){if(typeof o!="function"||typeof o.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ce(o.outputLen),ce(o.blockLen)}function C(o,t=!0){if(o.destroyed)throw new Error("Hash instance has been destroyed");if(t&&o.finished)throw new Error("Hash#digest() has already been called")}function be(o,t){P(o);const s=t.outputLen;if(o.length<s)throw new Error(`digestInto() expects output buffer of length at least ${s}`)}var de={number:ce,bool:G,bytes:P,hash:V,exists:C,output:be};const ye=BigInt(2**32-1),Re=BigInt(32);function _e(o,t=!1){return t?{h:Number(o&ye),l:Number(o>>Re&ye)}:{h:Number(o>>Re&ye)|0,l:Number(o&ye)|0}}function je(o,t=!1){let s=new Uint32Array(o.length),x=new Uint32Array(o.length);for(let h=0;h<o.length;h++){const{h:l,l:p}=_e(o[h],t);[s[h],x[h]]=[l,p]}return[s,x]}const ke=(o,t)=>BigInt(o>>>0)<<Re|BigInt(t>>>0),rt=(o,t,s)=>o>>>s,Te=(o,t,s)=>o<<32-s|t>>>s,st=(o,t,s)=>o>>>s|t<<32-s,Xe=(o,t,s)=>o<<32-s|t>>>s,v=(o,t,s)=>o<<64-s|t>>>s-32,H=(o,t,s)=>o>>>s-32|t<<64-s,F=(o,t)=>t,j=(o,t)=>o,te=(o,t,s)=>o<<s|t>>>32-s,xe=(o,t,s)=>t<<s|o>>>32-s,Le=(o,t,s)=>t<<s-32|o>>>64-s,we=(o,t,s)=>o<<s-32|t>>>64-s;function Oe(o,t,s,x){const h=(t>>>0)+(x>>>0);return{h:o+s+(h/2**32|0)|0,l:h|0}}var w={fromBig:_e,split:je,toBig:ke,shrSH:rt,shrSL:Te,rotrSH:st,rotrSL:Xe,rotrBH:v,rotrBL:H,rotr32H:F,rotr32L:j,rotlSH:te,rotlSL:xe,rotlBH:Le,rotlBL:we,add:Oe,add3L:(o,t,s)=>(o>>>0)+(t>>>0)+(s>>>0),add3H:(o,t,s,x)=>t+s+x+(o/2**32|0)|0,add4L:(o,t,s,x)=>(o>>>0)+(t>>>0)+(s>>>0)+(x>>>0),add4H:(o,t,s,x,h)=>t+s+x+h+(o/2**32|0)|0,add5H:(o,t,s,x,h,l)=>t+s+x+h+l+(o/2**32|0)|0,add5L:(o,t,s,x,h)=>(o>>>0)+(t>>>0)+(s>>>0)+(x>>>0)+(h>>>0)};const I=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const S=o=>o instanceof Uint8Array,R=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength),N=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)),Z=o=>new DataView(o.buffer,o.byteOffset,o.byteLength),z=(o,t)=>o<<32-t|o>>>t;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const oe=Array.from({length:256},(o,t)=>t.toString(16).padStart(2,"0"));function vt(o){if(!S(o))throw new Error("Uint8Array expected");let t="";for(let s=0;s<o.length;s++)t+=oe[o[s]];return t}function Et(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const t=o.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const s=new Uint8Array(t/2);for(let x=0;x<s.length;x++){const h=x*2,l=o.slice(h,h+2),p=Number.parseInt(l,16);if(Number.isNaN(p)||p<0)throw new Error("Invalid byte sequence");s[x]=p}return s}const Me=async()=>{};async function At(o,t,s){let x=Date.now();for(let h=0;h<o;h++){s(h);const l=Date.now()-x;l>=0&&l<t||(await Me(),x+=l)}}function Zt(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}function Ze(o){if(typeof o=="string"&&(o=Zt(o)),!S(o))throw new Error(`expected Uint8Array, got ${typeof o}`);return o}function Wt(...o){const t=new Uint8Array(o.reduce((x,h)=>x+h.length,0));let s=0;return o.forEach(x=>{if(!S(x))throw new Error("Uint8Array expected");t.set(x,s),s+=x.length}),t}class Se{clone(){return this._cloneInto()}}const Yt=o=>Object.prototype.toString.call(o)==="[object Object]"&&o.constructor===Object;function Ut(o,t){if(t!==void 0&&(typeof t!="object"||!Yt(t)))throw new Error("Options should be object or undefined");return Object.assign(o,t)}function Mt(o){const t=x=>o().update(Ze(x)).digest(),s=o();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>o(),t}function Qt(o){const t=(x,h)=>o(h).update(Ze(x)).digest(),s=o({});return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=x=>o(x),t}function It(o){const t=(x,h)=>o(h).update(Ze(x)).digest(),s=o({});return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=x=>o(x),t}function We(o=32){if(crypto&&typeof crypto.getRandomValues=="function")return crypto.getRandomValues(new Uint8Array(o));throw new Error("crypto.getRandomValues must be defined")}const[ue,Gt,k]=[[],[],[]],ht=BigInt(0),Ue=BigInt(1),he=BigInt(2),K=BigInt(7),Ge=BigInt(256),ne=BigInt(113);for(let o=0,t=Ue,s=1,x=0;o<24;o++){[s,x]=[x,(2*s+3*x)%5],ue.push(2*(5*x+s)),Gt.push((o+1)*(o+2)/2%64);let h=ht;for(let l=0;l<7;l++)t=(t<<Ue^(t>>K)*ne)%Ge,t&he&&(h^=Ue<<(Ue<<BigInt(l))-Ue);k.push(h)}const[Nt,lt]=w.split(k,!0),ot=(o,t,s)=>s>32?w.rotlBH(o,t,s):w.rotlSH(o,t,s),kt=(o,t,s)=>s>32?w.rotlBL(o,t,s):w.rotlSL(o,t,s);function Ae(o,t=24){const s=new Uint32Array(10);for(let x=24-t;x<24;x++){for(let p=0;p<10;p++)s[p]=o[p]^o[p+10]^o[p+20]^o[p+30]^o[p+40];for(let p=0;p<10;p+=2){const A=(p+8)%10,O=(p+2)%10,M=s[O],$=s[O+1],J=ot(M,$,1)^s[A],Q=kt(M,$,1)^s[A+1];for(let pe=0;pe<50;pe+=10)o[p+pe]^=J,o[p+pe+1]^=Q}let h=o[2],l=o[3];for(let p=0;p<24;p++){const A=Gt[p],O=ot(h,l,A),M=kt(h,l,A),$=ue[p];h=o[$],l=o[$+1],o[$]=O,o[$+1]=M}for(let p=0;p<50;p+=10){for(let A=0;A<10;A++)s[A]=o[p+A];for(let A=0;A<10;A++)o[p+A]^=~s[(A+2)%10]&s[(A+4)%10]}o[0]^=Nt[x],o[1]^=lt[x]}s.fill(0)}class m extends Se{constructor(t,s,x,h=!1,l=24){if(super(),this.blockLen=t,this.suffix=s,this.outputLen=x,this.enableXOF=h,this.rounds=l,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,de.number(x),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=N(this.state)}keccak(){Ae(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){de.exists(this);const{blockLen:s,state:x}=this;t=Ze(t);const h=t.length;for(let l=0;l<h;){const p=Math.min(s-this.pos,h-l);for(let A=0;A<p;A++)x[this.pos++]^=t[l++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:s,pos:x,blockLen:h}=this;t[x]^=s,(s&128)!==0&&x===h-1&&this.keccak(),t[h-1]^=128,this.keccak()}writeInto(t){de.exists(this,!1),de.bytes(t),this.finish();const s=this.state,{blockLen:x}=this;for(let h=0,l=t.length;h<l;){this.posOut>=x&&this.keccak();const p=Math.min(x-this.posOut,l-h);t.set(s.subarray(this.posOut,this.posOut+p),h),this.posOut+=p,h+=p}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return de.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(de.output(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:s,suffix:x,outputLen:h,rounds:l,enableXOF:p}=this;return t||(t=new m(s,x,h,p,l)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=l,t.suffix=x,t.outputLen=h,t.enableXOF=p,t.destroyed=this.destroyed,t}}const d=(o,t,s)=>Mt(()=>new m(t,o,s)),f=d(6,144,224/8),c=d(6,136,256/8),E=d(6,104,384/8),L=d(6,72,512/8),W=d(1,144,224/8),fe=d(1,136,256/8),U=d(1,104,384/8),me=d(1,72,512/8),ve=(o,t,s)=>It((x={})=>new m(t,o,x.dkLen===void 0?s:x.dkLen,!0)),D=ve(31,168,128/8),Ce=ve(31,136,256/8),Ye=de.bool,it=de.bytes;function ge(o){if(!(o instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof o}`);return new TextDecoder().decode(o)}function at(o){const t=o.startsWith("0x")?o.substring(2):o;return _hexToBytes(t)}function Pt(o,t){if(o.length!==t.length)return!1;for(let s=0;s<o.length;s++)if(o[s]!==t[s])return!1;return!0}function bt(o){return t=>(de.bytes(t),o(t))}const Tt=(()=>{const o=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,t=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:t&&!o?t("crypto"):void 0,web:o}})(),zt=bt(W),Ie=(()=>{const o=bt(fe);return o.create=fe.create,o})(),re=bt(U),Ne=bt(me);var He=se(35742),le;(function(o){o[o.EIP155ReplayProtection=155]="EIP155ReplayProtection",o[o.EIP1559FeeMarket=1559]="EIP1559FeeMarket",o[o.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",o[o.EIP2930AccessLists=2930]="EIP2930AccessLists"})(le||(le={}));function x0(o){if(o.length===0)return!0;const t=o[0];return!!Array.isArray(t)}function u0(o){return!x0(o)}var Y;(function(o){o[o.Legacy=0]="Legacy",o[o.AccessListEIP2930=1]="AccessListEIP2930",o[o.FeeMarketEIP1559=2]="FeeMarketEIP1559",o[o.BlobEIP4844=3]="BlobEIP4844"})(Y||(Y={}));function Lt(o){return o.type===Y.Legacy}function $t(o){return o.type===Y.AccessListEIP2930}function e0(o){return o.type===Y.FeeMarketEIP1559}function h0(o){return o.type===Y.BlobEIP4844}function t0(o){return Number((0,a.v3)((0,a.O0)(o.type)))===Y.Legacy}function n0(o){return Number((0,a.v3)((0,a.O0)(o.type)))===Y.AccessListEIP2930}function r0(o){return Number((0,a.v3)((0,a.O0)(o.type)))===Y.FeeMarketEIP1559}function s0(o){return Number((0,a.v3)((0,a.O0)(o.type)))===Y.BlobEIP4844}function o0(o,t){const s=o.param("vm","maxInitCodeSize");if(s&&BigInt(t)>s)throw new Error(`the initcode size of this transaction is too large: it is ${t} while the max is ${o.param("vm","maxInitCodeSize")}`)}class De{static getAccessListData(t){let s,x;if(u0(t)){s=t;const h=[];for(let l=0;l<t.length;l++){const p=t[l],A=(0,a.nr)(p.address),O=[];for(let M=0;M<p.storageKeys.length;M++)O.push((0,a.nr)(p.storageKeys[M]));h.push([A,O])}x=h}else{x=t!=null?t:[];const h=[];for(let l=0;l<x.length;l++){const p=x[l],A=(0,a.ci)(p[0]),O=[];for(let $=0;$<p[1].length;$++)O.push((0,a.ci)(p[1][$]));const M={address:A,storageKeys:O};h.push(M)}s=h}return{AccessListJSON:s,accessList:x}}static verifyAccessList(t){for(let s=0;s<t.length;s++){const x=t[s],h=x[0],l=x[1];if(x[2]!==void 0)throw new Error("Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.");if(h.length!==20)throw new Error("Invalid EIP-2930 transaction: address length should be 20 bytes");for(let p=0;p<l.length;p++)if(l[p].length!==32)throw new Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes")}}static getAccessListJSON(t){const s=[];for(let x=0;x<t.length;x++){const h=t[x],l={address:(0,a.ci)((0,a.V_)(h[0],20)),storageKeys:[]},p=h[1];for(let A=0;A<p.length;A++){const O=p[A];l.storageKeys.push((0,a.ci)((0,a.V_)(O,32)))}s.push(l)}return s}static getDataFeeEIP2930(t,s){const x=s.param("gasPrices","accessListStorageKeyCost"),h=s.param("gasPrices","accessListAddressCost");let l=0;for(let A=0;A<t.length;A++){const M=t[A][1];l+=M.length}return t.length*Number(h)+l*Number(x)}}class Ke{constructor(t,s){var Vt,jt;this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=He.qo.Mainnet;const{nonce:x,gasLimit:h,to:l,value:p,data:A,v:O,r:M,s:$,type:J}=t;this._type=Number((0,a.v3)((0,a.O0)(J))),this.txOptions=s;const Q=(0,a.O0)(l===""?"0x":l),pe=(0,a.O0)(O===""?"0x":O),Pe=(0,a.O0)(M===""?"0x":M),ie=(0,a.O0)($===""?"0x":$);this.nonce=(0,a.v3)((0,a.O0)(x===""?"0x":x)),this.gasLimit=(0,a.v3)((0,a.O0)(h===""?"0x":h)),this.to=Q.length>0?new a.kL(Q):void 0,this.value=(0,a.v3)((0,a.O0)(p===""?"0x":p)),this.data=(0,a.O0)(A===""?"0x":A),this.v=pe.length>0?(0,a.v3)(pe):void 0,this.r=Pe.length>0?(0,a.v3)(Pe):void 0,this.s=ie.length>0?(0,a.v3)(ie):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);const tt=this.to===void 0||this.to===null,a0=(Vt=s.allowUnlimitedInitCodeSize)!=null?Vt:!1,Ot=(jt=s.common)!=null?jt:this._getCommon();tt&&Ot.isActivatedEIP(3860)&&a0===!1&&o0(Ot,this.data.length)}get type(){return this._type}supports(t){return this.activeCapabilities.includes(t)}getValidationErrors(){const t=[];return this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),this.getBaseFee()>this.gasLimit&&t.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),t}isValid(){return this.getValidationErrors().length===0}_validateYParity(){const{v:t}=this;if(t!==void 0&&t!==BigInt(0)&&t!==BigInt(1)){const s=this._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(s)}}_validateHighS(){const{s:t}=this;if(this.common.gteHardfork("homestead")&&t!==void 0&&t>a.Sr){const s=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(s)}}getBaseFee(){const t=this.common.param("gasPrices","tx");let s=this.getDataFee();if(t&&(s+=t),this.common.gteHardfork("homestead")&&this.toCreationAddress()){const x=this.common.param("gasPrices","txCreation");x&&(s+=x)}return s}getDataFee(){const t=this.common.param("gasPrices","txDataZero"),s=this.common.param("gasPrices","txDataNonZero");let x=BigInt(0);for(let h=0;h<this.data.length;h++)this.data[h]===0?x+=t:x+=s;if((this.to===void 0||this.to===null)&&this.common.isActivatedEIP(3860)){const h=BigInt(Math.ceil(this.data.length/32)),l=this.common.param("gasPrices","initCodeWordCost")*h;x+=l}return x}toCreationAddress(){return this.to===void 0||this.to.bytes.length===0}isSigned(){const{v:t,r:s,s:x}=this;return!(t===void 0||s===void 0||x===void 0)}verifySignature(){try{const t=this.getSenderPublicKey();return(0,a._K)(t).length!==0}catch{return!1}}getSenderAddress(){return new a.kL((0,a.fB)(this.getSenderPublicKey()))}sign(t){if(t.length!==32){const O=this._errorMsg("Private key must be 32 bytes in length.");throw new Error(O)}let s=!1;this.type===Y.Legacy&&this.common.gteHardfork("spuriousDragon")&&!this.supports(le.EIP155ReplayProtection)&&(this.activeCapabilities.push(le.EIP155ReplayProtection),s=!0);const x=this.getHashedMessageToSign(),{v:h,r:l,s:p}=(0,a.v4)(x,t),A=this._processSignature(h,l,p);if(s){const O=this.activeCapabilities.indexOf(le.EIP155ReplayProtection);O>-1&&this.activeCapabilities.splice(O,1)}return A}toJSON(){return{type:(0,a.Z4)(BigInt(this.type)),nonce:(0,a.Z4)(this.nonce),gasLimit:(0,a.Z4)(this.gasLimit),to:this.to!==void 0?this.to.toString():void 0,value:(0,a.Z4)(this.value),data:(0,a.ci)(this.data),v:this.v!==void 0?(0,a.Z4)(this.v):void 0,r:this.r!==void 0?(0,a.Z4)(this.r):void 0,s:this.s!==void 0?(0,a.Z4)(this.s):void 0}}_getCommon(t,s){var x;if(s!==void 0){const h=(0,a.v3)((0,a.O0)(s));if(t){if(t.chainId()!==h){const l=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(l)}return t.copy()}else return He.Gn.isSupportedChainId(h)?new He.Gn({chain:h}):He.Gn.custom({name:"custom-chain",networkId:h,chainId:h},{baseChain:this.DEFAULT_CHAIN})}else return(x=t==null?void 0:t.copy())!=null?x:new He.Gn({chain:this.DEFAULT_CHAIN})}_validateCannotExceedMaxInteger(t,s=256,x=!1){for(const[h,l]of Object.entries(t))switch(s){case 64:if(x){if(l!==void 0&&l>=a.np){const p=this._errorMsg(`${h} cannot equal or exceed MAX_UINT64 (2^64-1), given ${l}`);throw new Error(p)}}else if(l!==void 0&&l>a.np){const p=this._errorMsg(`${h} cannot exceed MAX_UINT64 (2^64-1), given ${l}`);throw new Error(p)}break;case 256:if(x){if(l!==void 0&&l>=a.E2){const p=this._errorMsg(`${h} cannot equal or exceed MAX_INTEGER (2^256-1), given ${l}`);throw new Error(p)}}else if(l!==void 0&&l>a.E2){const p=this._errorMsg(`${h} cannot exceed MAX_INTEGER (2^256-1), given ${l}`);throw new Error(p)}break;default:{const p=this._errorMsg("unimplemented bits value");throw new Error(p)}}}static _validateNotArray(t){const s=["nonce","gasPrice","gasLimit","to","value","data","v","r","s","type","baseFee","maxFeePerGas","chainId"];for(const[x,h]of Object.entries(t))if(s.includes(x)&&Array.isArray(h))throw new Error(`${x} cannot be an array`)}_getSharedErrorPostfix(){let t="";try{t=this.isSigned()?(0,a.ci)(this.hash()):"not available (unsigned)"}catch{t="error"}let s="";try{s=this.isSigned().toString()}catch{t="error"}let x="";try{x=this.common.hardfork()}catch{x="error"}let h=`tx type=${this.type} hash=${t} nonce=${this.nonce} value=${this.value} `;return h+=`signed=${s} hf=${x}`,h}}const Ht=(0,a.nr)("0x"+Y.FeeMarketEIP1559.toString(16).padStart(2,"0"));class Qe extends Ke{constructor(t,s={}){var M;super({...t,type:Y.FeeMarketEIP1559},s);const{chainId:x,accessList:h,maxFeePerGas:l,maxPriorityFeePerGas:p}=t;if(this.common=this._getCommon(s.common,x),this.chainId=this.common.chainId(),this.common.isActivatedEIP(1559)===!1)throw new Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const A=De.getAccessListData(h!=null?h:[]);if(this.accessList=A.accessList,this.AccessListJSON=A.AccessListJSON,De.verifyAccessList(this.accessList),this.maxFeePerGas=(0,a.v3)((0,a.O0)(l===""?"0x":l)),this.maxPriorityFeePerGas=(0,a.v3)((0,a.O0)(p===""?"0x":p)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),Ke._validateNotArray(t),this.gasLimit*this.maxFeePerGas>a.E2){const $=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error($)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const $=this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error($)}this._validateYParity(),this._validateHighS(),((M=s==null?void 0:s.freeze)!=null?M:!0)&&Object.freeze(this)}static fromTxData(t,s={}){return new Qe(t,s)}static fromSerializedTx(t,s={}){if((0,a.hD)(t.subarray(0,1),Ht)===!1)throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ${Y.FeeMarketEIP1559}, received: ${(0,a.ci)(t.subarray(0,1))}`);const x=T.yH.decode(t.subarray(1));if(!Array.isArray(x))throw new Error("Invalid serialized tx input: must be array");return Qe.fromValuesArray(x,s)}static fromValuesArray(t,s={}){if(t.length!==9&&t.length!==12)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");const[x,h,l,p,A,O,M,$,J,Q,pe,Pe]=t;return this._validateNotArray({chainId:x,v:Q}),(0,a.jY)({nonce:h,maxPriorityFeePerGas:l,maxFeePerGas:p,gasLimit:A,value:M,v:Q,r:pe,s:Pe}),new Qe({chainId:(0,a.v3)(x),nonce:h,maxPriorityFeePerGas:l,maxFeePerGas:p,gasLimit:A,to:O,value:M,data:$,accessList:J!=null?J:[],v:Q!==void 0?(0,a.v3)(Q):void 0,r:pe,s:Pe},s)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(De.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(t=BigInt(0)){const s=this.maxPriorityFeePerGas,x=this.maxFeePerGas-t,l=(s<x?s:x)+t;return this.gasLimit*l+this.value}raw(){return[(0,a.XD)(this.chainId),(0,a.XD)(this.nonce),(0,a.XD)(this.maxPriorityFeePerGas),(0,a.XD)(this.maxFeePerGas),(0,a.XD)(this.gasLimit),this.to!==void 0?this.to.bytes:new Uint8Array(0),(0,a.XD)(this.value),this.data,this.accessList,this.v!==void 0?(0,a.XD)(this.v):new Uint8Array(0),this.r!==void 0?(0,a.XD)(this.r):new Uint8Array(0),this.s!==void 0?(0,a.XD)(this.s):new Uint8Array(0)]}serialize(){const t=this.raw();return(0,a.eV)(Ht,T.yH.encode(t))}getMessageToSign(){const t=this.raw().slice(0,9);return(0,a.eV)(Ht,T.yH.encode(t))}getHashedMessageToSign(){return Ie(this.getMessageToSign())}hash(){if(!this.isSigned()){const t=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=Ie(this.serialize())),this.cache.hash):Ie(this.serialize())}getMessageToVerifySignature(){return this.getHashedMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const l=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(l)}const t=this.getMessageToVerifySignature(),{v:s,r:x,s:h}=this;this._validateHighS();try{return(0,a.Js)(t,s+BigInt(27),(0,a.XD)(x),(0,a.XD)(h))}catch{const p=this._errorMsg("Invalid Signature");throw new Error(p)}}_processSignature(t,s,x){const h={...this.txOptions,common:this.common};return Qe.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,a.v3)(s),s:(0,a.v3)(x)},h)}toJSON(){const t=De.getAccessListJSON(this.accessList);return{...super.toJSON(),chainId:(0,a.Z4)(this.chainId),maxPriorityFeePerGas:(0,a.Z4)(this.maxPriorityFeePerGas),maxFeePerGas:(0,a.Z4)(this.maxFeePerGas),accessList:t}}errorStr(){let t=this._getSharedErrorPostfix();return t+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}const _t=(0,a.nr)("0x"+Y.AccessListEIP2930.toString(16).padStart(2,"0"));class et extends Ke{constructor(t,s={}){var O;super({...t,type:Y.AccessListEIP2930},s);const{chainId:x,accessList:h,gasPrice:l}=t;if(this.common=this._getCommon(s.common,x),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const p=De.getAccessListData(h!=null?h:[]);if(this.accessList=p.accessList,this.AccessListJSON=p.AccessListJSON,De.verifyAccessList(this.accessList),this.gasPrice=(0,a.v3)((0,a.O0)(l===""?"0x":l)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),Ke._validateNotArray(t),this.gasPrice*this.gasLimit>a.E2){const M=this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(M)}this._validateYParity(),this._validateHighS(),((O=s==null?void 0:s.freeze)!=null?O:!0)&&Object.freeze(this)}static fromTxData(t,s={}){return new et(t,s)}static fromSerializedTx(t,s={}){if((0,a.hD)(t.subarray(0,1),_t)===!1)throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ${Y.AccessListEIP2930}, received: ${(0,a.ci)(t.subarray(0,1))}`);const x=T.yH.decode(Uint8Array.from(t.subarray(1)));if(!Array.isArray(x))throw new Error("Invalid serialized tx input: must be array");return et.fromValuesArray(x,s)}static fromValuesArray(t,s={}){if(t.length!==8&&t.length!==11)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");const[x,h,l,p,A,O,M,$,J,Q,pe]=t;this._validateNotArray({chainId:x,v:J}),(0,a.jY)({nonce:h,gasPrice:l,gasLimit:p,value:O,v:J,r:Q,s:pe});const Pe=[];return new et({chainId:(0,a.v3)(x),nonce:h,gasPrice:l,gasLimit:p,to:A,value:O,data:M,accessList:$!=null?$:Pe,v:J!==void 0?(0,a.v3)(J):void 0,r:Q,s:pe},s)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(De.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[(0,a.XD)(this.chainId),(0,a.XD)(this.nonce),(0,a.XD)(this.gasPrice),(0,a.XD)(this.gasLimit),this.to!==void 0?this.to.bytes:new Uint8Array(0),(0,a.XD)(this.value),this.data,this.accessList,this.v!==void 0?(0,a.XD)(this.v):new Uint8Array(0),this.r!==void 0?(0,a.XD)(this.r):new Uint8Array(0),this.s!==void 0?(0,a.XD)(this.s):new Uint8Array(0)]}serialize(){const t=this.raw();return(0,a.eV)(_t,T.yH.encode(t))}getMessageToSign(){const t=this.raw().slice(0,8);return(0,a.eV)(_t,T.yH.encode(t))}getHashedMessageToSign(){return Ie(this.getMessageToSign())}hash(){if(!this.isSigned()){const t=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=Ie(this.serialize())),this.cache.hash):Ie(this.serialize())}getMessageToVerifySignature(){return this.getHashedMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const l=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(l)}const t=this.getMessageToVerifySignature(),{v:s,r:x,s:h}=this;this._validateHighS();try{return(0,a.Js)(t,s+BigInt(27),(0,a.XD)(x),(0,a.XD)(h))}catch{const p=this._errorMsg("Invalid Signature");throw new Error(p)}}_processSignature(t,s,x){const h={...this.txOptions,common:this.common};return et.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,a.v3)(s),s:(0,a.v3)(x)},h)}toJSON(){const t=De.getAccessListJSON(this.accessList);return{...super.toJSON(),chainId:(0,a.Z4)(this.chainId),gasPrice:(0,a.Z4)(this.gasPrice),accessList:t}}errorStr(){var s,x;let t=this._getSharedErrorPostfix();return t+=` gasPrice=${this.gasPrice} accessListCount=${(x=(s=this.accessList)==null?void 0:s.length)!=null?x:0}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}const l0=16777216,b0=16777216,m0=16777216,i0=16777216,T0=16777216,L0=4096,H0=32,Bt=(0,a.nr)("0x"+Y.BlobEIP4844.toString(16).padStart(2,"0")),g0=(o,t,s,x,h)=>{if(!(o.length===t.length&&t.length===s.length))throw new Error("Number of versionedHashes, blobs, and commitments not all equal");if(o.length===0)throw new Error("Invalid transaction with empty blobs");let l;try{l=a.V7.verifyBlobKzgProofBatch(t,s,x)}catch(p){throw new Error(`KZG verification of blobs fail with error=${p}`)}if(!l)throw new Error("KZG proof cannot be verified from blobs/commitments");for(let p=0;p<o.length;p++){const A=(0,a.h$)(s[p],h);if(!(0,a.hD)(A,o[p]))throw new Error(`commitment for blob at index ${p} does not match versionedHash`)}};class Ve extends Ke{constructor(t,s={}){var $,J,Q,pe,Pe;super({...t,type:Y.BlobEIP4844},s);const{chainId:x,accessList:h,maxFeePerGas:l,maxPriorityFeePerGas:p,maxFeePerBlobGas:A}=t;if(this.common=this._getCommon(s.common,x),this.chainId=this.common.chainId(),this.common.isActivatedEIP(1559)===!1)throw new Error("EIP-1559 not enabled on Common");if(this.common.isActivatedEIP(4844)===!1)throw new Error("EIP-4844 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const O=De.getAccessListData(h!=null?h:[]);if(this.accessList=O.accessList,this.AccessListJSON=O.AccessListJSON,De.verifyAccessList(this.accessList),this.maxFeePerGas=(0,a.v3)((0,a.O0)(l===""?"0x":l)),this.maxPriorityFeePerGas=(0,a.v3)((0,a.O0)(p===""?"0x":p)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),Ke._validateNotArray(t),this.gasLimit*this.maxFeePerGas>a.E2){const ie=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(ie)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const ie=this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(ie)}this.maxFeePerBlobGas=(0,a.v3)((0,a.O0)((A!=null?A:"")===""?"0x":A)),this.versionedHashes=(($=t.versionedHashes)!=null?$:[]).map(ie=>(0,a.O0)(ie)),this._validateYParity(),this._validateHighS();for(const ie of this.versionedHashes){if(ie.length!==32){const tt=this._errorMsg("versioned hash is invalid length");throw new Error(tt)}if(BigInt(ie[0])!==this.common.paramByEIP("sharding","blobCommitmentVersionKzg",4844)){const tt=this._errorMsg("versioned hash does not start with KZG commitment version");throw new Error(tt)}}if(this.versionedHashes.length>i0){const ie=this._errorMsg(`tx can contain at most ${i0} blobs`);throw new Error(ie)}this.blobs=(J=t.blobs)==null?void 0:J.map(ie=>(0,a.O0)(ie)),this.kzgCommitments=(Q=t.kzgCommitments)==null?void 0:Q.map(ie=>(0,a.O0)(ie)),this.kzgProofs=(pe=t.kzgProofs)==null?void 0:pe.map(ie=>(0,a.O0)(ie)),((Pe=s==null?void 0:s.freeze)!=null?Pe:!0)&&Object.freeze(this)}static fromTxData(t,s){if(t.blobsData!==void 0){if(t.blobs!==void 0)throw new Error("cannot have both raw blobs data and encoded blobs in constructor");if(t.kzgCommitments!==void 0)throw new Error("cannot have both raw blobs data and KZG commitments in constructor");if(t.versionedHashes!==void 0)throw new Error("cannot have both raw blobs data and versioned hashes in constructor");if(t.kzgProofs!==void 0)throw new Error("cannot have both raw blobs data and KZG proofs in constructor");t.blobs=(0,a.KR)(t.blobsData.reduce((x,h)=>x+h)),t.kzgCommitments=(0,a.PS)(t.blobs),t.versionedHashes=(0,a.CW)(t.kzgCommitments),t.kzgProofs=(0,a.y9)(t.blobs,t.kzgCommitments)}return new Ve(t,s)}static minimalFromNetworkWrapper(t,s){return Ve.fromTxData({...t,blobs:void 0,kzgCommitments:void 0,kzgProofs:void 0},s)}static fromSerializedTx(t,s={}){if((0,a.hD)(t.subarray(0,1),Bt)===!1)throw new Error(`Invalid serialized tx input: not an EIP-4844 transaction (wrong tx type, expected: ${Y.BlobEIP4844}, received: ${(0,a.ci)(t.subarray(0,1))}`);const x=T.yH.decode(t.subarray(1));if(!Array.isArray(x))throw new Error("Invalid serialized tx input: must be array");return Ve.fromValuesArray(x,s)}static fromValuesArray(t,s={}){if(t.length!==11&&t.length!==14)throw new Error("Invalid EIP-4844 transaction. Only expecting 11 values (for unsigned tx) or 14 values (for signed tx).");const[x,h,l,p,A,O,M,$,J,Q,pe,Pe,ie,tt]=t;return this._validateNotArray({chainId:x,v:Pe}),(0,a.jY)({nonce:h,maxPriorityFeePerGas:l,maxFeePerGas:p,gasLimit:A,value:M,maxFeePerBlobGas:Q,v:Pe,r:ie,s:tt}),new Ve({chainId:(0,a.v3)(x),nonce:h,maxPriorityFeePerGas:l,maxFeePerGas:p,gasLimit:A,to:O,value:M,data:$,accessList:J!=null?J:[],maxFeePerBlobGas:Q,versionedHashes:pe,v:Pe!==void 0?(0,a.v3)(Pe):void 0,r:ie,s:tt},s)}static fromSerializedBlobTxNetworkWrapper(t,s){var J;if(!s||!s.common)throw new Error("common instance required to validate versioned hashes");if((0,a.hD)(t.subarray(0,1),Bt)===!1)throw new Error(`Invalid serialized tx input: not an EIP-4844 transaction (wrong tx type, expected: ${Y.BlobEIP4844}, received: ${(0,a.ci)(t.subarray(0,1))}`);const x=T.yH.decode(t.subarray(1));if(x.length!==4)throw Error("Expected 4 values in the deserialized network transaction");const[h,l,p,A]=x,O=Ve.fromValuesArray(h,{...s,freeze:!1});if(O.to===void 0)throw Error("BlobEIP4844Transaction can not be send without a valid `to`");const M=Number(s.common.paramByEIP("sharding","blobCommitmentVersionKzg",4844));return g0(O.versionedHashes,l,p,A,M),O.blobs=l,O.kzgCommitments=p,O.kzgProofs=A,((J=s==null?void 0:s.freeze)!=null?J:!0)&&Object.freeze(O),O}getUpfrontCost(t=BigInt(0)){const s=this.maxPriorityFeePerGas,x=this.maxFeePerGas-t,l=(s<x?s:x)+t;return this.gasLimit*l+this.value}raw(){return[(0,a.XD)(this.chainId),(0,a.XD)(this.nonce),(0,a.XD)(this.maxPriorityFeePerGas),(0,a.XD)(this.maxFeePerGas),(0,a.XD)(this.gasLimit),this.to!==void 0?this.to.bytes:new Uint8Array(0),(0,a.XD)(this.value),this.data,this.accessList,(0,a.XD)(this.maxFeePerBlobGas),this.versionedHashes,this.v!==void 0?(0,a.XD)(this.v):new Uint8Array(0),this.r!==void 0?(0,a.XD)(this.r):new Uint8Array(0),this.s!==void 0?(0,a.XD)(this.s):new Uint8Array(0)]}serialize(){const t=this.raw();return(0,a.eV)(Bt,T.yH.encode(t))}serializeNetworkWrapper(){if(this.blobs===void 0||this.kzgCommitments===void 0||this.kzgProofs===void 0)throw new Error("cannot serialize network wrapper without blobs, KZG commitments and KZG proofs provided");const t=this.raw();return(0,a.eV)(Bt,T.yH.encode([t,this.blobs,this.kzgCommitments,this.kzgProofs]))}getMessageToSign(){const t=this.raw().slice(0,11);return(0,a.eV)(Bt,T.yH.encode(t))}getHashedMessageToSign(){return Ie(this.getMessageToSign())}hash(){if(!this.isSigned()){const t=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=Ie(this.serialize())),this.cache.hash):Ie(this.serialize())}getMessageToVerifySignature(){return this.getHashedMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const l=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(l)}const t=this.getMessageToVerifySignature(),{v:s,r:x,s:h}=this;this._validateHighS();try{return(0,a.Js)(t,s+BigInt(27),(0,a.XD)(x),(0,a.XD)(h))}catch{const p=this._errorMsg("Invalid Signature");throw new Error(p)}}toJSON(){const t=De.getAccessListJSON(this.accessList);return{...super.toJSON(),chainId:(0,a.Z4)(this.chainId),maxPriorityFeePerGas:(0,a.Z4)(this.maxPriorityFeePerGas),maxFeePerGas:(0,a.Z4)(this.maxFeePerGas),accessList:t,maxFeePerBlobGas:(0,a.Z4)(this.maxFeePerBlobGas),versionedHashes:this.versionedHashes.map(x=>(0,a.ci)(x))}}_processSignature(t,s,x){const h={...this.txOptions,common:this.common};return Ve.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,a.v3)(s),s:(0,a.v3)(x),maxFeePerBlobGas:this.maxFeePerBlobGas,versionedHashes:this.versionedHashes,blobs:this.blobs,kzgCommitments:this.kzgCommitments,kzgProofs:this.kzgProofs},h)}errorStr(){let t=this._getSharedErrorPostfix();return t+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}numBlobs(){return this.versionedHashes.length}}function ct(o,t){const s=Number(o),x=Number(t)*2;return s===x+35||s===x+36}class ze extends Ke{constructor(t,s={}){var h;if(super({...t,type:Y.Legacy},s),this.common=this._validateTxV(this.v,s.common),this.gasPrice=(0,a.v3)((0,a.O0)(t.gasPrice===""?"0x":t.gasPrice)),this.gasPrice*this.gasLimit>a.E2){const l=this._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw new Error(l)}this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),Ke._validateNotArray(t),this.common.gteHardfork("spuriousDragon")&&(this.isSigned()?ct(this.v,this.common.chainId())&&this.activeCapabilities.push(le.EIP155ReplayProtection):this.activeCapabilities.push(le.EIP155ReplayProtection)),((h=s==null?void 0:s.freeze)!=null?h:!0)&&Object.freeze(this)}static fromTxData(t,s={}){return new ze(t,s)}static fromSerializedTx(t,s={}){const x=T.yH.decode(t);if(!Array.isArray(x))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(x,s)}static fromValuesArray(t,s={}){if(t.length!==6&&t.length!==9)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");const[x,h,l,p,A,O,M,$,J]=t;return(0,a.jY)({nonce:x,gasPrice:h,gasLimit:l,value:A,v:M,r:$,s:J}),new ze({nonce:x,gasPrice:h,gasLimit:l,to:p,value:A,data:O,v:M,r:$,s:J},s)}raw(){return[(0,a.XD)(this.nonce),(0,a.XD)(this.gasPrice),(0,a.XD)(this.gasLimit),this.to!==void 0?this.to.bytes:new Uint8Array(0),(0,a.XD)(this.value),this.data,this.v!==void 0?(0,a.XD)(this.v):new Uint8Array(0),this.r!==void 0?(0,a.XD)(this.r):new Uint8Array(0),this.s!==void 0?(0,a.XD)(this.s):new Uint8Array(0)]}serialize(){return T.yH.encode(this.raw())}getMessageToSign(){const t=[(0,a.XD)(this.nonce),(0,a.XD)(this.gasPrice),(0,a.XD)(this.gasLimit),this.to!==void 0?this.to.bytes:new Uint8Array(0),(0,a.XD)(this.value),this.data];return this.supports(le.EIP155ReplayProtection)&&(t.push((0,a.XD)(this.common.chainId())),t.push((0,a._K)((0,a.O0)(0))),t.push((0,a._K)((0,a.O0)(0)))),t}getHashedMessageToSign(){const t=this.getMessageToSign();return Ie(T.yH.encode(t))}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){const t=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=Ie(T.yH.encode(this.raw()))),this.cache.hash):Ie(T.yH.encode(this.raw()))}getMessageToVerifySignature(){if(!this.isSigned()){const t=this._errorMsg("This transaction is not signed");throw new Error(t)}return this.getHashedMessageToSign()}getSenderPublicKey(){const t=this.getMessageToVerifySignature(),{v:s,r:x,s:h}=this;this._validateHighS();try{return(0,a.Js)(t,s,(0,a.XD)(x),(0,a.XD)(h),this.supports(le.EIP155ReplayProtection)?this.common.chainId():void 0)}catch{const p=this._errorMsg("Invalid Signature");throw new Error(p)}}_processSignature(t,s,x){this.supports(le.EIP155ReplayProtection)&&(t+=this.common.chainId()*BigInt(2)+BigInt(8));const h={...this.txOptions,common:this.common};return ze.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:t,r:(0,a.v3)(s),s:(0,a.v3)(x)},h)}toJSON(){return{...super.toJSON(),gasPrice:(0,a.Z4)(this.gasPrice)}}_validateTxV(t,s){let x;const h=t!==void 0?Number(t):void 0;if(h!==void 0&&h<37&&h!==27&&h!==28)throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${h}`);if(h!==void 0&&h!==0&&(!s||s.gteHardfork("spuriousDragon"))&&h!==27&&h!==28)if(s){if(!ct(BigInt(h),s.chainId()))throw new Error(`Incompatible EIP155-based V ${h} and chain id ${s.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let l;(h-35)%2===0?l=35:l=36,x=BigInt(h-l)/BigInt(2)}return this._getCommon(s,x)}errorStr(){let t=this._getSharedErrorPostfix();return t+=` gasPrice=${this.gasPrice}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}const Kt=o=>{var s;const t=Object.assign({},o);return t.gasLimit=(0,a.Fy)((s=t.gasLimit)!=null?s:t.gas,a.qT.BigInt),t.data=t.data===void 0?t.input:t.data,t.gasPrice=t.gasPrice!==void 0?BigInt(t.gasPrice):void 0,t.value=t.value!==void 0?BigInt(t.value):void 0,t.to=t.to!==null&&t.to!==void 0?(0,a.V_)((0,a.O0)(t.to),20):null,t.v=t.v==="0x0"?"0x":t.v,t.r=t.r==="0x0"?"0x":t.r,t.s=t.s==="0x0"?"0x":t.s,(t.v!=="0x"||t.r!=="0x"||t.s!=="0x")&&(t.v=(0,a.Fy)(t.v,a.qT.BigInt)),t};class mt{constructor(){}static fromTxData(t,s={}){if(!("type"in t)||t.type===void 0)return ze.fromTxData(t,s);if(t0(t))return ze.fromTxData(t,s);if(n0(t))return et.fromTxData(t,s);if(r0(t))return Qe.fromTxData(t,s);if(s0(t))return Ve.fromTxData(t,s);throw new Error(`Tx instantiation with type ${t==null?void 0:t.type} not supported`)}static fromSerializedData(t,s={}){if(t[0]<=127)switch(t[0]){case Y.AccessListEIP2930:return et.fromSerializedTx(t,s);case Y.FeeMarketEIP1559:return Qe.fromSerializedTx(t,s);case Y.BlobEIP4844:return Ve.fromSerializedTx(t,s);default:throw new Error(`TypedTransaction with ID ${t[0]} unknown`)}else return ze.fromSerializedTx(t,s)}static fromBlockBodyData(t,s={}){if(t instanceof Uint8Array)return this.fromSerializedData(t,s);if(Array.isArray(t))return ze.fromValuesArray(t,s);throw new Error("Cannot decode transaction: unknown type input")}static async fromJsonRpcProvider(t,s,x){const h=(0,a.VH)(t),l=await(0,a.Rb)(h,{method:"eth_getTransactionByHash",params:[s]});if(l===null)throw new Error("No data returned from provider");return mt.fromRPC(l,x)}static async fromRPC(t,s={}){return mt.fromTxData(Kt(t),s)}}},82090:function(xt,_,se){"use strict";se.d(_,{kL:function(){return nt},E2:function(){return Ye},np:function(){return Ce},Sr:function(){return at},qT:function(){return gt},Z4:function(){return W},XD:function(){return fe},PS:function(){return rn},y9:function(){return sn},v3:function(){return ue},ci:function(){return We},CW:function(){return on},h$:function(){return S0},eV:function(){return D},Js:function(){return N0},v4:function(){return G0},hD:function(){return S},Rb:function(){return an},KR:function(){return nn},VH:function(){return cn},nr:function(){return k},sO:function(){return Ue},I4:function(){return ht},Lo:function(){return Z},V7:function(){return Ft},fB:function(){return v0},V_:function(){return ne},MT:function(){return z},O0:function(){return m},Fy:function(){return M0},_K:function(){return ot},jY:function(){return L}});var T=se(60533);const a=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ce=e=>e instanceof Uint8Array,G=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),P=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),V=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),C=(e,n)=>e<<32-n|e>>>n;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const Fe=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function de(e){if(!ce(e))throw new Error("Uint8Array expected");let n="";for(let r=0;r<e.length;r++)n+=Fe[e[r]];return n}function ye(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const n=e.length;if(n%2)throw new Error("padded hex string expected, got unpadded hex of length "+n);const r=new Uint8Array(n/2);for(let i=0;i<r.length;i++){const u=i*2,g=e.slice(u,u+2),y=Number.parseInt(g,16);if(Number.isNaN(y)||y<0)throw new Error("Invalid byte sequence");r[i]=y}return r}const Re=async()=>{};async function _e(e,n,r){let i=Date.now();for(let u=0;u<e;u++){r(u);const g=Date.now()-i;g>=0&&g<n||(await Re(),i+=g)}}function je(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function ke(e){if(typeof e=="string"&&(e=je(e)),!ce(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function rt(...e){const n=new Uint8Array(e.reduce((i,u)=>i+u.length,0));let r=0;return e.forEach(i=>{if(!ce(i))throw new Error("Uint8Array expected");n.set(i,r),r+=i.length}),n}class Te{clone(){return this._cloneInto()}}const st=e=>Object.prototype.toString.call(e)==="[object Object]"&&e.constructor===Object;function Xe(e,n){if(n!==void 0&&(typeof n!="object"||!st(n)))throw new Error("Options should be object or undefined");return Object.assign(e,n)}function v(e){const n=i=>e().update(ke(i)).digest(),r=e();return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=()=>e(),n}function H(e){const n=(i,u)=>e(u).update(ke(i)).digest(),r=e({});return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=i=>e(i),n}function F(e){const n=(i,u)=>e(u).update(ke(i)).digest(),r=e({});return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=i=>e(i),n}function j(e=32){if(crypto&&typeof crypto.getRandomValues=="function")return crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function te(e){return randomBytes(e)}async function xe(e){return randomBytes(e)}function Le(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function we(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function Oe(e,...n){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(n.length>0&&!n.includes(e.length))throw new Error(`Expected Uint8Array of length ${n}, not of length=${e.length}`)}function qe(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Le(e.outputLen),Le(e.blockLen)}function ut(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function Je(e,n){Oe(e);const r=n.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var Ee={number:Le,bool:we,bytes:Oe,hash:qe,exists:ut,output:Je};const wt=Ee.bool,b=Ee.bytes;function w(e){if(!(e instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof e}`);return new TextDecoder().decode(e)}function I(e){const n=e.startsWith("0x")?e.substring(2):e;return ye(n)}function S(e,n){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}function R(e){return n=>(Ee.bytes(n),e(n))}const N=(()=>{const e=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,n=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:n&&!e?n("crypto"):void 0,web:e}})();function Z(e){if(typeof e!="string")throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return e[0]==="0"&&e[1]==="x"}const z=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return Z(e)?e.slice(2):e};function q(e){let n=e;if(typeof n!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof n}`);return n.length%2&&(n=`0${n}`),n}function oe(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return utf8ToBytes(e).byteLength}function vt(e,n,r){if(Array.isArray(e)!==!0)throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(Array.isArray(n)!==!0)throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof n}'`);return n[r===!0?"some":"every"](i=>e.indexOf(i)>=0)}function Et(e){let n="",r=0;const i=e.length;for(e.substring(0,2)==="0x"&&(r=2);r<i;r+=2){const u=parseInt(e.substr(r,2),16);n+=String.fromCharCode(u)}return n}function Me(e){const n=utf8ToBytes(e);return`0x${q(bytesToHex(n)).replace(/^0+|0+$/g,"")}`}function At(e){let n="";for(let r=0;r<e.length;r++){const u=e.charCodeAt(r).toString(16);n+=u.length<2?`0${u}`:u}return`0x${n}`}function Zt(e,n,r){if(!Array.isArray(e))throw new Error(`[getKeys] method expects input 'params' to be an array, got ${typeof e}`);if(typeof n!="string")throw new Error(`[getKeys] method expects input 'key' to be type 'string', got ${typeof e}`);const i=[];for(let u=0;u<e.length;u++){let g=e[u][n];if(r===!0&&!g)g="";else if(typeof g!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof g}`);i.push(g)}return i}function Ze(e,n){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof n<"u"&&n>0&&e.length!==2+2*n)}const Wt=function(e){if(!isHexString(e)){const n=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(n)}},Se=function(e){if(!(e instanceof Uint8Array)){const n=`This method only supports Uint8Array but input was: ${e}`;throw new Error(n)}},Yt=function(e){if(!Array.isArray(e)){const n=`This method only supports number arrays but input was: ${e}`;throw new Error(n)}},Ut=function(e){if(typeof e!="string"){const n=`This method only supports strings but input was: ${e}`;throw new Error(n)}},Mt=null,Qt=e=>{if(e.slice(0,2)==="0x")throw new Error("hex string is prefixed with 0x, should be unprefixed");return I(q(e))},It=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0")),We=e=>{let n="0x";if(e===void 0||e.length===0)return n;for(const r of e)n+=It[r];return n},ue=e=>{const n=We(e);return BigInt(n==="0x"?0:n)},Gt=e=>{const n=Number(ue(e));if(!Number.isSafeInteger(n))throw new Error("Number exceeds 53 bits");return n},k=e=>{if(typeof e!="string")throw new Error(`hex argument type ${typeof e} must be of type string`);if(!e.startsWith("0x"))throw new Error(`prefixed hex input should start with 0x, got ${e.substring(0,2)}`);e=e.slice(2),e.length%2!==0&&(e=q(e));const n=e.length/2,r=new Uint8Array(n);for(let i=0;i<n;i++){const u=parseInt(e.slice(i*2,(i+1)*2),16);r[i]=u}return r},ht=e=>{if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},Ue=e=>{const n=ht(e);return k(n)},he=e=>m("0x"+q(e.toString(16))),K=e=>new Uint8Array(e),Ge=(e,n,r)=>r?e.length<n?new Uint8Array([...e,...K(n-e.length)]):e.subarray(0,n):e.length<n?new Uint8Array([...K(n-e.length),...e]):e.subarray(-n),ne=(e,n)=>(Se(e),Ge(e,n,!1)),Nt=(e,n)=>(assertIsBytes(e),Ge(e,n,!0)),lt=e=>{let n=e[0];for(;e.length>0&&n.toString()==="0";)e=e.slice(1),n=e[0];return e},ot=e=>(Se(e),lt(e)),kt=e=>(assertIsArray(e),lt(e)),Ae=e=>(assertIsHexString(e),e=stripHexPrefix(e),"0x"+lt(e)),m=e=>{if(e==null)return new Uint8Array;if(Array.isArray(e)||e instanceof Uint8Array)return Uint8Array.from(e);if(typeof e=="string"){if(!Ze(e))throw new Error(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${e}`);return k(e)}if(typeof e=="number")return Ue(e);if(typeof e=="bigint"){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${e}`);let n=e.toString(16);return n.length%2&&(n="0"+n),Qt(n)}if(e.toBytes!==void 0)return e.toBytes();throw new Error("invalid type")},d=e=>BigInt.asIntN(256,ue(e)),f=e=>he(BigInt.asUintN(256,e)),c=e=>typeof e!="string"||isHexPrefixed(e)?e:"0x"+e,E=(e,n=50)=>{const r=e instanceof Uint8Array?We(e):e,i=r.slice(0,2)==="0x"?n+2:n;return r.length<=i?r:r.slice(0,i)+"\u2026"},L=e=>{for(const[n,r]of Object.entries(e))if(r!==void 0&&r.length>0&&r[0]===0)throw new Error(`${n} cannot have leading zeroes, received: ${We(r)}`)},W=e=>"0x"+e.toString(16),fe=e=>ot(he(e)),U=e=>ot(Ue(e)),me=(e,n)=>{const r=ue(e),i=ue(n);return r>i?1:r<i?-1:0},ve=e=>getRandomBytesSync(e),D=(...e)=>{if(e.length===1)return e[0];const n=e.reduce((i,u)=>i+u.length,0),r=new Uint8Array(n);for(let i=0,u=0;i<e.length;i++){const g=e[i];r.set(g,u),u+=g.length}return r},Ce=BigInt("0xffffffffffffffff"),Ye=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),it=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),ge=T.kA.CURVE.n,at=T.kA.CURVE.n/BigInt(2),Pt=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Tt=k("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"),Ie=k("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"),Ne=k("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"),He=Uint8Array.from([128]),le=16,x0="0000000000000000000000000000000000000003",u0=BigInt(1e9);var Y=se(93996);const Lt=BigInt(2**32-1),$t=BigInt(32);function e0(e,n=!1){return n?{h:Number(e&Lt),l:Number(e>>$t&Lt)}:{h:Number(e>>$t&Lt)|0,l:Number(e&Lt)|0}}function h0(e,n=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let u=0;u<e.length;u++){const{h:g,l:y}=e0(e[u],n);[r[u],i[u]]=[g,y]}return[r,i]}const t0=(e,n)=>BigInt(e>>>0)<<$t|BigInt(n>>>0),n0=(e,n,r)=>e>>>r,r0=(e,n,r)=>e<<32-r|n>>>r,s0=(e,n,r)=>e>>>r|n<<32-r,o0=(e,n,r)=>e<<32-r|n>>>r,De=(e,n,r)=>e<<64-r|n>>>r-32,Ke=(e,n,r)=>e>>>r-32|n<<64-r,Ht=(e,n)=>n,Qe=(e,n)=>e,_t=(e,n,r)=>e<<r|n>>>32-r,et=(e,n,r)=>n<<r|e>>>32-r,l0=(e,n,r)=>n<<r-32|e>>>64-r,b0=(e,n,r)=>e<<r-32|n>>>64-r;function m0(e,n,r,i){const u=(n>>>0)+(i>>>0);return{h:e+r+(u/2**32|0)|0,l:u|0}}var ct={fromBig:e0,split:h0,toBig:t0,shrSH:n0,shrSL:r0,rotrSH:s0,rotrSL:o0,rotrBH:De,rotrBL:Ke,rotr32H:Ht,rotr32L:Qe,rotlSH:_t,rotlSL:et,rotlBH:l0,rotlBL:b0,add:m0,add3L:(e,n,r)=>(e>>>0)+(n>>>0)+(r>>>0),add3H:(e,n,r,i)=>n+r+i+(e/2**32|0)|0,add4L:(e,n,r,i)=>(e>>>0)+(n>>>0)+(r>>>0)+(i>>>0),add4H:(e,n,r,i,u)=>n+r+i+u+(e/2**32|0)|0,add5H:(e,n,r,i,u,g)=>n+r+i+u+g+(e/2**32|0)|0,add5L:(e,n,r,i,u)=>(e>>>0)+(n>>>0)+(r>>>0)+(i>>>0)+(u>>>0)};const[ze,Kt,mt]=[[],[],[]],o=BigInt(0),t=BigInt(1),s=BigInt(2),x=BigInt(7),h=BigInt(256),l=BigInt(113);for(let e=0,n=t,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],ze.push(2*(5*i+r)),Kt.push((e+1)*(e+2)/2%64);let u=o;for(let g=0;g<7;g++)n=(n<<t^(n>>x)*l)%h,n&s&&(u^=t<<(t<<BigInt(g))-t);mt.push(u)}const[p,A]=ct.split(mt,!0),O=(e,n,r)=>r>32?ct.rotlBH(e,n,r):ct.rotlSH(e,n,r),M=(e,n,r)=>r>32?ct.rotlBL(e,n,r):ct.rotlSL(e,n,r);function $(e,n=24){const r=new Uint32Array(10);for(let i=24-n;i<24;i++){for(let y=0;y<10;y++)r[y]=e[y]^e[y+10]^e[y+20]^e[y+30]^e[y+40];for(let y=0;y<10;y+=2){const B=(y+8)%10,X=(y+2)%10,ae=r[X],Be=r[X+1],ee=O(ae,Be,1)^r[B],pt=M(ae,Be,1)^r[B+1];for(let $e=0;$e<50;$e+=10)e[y+$e]^=ee,e[y+$e+1]^=pt}let u=e[2],g=e[3];for(let y=0;y<24;y++){const B=Kt[y],X=O(u,g,B),ae=M(u,g,B),Be=ze[y];u=e[Be],g=e[Be+1],e[Be]=X,e[Be+1]=ae}for(let y=0;y<50;y+=10){for(let B=0;B<10;B++)r[B]=e[y+B];for(let B=0;B<10;B++)e[y+B]^=~r[(B+2)%10]&r[(B+4)%10]}e[0]^=p[i],e[1]^=A[i]}r.fill(0)}class J extends Te{constructor(n,r,i,u=!1,g=24){if(super(),this.blockLen=n,this.suffix=r,this.outputLen=i,this.enableXOF=u,this.rounds=g,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ee.number(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=P(this.state)}keccak(){$(this.state32,this.rounds),this.posOut=0,this.pos=0}update(n){Ee.exists(this);const{blockLen:r,state:i}=this;n=ke(n);const u=n.length;for(let g=0;g<u;){const y=Math.min(r-this.pos,u-g);for(let B=0;B<y;B++)i[this.pos++]^=n[g++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:r,pos:i,blockLen:u}=this;n[i]^=r,(r&128)!==0&&i===u-1&&this.keccak(),n[u-1]^=128,this.keccak()}writeInto(n){Ee.exists(this,!1),Ee.bytes(n),this.finish();const r=this.state,{blockLen:i}=this;for(let u=0,g=n.length;u<g;){this.posOut>=i&&this.keccak();const y=Math.min(i-this.posOut,g-u);n.set(r.subarray(this.posOut,this.posOut+y),u),this.posOut+=y,u+=y}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return Ee.number(n),this.xofInto(new Uint8Array(n))}digestInto(n){if(Ee.output(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(n){const{blockLen:r,suffix:i,outputLen:u,rounds:g,enableXOF:y}=this;return n||(n=new J(r,i,u,y,g)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=g,n.suffix=i,n.outputLen=u,n.enableXOF=y,n.destroyed=this.destroyed,n}}const Q=(e,n,r)=>v(()=>new J(n,e,r)),pe=Q(6,144,224/8),Pe=Q(6,136,256/8),ie=Q(6,104,384/8),tt=Q(6,72,512/8),a0=Q(1,144,224/8),Ot=Q(1,136,256/8),Vt=Q(1,104,384/8),jt=Q(1,72,512/8),p0=(e,n,r)=>F((i={})=>new J(n,e,i.dkLen===void 0?r:i.dkLen,!0)),dn=p0(31,168,128/8),fn=p0(31,136,256/8),xn=R(a0),Ct=(()=>{const e=R(Ot);return e.create=Ot.create,e})(),un=R(Vt),hn=R(jt),St=BigInt(0);class c0{constructor(n=St,r=St,i=KECCAK256_RLP,u=KECCAK256_NULL){this.nonce=n,this.balance=r,this.storageRoot=i,this.codeHash=u,this._validate()}static fromAccountData(n){const{nonce:r,balance:i,storageRoot:u,codeHash:g}=n;return new c0(r!==void 0?bytesToBigInt(toBytes(r)):void 0,i!==void 0?bytesToBigInt(toBytes(i)):void 0,u!==void 0?toBytes(u):void 0,g!==void 0?toBytes(g):void 0)}static fromRlpSerializedAccount(n){const r=RLP.decode(n);if(!Array.isArray(r))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(r)}static fromValuesArray(n){const[r,i,u,g]=n;return new c0(bytesToBigInt(r),bytesToBigInt(i),u,g)}_validate(){if(this.nonce<St)throw new Error("nonce must be greater than zero");if(this.balance<St)throw new Error("balance must be greater than zero");if(this.storageRoot.length!==32)throw new Error("storageRoot must have a length of 32");if(this.codeHash.length!==32)throw new Error("codeHash must have a length of 32")}raw(){return[bigIntToUnpaddedBytes(this.nonce),bigIntToUnpaddedBytes(this.balance),this.storageRoot,this.codeHash]}serialize(){return RLP.encode(this.raw())}isContract(){return!equalsBytes(this.codeHash,KECCAK256_NULL)}isEmpty(){return this.balance===St&&this.nonce===St&&equalsBytes(this.codeHash,KECCAK256_NULL)}}const y0=function(e){try{Ut(e)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},_0=function(e,n){assertIsHexString(e);const r=stripHexPrefix(e).toLowerCase();let i="";n!==void 0&&(i=bytesToBigInt(toBytes(n)).toString()+"0x");const u=utf8ToBytes(i+r),g=bytesToHex(keccak256(u)).slice(2);let y="0x";for(let B=0;B<r.length;B++)parseInt(g[B],16)>=8?y+=r[B].toUpperCase():y+=r[B];return y},ln=function(e,n){return y0(e)&&_0(e,n)===e},O0=function(e,n){return Se(e),Se(n),ue(n)===BigInt(0)?Ct(Y.yH.encode([e,Uint8Array.from([])])).subarray(-20):Ct(Y.yH.encode([e,n])).subarray(-20)},C0=function(e,n,r){if(Se(e),Se(n),Se(r),e.length!==20)throw new Error("Expected from to be of length 20");if(n.length!==32)throw new Error("Expected salt to be of length 32");return Ct(D(k("0xff"),e,n,Ct(r))).subarray(-20)},bn=function(e){return secp256k1.utils.isValidPrivateKey(e)},mn=function(e,n=!1){if(assertIsBytes(e),e.length===64)try{return secp256k1.ProjectivePoint.fromHex(concatBytes(Uint8Array.from([4]),e)),!0}catch{return!1}if(!n)return!1;try{return secp256k1.ProjectivePoint.fromHex(e),!0}catch{return!1}},w0=function(e,n=!1){if(Se(e),n&&e.length!==64&&(e=T.kA.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),e.length!==64)throw new Error("Expected pubKey to be of length 64");return Ct(e).subarray(-20)},v0=w0,D0=function(e){return Se(e),T.kA.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1)},F0=function(e){return v0(D0(e))},gn=function(e){return assertIsBytes(e),e.length!==64&&(e=secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),e},R0=function(){const n=zeros(20);return bytesToHex(n)},pn=function(e){try{assertIsString(e)}catch{return!1}return R0()===e};function U0(e){const[n,r,i,u]=e;return[n,r,i.length===0?KECCAK256_RLP:i,u.length===0?KECCAK256_NULL:u]}const E0=new Uint8Array(0);function yn(e){const[n,r,i,u]=e;return[n,r,equalsBytes(i,KECCAK256_RLP)?E0:i,equalsBytes(u,KECCAK256_NULL)?E0:u]}function wn(e,n=!0){const r=n?U0(e):e;return RLP.encode(r)}class nt{constructor(n){if(n.length!==20)throw new Error("Invalid address length");this.bytes=n}static zero(){return new nt(K(20))}static fromString(n){if(!y0(n))throw new Error("Invalid address");return new nt(m(n))}static fromPublicKey(n){if(!(n instanceof Uint8Array))throw new Error("Public key should be Uint8Array");const r=w0(n);return new nt(r)}static fromPrivateKey(n){if(!(n instanceof Uint8Array))throw new Error("Private key should be Uint8Array");const r=F0(n);return new nt(r)}static generate(n,r){if(typeof r!="bigint")throw new Error("Expected nonce to be a bigint");return new nt(O0(n.bytes,he(r)))}static generate2(n,r,i){if(!(r instanceof Uint8Array))throw new Error("Expected salt to be a Uint8Array");if(!(i instanceof Uint8Array))throw new Error("Expected initCode to be a Uint8Array");return new nt(C0(n.bytes,r,i))}equals(n){return S(this.bytes,n.bytes)}isZero(){return this.equals(nt.zero())}isPrecompileOrSystemAddress(){const n=ue(this.bytes),r=BigInt(0),i=BigInt("0xffff");return n>=r&&n<=i}toString(){return We(this.bytes)}toBytes(){return new Uint8Array(this.bytes)}}var I0;(function(e){e.String="string",e.Bytes="view",e.Number="number"})(I0||(I0={}));var P0;(function(e){e.String="string",e.Bytes="view",e.JSON="json"})(P0||(P0={}));var gt;(function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Uint8Array=2]="Uint8Array",e[e.PrefixedHexString=3]="PrefixedHexString"})(gt||(gt={}));function M0(e,n){if(e===null)return null;if(e===void 0)return;if(typeof e=="string"&&!Ze(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if(typeof e=="number"&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=m(e);switch(n){case gt.Uint8Array:return r;case gt.BigInt:return ue(r);case gt.Number:{const i=ue(r);if(i>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(i)}case gt.PrefixedHexString:return We(r);default:throw new Error("unknown outputType")}}class Xt{constructor(n,r,i,u){this.index=n,this.validatorIndex=r,this.address=i,this.amount=u}static fromWithdrawalData(n){const{index:r,validatorIndex:i,address:u,amount:g}=n,y=toType(r,TypeOutput.BigInt),B=toType(i,TypeOutput.BigInt),X=u instanceof Address?u:new Address(toBytes(u)),ae=toType(g,TypeOutput.BigInt);return new Xt(y,B,X,ae)}static fromValuesArray(n){if(n.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${n.length}`);const[r,i,u,g]=n;return Xt.fromWithdrawalData({index:r,validatorIndex:i,address:u,amount:g})}static toBytesArray(n){const{index:r,validatorIndex:i,address:u,amount:g}=n,y=toType(r,TypeOutput.BigInt)===BigInt(0)?new Uint8Array:toType(r,TypeOutput.Uint8Array),B=toType(i,TypeOutput.BigInt)===BigInt(0)?new Uint8Array:toType(i,TypeOutput.Uint8Array),X=u instanceof Address?u.bytes:toType(u,TypeOutput.Uint8Array),ae=toType(g,TypeOutput.BigInt)===BigInt(0)?new Uint8Array:toType(g,TypeOutput.Uint8Array);return[y,B,X,ae]}raw(){return Xt.toBytesArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.bytes,amount:this.amount}}toJSON(){return{index:bigIntToHex(this.index),validatorIndex:bigIntToHex(this.validatorIndex),address:bytesToHex(this.address.bytes),amount:bigIntToHex(this.amount)}}}function G0(e,n,r){const i=T.kA.sign(e,n),u=i.toCompactRawBytes(),g=u.slice(0,32),y=u.slice(32,64),B=r===void 0?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2);return{r:g,s:y,v:B}}function qt(e,n){return e===BigInt(0)||e===BigInt(1)?e:n===void 0?e-BigInt(27):e-(n*BigInt(2)+BigInt(35))}function Jt(e){return e===BigInt(0)||e===BigInt(1)}const N0=function(e,n,r,i,u){const g=D(ne(r,32),ne(i,32)),y=qt(n,u);if(!Jt(y))throw new Error("Invalid signature v value");return T.kA.Signature.fromCompact(g).addRecoveryBit(Number(y)).recoverPublicKey(e).toRawBytes(!1).slice(1)},vn=function(e,n,r,i){const u=qt(e,i);if(!Jt(u))throw new Error("Invalid signature v value");return bytesToHex(concatBytes(setLengthLeft(n,32),setLengthLeft(r,32),toBytes(e)))},En=function(e,n,r,i){const u=qt(e,i);if(!Jt(u))throw new Error("Invalid signature v value");const g=Uint8Array.from([...r]);return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(g[0]|=128),bytesToHex(concatBytes(setLengthLeft(n,32),setLengthLeft(g,32)))},In=function(e){const n=toBytes(e);let r,i,u;if(n.length>=65)r=n.subarray(0,32),i=n.subarray(32,64),u=bytesToBigInt(n.subarray(64));else if(n.length===64)r=n.subarray(0,32),i=n.subarray(32,64),u=BigInt(bytesToInt(n.subarray(32,33))>>7),i[0]&=127;else throw new Error("Invalid signature length");return u<27&&(u=u+BigInt(27)),{v:u,r,s:i}},Pn=function(e,n,r,i=!0,u){if(n.length!==32||r.length!==32||!Jt(qt(e,u)))return!1;const g=bytesToBigInt(n),y=bytesToBigInt(r);return!(g===BigInt(0)||g>=SECP256K1_ORDER||y===BigInt(0)||y>=SECP256K1_ORDER||i&&y>=SECP256K1_ORDER_DIV_2)},Bn=function(e){assertIsBytes(e);const n=utf8ToBytes(`Ethereum Signed Message:
2
+ ${e.length}`);return keccak256(concatBytes(n,e))};var Sn=se(17187);async function z0(e,n,r){let i;for await(const u of n)try{u.length<2?u.call(e,r):await new Promise((g,y)=>{u.call(e,r,B=>{B?y(B):g()})})}catch(g){i=g}if(i)throw i}class An extends null{emit(n,...r){var B;let[i,u]=r;const g=this;let y=(B=g._events[n])!=null?B:[];return u===void 0&&typeof i=="function"&&(u=i,i=void 0),(n==="newListener"||n==="removeListener")&&(i={event:i,fn:u},u=void 0),y=Array.isArray(y)?y:[y],z0(g,y.slice(),i).then(u).catch(u),g.listenerCount(n)>0}once(n,r){const i=this;let u;if(typeof r!="function")throw new TypeError("listener must be a function");return r.length>=2?u=function(g,y){i.removeListener(n,u),r(g,y)}:u=function(g){i.removeListener(n,u),r(g,u)},i.on(n,u),i}first(n,r){var u;let i=(u=this._events[n])!=null?u:[];if(typeof r!="function")throw new TypeError("listener must be a function");return Array.isArray(i)||(this._events[n]=i=[i]),i.unshift(r),this}before(n,r,i){return this.beforeOrAfter(n,r,i)}after(n,r,i){return this.beforeOrAfter(n,r,i,"after")}beforeOrAfter(n,r,i,u){var ae;let g=(ae=this._events[n])!=null?ae:[],y,B;const X=u==="after"?1:0;if(typeof i!="function")throw new TypeError("listener must be a function");if(typeof r!="function")throw new TypeError("target must be a function");for(Array.isArray(g)||(this._events[n]=g=[g]),B=g.length,y=g.length;y--;)if(g[y]===r){B=y+X;break}return g.splice(B,0,i),this}on(n,r){return super.on(n,r)}addListener(n,r){return super.addListener(n,r)}prependListener(n,r){return super.prependListener(n,r)}prependOnceListener(n,r){return super.prependOnceListener(n,r)}removeAllListeners(n){return super.removeAllListeners(n)}removeListener(n,r){return super.removeListener(n,r)}eventNames(){return super.eventNames()}listeners(n){return super.listeners(n)}listenerCount(n){return super.listenerCount(n)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(n){return super.setMaxListeners(n)}}function $0(e,n,r,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,r,i);const u=BigInt(32),g=BigInt(4294967295),y=Number(r>>u&g),B=Number(r&g),X=i?4:0,ae=i?0:4;e.setUint32(n+X,y,i),e.setUint32(n+ae,B,i)}class K0 extends Te{constructor(n,r,i,u){super(),this.blockLen=n,this.outputLen=r,this.padOffset=i,this.isLE=u,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(n),this.view=V(this.buffer)}update(n){Ee.exists(this);const{view:r,buffer:i,blockLen:u}=this;n=ke(n);const g=n.length;for(let y=0;y<g;){const B=Math.min(u-this.pos,g-y);if(B===u){const X=V(n);for(;u<=g-y;y+=u)this.process(X,y);continue}i.set(n.subarray(y,y+B),this.pos),this.pos+=B,y+=B,this.pos===u&&(this.process(r,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){Ee.exists(this),Ee.output(n,this),this.finished=!0;const{buffer:r,view:i,blockLen:u,isLE:g}=this;let{pos:y}=this;r[y++]=128,this.buffer.subarray(y).fill(0),this.padOffset>u-y&&(this.process(i,0),y=0);for(let ee=y;ee<u;ee++)r[ee]=0;$0(i,u-8,BigInt(this.length*8),g),this.process(i,0);const B=V(n),X=this.outputLen;if(X%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const ae=X/4,Be=this.get();if(ae>Be.length)throw new Error("_sha2: outputLen bigger than state");for(let ee=0;ee<ae;ee++)B.setUint32(4*ee,Be[ee],g)}digest(){const{buffer:n,outputLen:r}=this;this.digestInto(n);const i=n.slice(0,r);return this.destroy(),i}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:r,buffer:i,length:u,finished:g,destroyed:y,pos:B}=this;return n.length=u,n.pos=B,n.finished=g,n.destroyed=y,u%r&&n.buffer.set(i),n}}const V0=(e,n,r)=>e&n^~e&r,j0=(e,n,r)=>e&n^e&r^n&r,X0=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]),dt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ft=new Uint32Array(64);class B0 extends K0{constructor(){super(64,32,8,!1),this.A=dt[0]|0,this.B=dt[1]|0,this.C=dt[2]|0,this.D=dt[3]|0,this.E=dt[4]|0,this.F=dt[5]|0,this.G=dt[6]|0,this.H=dt[7]|0}get(){const{A:n,B:r,C:i,D:u,E:g,F:y,G:B,H:X}=this;return[n,r,i,u,g,y,B,X]}set(n,r,i,u,g,y,B,X){this.A=n|0,this.B=r|0,this.C=i|0,this.D=u|0,this.E=g|0,this.F=y|0,this.G=B|0,this.H=X|0}process(n,r){for(let ee=0;ee<16;ee++,r+=4)ft[ee]=n.getUint32(r,!1);for(let ee=16;ee<64;ee++){const pt=ft[ee-15],$e=ft[ee-2],k0=C(pt,7)^C(pt,18)^pt>>>3,f0=C($e,17)^C($e,19)^$e>>>10;ft[ee]=f0+ft[ee-7]+k0+ft[ee-16]|0}let{A:i,B:u,C:g,D:y,E:B,F:X,G:ae,H:Be}=this;for(let ee=0;ee<64;ee++){const pt=C(B,6)^C(B,11)^C(B,25),$e=Be+pt+V0(B,X,ae)+X0[ee]+ft[ee]|0,f0=(C(i,2)^C(i,13)^C(i,22))+j0(i,u,g)|0;Be=ae,ae=X,X=B,B=y+$e|0,y=g,g=u,u=i,i=$e+f0|0}i=i+this.A|0,u=u+this.B|0,g=g+this.C|0,y=y+this.D|0,B=B+this.E|0,X=X+this.F|0,ae=ae+this.G|0,Be=Be+this.H|0,this.set(i,u,g,y,B,X,ae,Be)}roundClean(){ft.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class q0 extends B0{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const J0=v(()=>new B0),kn=v(()=>new q0),Z0=R(J0);function Dt(){throw Error("kzg library not loaded")}let Ft={loadTrustedSetup:Dt,blobToKzgCommitment:Dt,computeBlobKzgProof:Dt,verifyKzgProof:Dt,verifyBlobKzgProofBatch:Dt};function Tn(e,n){Ft=e,Ft.loadTrustedSetup(n)}const W0=32,d0=4096,Rt=32*d0,Y0=Rt*2-1,Q0=W0*d0;function en(e,n){const r=new Uint8Array(n*Rt).fill(0);return r.set(e),r[e.byteLength]=128,r}function tn(e){const n=new Uint8Array(Q0);for(let r=0;r<d0;r++){const i=new Uint8Array(32);i.set(e.subarray(r*31,(r+1)*31),0),n.set(i,r*32)}return n}const nn=e=>{const n=je(e),r=n.byteLength;if(r===0)throw Error("invalid blob data");if(r>Y0)throw Error("blob data is too large");const i=Math.ceil(r/Rt),u=en(n,i),g=[];for(let y=0;y<i;y++){const B=u.subarray(y*Rt,(y+1)*Rt),X=tn(B);g.push(X)}return g},rn=e=>{const n=[];for(const r of e)n.push(Ft.blobToKzgCommitment(r));return n},sn=(e,n)=>e.map((i,u)=>Ft.computeBlobKzgProof(i,n[u])),S0=(e,n)=>{const r=new Uint8Array(32);return r.set([n],0),r.set(Z0(e).subarray(1),1),r},on=e=>{const n=[];for(const r of e)n.push(S0(r,1));return n};function Hn(e){const n={};for(let r of Object.keys(e.alloc)){let{balance:i,code:u,storage:g,nonce:y}=e.alloc[r];r=addHexPrefix(r),i=isHexPrefixed(i)?i:bigIntToHex(BigInt(i)),u=u!==void 0?addHexPrefix(u):void 0,g=g!==void 0?Object.entries(g):void 0,y=y!==void 0?addHexPrefix(y):void 0,n[r]=[i,u,g,y]}return n}class A0{constructor(n){this._database=n!=null?n:new Map}async get(n){const r=n instanceof Uint8Array?bytesToUnprefixedHex(n):n.toString();return this._database.get(r)}async put(n,r){const i=n instanceof Uint8Array?bytesToUnprefixedHex(n):n.toString();this._database.set(i,r)}async del(n){const r=n instanceof Uint8Array?bytesToUnprefixedHex(n):n.toString();this._database.delete(r)}async batch(n){for(const r of n)r.type==="del"&&await this.del(r.key),r.type==="put"&&await this.put(r.key,r.value)}shallowCopy(){return new A0(this._database)}open(){return Promise.resolve()}}const an=async(e,n)=>{const r=JSON.stringify({method:n.method,params:n.params,jsonrpc:"2.0",id:1});return(await(await fetch(e,{headers:{"content-type":"application/json"},method:"POST",body:r})).json()).result},cn=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e._getConnection!==void 0)return e._getConnection().url;throw new Error("Must provide valid provider URL or Web3Provider")}}}]);