@indigo-labs/indigo-sdk 0.3.5 → 0.3.6

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.
package/dist/index.js CHANGED
@@ -47,6 +47,7 @@ __export(index_exports, {
47
47
  ExecuteParams: () => ExecuteParams,
48
48
  GovParams: () => GovParams,
49
49
  IAssetPriceInfoSchema: () => IAssetPriceInfoSchema,
50
+ IAssetScriptParams: () => IAssetScriptParams,
50
51
  INIT_TOKEN_NAMES: () => INIT_TOKEN_NAMES,
51
52
  InterestCollectionParamsSchema: () => InterestCollectionParamsSchema,
52
53
  InterestOracleDatumSchema: () => InterestOracleDatumSchema,
@@ -86,6 +87,7 @@ __export(index_exports, {
86
87
  adjustStakingPosition: () => adjustStakingPosition,
87
88
  alwaysFailValidator: () => alwaysFailValidator,
88
89
  annulRequest: () => annulRequest,
90
+ attachOracle: () => attachOracle,
89
91
  balance: () => balance,
90
92
  batchCollectInterest: () => batchCollectInterest,
91
93
  batchProcessStableswapOrders: () => batchProcessStableswapOrders,
@@ -199,7 +201,10 @@ __export(index_exports, {
199
201
  mkCollectorValidatorFromSP: () => mkCollectorValidatorFromSP,
200
202
  mkExecuteValidator: () => mkExecuteValidator,
201
203
  mkExecuteValidatorFromSP: () => mkExecuteValidatorFromSP,
204
+ mkGovValidator: () => mkGovValidator,
205
+ mkGovValidatorFromSP: () => mkGovValidatorFromSP,
202
206
  mkIAssetTokenPolicy: () => mkIAssetTokenPolicy,
207
+ mkIAssetValidatorFromSP: () => mkIAssetValidatorFromSP,
203
208
  mkInterestCollectionValidator: () => mkInterestCollectionValidator,
204
209
  mkInterestCollectionValidatorFromSP: () => mkInterestCollectionValidatorFromSP,
205
210
  mkInterestOracleValidator: () => mkInterestOracleValidator,
@@ -215,6 +220,8 @@ __export(index_exports, {
215
220
  mkStabilityPoolAddr: () => mkStabilityPoolAddr,
216
221
  mkStabilityPoolValidator: () => mkStabilityPoolValidator,
217
222
  mkStabilityPoolValidatorFromSP: () => mkStabilityPoolValidatorFromSP,
223
+ mkStableswapValidator: () => mkStableswapValidator,
224
+ mkStableswapValidatorFromSP: () => mkStableswapValidatorFromSP,
218
225
  mkStakingValidatorFromSP: () => mkStakingValidatorFromSP,
219
226
  mkTreasuryAddr: () => mkTreasuryAddr,
220
227
  mkTreasuryValidatorFromSP: () => mkTreasuryValidatorFromSP,
@@ -6935,21 +6942,63 @@ function castGovParams(params) {
6935
6942
  return import_lucid27.Data.castTo(params, GovParams);
6936
6943
  }
6937
6944
 
6938
- // src/contracts/stability-pool/transactions.ts
6945
+ // src/contracts/gov/scripts.ts
6939
6946
  var import_lucid28 = require("@lucid-evolution/lucid");
6947
+
6948
+ // src/validators/governance-validator.ts
6949
+ var _governanceValidator = {
6950
+ type: "PlutusScriptV3",
6951
+ description: "Generated by Aiken",
6952
+ cborHex: "593056593053010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cdc3a400530090024888966002600460126ea800e33001300a3754007223233001001003223300300130020029b87480026e2520049b874801a6e1d200e9b874801260126ea8011222222229800980a8044c054c0580224464b30013009001899192cc004c06c00a0091640606eb8c064004c054dd5001c566002601a003159800980a9baa00380145901645901220243013375400522232598009805000c4c8c96600260380050048b2032375c6034002602c6ea800e2b3001300e00189919912cc004c07400626601c6eb0c07000489660020050078cc004026603c00513001301f002402480e22c80d0dd6980d000980d800980b1baa0038b2026404c60286ea800a44b300130083013375400513232332259800980e001c0162c80c8dd6980c8009bad30190023019001301437540051640452232598009804800c4c8c96600260360050048b2030375c6032002602a6ea800e2b3001300d001899192cc004c06c00a0091640606eb8c064004c054dd5001c590122024301337540052259800980418099baa0028991919912cc004c07000e00b1640646eb8c064004dd7180c801180c800980a1baa0028b202248888888c8c8cc8966002602201913232323298009812000cdd698120024dd71812001a444b3001302800489919912cc004c06c00a264b3001302c0018992cc004c074c0a0dd5000c4c8c8c8c8c8ca60026064003375c606400d30320049819001cc0c80092222259800981c00344cc078c0dc0284cc07800c4cc0780084cc0780044cc07801403a2c81a8606400260620026060002605e002605c00260526ea80062c8130c0ac0062c8148c09cdd5001c566002603e005132598009816000c4c966002603a60506ea80062646464646465300130320019bae303200698190024c0c800e6064004911112cc004c0e001a26603c606e01426603c00626603c00426603c00226603c00a01d1640d4303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b300130170028992cc004c0b0006264b3001301d30283754003132323232323232323298009bad30350019bae30350099bad3035007981a8034c0d4016606a0093035003981a801244444444b3001303e009899811181e80809980f00289981100209981200189981200109981200080a45903b0c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0a4dd5000c590261815800c5902918139baa0038acc004c06400a264b3001302c0018992cc004c074c0a0dd5000c4c8c8c8c8c8c8c8c8ca60026eb4c0d40066eb8c0d40266eb4c0d401e606a00d3035005981a8024c0d400e606a004911111112cc004c0f8026266044607a02026603c00a2660440082660480062660480042660480020291640ec303500130340013033001303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900400144c966002605800313259800980e98141baa00189919191919191919194c004dd7181a800cdd7181a804cc0d401e606a00d3035005981a8024dd6981a801cdd6981a801244444444b3001303e009899811181e80809981200309981200289981200209981300180a45903b0c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0a4dd5000c590261815800c5902918139baa0038acc004cdc3a4014005132598009816000c4c966002603a60506ea8006264646464646464646464653001375c606e003375c606e0173037009981b8044c0dc01e64b300130350018acc004c0a0c0d00062d1302d303400140c91640d86ea8c0dc01a64b300130350018acc004c0a0c0d00062d1302d303400140c91640d86ea8c0dc016606e009375a606e007375a606e00491111111112cc004c10802e26604c608202826605001026605000e26605000c2660540060311640fc30370013036001303500130340013033001303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900600144c966002605800313300e302b0010028b205230273754007159800980c00144c966002605800313259800980e98141baa00189919912cc004c0c00062660426eb0c0bc004896600200500889919912cc004c0d4006264b30013026303137540031323259800981c00144c01cc0e00222c81a8dd7181b00098191baa0018b205e30340018b2064375c606400260660026eb0c0c400902f45902d1bad302d001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900800144c8c966002605a0050038b2054375c6056002604e6ea800e2c8121024204840908121024204840908120c090dd50008992cc004c068006264b3001302b0018992cc004c070c09cdd5000c4c8c8c966002605e0051332259800981098161baa00289919192cc004c0d000a2660326066006264b300130250018992cc004c0d800626464b300130280018992cc004c0e400626603c60700020131640d860686ea800a2b3001302c00189919194c004dd6981d000cdd6981d001cdd6981d0012444b3001303e00480745903b0c0e8004c0e4004c0d0dd5001459031206230323754002606a0031640cc60626ea800a2b300130290018acc004c0c4dd500140162c81922c817102e18179baa0018b206230320013032001302d37540051640a8605c00626604000244b300100280944c9660026044605a6ea800626464653001375a6068003375c6068007375c60680049112cc004c0e00122601060700131640d430340013033001302e37540031640ac606000481722c8160dd61816800981680098141baa0018b204a302a0018b20503026375400b159800980f000c566002604c6ea801601716409d16408c8118c090dd50021813802c590250c090004c08c004c088004c074dd500bc566002602a0191323259800981180140122c8100dd69810800980e9baa0178acc004c0340322b3001301d375402f0028b203c8acc004c03c0322b3001301d375402f0028b203c8b2034406880d101a0cc004dd2a40012301f30203020001911919800800801912cc00400629422b30013371e6eb8c08800400e2946266004004604600280e102048c07cc0800064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204289980280298140022042375c60420026eb4c088004c090005022191919800800803112cc00400600713233225980099b910090028acc004cdc78048014400600c811226600a00a60520088110dd718110009bab30230013025001408c297adef6c6014800244646600200200644b30010018a5eb8226644b3001300500289981180119802002000c4cc01001000501e18110009811800a0409b88480024b3001300c301b37540031301f301c37540031640652301f30203020302030200014888888888c8cc89660026032604c6ea80862646644b3001301e3029375400313259800981198151baa001899912cc004c0c4006264b30013022302d3754003132332259800981a800c4cc098dd6181a000912cc00400a264b3001302830333754003133017300c3756602260686ea80acdd7181b981a1baa0018b206232330010013758602c60686ea801c896600200314c0103d87a80008992cc006600266ebc00530103d87a8000a50a5140cd1001899801801981d0012066325980099b8f375c60720020171301b330383039303a0014bd7045300103d87a800040cc6eb0c0e000503644c8c8cc8966002607600713005303b0068b2070375c60700026eb8c0e0008c0e0004dd6181b00120688b2064375a60640026066002605c6ea80062c8158c02cc044c0b4dd5180798169baa30300018b205c375c605c60566ea800660026eb0c034c0acdd50114c020c0acdd5018d30103d879800040191640a0605a60546ea8c0b4c0a8dd5180618151baa302d302a375400316409c6002002660046eb0c0acc0a0dd500f80b112cc004006297ae089981598141816000998010011816800a0548acc004c06cc098dd500a44c9660026038604e6ea8006264646464653001375a6060003375a606000b375a6060007375a606000491112cc004c0d401626602e6068010264b300130263031375400313233225980099800a48113496e636f727265637420476f7620696e70757400330113756602e606a6ea8c05cc0d4dd5001981c181a9baa03b8cc004c0d0dd5017c8888c8cc004004014896600200313303d337606ea4014dd400225eb7bdb1822653001375c6076003375a6078003304000248896600266e4002400e26608266ec0dd48049ba80080058acc004cdc7804801c6600201300880148cc108cdd81ba900a37500020051001401d133041337606ea400cdd400119803003000a07840f0303e00140f1222232330010010052259800800c4cc0f4cdd81ba9005374c00897adef6c608994c004dd7181d800cdd5981e000cc1000092225980099b9000900389982099bb037520126e980200162b30013371e01200719800804c022005233042337606ea4028dd30008014400500744cc104cdd81ba9003374c0046600c00c00281e103c0c0f800503c496600200314a314a081ba24444464b3001302f00180144c00c00503819b800040039b81480026e2520009112cc004c0b0006297adef6c608991919800800a5eb7bdb180896600200313303d337606ea4018dd3001a5eb7bdb1822653001375c607600337566078003304000248896600266e4002800e26608266ec0dd48051ba60070058acc004cdc7805001c4cc104cdd81ba900a374c00e003133041337606ea400cdd300119803003000a07840f0303e00140f0646600200297adef6c602259800800c4cc0f0cdd81ba9004375000697adef6c608994c004dd7181d000cdd6981d800cc0fc0092225980099b9000800389982019bb037520106ea001c0162b30013371e010007133040337606ea4020dd4003800c4cc100cdd81ba900337500046600c00c00281d903b0c0f400503b206a914c00400a6eb8c0e8c0dcdd5000cdd7180c981b9baa001406123039303a303a303a303a303a303a303a303a303a0019181c981d181d181d181d181d181d000cdd2a4005374a90024dd79809181a9baa02c488888888888888cc88cc896600260760251980098239baa041912cc00400629344c966002003149a264b3001337206eb8c128c13800cdd71825000c4cc010010cc134004c13c00a2a66092921326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f7264657200164120609a0028258c13400504a4dc024005223259800981f000c566002607c60926ea800a298103d87a80008a6103d8798000411d159800981d000c566002607460926ea800a2980103d87a80008a6103d87b8000411d13322598009822000c4c96600266e2000c0062980103d87980008acc004cdc4000801c530103d87b80008a6103d87a800041288250dd6982798261baa0048acc004c100006298103d87b80008a6103d879800041248248dd6982698251baa00330493754004823904718241baa002912cc004c0f4006298103d87a80008acc004cdc4000a40011302e3304b302e3304b3750601e004660966ea0c03c0052f5c097ae089817198259817198259ba80023304b375000297ae04bd70208c4119225980099b900020018a60103d87980008acc004cdc7801000c530103d87a80008a6103d87b8000411882324605a660946ea0004cc12930010101004bd704888cc88cc010cdc11bad304f002375a609e60a000266e08dd698278009bad304f3050002304a375400660946ea800646096609860986098609860986098609860986098609800314820225ea46096609860986098609860980032304b304c304c304c001918259826182618261826182618261826000c8c12cc130c130c130c130c130c130c130c1300064464b30013001480422b30013001480022900044cdc724508010204081020408000002411d1598009800a40811337049040021980180199b800024803e266e092080808080203300300333700004901fa08e411c6e200066ebd300103d8798000912cc004006297ae0899198261ba9001330030033233001001304f0032259800800c52f5c11332259800cc004cdc7801002d28528a0968998281ba900233004004001899802002000a096375c609e00260a00028268dd71826000a0949bac304a304b304b3047375407c9111111111111111114c004c17404a6eb4c17004a60220232259800800c520008980919801001182f800a0b89181f9982e192cc004c14cc168dd5000c4c96600260a860b66ea8c0f8c170dd5182f982e1baa0038980e1982f1ba80014bd7044c070cc178dd41809800a5eb810591bad305e305b37540031001416060ba60b46ea8c174c168dd50009982e192cc004c14cc168dd5000c4c96600260a860b66ea8c0f8c170dd5181f182e1baa0038980e1982f1ba80014bd7044c070cc178dd419b80001480052f5c082c8dd6982f182d9baa0018800a0b0305d305a3754607860b46ea80052f5c12222259800998152492c44656274206d696e74696e672066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001802a0208cc0040164466e240080066022900120208a50416d15980099815249344c69717569646174696f6e2070726f63657373696e672066656520726174696f206973206265747765656e205b30252c2035255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b89002001802a0228cc0040164466e2400800660c460be6ea8005011452820b88b20b8330134802920c8018acc004cc0a924013953746162696c69747920706f6f6c207769746864726177616c2066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001801a0208cc00400e4466e240080066022900120208a50416d1598009981524933526564656d7074696f6e207265696d62757273656d656e7420726174696f20696e206265747765656e205b30252c203235255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b89002001801a0228cc00400e4466e2400800660c460be6ea8005011452820b88b20b833013480c920c801899815248134526564656d7074696f6e2070726f63657373696e672066656520726174696f20696e206265747765656e205b30252c203130255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b8900200180120228cc00400a4466e2400800660c460be6ea8005011452820b88b20b8330134805120c8018a50416d14a082da294105b452820b69192cc004c13cc168dd5000c4c178c16cdd5000c54cc1652401263c65787065637465643e2044656e6f6d696e61746f722063616e6e6f74206265207a65726f2e001641606601e6eb4c174c168dd50009bad303c305a375400322225980099814a4811e524d52206973206265747765656e205b313030252c2031305f303030255d0059800cc004c04120029119b89002001802201e8cc0040124466e240080066020906400a01e8a50416915980099814a491d4d52206973206265747765656e205b313030252c2031305f303030255d0059800cc004c04120029119b89002001801a01e8cc00400e4466e240080066020906400a01e8a50416915980099814a491f4d61696e74656e616e636520726174696f206d757374206265203e3d204c52009800801c88cdc4800801400900f456600266052921214c69717569646174696f6e20726174696f206d757374206265203e3d20313030250098009808240052233712004003002403d133029491174d696e20636f6c6c61746572616c20706f73697469766500303c0018a50416914a082d2294105a452820b491111112cc004cc0b12401236941737365742063616e6e6f74206265206120636f6c6c61746572616c20617373657400980099b8f375c60c660c06ea801c00694294505d45660026605892012c436f6c6c61746572616c20617373657420746f2069417373657420726174696f20697320706f73697469766500300a332233225980099b880020018a6103d87980008acc004cdc40008014530103d87b80008a6103d87a800041848308cdc11bad3065002375a60ca60cc00266e08dd698328009bad3065306600230603754980106d8799f0001ff003060375400d159800acc004cc0b12401274d696e74696e672066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001802a0248cc0040164466e240080066026900120248a50417513302c49012a526564656d7074696f6e2066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b8900200180220248cc0040124466e240080066026900120248a50417514a082ea2b30013302c491224d696e206d696e74696e6720616d6f756e74206973206e6f6e2d6e65676174697665003025003899816249254d696e20726564656d7074696f6e20616d6f756e74206973206e6f6e2d6e656761746976650030250028a50417514a082ea294105d452820ba4888888888cc8a600260ce0053067306800298009bad304630643754608c60c86ea80f66eb8c19c02d222259800acc004c180c19cdd5001c528c4c8c9660026606c921415472656173757279207769746864726177616c2063616e6e6f742062652061626f7665207769746864726177616c206c696d697420666f72206c6f76656c61636500337133001001a44100a44100412c6eb4c05cc1a8dd5182618351baa0438acc004cc0d924013d5472656173757279207769746864726177616c2063616e6e6f742062652061626f7665207769746864726177616c206c696d697420666f7220494e445900337126605a002603060d46ea81c0dd6980b18351baa304c306a37540871598009981b249295472656173757279207769746864726177616c2076616c75652063616e6e6f7420626520656d70747900980099baf374c002980101a000a50a51419d1598009981b249355472656173757279207769746864726177616c2063616e6e6f7420726571756573742044414f206964656e7469747920746f6b656e00305e3302d001302c306a37540e11598009981b24812f5472656173757279207769746864726177616c2063616e20636f6e7461696e206d6178206f6620382061737365747300337126601c01c6eb0c130c1a8dd5001240211330364901355472656173757279207769746864726177616c2063616e20636f6e7461696e206f6e6c7920706f73697469766520616d6f756e74730032330010013758609a60d66ea800c896600200314a315980098259bad306f30703070306c375460de00313300200230700018a5041a4836a2941067452820ce8a50419d14a0833a2941067191980080099198008009bac304d306b375400644b30010018a5eb822660dc6e9cc8c8cc1c0c1c4008cc1c0c1c4004cc1c0c1c4c1c80052f5c060e200260d86ea8c1bc004cc008008c1c000506d112cc004006297adef6c60899194c004dd71838000cdd698381838800ccc010010c1c400e6eb8c1c00092222598009832801c400a33001002800cc8c8008c05c004cc1cccdd81ba9004375000697adef6c6091111192cc004c0fc0060051300300141d06530010048054026444453001005801c0120050014018820940f503a20dc18380009bac306e00141b060d660d06ea800d06545660026606892011b496e636f727265637420476f7665726e616e6365206f75747075740098008084c0a0cc1a80d52f5c130273306a3232304f3306c375060426eb4c1b4c1a8dd50219983618368011983618368009983618369837000998361ba83021375a608e60d46ea810d2f5c060da00260d860d06ea81052f5c13022306b306837540dd4c0103d87a8000408d1598009981a24927546865207472616e73616374696f6e206d757374206265207369676e6564206279206f776e6572003304b3758602860d06ea817c0062b30013303449012850726f706f73616c20696e636f6d70617469626c6520776974682063757272656e742073746174650059800982c98339baa004899b87375a60d660d06ea8c1acc1a0dd5002180f9bad304c3068375408314a2832a2b30013303449010d496e76616c6964207054696d6500332259800992cc004c16c00629462b300130630018a518a5041a08340c1a4dd519810183698351baa002306d306a375400313259800982f800c528c56600260c600314a314a0834106818349baa33020304c306a3754004609860d46ea800629410671805980a98341baa05f300b304d3306a304d3306a30283306a375066e04038dd6980a18341baa06e4bd70198354c00528d30103d87a8000a60103d8798000419497ae03306a304d3306a30283306a3750600a6eb4c050c1a0dd503725eb80cc1aa6002946980103d87a8000a60103d8798000419497ae04bd704566002660689201245472616e73616374696f6e206d696e742065786163746c79203120706f6c6c546f6b656e003026374c6044609460d06ea81ba2b300133034490113496e76616c696420506f6c6c206f75747075740098008084c0a0cc1a8c134cc1a8c0a0cc1a8c0a4c1a0dd503725eb80cc1a9300103d87a80004bd7025eb82604e660d4609a660d4609a660d46ea0c07cdd6983598341baa0413306a3752002660d4008660d4006660d498106d8799f0000ff003306a3750004660d49810100003306a4c10100003306a301730683754609460d06ea8104cc1a8dd418029bad304530683754609460d06ea8104cc1a8dd419b80002375a602c60d06ea8c128c1a0dd502099835182618341baa0413306a302930683754609460d06ea81052f5c097ae04bd704cc090c088c128c1a0dd5037194c004dd7183618349baa0019bae304b30693754003337046eb4c1b0c1a4dd5182598349baa04233014014375a608c60d26ea810902d180b18341baa06ea60103d87a8000408d13259800982e800c4c8c8c8c8cc8966003300130103072005980818390024c040c1c800e602060e4005301030723073002404515980098319bad301d306f375409114a313259800983a000c4c96600266ebcc0c4cc1ccc078c1c4dd503ba5eb80c1d0c1c4dd5183a18389baa30533071375400313259800983318389baa0018992cc004c1dc006264b300130683073375400313232323232323232329800984000800cdd7184000804cdd69840008044c2000401a61000200b308001004984000801cc96600260fc0031598009838983e800c5a260ec60fa00283da2c83f8dd5184000801244444444b3001308901009899837984400807899837802899837802099837801899837801099838804099828a4812469417373657420776974682073616d65206e616d6520616c7265616479206578697374730059800acc004c1f4c21004dd518191842809baa012898179981c80b9bae308801308501375402514a084100a29462b30013375e6607202e6eb8c22004c21404dd5009260103d87b80008992cc004c1e8c21404dd5000c4c0c0cc0e8060dd71844809843009baa0018a51420c046062610a026ea804a2941082012104028b210c02184000800983f800983f000983e800983e000983d800983d000983c800983a1baa0018b20e230760018b20e8307237540031641bc609e60aa60e26ea8c14cc1c4dd5000c54cc1bd2401193c65787065637465643e204d697865642076657273696f6e73001641b860e60031641c53001375860a260de6ea819a604060de6ea81d698103d879800041288362294106c18388009bae30700043070001306f001306e0013069375460d860d26ea80162b300130610018991919194c004c038c1c0012601c60e0007300e307000298071838000cc038c1c0c1c400500f183800098378009837000983698349baa306c3069375400b159800982c800c4c8c8c8c9660033001300e3070003980718380014c038c1c00066eb4c1c0c1c400500d456600260c260d86ea8c1c00122942294506a452820d43070001306f001306e306e001306d306d306d3069375460d860d26ea80162b3001305b00189919194c004c034c1bc00e601a60de005300d306f0019bad306f3070001403060de00260dc00260da60da60da60da60da60d26ea8c1b0c1a4dd5002c56600266e1d2008001899191919194c004c1c4016601e60e2009300f3071003980798388014dd69838800cdd698389839000cdd7180e98371baa074403460e260e200260e000260de00260dc00260da60d26ea8c1b0c1a4dd5002c56600266e1d200a001899191919194c004c1c4016601e60e2009300f3071003980798388014dd69838800cdd698389839000cdd7180e98371baa074403460e260e260e260e200260e000260de00260dc00260da60d26ea8c1b0c1a4dd5002c56600266e1d200c0018992cc004cc0d924012a50726f706f73616c206465706f73697420696e2072616e6765205b302c2031305f30303020494e44595d005980098179bad306d306a37540031337126eb4c1b4c1a8dd500099b82482827005406a294106745660026606c92128566f74696e6720706572696f6420696e2072616e6765205b3120686f75722c2031206d6f6e74685d005980099b8948202eadc0cdd6982618351baa001899b89375a609860d46ea80052080a0f6a7138a50419d1598009981b249264566666563746976652064656c617920696e2072616e6765205b302c20313220686f7572735d005980098179bad304e306a37540031337126eb4c138c1a8dd5000a410171325314a0833a2b30013303649012b45787069726174696f6e20706572696f6420696e2072616e6765205b31206461792c2031206d6f6e74685d005980099b8948203c2c948dd6980c18351baa001899b89375a603060d46ea80052080a0f6a7138a50419d1598009981b2492b50726f706f73696e6720706572696f6420696e2072616e6765205b3120686f75722c2031206d6f6e74685d005980099b8948202eadc0cdd6982398351baa001899b89375a608e60d46ea80052080a0f6a7138a50419d1598009981b2492950726f706f73696e6720706572696f64203c20566f74696e6720706572696f64202d203120686f757200337106eb4c11cc1a8dd500099b80375a609860d46ea800520ffb9b7038acc004cc0d92411f546f74616c2073686172647320696e2072616e6765205b312c20313030305d005980099b8948008dd6980c98351baa001899b89375a603260d46ea800520d00f8a50419d1598009981b249234d696e2071756f72756d20696e2072616e6765205b302c2031306d696c20494e44595d005980098179bad302b306a37540031337126eb4c0acc1a8dd500099b82482036b1025406a294106745660026606c92127456c6563746f7261746520696e2072616e6765205b31356d696c2c2033356d696c20494e44595d005980099b8933704904043d387280d1bad301b306a37540031337126eb4c06cc1a8dd500099b8248202eec085406a294106745660026606c921384d6178207472656173757279206c6f76656c616365207370656e6420696e2072616e6765205b302c2034352062696c6c696f6e204144415d005980098179bad3017306a37540031337126eb4c05cc1a8dd500099b824820222b28f3c09406a294106744cc0d92401354d617820747265617375727920494e4459207370656e6420696e2072616e6765205b302c203335206d696c6c696f6e20494e44595d005980098179bad3016306a37540031337126eb4c058c1a8dd500099b8248202eec085406a2941067452820ce8a50419d14a0833a2941067452820ce8a50419d14a0833a2941067452820ce8a50419c60d860d26ea80162b3001305a0018991981b2491d43616e6e6f7420636f6e7461696e206475706c6963617465206b657973003375e6e9ccc04c04c004dd380099198008009bac306d306e306a375460da60d46ea8018896600200314bd7044cc1b4c1b8dd61837000998010011837800a0d889981aa491e5465787450726f706f73616c2773206c656e677468206973203c3d20363400337126e34dd7183618349baa005482000506620cc4198833106620cc41988330c19cdd5002452820ca8a50419514a0832a2941065452820ca8a50419514a0832860cc0126e000208acc004c0fc04a26644b3001304d0018992cc004cc05924010e4d697865642076657273696f6e73003375e609a60946ea8c134c128dd5181618251baa001300a3304c300b304a37540a097ae08acc004cc05924012e706f6c6c206d616e6167657220696e707574206d75737420757365207468652072696768742072656465656d657200323322598009820800c4c8c96600260a60050048b20a0375a60a2002609a6ea800e2b30013045001899192cc004c14c00a0091641406eb4c144004c134dd5001c566002607a0031323259800982980140122c8280dd6982880098269baa0038b2094412882504cdd78009818198269ba80044bd7018251baa0013259800981f98251baa0018982718259baa0018b20903232330010013756601c60986ea810c896600200314c0103d87a80008992cc004cdd78021826800c4c0cccc140c1380052f5c11330030033052002412c60a00028270c028cc130c134c128dd5000a5eb822b30013301649114496e636f727265637420676f76206f75747075740098009bac302e304a3754083300a3304c0174bd704c024cc130c8c8c8c0c8cc13cc14000ccc13cc140008cc13cc140004cc13cc140c144004cc13cdd419b80375a6054609a6ea809920014bd701828000982780098251baa0234bd704c010c134c128dd5028530103d87a8000401513301649013b4d757374206275726e203120706f6c6c20746f6b656e20616e64206f7074696f6e616c6c79206d696e7420616e207570677261646520746f6b656e005980098041ba63300630073004302c304a37540a06008605c60946ea81422946260106e98c01cc010c0b0c128dd5028208e8a50411d14a0823a29410471826000c5904a1bad304a30473754083300137586094608e6ea80fa6052608e6ea8136980103d87980004089159800981b80944cc04d24011d5370656e642065786163746c792031205570677261646520546f6b656e00303f323322330020020012259800800c52000899b8033002002304e0013300d3756605860946ea8c0b0c128dd51826800801a0963758609660906ea80fcc0acc11cdd5026c54cc1152410472646d72001641108221044111111919800800998158032cc004c0fcc128dd5002c48c8cdd7982818269baa3050304d3754004002609e60986ea801a246466ebcc140c134dd5001000982798261baa006412044b30010018a508acc004c96600266ebcc0c4c134dd500080344c96600200314a31598009829000c4c8ca60026eb8c14c0066eb4c14cc1500066eb8c14c0092225980099b8f001489008acc004cdc7801a441008acc004c11cc148dd50054566002603000513371200490404df701452820a08980c00120a08a50414114a0828060a60026eb0c144006294104f209e32330010013300a37566060609c6ea8008c02c018896600200314bd7044c8cc88cc88cc008008004896600200310038991982b9ba733057375200a660ae60a8002660ae60aa00297ae0330030033059002305700141546eacc14800cdd7182780099801801982a0011829000a0a08a504128609e00314a3133002002305000141248268a60026eb8c124c118dd5000cdd7181418231baa001a400480508c8cc004004008896600200314bd6f7b63044c8cc124cdd818230009ba632330010013756609000444b30010018a5eb7bdb1822646609866ec0c124004dd418081bad304a00133003003304e002304c00141286600600660960046092002823888ca60020030038012002222598008014400626530010049826801e6002005375c609000337566092003222223259800980b800c00a260060028260c8ca6002003006802a00222259800801440062653001004982b801e6002005375c60a4003375a60a600300540748020c154009053280aa02440106096004824914a08190c0d8c0ccdd5180a98199baa0012259800800c40062a6606600420028190c0d4c0c8dd5000c5902f198059bac30343031375405003f1640c83030001302f001302e001302d001302837540031640946054604e6ea80522c8121024111191980480211801180618151baa00159800980e18139baa00189198029bab300b3029375400200712300898009bab300b30293754003375c605860526ea800e6eb8c02cc0a4dd5001a014409444646600200200644b30010018a6103d87a80008992cc004cdd7981698151baa0010048980799816000a5eb82266006006605c0048138c0b000502a11180f4c00400a6eb8c0a4c098dd5000cdd7180418131baa001401c2232598009809000c4c966002604600313300930220010038b2040301e3754007159800980b000c4c966002604600313300730220010038b2040301e37540071598009807000c4c8c96600260480050048b2042375c6044002603c6ea800e2c80d901b2036301c375400444b30013010301b3754005132323232323232323232323298009815800cdd698158064dd69815805cdd698158054dd69815804cdd698158044dd69815803cdd698158034dd69815802cdd698158024dd69815801244444444444b3001303700c89980f981b00709980d00580c4590340c0ac004c0a8004c0a4004c0a0004c09c004c098004c094004c090004c08c004c088004c084004c070dd50014590191802002116401c300900130043754013149a26cac8009"
6953
+ };
6954
+
6955
+ // src/contracts/gov/scripts.ts
6956
+ var mkGovValidator = (params) => {
6957
+ return {
6958
+ type: "PlutusV3",
6959
+ script: (0, import_lucid28.applyParamsToScript)(_governanceValidator.cborHex, [
6960
+ castGovParams(params)
6961
+ ])
6962
+ };
6963
+ };
6964
+ var mkGovValidatorFromSP = (params) => {
6965
+ return {
6966
+ type: "PlutusV3",
6967
+ script: (0, import_lucid28.applyParamsToScript)(_governanceValidator.cborHex, [
6968
+ castGovParams({
6969
+ gBiasTime: BigInt(params.gBiasTime),
6970
+ govNFT: fromSystemParamsAssetLucid(params.govNFT),
6971
+ pollToken: fromSystemParamsAssetLucid(params.pollToken),
6972
+ upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
6973
+ indyAsset: fromSystemParamsAssetLucid(params.indyAsset),
6974
+ versionRecordToken: fromSystemParamsAssetLucid(
6975
+ params.versionRecordToken
6976
+ ),
6977
+ iassetSymbol: params.iassetSymbol.unCurrencySymbol,
6978
+ iassetValHash: params.iassetValHash,
6979
+ pollManagerValHash: params.pollManagerValHash,
6980
+ daoIdentityToken: fromSystemParamsAssetLucid(params.daoIdentityToken),
6981
+ iAssetAuthToken: fromSystemParamsAssetLucid(params.iAssetAuthToken)
6982
+ })
6983
+ ])
6984
+ };
6985
+ };
6986
+
6987
+ // src/contracts/stability-pool/transactions.ts
6988
+ var import_lucid29 = require("@lucid-evolution/lucid");
6940
6989
  var import_cardano_offchain_common18 = require("@3rd-eye-labs/cardano-offchain-common");
6941
6990
  var import_ts_pattern18 = require("ts-pattern");
6942
6991
  async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
6943
6992
  const [pkh, _skh] = await addrDetails(lucid);
6944
- const iasset = (0, import_lucid28.fromHex)((0, import_lucid28.fromText)(assetAscii));
6993
+ const iasset = (0, import_lucid29.fromHex)((0, import_lucid29.fromText)(assetAscii));
6945
6994
  const iassetAssetClass = {
6946
- currencySymbol: (0, import_lucid28.fromHex)(
6995
+ currencySymbol: (0, import_lucid29.fromHex)(
6947
6996
  sysParams.stabilityPoolParams.assetSymbol.unCurrencySymbol
6948
6997
  ),
6949
6998
  tokenName: iasset
6950
6999
  };
6951
7000
  const datum = {
6952
- owner: (0, import_lucid28.fromHex)(pkh.hash),
7001
+ owner: (0, import_lucid29.fromHex)(pkh.hash),
6953
7002
  iasset,
6954
7003
  state: initSpState,
6955
7004
  assetSums: [],
@@ -6957,8 +7006,8 @@ async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
6957
7006
  lastRequestProcessingTime: 0n
6958
7007
  };
6959
7008
  return lucid.newTx().pay.ToContract(
6960
- (0, import_lucid28.credentialToAddress)(lucid.config().network, {
6961
- hash: (0, import_lucid28.validatorToScriptHash)(
7009
+ (0, import_lucid29.credentialToAddress)(lucid.config().network, {
7010
+ hash: (0, import_lucid29.validatorToScriptHash)(
6962
7011
  mkStabilityPoolValidatorFromSP(sysParams.stabilityPoolParams)
6963
7012
  ),
6964
7013
  type: "Script"
@@ -6967,7 +7016,7 @@ async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
6967
7016
  kind: "inline",
6968
7017
  value: serialiseStabilityPoolDatum({ Account: datum })
6969
7018
  },
6970
- (0, import_lucid28.addAssets)(
7019
+ (0, import_lucid29.addAssets)(
6971
7020
  (0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, amount),
6972
7021
  (0, import_cardano_offchain_common18.mkLovelacesOf)(
6973
7022
  // TODO: Calculate a more accurate amount to just cover costs.
@@ -7016,7 +7065,7 @@ async function requestSpAccountAdjustment(amount, accountUtxo, sysParams, lucid)
7016
7065
  Account: newAccountDatum
7017
7066
  })
7018
7067
  },
7019
- (0, import_lucid28.addAssets)(
7068
+ (0, import_lucid29.addAssets)(
7020
7069
  (0, import_cardano_offchain_common18.mkLovelacesOf)(
7021
7070
  // TODO: Calculate a more accurate amount to just cover costs.
7022
7071
  7000000n
@@ -7027,7 +7076,7 @@ async function requestSpAccountAdjustment(amount, accountUtxo, sysParams, lucid)
7027
7076
  ),
7028
7077
  amount > 0n ? (0, import_cardano_offchain_common18.mkAssetsOf)(
7029
7078
  {
7030
- currencySymbol: (0, import_lucid28.fromHex)(
7079
+ currencySymbol: (0, import_lucid29.fromHex)(
7031
7080
  sysParams.stabilityPoolParams.assetSymbol.unCurrencySymbol
7032
7081
  ),
7033
7082
  tokenName: oldAccountDatum.iasset
@@ -7035,7 +7084,7 @@ async function requestSpAccountAdjustment(amount, accountUtxo, sysParams, lucid)
7035
7084
  amount
7036
7085
  ) : {}
7037
7086
  )
7038
- ).addSignerKey((0, import_lucid28.toHex)(oldAccountDatum.owner));
7087
+ ).addSignerKey((0, import_lucid29.toHex)(oldAccountDatum.owner));
7039
7088
  }
7040
7089
  async function requestSpAccountClosure(accountUtxo, sysParams, lucid, maxTxFee = BASE_MAX_TX_FEE) {
7041
7090
  const myAddress = await lucid.wallet().address();
@@ -7069,7 +7118,7 @@ async function requestSpAccountClosure(accountUtxo, sysParams, lucid, maxTxFee =
7069
7118
  kind: "inline",
7070
7119
  value: serialiseStabilityPoolDatum({ Account: newAccountDatum })
7071
7120
  },
7072
- (0, import_lucid28.addAssets)(
7121
+ (0, import_lucid29.addAssets)(
7073
7122
  (0, import_cardano_offchain_common18.mkLovelacesOf)(
7074
7123
  // TODO: Calculate a more accurate amount to just cover costs.
7075
7124
  5000000n
@@ -7079,11 +7128,11 @@ async function requestSpAccountClosure(accountUtxo, sysParams, lucid, maxTxFee =
7079
7128
  1n
7080
7129
  )
7081
7130
  )
7082
- ).addSignerKey((0, import_lucid28.toHex)(oldAccountDatum.owner));
7131
+ ).addSignerKey((0, import_lucid29.toHex)(oldAccountDatum.owner));
7083
7132
  }
7084
7133
  async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE2s2sSnapshotOrefs, sysParams, lucid, currentSlot) {
7085
7134
  const network = lucid.config().network;
7086
- const currentTime = BigInt((0, import_lucid28.slotToUnixTime)(network, currentSlot));
7135
+ const currentTime = BigInt((0, import_lucid29.slotToUnixTime)(network, currentSlot));
7087
7136
  const stabilityPoolScriptRef = (0, import_cardano_offchain_common18.matchSingle)(
7088
7137
  await lucid.utxosByOutRef([
7089
7138
  fromSystemParamsScriptRef(
@@ -7099,7 +7148,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7099
7148
  getInlineDatumOrThrow(stabilityPoolUtxo)
7100
7149
  );
7101
7150
  const baseRefInputs = [iAssetUtxo, stabilityPoolScriptRef];
7102
- const validFrom = (0, import_lucid28.slotToUnixTime)(network, currentSlot - 1);
7151
+ const validFrom = (0, import_lucid29.slotToUnixTime)(network, currentSlot - 1);
7103
7152
  const tx = lucid.newTx().validFrom(validFrom).validTo(validFrom + sysParams.stabilityPoolParams.accountProcessingBiasMs).readFrom(baseRefInputs).collectFrom([stabilityPoolUtxo], {
7104
7153
  kind: "selected",
7105
7154
  inputs: [stabilityPoolUtxo, accountUtxo],
@@ -7112,7 +7161,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7112
7161
  });
7113
7162
  if (!accountDatum.request) throw new Error("Account Request is null");
7114
7163
  const iassetAssetClass = {
7115
- currencySymbol: (0, import_lucid28.fromHex)(
7164
+ currencySymbol: (0, import_lucid29.fromHex)(
7116
7165
  sysParams.stabilityPoolParams.assetSymbol.unCurrencySymbol
7117
7166
  ),
7118
7167
  tokenName: stabilityPoolDatum.iasset
@@ -7147,7 +7196,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7147
7196
  fromSystemParamsAsset(sysParams.stabilityPoolParams.accountToken),
7148
7197
  1n
7149
7198
  ),
7150
- import_lucid28.Data.void()
7199
+ import_lucid29.Data.void()
7151
7200
  ).pay.ToContract(
7152
7201
  poolAddr,
7153
7202
  {
@@ -7170,7 +7219,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7170
7219
  )
7171
7220
  })
7172
7221
  },
7173
- (0, import_lucid28.addAssets)(
7222
+ (0, import_lucid29.addAssets)(
7174
7223
  stabilityPoolUtxo.assets,
7175
7224
  (0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, requestDepositAmt),
7176
7225
  (0, import_cardano_offchain_common18.mkLovelacesOf)(
@@ -7198,7 +7247,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7198
7247
  }
7199
7248
  })
7200
7249
  },
7201
- (0, import_lucid28.addAssets)(
7250
+ (0, import_lucid29.addAssets)(
7202
7251
  (0, import_cardano_offchain_common18.mkAssetsOf)(
7203
7252
  fromSystemParamsAsset(sysParams.stabilityPoolParams.accountToken),
7204
7253
  1n
@@ -7275,13 +7324,13 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7275
7324
  }
7276
7325
  })
7277
7326
  },
7278
- (0, import_lucid28.addAssets)(
7327
+ (0, import_lucid29.addAssets)(
7279
7328
  stabilityPoolUtxo.assets,
7280
7329
  (0, import_cardano_offchain_common18.negateAssets)(reward),
7281
7330
  (0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, accountBalanceChange + withdrawalFeeAmt)
7282
7331
  )
7283
7332
  );
7284
- const theoreticalOwnerOutputVal = (0, import_lucid28.addAssets)(
7333
+ const theoreticalOwnerOutputVal = (0, import_lucid29.addAssets)(
7285
7334
  reward,
7286
7335
  isDepositOrRewardWithdrawal ? {} : (0, import_cardano_offchain_common18.mkAssetsOf)(
7287
7336
  iassetAssetClass,
@@ -7290,7 +7339,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7290
7339
  );
7291
7340
  const ownerOutputDat = serialiseActionReturnDatum({
7292
7341
  IndigoStabilityPoolAccountAdjustment: {
7293
- txHash: (0, import_lucid28.fromHex)(accountUtxo.txHash),
7342
+ txHash: (0, import_lucid29.fromHex)(accountUtxo.txHash),
7294
7343
  outputIndex: BigInt(accountUtxo.outputIndex)
7295
7344
  }
7296
7345
  });
@@ -7301,7 +7350,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7301
7350
  { InlineDatum: { datum: ownerOutputDat } }
7302
7351
  );
7303
7352
  const extraOwnerOutputLovelacesAmt = (0, import_cardano_offchain_common18.lovelacesAmt)(theoreticalOwnerOutputVal) >= ownerOutputMinUtxoLovelace ? 0n : ownerOutputMinUtxoLovelace - (0, import_cardano_offchain_common18.lovelacesAmt)(theoreticalOwnerOutputVal);
7304
- const actualOwnerOutputVal = (0, import_lucid28.addAssets)(
7353
+ const actualOwnerOutputVal = (0, import_lucid29.addAssets)(
7305
7354
  theoreticalOwnerOutputVal,
7306
7355
  (0, import_cardano_offchain_common18.mkLovelacesOf)(extraOwnerOutputLovelacesAmt)
7307
7356
  );
@@ -7339,7 +7388,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7339
7388
  kind: "inline",
7340
7389
  value: accountOutputDat
7341
7390
  },
7342
- (0, import_lucid28.addAssets)(
7391
+ (0, import_lucid29.addAssets)(
7343
7392
  accountOutputValWithoutAda,
7344
7393
  (0, import_cardano_offchain_common18.mkLovelacesOf)(accountOutputAdaAmt)
7345
7394
  )
@@ -7419,7 +7468,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7419
7468
  fromSystemParamsAsset(sysParams.stabilityPoolParams.accountToken),
7420
7469
  -1n
7421
7470
  ),
7422
- import_lucid28.Data.void()
7471
+ import_lucid29.Data.void()
7423
7472
  ).pay.ToContract(
7424
7473
  stabilityPoolUtxo.address,
7425
7474
  {
@@ -7431,7 +7480,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7431
7480
  }
7432
7481
  })
7433
7482
  },
7434
- (0, import_lucid28.addAssets)(
7483
+ (0, import_lucid29.addAssets)(
7435
7484
  stabilityPoolUtxo.assets,
7436
7485
  (0, import_cardano_offchain_common18.negateAssets)(reward),
7437
7486
  (0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, -withdrawnAmt + withdrawalFeeAmt)
@@ -7442,12 +7491,12 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
7442
7491
  kind: "inline",
7443
7492
  value: serialiseActionReturnDatum({
7444
7493
  IndigoStabilityPoolAccountClosure: {
7445
- txHash: (0, import_lucid28.fromHex)(accountUtxo.txHash),
7494
+ txHash: (0, import_lucid29.fromHex)(accountUtxo.txHash),
7446
7495
  outputIndex: BigInt(accountUtxo.outputIndex)
7447
7496
  }
7448
7497
  })
7449
7498
  },
7450
- (0, import_lucid28.addAssets)(
7499
+ (0, import_lucid29.addAssets)(
7451
7500
  (0, import_cardano_offchain_common18.mkLovelacesOf)((0, import_cardano_offchain_common18.lovelacesAmt)(accountUtxo.assets)),
7452
7501
  reward,
7453
7502
  (0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, withdrawnAmt - withdrawalFeeAmt)
@@ -7490,7 +7539,7 @@ async function createE2s2sSnapshots(stabilityPoolOref, sysParams, lucid) {
7490
7539
  serialiseStabilityPoolRedeemer("RecordEpochToScaleToSum")
7491
7540
  ).mintAssets(
7492
7541
  (0, import_cardano_offchain_common18.mkAssetsOf)(snapshotAc, BigInt(newSnapshotDatums.length)),
7493
- import_lucid28.Data.void()
7542
+ import_lucid29.Data.void()
7494
7543
  ).pay.ToContract(
7495
7544
  spUtxo.address,
7496
7545
  {
@@ -7527,7 +7576,7 @@ async function annulRequest(accountUtxo, params, lucid) {
7527
7576
  const oldAccountDatum = parseAccountDatumOrThrow(
7528
7577
  getInlineDatumOrThrow(accountUtxo)
7529
7578
  );
7530
- const tx = lucid.newTx().readFrom([stabilityPoolRefScriptUtxo]).collectFrom([accountUtxo], serialiseStabilityPoolRedeemer("AnnulRequest")).addSignerKey((0, import_lucid28.toHex)(oldAccountDatum.owner));
7579
+ const tx = lucid.newTx().readFrom([stabilityPoolRefScriptUtxo]).collectFrom([accountUtxo], serialiseStabilityPoolRedeemer("AnnulRequest")).addSignerKey((0, import_lucid29.toHex)(oldAccountDatum.owner));
7531
7580
  if (oldAccountDatum.request !== "Create") {
7532
7581
  tx.pay.ToContract(
7533
7582
  accountUtxo.address,
@@ -7550,7 +7599,7 @@ async function annulRequest(accountUtxo, params, lucid) {
7550
7599
  }
7551
7600
 
7552
7601
  // src/contracts/staking/transactions.ts
7553
- var import_lucid29 = require("@lucid-evolution/lucid");
7602
+ var import_lucid30 = require("@lucid-evolution/lucid");
7554
7603
  var import_cardano_offchain_common19 = require("@3rd-eye-labs/cardano-offchain-common");
7555
7604
  async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
7556
7605
  const [pkh, _] = await addrDetails(lucid);
@@ -7576,18 +7625,18 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
7576
7625
  }
7577
7626
  };
7578
7627
  const stakingPositionDatum = {
7579
- owner: (0, import_lucid29.fromHex)(pkh.hash),
7628
+ owner: (0, import_lucid30.fromHex)(pkh.hash),
7580
7629
  lockedAmount: [],
7581
7630
  positionSnapshot: {
7582
7631
  snapshotAda: stakingManagerOut.datum.managerSnapshot.snapshotAda
7583
7632
  }
7584
7633
  };
7585
- const stakingToken = params.stakingParams.stakingToken[0].unCurrencySymbol + (0, import_lucid29.fromText)(params.stakingParams.stakingToken[1].unTokenName);
7586
- const indyToken = params.stakingParams.indyToken[0].unCurrencySymbol + (0, import_lucid29.fromText)(params.stakingParams.indyToken[1].unTokenName);
7634
+ const stakingToken = params.stakingParams.stakingToken[0].unCurrencySymbol + (0, import_lucid30.fromText)(params.stakingParams.stakingToken[1].unTokenName);
7635
+ const indyToken = params.stakingParams.indyToken[0].unCurrencySymbol + (0, import_lucid30.fromText)(params.stakingParams.indyToken[1].unTokenName);
7587
7636
  return lucid.newTx().collectFrom(
7588
7637
  [stakingManagerOut.utxo],
7589
7638
  serialiseStakingRedeemer({
7590
- CreateStakingPosition: { creatorPkh: (0, import_lucid29.fromHex)(pkh.hash) }
7639
+ CreateStakingPosition: { creatorPkh: (0, import_lucid30.fromHex)(pkh.hash) }
7591
7640
  })
7592
7641
  ).readFrom([stakingRefScriptUtxo]).pay.ToContract(
7593
7642
  stakingManagerOut.utxo.address,
@@ -7600,7 +7649,7 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
7600
7649
  {
7601
7650
  [stakingToken]: 1n
7602
7651
  },
7603
- import_lucid29.Data.void()
7652
+ import_lucid30.Data.void()
7604
7653
  ).pay.ToContract(
7605
7654
  stakingManagerOut.utxo.address,
7606
7655
  {
@@ -7615,7 +7664,7 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
7615
7664
  }
7616
7665
  async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, currentSlot, stakingManagerRef) {
7617
7666
  const network = lucid.config().network;
7618
- const now = BigInt((0, import_lucid29.slotToUnixTime)(network, currentSlot));
7667
+ const now = BigInt((0, import_lucid30.slotToUnixTime)(network, currentSlot));
7619
7668
  const stakingPositionOut = await findStakingPositionByOutRef(
7620
7669
  stakingPositionRef,
7621
7670
  lucid
@@ -7654,7 +7703,7 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
7654
7703
  totalStake: stakingManagerOut.datum.totalStake + amount
7655
7704
  })
7656
7705
  },
7657
- (0, import_lucid29.addAssets)(stakingManagerOut.utxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(-adaReward))
7706
+ (0, import_lucid30.addAssets)(stakingManagerOut.utxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(-adaReward))
7658
7707
  ).pay.ToContract(
7659
7708
  stakingPositionOut.utxo.address,
7660
7709
  {
@@ -7664,12 +7713,12 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
7664
7713
  lockedAmount: newLockedAmount
7665
7714
  })
7666
7715
  },
7667
- (0, import_lucid29.addAssets)(stakingPositionOut.utxo.assets, (0, import_cardano_offchain_common19.mkAssetsOf)(indyToken, amount))
7668
- ).addSignerKey((0, import_lucid29.toHex)(stakingPositionOut.datum.owner));
7716
+ (0, import_lucid30.addAssets)(stakingPositionOut.utxo.assets, (0, import_cardano_offchain_common19.mkAssetsOf)(indyToken, amount))
7717
+ ).addSignerKey((0, import_lucid30.toHex)(stakingPositionOut.datum.owner));
7669
7718
  }
7670
7719
  async function closeStakingPosition(stakingPositionRef, params, lucid, currentSlot, stakingManagerRef) {
7671
7720
  const network = lucid.config().network;
7672
- const now = BigInt((0, import_lucid29.slotToUnixTime)(network, currentSlot));
7721
+ const now = BigInt((0, import_lucid30.slotToUnixTime)(network, currentSlot));
7673
7722
  const stakingPositionOut = await findStakingPositionByOutRef(
7674
7723
  stakingPositionRef,
7675
7724
  lucid
@@ -7711,11 +7760,11 @@ async function closeStakingPosition(stakingPositionRef, params, lucid, currentSl
7711
7760
  totalStake: stakingManagerOut.datum.totalStake - existingIndyAmount
7712
7761
  })
7713
7762
  },
7714
- (0, import_lucid29.addAssets)(stakingManagerOut.utxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(-adaReward))
7763
+ (0, import_lucid30.addAssets)(stakingManagerOut.utxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(-adaReward))
7715
7764
  ).mintAssets(
7716
7765
  (0, import_cardano_offchain_common19.mkAssetsOf)(fromSystemParamsAsset(params.stakingParams.stakingToken), -1n),
7717
- import_lucid29.Data.void()
7718
- ).addSignerKey((0, import_lucid29.toHex)(stakingPositionOut.datum.owner));
7766
+ import_lucid30.Data.void()
7767
+ ).addSignerKey((0, import_lucid30.toHex)(stakingPositionOut.datum.owner));
7719
7768
  }
7720
7769
  var MIN_UTXO_AMOUNT = 2000000n;
7721
7770
  async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
@@ -7723,7 +7772,7 @@ async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
7723
7772
  const stakingManagerDatum = parseStakingManagerDatum(
7724
7773
  (0, import_cardano_offchain_common19.getInlineDatumOrThrow)(stakingManagerUtxo)
7725
7774
  );
7726
- const collectorUtxos = (await lucid.utxosByOutRef(collectorRefs)).filter((utxo) => utxo.datum && utxo.datum === import_lucid29.Data.void()).filter((utxo) => utxo.assets["lovelace"] > MIN_UTXO_AMOUNT);
7775
+ const collectorUtxos = (await lucid.utxosByOutRef(collectorRefs)).filter((utxo) => utxo.datum && utxo.datum === import_lucid30.Data.void()).filter((utxo) => utxo.assets["lovelace"] > MIN_UTXO_AMOUNT);
7727
7776
  if (collectorUtxos.length === 0) {
7728
7777
  throw new Error("No available collectors found");
7729
7778
  }
@@ -7760,12 +7809,12 @@ async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
7760
7809
  managerSnapshot: { snapshotAda: newSnapshot }
7761
7810
  })
7762
7811
  },
7763
- (0, import_lucid29.addAssets)(stakingManagerUtxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(adaRewardCollected))
7812
+ (0, import_lucid30.addAssets)(stakingManagerUtxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(adaRewardCollected))
7764
7813
  );
7765
7814
  for (const collectorUtxo of collectorUtxos) {
7766
7815
  tx.pay.ToContract(
7767
7816
  collectorUtxo.address,
7768
- { kind: "inline", value: import_lucid29.Data.void() },
7817
+ { kind: "inline", value: import_lucid30.Data.void() },
7769
7818
  (0, import_cardano_offchain_common19.mkLovelacesOf)(MIN_UTXO_AMOUNT)
7770
7819
  );
7771
7820
  }
@@ -7773,47 +7822,47 @@ async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
7773
7822
  }
7774
7823
 
7775
7824
  // src/contracts/staking/types.ts
7776
- var import_lucid30 = require("@lucid-evolution/lucid");
7777
- var StakingParamsSchema = import_lucid30.Data.Object({
7825
+ var import_lucid31 = require("@lucid-evolution/lucid");
7826
+ var StakingParamsSchema = import_lucid31.Data.Object({
7778
7827
  stakingManagerNft: AssetClassSchema2,
7779
7828
  stakingToken: AssetClassSchema2,
7780
7829
  indyToken: AssetClassSchema2,
7781
7830
  pollToken: AssetClassSchema2,
7782
7831
  versionRecordToken: AssetClassSchema2,
7783
- collectorValHash: import_lucid30.Data.Bytes()
7832
+ collectorValHash: import_lucid31.Data.Bytes()
7784
7833
  });
7785
7834
  var StakingParams = StakingParamsSchema;
7786
7835
  function castStakingParams(params) {
7787
- return import_lucid30.Data.castTo(params, StakingParams);
7836
+ return import_lucid31.Data.castTo(params, StakingParams);
7788
7837
  }
7789
7838
 
7790
7839
  // src/contracts/interest-oracle/transactions.ts
7791
- var import_lucid36 = require("@lucid-evolution/lucid");
7840
+ var import_lucid37 = require("@lucid-evolution/lucid");
7792
7841
 
7793
7842
  // src/contracts/one-shot/transactions.ts
7794
- var import_lucid33 = require("@lucid-evolution/lucid");
7843
+ var import_lucid34 = require("@lucid-evolution/lucid");
7795
7844
 
7796
7845
  // src/contracts/one-shot/scripts.ts
7797
- var import_lucid32 = require("@lucid-evolution/lucid");
7846
+ var import_lucid33 = require("@lucid-evolution/lucid");
7798
7847
 
7799
7848
  // src/contracts/one-shot/types.ts
7800
- var import_lucid31 = require("@lucid-evolution/lucid");
7801
- var OneShotParamsSchema = import_lucid31.Data.Object({
7802
- referenceOutRef: import_lucid31.Data.Object({
7803
- txHash: import_lucid31.Data.Bytes(),
7804
- outputIdx: import_lucid31.Data.Integer()
7849
+ var import_lucid32 = require("@lucid-evolution/lucid");
7850
+ var OneShotParamsSchema = import_lucid32.Data.Object({
7851
+ referenceOutRef: import_lucid32.Data.Object({
7852
+ txHash: import_lucid32.Data.Bytes(),
7853
+ outputIdx: import_lucid32.Data.Integer()
7805
7854
  }),
7806
- mintAmounts: import_lucid31.Data.Array(
7807
- import_lucid31.Data.Object({
7855
+ mintAmounts: import_lucid32.Data.Array(
7856
+ import_lucid32.Data.Object({
7808
7857
  /// Use hex encoded string
7809
- tokenName: import_lucid31.Data.Bytes(),
7810
- amount: import_lucid31.Data.Integer()
7858
+ tokenName: import_lucid32.Data.Bytes(),
7859
+ amount: import_lucid32.Data.Integer()
7811
7860
  })
7812
7861
  )
7813
7862
  });
7814
7863
  var OneShotParams = OneShotParamsSchema;
7815
7864
  function castOneShotParams(params) {
7816
- return import_lucid31.Data.castTo(params, OneShotParams);
7865
+ return import_lucid32.Data.castTo(params, OneShotParams);
7817
7866
  }
7818
7867
 
7819
7868
  // src/contracts/one-shot/scripts.ts
@@ -7824,7 +7873,7 @@ var oneShotPolicyData = {
7824
7873
  function mkOneShotPolicy(params) {
7825
7874
  return {
7826
7875
  type: oneShotPolicyData.type,
7827
- script: (0, import_lucid32.applyParamsToScript)(oneShotPolicyData.cborHex, [
7876
+ script: (0, import_lucid33.applyParamsToScript)(oneShotPolicyData.cborHex, [
7828
7877
  castOneShotParams(params)
7829
7878
  ])
7830
7879
  };
@@ -7834,7 +7883,7 @@ function mkOneShotPolicy(params) {
7834
7883
  var import_Array = require("fp-ts/lib/Array");
7835
7884
  async function oneShotMintTx(lucid, params) {
7836
7885
  const oneShotPolicy = mkOneShotPolicy(params);
7837
- const policyId = (0, import_lucid33.mintingPolicyToId)(oneShotPolicy);
7886
+ const policyId = (0, import_lucid34.mintingPolicyToId)(oneShotPolicy);
7838
7887
  const refUtxo = matchSingle(
7839
7888
  await lucid.utxosByOutRef([
7840
7889
  {
@@ -7850,11 +7899,11 @@ async function oneShotMintTx(lucid, params) {
7850
7899
  lucid.newTx().collectFrom([refUtxo]).mintAssets(
7851
7900
  (0, import_Array.reduce)(
7852
7901
  {},
7853
- (acc, entry) => (0, import_lucid33.addAssets)(acc, {
7854
- [(0, import_lucid33.toUnit)(policyId, entry.tokenName)]: entry.amount
7902
+ (acc, entry) => (0, import_lucid34.addAssets)(acc, {
7903
+ [(0, import_lucid34.toUnit)(policyId, entry.tokenName)]: entry.amount
7855
7904
  })
7856
7905
  )(params.mintAmounts),
7857
- import_lucid33.Data.void()
7906
+ import_lucid34.Data.void()
7858
7907
  ).attach.MintingPolicy(oneShotPolicy),
7859
7908
  policyId
7860
7909
  ];
@@ -7867,18 +7916,18 @@ async function runOneShotMintTx(lucid, params) {
7867
7916
  }
7868
7917
 
7869
7918
  // src/contracts/interest-oracle/scripts.ts
7870
- var import_lucid35 = require("@lucid-evolution/lucid");
7919
+ var import_lucid36 = require("@lucid-evolution/lucid");
7871
7920
 
7872
7921
  // src/contracts/interest-oracle/types.ts
7873
- var import_lucid34 = require("@lucid-evolution/lucid");
7874
- var InterestOracleParamsSchema = import_lucid34.Data.Object({
7922
+ var import_lucid35 = require("@lucid-evolution/lucid");
7923
+ var InterestOracleParamsSchema = import_lucid35.Data.Object({
7875
7924
  /** Milliseconds */
7876
- biasTime: import_lucid34.Data.Integer(),
7877
- owner: import_lucid34.Data.Bytes()
7925
+ biasTime: import_lucid35.Data.Integer(),
7926
+ owner: import_lucid35.Data.Bytes()
7878
7927
  });
7879
7928
  var InterestOracleParams = InterestOracleParamsSchema;
7880
7929
  function castInterestOracleParams(params) {
7881
- return import_lucid34.Data.castTo(params, InterestOracleParams);
7930
+ return import_lucid35.Data.castTo(params, InterestOracleParams);
7882
7931
  }
7883
7932
 
7884
7933
  // src/validators/interest-oracle-validator.ts
@@ -7892,7 +7941,7 @@ var _interestOracleValidator = {
7892
7941
  function mkInterestOracleValidator(params) {
7893
7942
  return {
7894
7943
  type: "PlutusV3",
7895
- script: (0, import_lucid35.applyParamsToScript)(_interestOracleValidator.cborHex, [
7944
+ script: (0, import_lucid36.applyParamsToScript)(_interestOracleValidator.cborHex, [
7896
7945
  castInterestOracleParams(params)
7897
7946
  ])
7898
7947
  };
@@ -7918,14 +7967,14 @@ async function startInterestOracle(initialUnitaryInterest, initialInterestRate,
7918
7967
  },
7919
7968
  mintAmounts: [
7920
7969
  {
7921
- tokenName: (0, import_lucid36.fromText)(tokenName),
7970
+ tokenName: (0, import_lucid37.fromText)(tokenName),
7922
7971
  amount: 1n
7923
7972
  }
7924
7973
  ]
7925
7974
  });
7926
7975
  const validator = mkInterestOracleValidator(oracleParams);
7927
7976
  tx.pay.ToContract(
7928
- (0, import_lucid36.validatorToAddress)(network, validator),
7977
+ (0, import_lucid37.validatorToAddress)(network, validator),
7929
7978
  {
7930
7979
  kind: "inline",
7931
7980
  value: serialiseInterestOracleDatum({
@@ -7938,12 +7987,12 @@ async function startInterestOracle(initialUnitaryInterest, initialInterestRate,
7938
7987
  },
7939
7988
  {
7940
7989
  lovelace: 2500000n,
7941
- [(0, import_lucid36.toUnit)(policyId, (0, import_lucid36.fromText)(tokenName))]: 1n
7990
+ [(0, import_lucid37.toUnit)(policyId, (0, import_lucid37.fromText)(tokenName))]: 1n
7942
7991
  }
7943
7992
  );
7944
7993
  if (withScriptRef) {
7945
7994
  tx.pay.ToAddressWithData(
7946
- (0, import_lucid36.validatorToAddress)(network, validator),
7995
+ (0, import_lucid37.validatorToAddress)(network, validator),
7947
7996
  void 0,
7948
7997
  void 0,
7949
7998
  validator
@@ -7952,8 +8001,8 @@ async function startInterestOracle(initialUnitaryInterest, initialInterestRate,
7952
8001
  return [
7953
8002
  tx,
7954
8003
  {
7955
- currencySymbol: (0, import_lucid36.fromHex)(policyId),
7956
- tokenName: (0, import_lucid36.fromHex)((0, import_lucid36.fromText)(tokenName))
8004
+ currencySymbol: (0, import_lucid37.fromHex)(policyId),
8005
+ tokenName: (0, import_lucid37.fromHex)((0, import_lucid37.fromText)(tokenName))
7957
8006
  }
7958
8007
  ];
7959
8008
  }
@@ -7964,7 +8013,7 @@ async function feedInterestOracle(params, newInterestRate, lucid, currentSlot, a
7964
8013
  utxo = await findInterestOracle(lucid, assetClass);
7965
8014
  }
7966
8015
  const network = lucid.config().network;
7967
- const now = BigInt((0, import_lucid36.slotToUnixTime)(network, currentSlot));
8016
+ const now = BigInt((0, import_lucid37.slotToUnixTime)(network, currentSlot));
7968
8017
  const tx = lucid.newTx();
7969
8018
  const datum = parseInterestOracleDatum(getInlineDatumOrThrow(utxo));
7970
8019
  if (scriptRef2) {
@@ -8002,10 +8051,10 @@ async function feedInterestOracle(params, newInterestRate, lucid, currentSlot, a
8002
8051
  }
8003
8052
 
8004
8053
  // src/contracts/interest-collection/helpers.ts
8005
- var import_lucid37 = require("@lucid-evolution/lucid");
8054
+ var import_lucid38 = require("@lucid-evolution/lucid");
8006
8055
  function signersAllOf(multisig) {
8007
8056
  if ("Signature" in multisig) {
8008
- return [(0, import_lucid37.toHex)(multisig.Signature.keyHash)];
8057
+ return [(0, import_lucid38.toHex)(multisig.Signature.keyHash)];
8009
8058
  } else {
8010
8059
  return multisig.AtLeast.authSignatories.map((signatory) => {
8011
8060
  try {
@@ -8018,24 +8067,24 @@ function signersAllOf(multisig) {
8018
8067
  }
8019
8068
 
8020
8069
  // src/contracts/interest-collection/types.ts
8021
- var import_lucid38 = require("@lucid-evolution/lucid");
8022
- var InterestCollectionParamsSchema = import_lucid38.Data.Object({
8070
+ var import_lucid39 = require("@lucid-evolution/lucid");
8071
+ var InterestCollectionParamsSchema = import_lucid39.Data.Object({
8023
8072
  versionRecordNft: AssetClassSchema2,
8024
8073
  multisigUtxoNft: AssetClassSchema2,
8025
8074
  cdpAuthTk: AssetClassSchema2,
8026
8075
  collateralAssetAuthTk: AssetClassSchema2,
8027
8076
  govAuthTk: AssetClassSchema2,
8028
- cdpAssetSymbol: import_lucid38.Data.Bytes(),
8029
- cdpBiasTime: import_lucid38.Data.Integer(),
8030
- interestSettlementCooldown: import_lucid38.Data.Integer()
8077
+ cdpAssetSymbol: import_lucid39.Data.Bytes(),
8078
+ cdpBiasTime: import_lucid39.Data.Integer(),
8079
+ interestSettlementCooldown: import_lucid39.Data.Integer()
8031
8080
  });
8032
8081
  var InterestCollectionParams = InterestCollectionParamsSchema;
8033
8082
  function castInterestCollectionParams(params) {
8034
- return import_lucid38.Data.castTo(params, InterestCollectionParams);
8083
+ return import_lucid39.Data.castTo(params, InterestCollectionParams);
8035
8084
  }
8036
8085
 
8037
8086
  // src/contracts/interest-collection/scripts.ts
8038
- var import_lucid39 = require("@lucid-evolution/lucid");
8087
+ var import_lucid40 = require("@lucid-evolution/lucid");
8039
8088
 
8040
8089
  // src/validators/interest-collection-validator.ts
8041
8090
  var _interestCollectionValidator = {
@@ -8048,7 +8097,7 @@ var _interestCollectionValidator = {
8048
8097
  function mkInterestCollectionValidator(params) {
8049
8098
  return {
8050
8099
  type: "PlutusV3",
8051
- script: (0, import_lucid39.applyParamsToScript)(_interestCollectionValidator.cborHex, [
8100
+ script: (0, import_lucid40.applyParamsToScript)(_interestCollectionValidator.cborHex, [
8052
8101
  castInterestCollectionParams(params)
8053
8102
  ])
8054
8103
  };
@@ -8056,7 +8105,7 @@ function mkInterestCollectionValidator(params) {
8056
8105
  var mkInterestCollectionValidatorFromSP = (params) => {
8057
8106
  return {
8058
8107
  type: "PlutusV3",
8059
- script: (0, import_lucid39.applyParamsToScript)(_interestCollectionValidator.cborHex, [
8108
+ script: (0, import_lucid40.applyParamsToScript)(_interestCollectionValidator.cborHex, [
8060
8109
  castInterestCollectionParams({
8061
8110
  versionRecordNft: fromSystemParamsAssetLucid(params.versionRecordNft),
8062
8111
  multisigUtxoNft: fromSystemParamsAssetLucid(params.multisigUtxoNft),
@@ -8074,17 +8123,17 @@ var mkInterestCollectionValidatorFromSP = (params) => {
8074
8123
  };
8075
8124
 
8076
8125
  // src/contracts/version-registry/types.ts
8077
- var import_lucid40 = require("@lucid-evolution/lucid");
8078
- var VersionRecordTokenParamsSchema = import_lucid40.Data.Object({
8126
+ var import_lucid41 = require("@lucid-evolution/lucid");
8127
+ var VersionRecordTokenParamsSchema = import_lucid41.Data.Object({
8079
8128
  upgradeToken: AssetClassSchema2
8080
8129
  });
8081
8130
  var VersionRecordTokenParams = VersionRecordTokenParamsSchema;
8082
8131
  function castVersionRecordTokenParams(params) {
8083
- return import_lucid40.Data.castTo(params, VersionRecordTokenParams);
8132
+ return import_lucid41.Data.castTo(params, VersionRecordTokenParams);
8084
8133
  }
8085
8134
 
8086
8135
  // src/contracts/version-registry/scripts.ts
8087
- var import_lucid41 = require("@lucid-evolution/lucid");
8136
+ var import_lucid42 = require("@lucid-evolution/lucid");
8088
8137
 
8089
8138
  // src/validators/version-record-policy.ts
8090
8139
  var _versionRecordTokenPolicy = {
@@ -8104,7 +8153,7 @@ var _versionRegistryValidator = {
8104
8153
  function mkVersionRecordTokenPolicy(params) {
8105
8154
  return {
8106
8155
  type: "PlutusV3",
8107
- script: (0, import_lucid41.applyParamsToScript)(_versionRecordTokenPolicy.cborHex, [
8156
+ script: (0, import_lucid42.applyParamsToScript)(_versionRecordTokenPolicy.cborHex, [
8108
8157
  castVersionRecordTokenParams(params)
8109
8158
  ])
8110
8159
  };
@@ -8117,7 +8166,7 @@ var mkVersionRegistryValidator = () => {
8117
8166
  };
8118
8167
 
8119
8168
  // src/contracts/collector/scripts.ts
8120
- var import_lucid42 = require("@lucid-evolution/lucid");
8169
+ var import_lucid43 = require("@lucid-evolution/lucid");
8121
8170
 
8122
8171
  // src/validators/collector-validator.ts
8123
8172
  var _collectorValidator = {
@@ -8130,19 +8179,19 @@ var _collectorValidator = {
8130
8179
  var mkCollectorValidatorFromSP = (params) => {
8131
8180
  return {
8132
8181
  type: "PlutusV3",
8133
- script: (0, import_lucid42.applyParamsToScript)(_collectorValidator.cborHex, [
8134
- new import_lucid42.Constr(0, [
8135
- new import_lucid42.Constr(0, [
8182
+ script: (0, import_lucid43.applyParamsToScript)(_collectorValidator.cborHex, [
8183
+ new import_lucid43.Constr(0, [
8184
+ new import_lucid43.Constr(0, [
8136
8185
  params.stakingManagerNFT[0].unCurrencySymbol,
8137
- (0, import_lucid42.fromText)(params.stakingManagerNFT[1].unTokenName)
8186
+ (0, import_lucid43.fromText)(params.stakingManagerNFT[1].unTokenName)
8138
8187
  ]),
8139
- new import_lucid42.Constr(0, [
8188
+ new import_lucid43.Constr(0, [
8140
8189
  params.stakingToken[0].unCurrencySymbol,
8141
- (0, import_lucid42.fromText)(params.stakingToken[1].unTokenName)
8190
+ (0, import_lucid43.fromText)(params.stakingToken[1].unTokenName)
8142
8191
  ]),
8143
- new import_lucid42.Constr(0, [
8192
+ new import_lucid43.Constr(0, [
8144
8193
  params.versionRecordToken[0].unCurrencySymbol,
8145
- (0, import_lucid42.fromText)(params.versionRecordToken[1].unTokenName)
8194
+ (0, import_lucid43.fromText)(params.versionRecordToken[1].unTokenName)
8146
8195
  ])
8147
8196
  ])
8148
8197
  ])
@@ -8150,7 +8199,7 @@ var mkCollectorValidatorFromSP = (params) => {
8150
8199
  };
8151
8200
 
8152
8201
  // src/contracts/treasury/scripts.ts
8153
- var import_lucid44 = require("@lucid-evolution/lucid");
8202
+ var import_lucid45 = require("@lucid-evolution/lucid");
8154
8203
 
8155
8204
  // src/validators/treasury-validator.ts
8156
8205
  var _treasuryValidator = {
@@ -8160,22 +8209,22 @@ var _treasuryValidator = {
8160
8209
  };
8161
8210
 
8162
8211
  // src/contracts/treasury/types.ts
8163
- var import_lucid43 = require("@lucid-evolution/lucid");
8164
- var TreasuryParamsSchema = import_lucid43.Data.Object({
8212
+ var import_lucid44 = require("@lucid-evolution/lucid");
8213
+ var TreasuryParamsSchema = import_lucid44.Data.Object({
8165
8214
  upgradeToken: AssetClassSchema2,
8166
8215
  versionRecordToken: AssetClassSchema2,
8167
- treasuryUtxosStakeCredential: import_lucid43.Data.Nullable(StakeCredentialSchema)
8216
+ treasuryUtxosStakeCredential: import_lucid44.Data.Nullable(StakeCredentialSchema)
8168
8217
  });
8169
8218
  var TreasuryParams = TreasuryParamsSchema;
8170
8219
  function castTreasuryParams(params) {
8171
- return import_lucid43.Data.castTo(params, TreasuryParams);
8220
+ return import_lucid44.Data.castTo(params, TreasuryParams);
8172
8221
  }
8173
8222
 
8174
8223
  // src/contracts/treasury/scripts.ts
8175
8224
  var mkTreasuryValidatorFromSP = (params) => {
8176
8225
  return {
8177
8226
  type: "PlutusV3",
8178
- script: (0, import_lucid44.applyParamsToScript)(_treasuryValidator.cborHex, [
8227
+ script: (0, import_lucid45.applyParamsToScript)(_treasuryValidator.cborHex, [
8179
8228
  castTreasuryParams({
8180
8229
  upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
8181
8230
  versionRecordToken: fromSystemParamsAssetLucid(
@@ -8188,8 +8237,8 @@ var mkTreasuryValidatorFromSP = (params) => {
8188
8237
  };
8189
8238
 
8190
8239
  // src/contracts/execute/types.ts
8191
- var import_lucid45 = require("@lucid-evolution/lucid");
8192
- var ExecuteParamsSchema = import_lucid45.Data.Object({
8240
+ var import_lucid46 = require("@lucid-evolution/lucid");
8241
+ var ExecuteParamsSchema = import_lucid46.Data.Object({
8193
8242
  govNFT: AssetClassSchema2,
8194
8243
  upgradeToken: AssetClassSchema2,
8195
8244
  iAssetToken: AssetClassSchema2,
@@ -8198,19 +8247,19 @@ var ExecuteParamsSchema = import_lucid45.Data.Object({
8198
8247
  cdpCreatorToken: AssetClassSchema2,
8199
8248
  cdpToken: AssetClassSchema2,
8200
8249
  versionRecordToken: AssetClassSchema2,
8201
- iassetValHash: import_lucid45.Data.Bytes(),
8202
- cdpValHash: import_lucid45.Data.Bytes(),
8203
- sPoolValHash: import_lucid45.Data.Bytes(),
8204
- versionRegistryValHash: import_lucid45.Data.Bytes(),
8205
- treasuryValHash: import_lucid45.Data.Bytes()
8250
+ iassetValHash: import_lucid46.Data.Bytes(),
8251
+ cdpValHash: import_lucid46.Data.Bytes(),
8252
+ sPoolValHash: import_lucid46.Data.Bytes(),
8253
+ versionRegistryValHash: import_lucid46.Data.Bytes(),
8254
+ treasuryValHash: import_lucid46.Data.Bytes()
8206
8255
  });
8207
8256
  var ExecuteParams = ExecuteParamsSchema;
8208
8257
  function castExecuteParams(params) {
8209
- return import_lucid45.Data.castTo(params, ExecuteParams);
8258
+ return import_lucid46.Data.castTo(params, ExecuteParams);
8210
8259
  }
8211
8260
 
8212
8261
  // src/contracts/execute/scripts.ts
8213
- var import_lucid46 = require("@lucid-evolution/lucid");
8262
+ var import_lucid47 = require("@lucid-evolution/lucid");
8214
8263
 
8215
8264
  // src/validators/execute-validator.ts
8216
8265
  var _executeValidator = {
@@ -8223,8 +8272,8 @@ var _executeValidator = {
8223
8272
  var mkExecuteValidator = (params) => {
8224
8273
  return {
8225
8274
  type: "PlutusV3",
8226
- script: (0, import_lucid46.applySingleCborEncoding)(
8227
- (0, import_lucid46.applyParamsToScript)(_executeValidator.cborHex, [
8275
+ script: (0, import_lucid47.applySingleCborEncoding)(
8276
+ (0, import_lucid47.applyParamsToScript)(_executeValidator.cborHex, [
8228
8277
  castExecuteParams(params)
8229
8278
  ])
8230
8279
  )
@@ -8233,8 +8282,8 @@ var mkExecuteValidator = (params) => {
8233
8282
  var mkExecuteValidatorFromSP = (params) => {
8234
8283
  return {
8235
8284
  type: "PlutusV3",
8236
- script: (0, import_lucid46.applySingleCborEncoding)(
8237
- (0, import_lucid46.applyParamsToScript)(_executeValidator.cborHex, [
8285
+ script: (0, import_lucid47.applySingleCborEncoding)(
8286
+ (0, import_lucid47.applyParamsToScript)(_executeValidator.cborHex, [
8238
8287
  castExecuteParams({
8239
8288
  govNFT: fromSystemParamsAssetLucid(params.govNFT),
8240
8289
  upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
@@ -8262,21 +8311,21 @@ var mkExecuteValidatorFromSP = (params) => {
8262
8311
  };
8263
8312
 
8264
8313
  // src/contracts/price-oracle/types.ts
8265
- var import_lucid47 = require("@lucid-evolution/lucid");
8266
- var PriceOracleParamsSchema = import_lucid47.Data.Object({
8267
- owner: import_lucid47.Data.Bytes(),
8314
+ var import_lucid48 = require("@lucid-evolution/lucid");
8315
+ var PriceOracleParamsSchema = import_lucid48.Data.Object({
8316
+ owner: import_lucid48.Data.Bytes(),
8268
8317
  /** Milliseconds */
8269
- biasTime: import_lucid47.Data.Integer(),
8318
+ biasTime: import_lucid48.Data.Integer(),
8270
8319
  /** Milliseconds */
8271
- expirationPeriod: import_lucid47.Data.Integer()
8320
+ expirationPeriod: import_lucid48.Data.Integer()
8272
8321
  });
8273
8322
  var PriceOracleParams = PriceOracleParamsSchema;
8274
8323
  function castPriceOracleParams(params) {
8275
- return import_lucid47.Data.castTo(params, PriceOracleParams);
8324
+ return import_lucid48.Data.castTo(params, PriceOracleParams);
8276
8325
  }
8277
8326
 
8278
8327
  // src/contracts/rob/helpers.ts
8279
- var import_lucid48 = require("@lucid-evolution/lucid");
8328
+ var import_lucid49 = require("@lucid-evolution/lucid");
8280
8329
 
8281
8330
  // src/contracts/rob/types-new.ts
8282
8331
  var import_evolution19 = require("@evolution-sdk/evolution");
@@ -8398,7 +8447,7 @@ function robAmountToSpend(utxo, datum, sysParams) {
8398
8447
  }
8399
8448
  }).with({ SellIAssetOrder: import_ts_pattern19.P.any }, (_) => {
8400
8449
  return (0, import_cardano_offchain_common22.assetClassValueOf)(utxo.assets, {
8401
- currencySymbol: (0, import_lucid48.fromHex)(
8450
+ currencySymbol: (0, import_lucid49.fromHex)(
8402
8451
  sysParams.cdpParams.cdpAssetSymbol.unCurrencySymbol
8403
8452
  ),
8404
8453
  tokenName: datum.iasset
@@ -8415,7 +8464,7 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
8415
8464
  tx,
8416
8465
  (idx, acc, [robUtxo, spendAmt]) => {
8417
8466
  const robDatum = parseRobDatumOrThrow(getInlineDatumOrThrow(robUtxo));
8418
- if ((0, import_lucid48.toHex)(robDatum.iasset) !== (0, import_lucid48.toHex)(iasset)) {
8467
+ if ((0, import_lucid49.toHex)(robDatum.iasset) !== (0, import_lucid49.toHex)(iasset)) {
8419
8468
  throw new Error("Only same iAsset");
8420
8469
  }
8421
8470
  const [robOutputVal, sellOrderAllowedAssetsIdx] = (0, import_ts_pattern19.match)(
@@ -8435,12 +8484,12 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
8435
8484
  price
8436
8485
  )
8437
8486
  );
8438
- const resultVal = (0, import_lucid48.addAssets)(
8487
+ const resultVal = (0, import_lucid49.addAssets)(
8439
8488
  robUtxo.assets,
8440
8489
  (0, import_cardano_offchain_common22.mkAssetsOf)(collateralAsset, -collateralForRedemption),
8441
8490
  (0, import_cardano_offchain_common22.mkAssetsOf)(
8442
8491
  {
8443
- currencySymbol: (0, import_lucid48.fromHex)(
8492
+ currencySymbol: (0, import_lucid49.fromHex)(
8444
8493
  sysParams.robParams.iassetPolicyId.unCurrencySymbol
8445
8494
  ),
8446
8495
  tokenName: robDatum.iasset
@@ -8470,12 +8519,12 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
8470
8519
  price
8471
8520
  )
8472
8521
  );
8473
- const resultVal = (0, import_lucid48.addAssets)(
8522
+ const resultVal = (0, import_lucid49.addAssets)(
8474
8523
  robUtxo.assets,
8475
8524
  (0, import_cardano_offchain_common22.mkAssetsOf)(collateralAsset, payoutCollateralAmt),
8476
8525
  (0, import_cardano_offchain_common22.mkAssetsOf)(
8477
8526
  {
8478
- currencySymbol: (0, import_lucid48.fromHex)(
8527
+ currencySymbol: (0, import_lucid49.fromHex)(
8479
8528
  sysParams.robParams.iassetPolicyId.unCurrencySymbol
8480
8529
  ),
8481
8530
  tokenName: robDatum.iasset
@@ -8508,7 +8557,7 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
8508
8557
  ...robDatum,
8509
8558
  robRefInput: {
8510
8559
  outputIndex: BigInt(robUtxo.outputIndex),
8511
- txHash: (0, import_lucid48.fromHex)(robUtxo.txHash)
8560
+ txHash: (0, import_lucid49.fromHex)(robUtxo.txHash)
8512
8561
  }
8513
8562
  })
8514
8563
  },
@@ -8520,21 +8569,21 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
8520
8569
  }
8521
8570
 
8522
8571
  // src/contracts/rob/types.ts
8523
- var import_lucid49 = require("@lucid-evolution/lucid");
8524
- var RobParamsSchema = import_lucid49.Data.Object({
8572
+ var import_lucid50 = require("@lucid-evolution/lucid");
8573
+ var RobParamsSchema = import_lucid50.Data.Object({
8525
8574
  versionRecordToken: AssetClassSchema2,
8526
8575
  iassetAuthToken: AssetClassSchema2,
8527
8576
  collateralAssetAuthToken: AssetClassSchema2,
8528
- iassetPolicyId: import_lucid49.Data.Bytes(),
8529
- iassetValHash: import_lucid49.Data.Bytes()
8577
+ iassetPolicyId: import_lucid50.Data.Bytes(),
8578
+ iassetValHash: import_lucid50.Data.Bytes()
8530
8579
  });
8531
8580
  var RobParams = RobParamsSchema;
8532
8581
  function castRobParams(params) {
8533
- return import_lucid49.Data.castTo(params, RobParams);
8582
+ return import_lucid50.Data.castTo(params, RobParams);
8534
8583
  }
8535
8584
 
8536
8585
  // src/contracts/rob/transactions.ts
8537
- var import_lucid50 = require("@lucid-evolution/lucid");
8586
+ var import_lucid51 = require("@lucid-evolution/lucid");
8538
8587
  var import_fp_ts18 = require("fp-ts");
8539
8588
  var import_Array2 = require("fp-ts/lib/Array");
8540
8589
  var import_cardano_offchain_common23 = require("@3rd-eye-labs/cardano-offchain-common");
@@ -8543,11 +8592,11 @@ async function openRob(assetTokenNameAscii, depositAmt, orderType, lucid, sysPar
8543
8592
  const network = lucid.config().network;
8544
8593
  const [ownPkh, _] = await addrDetails(lucid);
8545
8594
  const newDatum = {
8546
- owner: (0, import_lucid50.fromHex)(ownPkh.hash),
8547
- iasset: (0, import_lucid50.fromHex)((0, import_lucid50.fromText)(assetTokenNameAscii)),
8595
+ owner: (0, import_lucid51.fromHex)(ownPkh.hash),
8596
+ iasset: (0, import_lucid51.fromHex)((0, import_lucid51.fromText)(assetTokenNameAscii)),
8548
8597
  orderType,
8549
8598
  robRefInput: {
8550
- txHash: (0, import_lucid50.fromHex)(
8599
+ txHash: (0, import_lucid51.fromHex)(
8551
8600
  "0000000000000000000000000000000000000000000000000000000000000000"
8552
8601
  ),
8553
8602
  outputIndex: 0n
@@ -8560,7 +8609,7 @@ async function openRob(assetTokenNameAscii, depositAmt, orderType, lucid, sysPar
8560
8609
  { SellIAssetOrder: import_ts_pattern20.P.any },
8561
8610
  (_2) => (0, import_cardano_offchain_common23.mkAssetsOf)(
8562
8611
  {
8563
- currencySymbol: (0, import_lucid50.fromHex)(
8612
+ currencySymbol: (0, import_lucid51.fromHex)(
8564
8613
  sysParams.cdpParams.cdpAssetSymbol.unCurrencySymbol
8565
8614
  ),
8566
8615
  tokenName: newDatum.iasset
@@ -8578,7 +8627,7 @@ async function openRob(assetTokenNameAscii, depositAmt, orderType, lucid, sysPar
8578
8627
  kind: "inline",
8579
8628
  value: serialiseRobDatum(newDatum)
8580
8629
  },
8581
- (0, import_lucid50.addAssets)(depositVal, (0, import_cardano_offchain_common23.mkLovelacesOf)(MIN_ROB_COLLATERAL_AMT))
8630
+ (0, import_lucid51.addAssets)(depositVal, (0, import_cardano_offchain_common23.mkLovelacesOf)(MIN_ROB_COLLATERAL_AMT))
8582
8631
  );
8583
8632
  }
8584
8633
  async function cancelRob(robOutRef, sysParams, lucid) {
@@ -8593,7 +8642,7 @@ async function cancelRob(robOutRef, sysParams, lucid) {
8593
8642
  (_) => new Error("Expected a single ROB UTXO.")
8594
8643
  );
8595
8644
  const robDatum = parseRobDatumOrThrow(getInlineDatumOrThrow(robUtxo));
8596
- return lucid.newTx().readFrom([robScriptRefUtxo]).collectFrom([robUtxo], serialiseRobRedeemer("Cancel")).addSignerKey((0, import_lucid50.toHex)(robDatum.owner));
8645
+ return lucid.newTx().readFrom([robScriptRefUtxo]).collectFrom([robUtxo], serialiseRobRedeemer("Cancel")).addSignerKey((0, import_lucid51.toHex)(robDatum.owner));
8597
8646
  }
8598
8647
  async function redeemRob(redemptionRobsData, priceOracleOutRef, iassetOutRef, collateralAssetOutRef, lucid, sysParams, currentSlot, pythMessage = void 0, pythStateOutRef = void 0) {
8599
8648
  const robScriptRefUtxo = matchSingle(
@@ -8645,7 +8694,7 @@ async function redeemRob(redemptionRobsData, priceOracleOutRef, iassetOutRef, co
8645
8694
  );
8646
8695
  tx.validFrom(interval.validFrom).validTo(interval.validTo);
8647
8696
  allRefInputs.push(...referenceInputs);
8648
- const refInputIdxs = (0, import_lucid50.getInputIndices)(allRefInputs, allRefInputs);
8697
+ const refInputIdxs = (0, import_lucid51.getInputIndices)(allRefInputs, allRefInputs);
8649
8698
  buildRedemptionsTx(
8650
8699
  redemptionRobs,
8651
8700
  iassetDatum.assetName,
@@ -8685,7 +8734,7 @@ async function adjustRob(lucid, robOutRef, adjustmentAmt, newLimitPrice, sysPara
8685
8734
  );
8686
8735
  }
8687
8736
  const iassetAc = {
8688
- currencySymbol: (0, import_lucid50.fromHex)(
8737
+ currencySymbol: (0, import_lucid51.fromHex)(
8689
8738
  sysParams.robParams.iassetPolicyId.unCurrencySymbol
8690
8739
  ),
8691
8740
  tokenName: robDatum.iasset
@@ -8701,7 +8750,7 @@ async function adjustRob(lucid, robOutRef, adjustmentAmt, newLimitPrice, sysPara
8701
8750
  (acc, [asset, _]) => {
8702
8751
  const amt = (0, import_cardano_offchain_common23.assetClassValueOf)(robUtxo.assets, asset) - // in case of ADA, the min has to stay.
8703
8752
  ((0, import_cardano_offchain_common23.isSameAssetClass)(asset, import_cardano_offchain_common23.adaAssetClass) ? MIN_ROB_COLLATERAL_AMT : 0n);
8704
- return (0, import_lucid50.addAssets)(acc, (0, import_cardano_offchain_common23.mkAssetsOf)(asset, amt));
8753
+ return (0, import_lucid51.addAssets)(acc, (0, import_cardano_offchain_common23.mkAssetsOf)(asset, amt));
8705
8754
  }
8706
8755
  )
8707
8756
  );
@@ -8753,19 +8802,19 @@ async function adjustRob(lucid, robOutRef, adjustmentAmt, newLimitPrice, sysPara
8753
8802
  }).exhaustive()
8754
8803
  })
8755
8804
  },
8756
- (0, import_lucid50.addAssets)(
8805
+ (0, import_lucid51.addAssets)(
8757
8806
  robUtxo.assets,
8758
8807
  (0, import_cardano_offchain_common23.mkAssetsOf)(depositAsset, adjustmentAmt),
8759
8808
  (0, import_cardano_offchain_common23.negateAssets)(rewardVal)
8760
8809
  )
8761
- ).addSignerKey((0, import_lucid50.toHex)(robDatum.owner));
8810
+ ).addSignerKey((0, import_lucid51.toHex)(robDatum.owner));
8762
8811
  }
8763
8812
  async function claimRob(lucid, robOutRef, sysParams) {
8764
8813
  return adjustRob(lucid, robOutRef, 0n, void 0, sysParams);
8765
8814
  }
8766
8815
 
8767
8816
  // src/contracts/rob/scripts.ts
8768
- var import_lucid51 = require("@lucid-evolution/lucid");
8817
+ var import_lucid52 = require("@lucid-evolution/lucid");
8769
8818
 
8770
8819
  // src/validators/rob-validator.ts
8771
8820
  var _robValidator = {
@@ -8778,13 +8827,13 @@ var _robValidator = {
8778
8827
  var mkRobValidator = (params) => {
8779
8828
  return {
8780
8829
  type: "PlutusV3",
8781
- script: (0, import_lucid51.applyParamsToScript)(_robValidator.cborHex, [castRobParams(params)])
8830
+ script: (0, import_lucid52.applyParamsToScript)(_robValidator.cborHex, [castRobParams(params)])
8782
8831
  };
8783
8832
  };
8784
8833
  var mkRobValidatorFromSP = (params) => {
8785
8834
  return {
8786
8835
  type: "PlutusV3",
8787
- script: (0, import_lucid51.applyParamsToScript)(_robValidator.cborHex, [
8836
+ script: (0, import_lucid52.applyParamsToScript)(_robValidator.cborHex, [
8788
8837
  castRobParams({
8789
8838
  versionRecordToken: fromSystemParamsAssetLucid(
8790
8839
  params.versionRecordToken
@@ -8801,10 +8850,10 @@ var mkRobValidatorFromSP = (params) => {
8801
8850
  };
8802
8851
 
8803
8852
  // src/contracts/price-oracle/transactions.ts
8804
- var import_lucid53 = require("@lucid-evolution/lucid");
8853
+ var import_lucid54 = require("@lucid-evolution/lucid");
8805
8854
 
8806
8855
  // src/contracts/price-oracle/scripts.ts
8807
- var import_lucid52 = require("@lucid-evolution/lucid");
8856
+ var import_lucid53 = require("@lucid-evolution/lucid");
8808
8857
 
8809
8858
  // src/validators/price-oracle-validator.ts
8810
8859
  var _priceOracleValidator = {
@@ -8817,7 +8866,7 @@ var _priceOracleValidator = {
8817
8866
  function mkPriceOracleValidator(params) {
8818
8867
  return {
8819
8868
  type: "PlutusV3",
8820
- script: (0, import_lucid52.applyParamsToScript)(_priceOracleValidator.cborHex, [
8869
+ script: (0, import_lucid53.applyParamsToScript)(_priceOracleValidator.cborHex, [
8821
8870
  castPriceOracleParams(params)
8822
8871
  ])
8823
8872
  };
@@ -8828,7 +8877,7 @@ var import_cardano_offchain_common24 = require("@3rd-eye-labs/cardano-offchain-c
8828
8877
  var Core2 = __toESM(require("@evolution-sdk/evolution"));
8829
8878
  async function startPriceOracleTx(lucid, assetName, startPrice, oracleParams, currentSlot, refOutRef, auxiliaryData) {
8830
8879
  const network = lucid.config().network;
8831
- const now = BigInt((0, import_lucid53.slotToUnixTime)(network, currentSlot));
8880
+ const now = BigInt((0, import_lucid54.slotToUnixTime)(network, currentSlot));
8832
8881
  if (!refOutRef) {
8833
8882
  refOutRef = (await lucid.wallet().getUtxos())[0];
8834
8883
  }
@@ -8839,31 +8888,31 @@ async function startPriceOracleTx(lucid, assetName, startPrice, oracleParams, cu
8839
8888
  },
8840
8889
  mintAmounts: [
8841
8890
  {
8842
- tokenName: (0, import_lucid53.fromText)(assetName),
8891
+ tokenName: (0, import_lucid54.fromText)(assetName),
8843
8892
  amount: 1n
8844
8893
  }
8845
8894
  ]
8846
8895
  });
8847
8896
  const priceOracleNft = {
8848
- currencySymbol: (0, import_lucid53.fromHex)(oracleNftPolicyId),
8849
- tokenName: (0, import_lucid53.fromHex)((0, import_lucid53.fromText)(assetName))
8897
+ currencySymbol: (0, import_lucid54.fromHex)(oracleNftPolicyId),
8898
+ tokenName: (0, import_lucid54.fromHex)((0, import_lucid54.fromText)(assetName))
8850
8899
  };
8851
8900
  const oracleValidator = mkPriceOracleValidator(oracleParams);
8852
8901
  const oracleDatum = {
8853
8902
  price: startPrice,
8854
8903
  expirationTime: BigInt(now) + oracleParams.expirationPeriod,
8855
- auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(import_lucid53.Data.void())
8904
+ auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(import_lucid54.Data.void())
8856
8905
  };
8857
8906
  tx.pay.ToContract(
8858
- (0, import_lucid53.validatorToAddress)(lucid.config().network, oracleValidator),
8907
+ (0, import_lucid54.validatorToAddress)(lucid.config().network, oracleValidator),
8859
8908
  { kind: "inline", value: serialisePriceOracleDatum(oracleDatum) },
8860
- (0, import_lucid53.addAssets)((0, import_cardano_offchain_common24.mkAssetsOf)(priceOracleNft, 1n))
8909
+ (0, import_lucid54.addAssets)((0, import_cardano_offchain_common24.mkAssetsOf)(priceOracleNft, 1n))
8861
8910
  );
8862
8911
  return [tx, priceOracleNft];
8863
8912
  }
8864
8913
  async function feedPriceOracleTx(lucid, oracleOref, newPrice, oracleParams, currentSlot, auxiliaryData) {
8865
8914
  const network = lucid.config().network;
8866
- const currentTime = BigInt((0, import_lucid53.slotToUnixTime)(network, currentSlot));
8915
+ const currentTime = BigInt((0, import_lucid54.slotToUnixTime)(network, currentSlot));
8867
8916
  const priceOracleUtxo = matchSingle(
8868
8917
  await lucid.utxosByOutRef([oracleOref]),
8869
8918
  (_) => new Error("Expected a single price oracle UTXO")
@@ -8882,7 +8931,7 @@ async function feedPriceOracleTx(lucid, oracleOref, newPrice, oracleParams, curr
8882
8931
  value: serialisePriceOracleDatum({
8883
8932
  price: newPrice,
8884
8933
  expirationTime: currentTime + oracleParams.expirationPeriod,
8885
- auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(import_lucid53.Data.void())
8934
+ auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(import_lucid54.Data.void())
8886
8935
  })
8887
8936
  },
8888
8937
  priceOracleUtxo.assets
@@ -8890,7 +8939,7 @@ async function feedPriceOracleTx(lucid, oracleOref, newPrice, oracleParams, curr
8890
8939
  }
8891
8940
 
8892
8941
  // src/utils/helper-txs.ts
8893
- var import_lucid54 = require("@lucid-evolution/lucid");
8942
+ var import_lucid55 = require("@lucid-evolution/lucid");
8894
8943
 
8895
8944
  // src/scripts/always-fail-validator.ts
8896
8945
  var alwaysFailValidator = {
@@ -8900,7 +8949,7 @@ var alwaysFailValidator = {
8900
8949
 
8901
8950
  // src/utils/helper-txs.ts
8902
8951
  async function runCreateScriptRefTx(lucid, scriptRefValidator, network) {
8903
- const scriptAddr = (0, import_lucid54.validatorToAddress)(network, alwaysFailValidator);
8952
+ const scriptAddr = (0, import_lucid55.validatorToAddress)(network, alwaysFailValidator);
8904
8953
  const txHash = await lucid.newTx().pay.ToAddressWithData(scriptAddr, void 0, {}, scriptRefValidator).complete().then((tx) => tx.sign.withWallet().complete()).then((tx) => tx.submit());
8905
8954
  await lucid.awaitTx(txHash);
8906
8955
  return { txHash, outputIndex: 0 };
@@ -8911,7 +8960,7 @@ var import_lucid59 = require("@lucid-evolution/lucid");
8911
8960
  var import_cardano_offchain_common25 = require("@3rd-eye-labs/cardano-offchain-common");
8912
8961
 
8913
8962
  // src/scripts/auth-token-policy.ts
8914
- var import_lucid55 = require("@lucid-evolution/lucid");
8963
+ var import_lucid56 = require("@lucid-evolution/lucid");
8915
8964
  var authPolicyData = {
8916
8965
  type: "PlutusV2",
8917
8966
  cborHex: "5904d95904d60100003232323232323232323232323232323232323232323232323232223232223232323253355335533357346042660166018a00200e03026464666ae68cdc419806980728019980b9999aa999ab9a3370e90030008990911118020029aba1302400215333573466e1d20040011321222230020053574260480042a666ae68c08c0044c848888c004014d5d098120010a999ab9a30220011321222230030053574260480040424c40024c4c016900100a80d98120009baa3500201d01813357389213d4d75737420636f6e73756d65204e4654206f7220746f6b656e2070726576696f75736c79206d696e746564207573696e67207468697320706f6c6963790001301415335738920103505435001613253335734604060460022646464646464646464646464646464646464646464642466666666666600202e02a02602201e01a01601200e00a0060046ae84d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d118118011aba1302200101f37546a002036a666ae68c078c0840084c8c848cc00400c008d5d09aba2302100335742604000403aa666ae68c074c080dd500180880e1baa00153335734603260380022646601e6ae84004d5d09aba2001301b00101837540044464646603a4466a0029000111a801112999ab9a3375e0040102660464466a0029000111a801112999ab9a3375e00401a20022600c0060022600c0060086a00402a6a0020264666aa6020026660144466aa601c02a46a002446601e00466aa602203046a0024466024004666a0026e012000700466e0000520000013355300e015235001223300f00233350012335530120192350012233013002300e0010012233300a0090020012335530120192350012233013002301000100133300500400200100e232333008200133008200175a6aa666ae68c05cc0680044c8c8c8c8c8c848cccc00401c01400c008d5d09aba2002357420026ae88008d5d08009aba2301a00235742603200202c44440066ea8d400404ccc06488cccd55cf800900891919809a999ab9a3019301c001132321233001003002357426ae88c070008d5d0980d80080c18021aba200337546ae84008054dd61a80091111111111100611199ab9a3375e00400201c010444666aa601602601e66aa601802646a002446601a0046010002666aa6016026446a00444a66a666aa602802e6601c4466601402e004002601002c46a002446601400400a00c200626602600800601c00266aa601802646a002446601a0046603844a66a002260180064426a00444a66a6601800401022444660040140082600c00600800446600244a66a004018200200a4244460060084446602c446666aae7c00480388c8cc040cc02cc01cc064004c018c060004c010d5d10019aba1002012375600242444600200820142014442466002006004601c4422444a66a00220044426600a004666aa600e01e00a008002601a442244a66a00200a44266012600800466aa600c01a00800220022006442446600200800660124422444a66a00226a00600e442666a00a0106008004666aa600e01400a0080024400444002240022a66ae71241035054310016370e90001b874800955cf2ab9d2323001001223300330020020011"
@@ -8919,15 +8968,15 @@ var authPolicyData = {
8919
8968
  function mkAuthTokenPolicy(ac, tn) {
8920
8969
  return {
8921
8970
  type: authPolicyData.type,
8922
- script: (0, import_lucid55.applyParamsToScript)(authPolicyData.cborHex, [
8923
- new import_lucid55.Constr(0, [(0, import_lucid55.toHex)(ac.currencySymbol), (0, import_lucid55.toHex)(ac.tokenName)]),
8971
+ script: (0, import_lucid56.applyParamsToScript)(authPolicyData.cborHex, [
8972
+ new import_lucid56.Constr(0, [(0, import_lucid56.toHex)(ac.currencySymbol), (0, import_lucid56.toHex)(ac.tokenName)]),
8924
8973
  tn
8925
8974
  ])
8926
8975
  };
8927
8976
  }
8928
8977
 
8929
8978
  // src/contracts/iasset/scripts.ts
8930
- var import_lucid56 = require("@lucid-evolution/lucid");
8979
+ var import_lucid57 = require("@lucid-evolution/lucid");
8931
8980
 
8932
8981
  // src/validators/iasset-validator.ts
8933
8982
  var _iassetValidator = {
@@ -8937,8 +8986,8 @@ var _iassetValidator = {
8937
8986
  };
8938
8987
 
8939
8988
  // src/contracts/iasset/scripts.ts
8940
- var import_lucid57 = require("@lucid-evolution/lucid");
8941
- var IAssetScriptParamsSchema = import_lucid57.Data.Object({
8989
+ var import_lucid58 = require("@lucid-evolution/lucid");
8990
+ var IAssetScriptParamsSchema = import_lucid58.Data.Object({
8942
8991
  upgradeToken: AssetClassSchema2,
8943
8992
  versionRecordToken: AssetClassSchema2
8944
8993
  });
@@ -8946,8 +8995,8 @@ var IAssetScriptParams = IAssetScriptParamsSchema;
8946
8995
  var mkIAssetValidatorFromSP = (params) => {
8947
8996
  return {
8948
8997
  type: "PlutusV3",
8949
- script: (0, import_lucid56.applyParamsToScript)(_iassetValidator.cborHex, [
8950
- import_lucid57.Data.castTo(
8998
+ script: (0, import_lucid57.applyParamsToScript)(_iassetValidator.cborHex, [
8999
+ import_lucid58.Data.castTo(
8951
9000
  {
8952
9001
  upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
8953
9002
  versionRecordToken: fromSystemParamsAssetLucid(
@@ -8960,40 +9009,6 @@ var mkIAssetValidatorFromSP = (params) => {
8960
9009
  };
8961
9010
  };
8962
9011
 
8963
- // src/contracts/gov/scripts.ts
8964
- var import_lucid58 = require("@lucid-evolution/lucid");
8965
-
8966
- // src/validators/governance-validator.ts
8967
- var _governanceValidator = {
8968
- type: "PlutusScriptV3",
8969
- description: "Generated by Aiken",
8970
- cborHex: "593056593053010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cdc3a400530090024888966002600460126ea800e33001300a3754007223233001001003223300300130020029b87480026e2520049b874801a6e1d200e9b874801260126ea8011222222229800980a8044c054c0580224464b30013009001899192cc004c06c00a0091640606eb8c064004c054dd5001c566002601a003159800980a9baa00380145901645901220243013375400522232598009805000c4c8c96600260380050048b2032375c6034002602c6ea800e2b3001300e00189919912cc004c07400626601c6eb0c07000489660020050078cc004026603c00513001301f002402480e22c80d0dd6980d000980d800980b1baa0038b2026404c60286ea800a44b300130083013375400513232332259800980e001c0162c80c8dd6980c8009bad30190023019001301437540051640452232598009804800c4c8c96600260360050048b2030375c6032002602a6ea800e2b3001300d001899192cc004c06c00a0091640606eb8c064004c054dd5001c590122024301337540052259800980418099baa0028991919912cc004c07000e00b1640646eb8c064004dd7180c801180c800980a1baa0028b202248888888c8c8cc8966002602201913232323298009812000cdd698120024dd71812001a444b3001302800489919912cc004c06c00a264b3001302c0018992cc004c074c0a0dd5000c4c8c8c8c8c8ca60026064003375c606400d30320049819001cc0c80092222259800981c00344cc078c0dc0284cc07800c4cc0780084cc0780044cc07801403a2c81a8606400260620026060002605e002605c00260526ea80062c8130c0ac0062c8148c09cdd5001c566002603e005132598009816000c4c966002603a60506ea80062646464646465300130320019bae303200698190024c0c800e6064004911112cc004c0e001a26603c606e01426603c00626603c00426603c00226603c00a01d1640d4303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b300130170028992cc004c0b0006264b3001301d30283754003132323232323232323298009bad30350019bae30350099bad3035007981a8034c0d4016606a0093035003981a801244444444b3001303e009899811181e80809980f00289981100209981200189981200109981200080a45903b0c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0a4dd5000c590261815800c5902918139baa0038acc004c06400a264b3001302c0018992cc004c074c0a0dd5000c4c8c8c8c8c8c8c8c8ca60026eb4c0d40066eb8c0d40266eb4c0d401e606a00d3035005981a8024c0d400e606a004911111112cc004c0f8026266044607a02026603c00a2660440082660480062660480042660480020291640ec303500130340013033001303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900400144c966002605800313259800980e98141baa00189919191919191919194c004dd7181a800cdd7181a804cc0d401e606a00d3035005981a8024dd6981a801cdd6981a801244444444b3001303e009899811181e80809981200309981200289981200209981300180a45903b0c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0a4dd5000c590261815800c5902918139baa0038acc004cdc3a4014005132598009816000c4c966002603a60506ea8006264646464646464646464653001375c606e003375c606e0173037009981b8044c0dc01e64b300130350018acc004c0a0c0d00062d1302d303400140c91640d86ea8c0dc01a64b300130350018acc004c0a0c0d00062d1302d303400140c91640d86ea8c0dc016606e009375a606e007375a606e00491111111112cc004c10802e26604c608202826605001026605000e26605000c2660540060311640fc30370013036001303500130340013033001303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900600144c966002605800313300e302b0010028b205230273754007159800980c00144c966002605800313259800980e98141baa00189919912cc004c0c00062660426eb0c0bc004896600200500889919912cc004c0d4006264b30013026303137540031323259800981c00144c01cc0e00222c81a8dd7181b00098191baa0018b205e30340018b2064375c606400260660026eb0c0c400902f45902d1bad302d001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900800144c8c966002605a0050038b2054375c6056002604e6ea800e2c8121024204840908121024204840908120c090dd50008992cc004c068006264b3001302b0018992cc004c070c09cdd5000c4c8c8c966002605e0051332259800981098161baa00289919192cc004c0d000a2660326066006264b300130250018992cc004c0d800626464b300130280018992cc004c0e400626603c60700020131640d860686ea800a2b3001302c00189919194c004dd6981d000cdd6981d001cdd6981d0012444b3001303e00480745903b0c0e8004c0e4004c0d0dd5001459031206230323754002606a0031640cc60626ea800a2b300130290018acc004c0c4dd500140162c81922c817102e18179baa0018b206230320013032001302d37540051640a8605c00626604000244b300100280944c9660026044605a6ea800626464653001375a6068003375c6068007375c60680049112cc004c0e00122601060700131640d430340013033001302e37540031640ac606000481722c8160dd61816800981680098141baa0018b204a302a0018b20503026375400b159800980f000c566002604c6ea801601716409d16408c8118c090dd50021813802c590250c090004c08c004c088004c074dd500bc566002602a0191323259800981180140122c8100dd69810800980e9baa0178acc004c0340322b3001301d375402f0028b203c8acc004c03c0322b3001301d375402f0028b203c8b2034406880d101a0cc004dd2a40012301f30203020001911919800800801912cc00400629422b30013371e6eb8c08800400e2946266004004604600280e102048c07cc0800064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204289980280298140022042375c60420026eb4c088004c090005022191919800800803112cc00400600713233225980099b910090028acc004cdc78048014400600c811226600a00a60520088110dd718110009bab30230013025001408c297adef6c6014800244646600200200644b30010018a5eb8226644b3001300500289981180119802002000c4cc01001000501e18110009811800a0409b88480024b3001300c301b37540031301f301c37540031640652301f30203020302030200014888888888c8cc89660026032604c6ea80862646644b3001301e3029375400313259800981198151baa001899912cc004c0c4006264b30013022302d3754003132332259800981a800c4cc098dd6181a000912cc00400a264b3001302830333754003133017300c3756602260686ea80acdd7181b981a1baa0018b206232330010013758602c60686ea801c896600200314c0103d87a80008992cc006600266ebc00530103d87a8000a50a5140cd1001899801801981d0012066325980099b8f375c60720020171301b330383039303a0014bd7045300103d87a800040cc6eb0c0e000503644c8c8cc8966002607600713005303b0068b2070375c60700026eb8c0e0008c0e0004dd6181b00120688b2064375a60640026066002605c6ea80062c8158c02cc044c0b4dd5180798169baa30300018b205c375c605c60566ea800660026eb0c034c0acdd50114c020c0acdd5018d30103d879800040191640a0605a60546ea8c0b4c0a8dd5180618151baa302d302a375400316409c6002002660046eb0c0acc0a0dd500f80b112cc004006297ae089981598141816000998010011816800a0548acc004c06cc098dd500a44c9660026038604e6ea8006264646464653001375a6060003375a606000b375a6060007375a606000491112cc004c0d401626602e6068010264b300130263031375400313233225980099800a48113496e636f727265637420476f7620696e70757400330113756602e606a6ea8c05cc0d4dd5001981c181a9baa03b8cc004c0d0dd5017c8888c8cc004004014896600200313303d337606ea4014dd400225eb7bdb1822653001375c6076003375a6078003304000248896600266e4002400e26608266ec0dd48049ba80080058acc004cdc7804801c6600201300880148cc108cdd81ba900a37500020051001401d133041337606ea400cdd400119803003000a07840f0303e00140f1222232330010010052259800800c4cc0f4cdd81ba9005374c00897adef6c608994c004dd7181d800cdd5981e000cc1000092225980099b9000900389982099bb037520126e980200162b30013371e01200719800804c022005233042337606ea4028dd30008014400500744cc104cdd81ba9003374c0046600c00c00281e103c0c0f800503c496600200314a314a081ba24444464b3001302f00180144c00c00503819b800040039b81480026e2520009112cc004c0b0006297adef6c608991919800800a5eb7bdb180896600200313303d337606ea4018dd3001a5eb7bdb1822653001375c607600337566078003304000248896600266e4002800e26608266ec0dd48051ba60070058acc004cdc7805001c4cc104cdd81ba900a374c00e003133041337606ea400cdd300119803003000a07840f0303e00140f0646600200297adef6c602259800800c4cc0f0cdd81ba9004375000697adef6c608994c004dd7181d000cdd6981d800cc0fc0092225980099b9000800389982019bb037520106ea001c0162b30013371e010007133040337606ea4020dd4003800c4cc100cdd81ba900337500046600c00c00281d903b0c0f400503b206a914c00400a6eb8c0e8c0dcdd5000cdd7180c981b9baa001406123039303a303a303a303a303a303a303a303a303a0019181c981d181d181d181d181d181d000cdd2a4005374a90024dd79809181a9baa02c488888888888888cc88cc896600260760251980098239baa041912cc00400629344c966002003149a264b3001337206eb8c128c13800cdd71825000c4cc010010cc134004c13c00a2a66092921326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f7264657200164120609a0028258c13400504a4dc024005223259800981f000c566002607c60926ea800a298103d87a80008a6103d8798000411d159800981d000c566002607460926ea800a2980103d87a80008a6103d87b8000411d13322598009822000c4c96600266e2000c0062980103d87980008acc004cdc4000801c530103d87b80008a6103d87a800041288250dd6982798261baa0048acc004c100006298103d87b80008a6103d879800041248248dd6982698251baa00330493754004823904718241baa002912cc004c0f4006298103d87a80008acc004cdc4000a40011302e3304b302e3304b3750601e004660966ea0c03c0052f5c097ae089817198259817198259ba80023304b375000297ae04bd70208c4119225980099b900020018a60103d87980008acc004cdc7801000c530103d87a80008a6103d87b8000411882324605a660946ea0004cc12930010101004bd704888cc88cc010cdc11bad304f002375a609e60a000266e08dd698278009bad304f3050002304a375400660946ea800646096609860986098609860986098609860986098609800314820225ea46096609860986098609860980032304b304c304c304c001918259826182618261826182618261826000c8c12cc130c130c130c130c130c130c130c1300064464b30013001480422b30013001480022900044cdc724508010204081020408000002411d1598009800a40811337049040021980180199b800024803e266e092080808080203300300333700004901fa08e411c6e200066ebd300103d8798000912cc004006297ae0899198261ba9001330030033233001001304f0032259800800c52f5c11332259800cc004cdc7801002d28528a0968998281ba900233004004001899802002000a096375c609e00260a00028268dd71826000a0949bac304a304b304b3047375407c9111111111111111114c004c17404a6eb4c17004a60220232259800800c520008980919801001182f800a0b89181f9982e192cc004c14cc168dd5000c4c96600260a860b66ea8c0f8c170dd5182f982e1baa0038980e1982f1ba80014bd7044c070cc178dd41809800a5eb810591bad305e305b37540031001416060ba60b46ea8c174c168dd50009982e192cc004c14cc168dd5000c4c96600260a860b66ea8c0f8c170dd5181f182e1baa0038980e1982f1ba80014bd7044c070cc178dd419b80001480052f5c082c8dd6982f182d9baa0018800a0b0305d305a3754607860b46ea80052f5c12222259800998152492c44656274206d696e74696e672066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001802a0208cc0040164466e240080066022900120208a50416d15980099815249344c69717569646174696f6e2070726f63657373696e672066656520726174696f206973206265747765656e205b30252c2035255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b89002001802a0228cc0040164466e2400800660c460be6ea8005011452820b88b20b8330134802920c8018acc004cc0a924013953746162696c69747920706f6f6c207769746864726177616c2066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001801a0208cc00400e4466e240080066022900120208a50416d1598009981524933526564656d7074696f6e207265696d62757273656d656e7420726174696f20696e206265747765656e205b30252c203235255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b89002001801a0228cc00400e4466e2400800660c460be6ea8005011452820b88b20b833013480c920c801899815248134526564656d7074696f6e2070726f63657373696e672066656520726174696f20696e206265747765656e205b30252c203130255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b8900200180120228cc00400a4466e2400800660c460be6ea8005011452820b88b20b8330134805120c8018a50416d14a082da294105b452820b69192cc004c13cc168dd5000c4c178c16cdd5000c54cc1652401263c65787065637465643e2044656e6f6d696e61746f722063616e6e6f74206265207a65726f2e001641606601e6eb4c174c168dd50009bad303c305a375400322225980099814a4811e524d52206973206265747765656e205b313030252c2031305f303030255d0059800cc004c04120029119b89002001802201e8cc0040124466e240080066020906400a01e8a50416915980099814a491d4d52206973206265747765656e205b313030252c2031305f303030255d0059800cc004c04120029119b89002001801a01e8cc00400e4466e240080066020906400a01e8a50416915980099814a491f4d61696e74656e616e636520726174696f206d757374206265203e3d204c52009800801c88cdc4800801400900f456600266052921214c69717569646174696f6e20726174696f206d757374206265203e3d20313030250098009808240052233712004003002403d133029491174d696e20636f6c6c61746572616c20706f73697469766500303c0018a50416914a082d2294105a452820b491111112cc004cc0b12401236941737365742063616e6e6f74206265206120636f6c6c61746572616c20617373657400980099b8f375c60c660c06ea801c00694294505d45660026605892012c436f6c6c61746572616c20617373657420746f2069417373657420726174696f20697320706f73697469766500300a332233225980099b880020018a6103d87980008acc004cdc40008014530103d87b80008a6103d87a800041848308cdc11bad3065002375a60ca60cc00266e08dd698328009bad3065306600230603754980106d8799f0001ff003060375400d159800acc004cc0b12401274d696e74696e672066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001802a0248cc0040164466e240080066026900120248a50417513302c49012a526564656d7074696f6e2066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b8900200180220248cc0040124466e240080066026900120248a50417514a082ea2b30013302c491224d696e206d696e74696e6720616d6f756e74206973206e6f6e2d6e65676174697665003025003899816249254d696e20726564656d7074696f6e20616d6f756e74206973206e6f6e2d6e656761746976650030250028a50417514a082ea294105d452820ba4888888888cc8a600260ce0053067306800298009bad304630643754608c60c86ea80f66eb8c19c02d222259800acc004c180c19cdd5001c528c4c8c9660026606c921415472656173757279207769746864726177616c2063616e6e6f742062652061626f7665207769746864726177616c206c696d697420666f72206c6f76656c61636500337133001001a44100a44100412c6eb4c05cc1a8dd5182618351baa0438acc004cc0d924013d5472656173757279207769746864726177616c2063616e6e6f742062652061626f7665207769746864726177616c206c696d697420666f7220494e445900337126605a002603060d46ea81c0dd6980b18351baa304c306a37540871598009981b249295472656173757279207769746864726177616c2076616c75652063616e6e6f7420626520656d70747900980099baf374c002980101a000a50a51419d1598009981b249355472656173757279207769746864726177616c2063616e6e6f7420726571756573742044414f206964656e7469747920746f6b656e00305e3302d001302c306a37540e11598009981b24812f5472656173757279207769746864726177616c2063616e20636f6e7461696e206d6178206f6620382061737365747300337126601c01c6eb0c130c1a8dd5001240211330364901355472656173757279207769746864726177616c2063616e20636f6e7461696e206f6e6c7920706f73697469766520616d6f756e74730032330010013758609a60d66ea800c896600200314a315980098259bad306f30703070306c375460de00313300200230700018a5041a4836a2941067452820ce8a50419d14a0833a2941067191980080099198008009bac304d306b375400644b30010018a5eb822660dc6e9cc8c8cc1c0c1c4008cc1c0c1c4004cc1c0c1c4c1c80052f5c060e200260d86ea8c1bc004cc008008c1c000506d112cc004006297adef6c60899194c004dd71838000cdd698381838800ccc010010c1c400e6eb8c1c00092222598009832801c400a33001002800cc8c8008c05c004cc1cccdd81ba9004375000697adef6c6091111192cc004c0fc0060051300300141d06530010048054026444453001005801c0120050014018820940f503a20dc18380009bac306e00141b060d660d06ea800d06545660026606892011b496e636f727265637420476f7665726e616e6365206f75747075740098008084c0a0cc1a80d52f5c130273306a3232304f3306c375060426eb4c1b4c1a8dd50219983618368011983618368009983618369837000998361ba83021375a608e60d46ea810d2f5c060da00260d860d06ea81052f5c13022306b306837540dd4c0103d87a8000408d1598009981a24927546865207472616e73616374696f6e206d757374206265207369676e6564206279206f776e6572003304b3758602860d06ea817c0062b30013303449012850726f706f73616c20696e636f6d70617469626c6520776974682063757272656e742073746174650059800982c98339baa004899b87375a60d660d06ea8c1acc1a0dd5002180f9bad304c3068375408314a2832a2b30013303449010d496e76616c6964207054696d6500332259800992cc004c16c00629462b300130630018a518a5041a08340c1a4dd519810183698351baa002306d306a375400313259800982f800c528c56600260c600314a314a0834106818349baa33020304c306a3754004609860d46ea800629410671805980a98341baa05f300b304d3306a304d3306a30283306a375066e04038dd6980a18341baa06e4bd70198354c00528d30103d87a8000a60103d8798000419497ae03306a304d3306a30283306a3750600a6eb4c050c1a0dd503725eb80cc1aa6002946980103d87a8000a60103d8798000419497ae04bd704566002660689201245472616e73616374696f6e206d696e742065786163746c79203120706f6c6c546f6b656e003026374c6044609460d06ea81ba2b300133034490113496e76616c696420506f6c6c206f75747075740098008084c0a0cc1a8c134cc1a8c0a0cc1a8c0a4c1a0dd503725eb80cc1a9300103d87a80004bd7025eb82604e660d4609a660d4609a660d46ea0c07cdd6983598341baa0413306a3752002660d4008660d4006660d498106d8799f0000ff003306a3750004660d49810100003306a4c10100003306a301730683754609460d06ea8104cc1a8dd418029bad304530683754609460d06ea8104cc1a8dd419b80002375a602c60d06ea8c128c1a0dd502099835182618341baa0413306a302930683754609460d06ea81052f5c097ae04bd704cc090c088c128c1a0dd5037194c004dd7183618349baa0019bae304b30693754003337046eb4c1b0c1a4dd5182598349baa04233014014375a608c60d26ea810902d180b18341baa06ea60103d87a8000408d13259800982e800c4c8c8c8c8cc8966003300130103072005980818390024c040c1c800e602060e4005301030723073002404515980098319bad301d306f375409114a313259800983a000c4c96600266ebcc0c4cc1ccc078c1c4dd503ba5eb80c1d0c1c4dd5183a18389baa30533071375400313259800983318389baa0018992cc004c1dc006264b300130683073375400313232323232323232329800984000800cdd7184000804cdd69840008044c2000401a61000200b308001004984000801cc96600260fc0031598009838983e800c5a260ec60fa00283da2c83f8dd5184000801244444444b3001308901009899837984400807899837802899837802099837801899837801099838804099828a4812469417373657420776974682073616d65206e616d6520616c7265616479206578697374730059800acc004c1f4c21004dd518191842809baa012898179981c80b9bae308801308501375402514a084100a29462b30013375e6607202e6eb8c22004c21404dd5009260103d87b80008992cc004c1e8c21404dd5000c4c0c0cc0e8060dd71844809843009baa0018a51420c046062610a026ea804a2941082012104028b210c02184000800983f800983f000983e800983e000983d800983d000983c800983a1baa0018b20e230760018b20e8307237540031641bc609e60aa60e26ea8c14cc1c4dd5000c54cc1bd2401193c65787065637465643e204d697865642076657273696f6e73001641b860e60031641c53001375860a260de6ea819a604060de6ea81d698103d879800041288362294106c18388009bae30700043070001306f001306e0013069375460d860d26ea80162b300130610018991919194c004c038c1c0012601c60e0007300e307000298071838000cc038c1c0c1c400500f183800098378009837000983698349baa306c3069375400b159800982c800c4c8c8c8c9660033001300e3070003980718380014c038c1c00066eb4c1c0c1c400500d456600260c260d86ea8c1c00122942294506a452820d43070001306f001306e306e001306d306d306d3069375460d860d26ea80162b3001305b00189919194c004c034c1bc00e601a60de005300d306f0019bad306f3070001403060de00260dc00260da60da60da60da60da60d26ea8c1b0c1a4dd5002c56600266e1d2008001899191919194c004c1c4016601e60e2009300f3071003980798388014dd69838800cdd698389839000cdd7180e98371baa074403460e260e200260e000260de00260dc00260da60d26ea8c1b0c1a4dd5002c56600266e1d200a001899191919194c004c1c4016601e60e2009300f3071003980798388014dd69838800cdd698389839000cdd7180e98371baa074403460e260e260e260e200260e000260de00260dc00260da60d26ea8c1b0c1a4dd5002c56600266e1d200c0018992cc004cc0d924012a50726f706f73616c206465706f73697420696e2072616e6765205b302c2031305f30303020494e44595d005980098179bad306d306a37540031337126eb4c1b4c1a8dd500099b82482827005406a294106745660026606c92128566f74696e6720706572696f6420696e2072616e6765205b3120686f75722c2031206d6f6e74685d005980099b8948202eadc0cdd6982618351baa001899b89375a609860d46ea80052080a0f6a7138a50419d1598009981b249264566666563746976652064656c617920696e2072616e6765205b302c20313220686f7572735d005980098179bad304e306a37540031337126eb4c138c1a8dd5000a410171325314a0833a2b30013303649012b45787069726174696f6e20706572696f6420696e2072616e6765205b31206461792c2031206d6f6e74685d005980099b8948203c2c948dd6980c18351baa001899b89375a603060d46ea80052080a0f6a7138a50419d1598009981b2492b50726f706f73696e6720706572696f6420696e2072616e6765205b3120686f75722c2031206d6f6e74685d005980099b8948202eadc0cdd6982398351baa001899b89375a608e60d46ea80052080a0f6a7138a50419d1598009981b2492950726f706f73696e6720706572696f64203c20566f74696e6720706572696f64202d203120686f757200337106eb4c11cc1a8dd500099b80375a609860d46ea800520ffb9b7038acc004cc0d92411f546f74616c2073686172647320696e2072616e6765205b312c20313030305d005980099b8948008dd6980c98351baa001899b89375a603260d46ea800520d00f8a50419d1598009981b249234d696e2071756f72756d20696e2072616e6765205b302c2031306d696c20494e44595d005980098179bad302b306a37540031337126eb4c0acc1a8dd500099b82482036b1025406a294106745660026606c92127456c6563746f7261746520696e2072616e6765205b31356d696c2c2033356d696c20494e44595d005980099b8933704904043d387280d1bad301b306a37540031337126eb4c06cc1a8dd500099b8248202eec085406a294106745660026606c921384d6178207472656173757279206c6f76656c616365207370656e6420696e2072616e6765205b302c2034352062696c6c696f6e204144415d005980098179bad3017306a37540031337126eb4c05cc1a8dd500099b824820222b28f3c09406a294106744cc0d92401354d617820747265617375727920494e4459207370656e6420696e2072616e6765205b302c203335206d696c6c696f6e20494e44595d005980098179bad3016306a37540031337126eb4c058c1a8dd500099b8248202eec085406a2941067452820ce8a50419d14a0833a2941067452820ce8a50419d14a0833a2941067452820ce8a50419c60d860d26ea80162b3001305a0018991981b2491d43616e6e6f7420636f6e7461696e206475706c6963617465206b657973003375e6e9ccc04c04c004dd380099198008009bac306d306e306a375460da60d46ea8018896600200314bd7044cc1b4c1b8dd61837000998010011837800a0d889981aa491e5465787450726f706f73616c2773206c656e677468206973203c3d20363400337126e34dd7183618349baa005482000506620cc4198833106620cc41988330c19cdd5002452820ca8a50419514a0832a2941065452820ca8a50419514a0832860cc0126e000208acc004c0fc04a26644b3001304d0018992cc004cc05924010e4d697865642076657273696f6e73003375e609a60946ea8c134c128dd5181618251baa001300a3304c300b304a37540a097ae08acc004cc05924012e706f6c6c206d616e6167657220696e707574206d75737420757365207468652072696768742072656465656d657200323322598009820800c4c8c96600260a60050048b20a0375a60a2002609a6ea800e2b30013045001899192cc004c14c00a0091641406eb4c144004c134dd5001c566002607a0031323259800982980140122c8280dd6982880098269baa0038b2094412882504cdd78009818198269ba80044bd7018251baa0013259800981f98251baa0018982718259baa0018b20903232330010013756601c60986ea810c896600200314c0103d87a80008992cc004cdd78021826800c4c0cccc140c1380052f5c11330030033052002412c60a00028270c028cc130c134c128dd5000a5eb822b30013301649114496e636f727265637420676f76206f75747075740098009bac302e304a3754083300a3304c0174bd704c024cc130c8c8c8c0c8cc13cc14000ccc13cc140008cc13cc140004cc13cc140c144004cc13cdd419b80375a6054609a6ea809920014bd701828000982780098251baa0234bd704c010c134c128dd5028530103d87a8000401513301649013b4d757374206275726e203120706f6c6c20746f6b656e20616e64206f7074696f6e616c6c79206d696e7420616e207570677261646520746f6b656e005980098041ba63300630073004302c304a37540a06008605c60946ea81422946260106e98c01cc010c0b0c128dd5028208e8a50411d14a0823a29410471826000c5904a1bad304a30473754083300137586094608e6ea80fa6052608e6ea8136980103d87980004089159800981b80944cc04d24011d5370656e642065786163746c792031205570677261646520546f6b656e00303f323322330020020012259800800c52000899b8033002002304e0013300d3756605860946ea8c0b0c128dd51826800801a0963758609660906ea80fcc0acc11cdd5026c54cc1152410472646d72001641108221044111111919800800998158032cc004c0fcc128dd5002c48c8cdd7982818269baa3050304d3754004002609e60986ea801a246466ebcc140c134dd5001000982798261baa006412044b30010018a508acc004c96600266ebcc0c4c134dd500080344c96600200314a31598009829000c4c8ca60026eb8c14c0066eb4c14cc1500066eb8c14c0092225980099b8f001489008acc004cdc7801a441008acc004c11cc148dd50054566002603000513371200490404df701452820a08980c00120a08a50414114a0828060a60026eb0c144006294104f209e32330010013300a37566060609c6ea8008c02c018896600200314bd7044c8cc88cc88cc008008004896600200310038991982b9ba733057375200a660ae60a8002660ae60aa00297ae0330030033059002305700141546eacc14800cdd7182780099801801982a0011829000a0a08a504128609e00314a3133002002305000141248268a60026eb8c124c118dd5000cdd7181418231baa001a400480508c8cc004004008896600200314bd6f7b63044c8cc124cdd818230009ba632330010013756609000444b30010018a5eb7bdb1822646609866ec0c124004dd418081bad304a00133003003304e002304c00141286600600660960046092002823888ca60020030038012002222598008014400626530010049826801e6002005375c609000337566092003222223259800980b800c00a260060028260c8ca6002003006802a00222259800801440062653001004982b801e6002005375c60a4003375a60a600300540748020c154009053280aa02440106096004824914a08190c0d8c0ccdd5180a98199baa0012259800800c40062a6606600420028190c0d4c0c8dd5000c5902f198059bac30343031375405003f1640c83030001302f001302e001302d001302837540031640946054604e6ea80522c8121024111191980480211801180618151baa00159800980e18139baa00189198029bab300b3029375400200712300898009bab300b30293754003375c605860526ea800e6eb8c02cc0a4dd5001a014409444646600200200644b30010018a6103d87a80008992cc004cdd7981698151baa0010048980799816000a5eb82266006006605c0048138c0b000502a11180f4c00400a6eb8c0a4c098dd5000cdd7180418131baa001401c2232598009809000c4c966002604600313300930220010038b2040301e3754007159800980b000c4c966002604600313300730220010038b2040301e37540071598009807000c4c8c96600260480050048b2042375c6044002603c6ea800e2c80d901b2036301c375400444b30013010301b3754005132323232323232323232323298009815800cdd698158064dd69815805cdd698158054dd69815804cdd698158044dd69815803cdd698158034dd69815802cdd698158024dd69815801244444444444b3001303700c89980f981b00709980d00580c4590340c0ac004c0a8004c0a4004c0a0004c09c004c098004c094004c090004c08c004c088004c084004c070dd50014590191802002116401c300900130043754013149a26cac8009"
8971
- };
8972
-
8973
- // src/contracts/gov/scripts.ts
8974
- var mkGovValidatorFromSP = (params) => {
8975
- return {
8976
- type: "PlutusV3",
8977
- script: (0, import_lucid58.applyParamsToScript)(_governanceValidator.cborHex, [
8978
- castGovParams({
8979
- gBiasTime: BigInt(params.gBiasTime),
8980
- govNFT: fromSystemParamsAssetLucid(params.govNFT),
8981
- pollToken: fromSystemParamsAssetLucid(params.pollToken),
8982
- upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
8983
- indyAsset: fromSystemParamsAssetLucid(params.indyAsset),
8984
- versionRecordToken: fromSystemParamsAssetLucid(
8985
- params.versionRecordToken
8986
- ),
8987
- iassetSymbol: params.iassetSymbol.unCurrencySymbol,
8988
- iassetValHash: params.iassetValHash,
8989
- pollManagerValHash: params.pollManagerValHash,
8990
- daoIdentityToken: fromSystemParamsAssetLucid(params.daoIdentityToken),
8991
- iAssetAuthToken: fromSystemParamsAssetLucid(params.iAssetAuthToken)
8992
- })
8993
- ])
8994
- };
8995
- };
8996
-
8997
9012
  // src/contracts/initialize/helpers.ts
8998
9013
  var import_ts_pattern21 = require("ts-pattern");
8999
9014
 
@@ -9440,6 +9455,14 @@ var _stableswapValidator = {
9440
9455
  };
9441
9456
 
9442
9457
  // src/contracts/stableswap/scripts.ts
9458
+ var mkStableswapValidator = (params) => {
9459
+ return {
9460
+ type: "PlutusV3",
9461
+ script: (0, import_lucid62.applyParamsToScript)(_stableswapValidator.cborHex, [
9462
+ castStableswapParams(params)
9463
+ ])
9464
+ };
9465
+ };
9443
9466
  var mkStableswapValidatorFromSP = (params) => {
9444
9467
  return {
9445
9468
  type: "PlutusV3",
@@ -10707,6 +10730,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
10707
10730
  ExecuteParams,
10708
10731
  GovParams,
10709
10732
  IAssetPriceInfoSchema,
10733
+ IAssetScriptParams,
10710
10734
  INIT_TOKEN_NAMES,
10711
10735
  InterestCollectionParamsSchema,
10712
10736
  InterestOracleDatumSchema,
@@ -10746,6 +10770,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
10746
10770
  adjustStakingPosition,
10747
10771
  alwaysFailValidator,
10748
10772
  annulRequest,
10773
+ attachOracle,
10749
10774
  balance,
10750
10775
  batchCollectInterest,
10751
10776
  batchProcessStableswapOrders,
@@ -10859,7 +10884,10 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
10859
10884
  mkCollectorValidatorFromSP,
10860
10885
  mkExecuteValidator,
10861
10886
  mkExecuteValidatorFromSP,
10887
+ mkGovValidator,
10888
+ mkGovValidatorFromSP,
10862
10889
  mkIAssetTokenPolicy,
10890
+ mkIAssetValidatorFromSP,
10863
10891
  mkInterestCollectionValidator,
10864
10892
  mkInterestCollectionValidatorFromSP,
10865
10893
  mkInterestOracleValidator,
@@ -10875,6 +10903,8 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
10875
10903
  mkStabilityPoolAddr,
10876
10904
  mkStabilityPoolValidator,
10877
10905
  mkStabilityPoolValidatorFromSP,
10906
+ mkStableswapValidator,
10907
+ mkStableswapValidatorFromSP,
10878
10908
  mkStakingValidatorFromSP,
10879
10909
  mkTreasuryAddr,
10880
10910
  mkTreasuryValidatorFromSP,