@indigo-labs/indigo-sdk 0.3.4 → 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.d.mts +98 -50
- package/dist/index.d.ts +98 -50
- package/dist/index.js +258 -216
- package/dist/index.mjs +92 -59
- package/package.json +1 -1
- package/src/index.ts +5 -0
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,
|
|
@@ -213,6 +218,10 @@ __export(index_exports, {
|
|
|
213
218
|
mkRobValidatorFromSP: () => mkRobValidatorFromSP,
|
|
214
219
|
mkSPInteger: () => mkSPInteger,
|
|
215
220
|
mkStabilityPoolAddr: () => mkStabilityPoolAddr,
|
|
221
|
+
mkStabilityPoolValidator: () => mkStabilityPoolValidator,
|
|
222
|
+
mkStabilityPoolValidatorFromSP: () => mkStabilityPoolValidatorFromSP,
|
|
223
|
+
mkStableswapValidator: () => mkStableswapValidator,
|
|
224
|
+
mkStableswapValidatorFromSP: () => mkStableswapValidatorFromSP,
|
|
216
225
|
mkStakingValidatorFromSP: () => mkStakingValidatorFromSP,
|
|
217
226
|
mkTreasuryAddr: () => mkTreasuryAddr,
|
|
218
227
|
mkTreasuryValidatorFromSP: () => mkTreasuryValidatorFromSP,
|
|
@@ -1280,6 +1289,14 @@ var _stabilityPoolValidator = {
|
|
|
1280
1289
|
};
|
|
1281
1290
|
|
|
1282
1291
|
// src/contracts/stability-pool/scripts.ts
|
|
1292
|
+
var mkStabilityPoolValidator = (params) => {
|
|
1293
|
+
return {
|
|
1294
|
+
type: "PlutusV3",
|
|
1295
|
+
script: (0, import_lucid7.applyParamsToScript)(_stabilityPoolValidator.cborHex, [
|
|
1296
|
+
castStabilityPoolParams(params)
|
|
1297
|
+
])
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1283
1300
|
var mkStabilityPoolValidatorFromSP = (params) => {
|
|
1284
1301
|
return {
|
|
1285
1302
|
type: "PlutusV3",
|
|
@@ -6925,21 +6942,63 @@ function castGovParams(params) {
|
|
|
6925
6942
|
return import_lucid27.Data.castTo(params, GovParams);
|
|
6926
6943
|
}
|
|
6927
6944
|
|
|
6928
|
-
// src/contracts/
|
|
6945
|
+
// src/contracts/gov/scripts.ts
|
|
6929
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");
|
|
6930
6989
|
var import_cardano_offchain_common18 = require("@3rd-eye-labs/cardano-offchain-common");
|
|
6931
6990
|
var import_ts_pattern18 = require("ts-pattern");
|
|
6932
6991
|
async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
|
|
6933
6992
|
const [pkh, _skh] = await addrDetails(lucid);
|
|
6934
|
-
const iasset = (0,
|
|
6993
|
+
const iasset = (0, import_lucid29.fromHex)((0, import_lucid29.fromText)(assetAscii));
|
|
6935
6994
|
const iassetAssetClass = {
|
|
6936
|
-
currencySymbol: (0,
|
|
6995
|
+
currencySymbol: (0, import_lucid29.fromHex)(
|
|
6937
6996
|
sysParams.stabilityPoolParams.assetSymbol.unCurrencySymbol
|
|
6938
6997
|
),
|
|
6939
6998
|
tokenName: iasset
|
|
6940
6999
|
};
|
|
6941
7000
|
const datum = {
|
|
6942
|
-
owner: (0,
|
|
7001
|
+
owner: (0, import_lucid29.fromHex)(pkh.hash),
|
|
6943
7002
|
iasset,
|
|
6944
7003
|
state: initSpState,
|
|
6945
7004
|
assetSums: [],
|
|
@@ -6947,8 +7006,8 @@ async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
|
|
|
6947
7006
|
lastRequestProcessingTime: 0n
|
|
6948
7007
|
};
|
|
6949
7008
|
return lucid.newTx().pay.ToContract(
|
|
6950
|
-
(0,
|
|
6951
|
-
hash: (0,
|
|
7009
|
+
(0, import_lucid29.credentialToAddress)(lucid.config().network, {
|
|
7010
|
+
hash: (0, import_lucid29.validatorToScriptHash)(
|
|
6952
7011
|
mkStabilityPoolValidatorFromSP(sysParams.stabilityPoolParams)
|
|
6953
7012
|
),
|
|
6954
7013
|
type: "Script"
|
|
@@ -6957,7 +7016,7 @@ async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
|
|
|
6957
7016
|
kind: "inline",
|
|
6958
7017
|
value: serialiseStabilityPoolDatum({ Account: datum })
|
|
6959
7018
|
},
|
|
6960
|
-
(0,
|
|
7019
|
+
(0, import_lucid29.addAssets)(
|
|
6961
7020
|
(0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, amount),
|
|
6962
7021
|
(0, import_cardano_offchain_common18.mkLovelacesOf)(
|
|
6963
7022
|
// TODO: Calculate a more accurate amount to just cover costs.
|
|
@@ -7006,7 +7065,7 @@ async function requestSpAccountAdjustment(amount, accountUtxo, sysParams, lucid)
|
|
|
7006
7065
|
Account: newAccountDatum
|
|
7007
7066
|
})
|
|
7008
7067
|
},
|
|
7009
|
-
(0,
|
|
7068
|
+
(0, import_lucid29.addAssets)(
|
|
7010
7069
|
(0, import_cardano_offchain_common18.mkLovelacesOf)(
|
|
7011
7070
|
// TODO: Calculate a more accurate amount to just cover costs.
|
|
7012
7071
|
7000000n
|
|
@@ -7017,7 +7076,7 @@ async function requestSpAccountAdjustment(amount, accountUtxo, sysParams, lucid)
|
|
|
7017
7076
|
),
|
|
7018
7077
|
amount > 0n ? (0, import_cardano_offchain_common18.mkAssetsOf)(
|
|
7019
7078
|
{
|
|
7020
|
-
currencySymbol: (0,
|
|
7079
|
+
currencySymbol: (0, import_lucid29.fromHex)(
|
|
7021
7080
|
sysParams.stabilityPoolParams.assetSymbol.unCurrencySymbol
|
|
7022
7081
|
),
|
|
7023
7082
|
tokenName: oldAccountDatum.iasset
|
|
@@ -7025,7 +7084,7 @@ async function requestSpAccountAdjustment(amount, accountUtxo, sysParams, lucid)
|
|
|
7025
7084
|
amount
|
|
7026
7085
|
) : {}
|
|
7027
7086
|
)
|
|
7028
|
-
).addSignerKey((0,
|
|
7087
|
+
).addSignerKey((0, import_lucid29.toHex)(oldAccountDatum.owner));
|
|
7029
7088
|
}
|
|
7030
7089
|
async function requestSpAccountClosure(accountUtxo, sysParams, lucid, maxTxFee = BASE_MAX_TX_FEE) {
|
|
7031
7090
|
const myAddress = await lucid.wallet().address();
|
|
@@ -7059,7 +7118,7 @@ async function requestSpAccountClosure(accountUtxo, sysParams, lucid, maxTxFee =
|
|
|
7059
7118
|
kind: "inline",
|
|
7060
7119
|
value: serialiseStabilityPoolDatum({ Account: newAccountDatum })
|
|
7061
7120
|
},
|
|
7062
|
-
(0,
|
|
7121
|
+
(0, import_lucid29.addAssets)(
|
|
7063
7122
|
(0, import_cardano_offchain_common18.mkLovelacesOf)(
|
|
7064
7123
|
// TODO: Calculate a more accurate amount to just cover costs.
|
|
7065
7124
|
5000000n
|
|
@@ -7069,11 +7128,11 @@ async function requestSpAccountClosure(accountUtxo, sysParams, lucid, maxTxFee =
|
|
|
7069
7128
|
1n
|
|
7070
7129
|
)
|
|
7071
7130
|
)
|
|
7072
|
-
).addSignerKey((0,
|
|
7131
|
+
).addSignerKey((0, import_lucid29.toHex)(oldAccountDatum.owner));
|
|
7073
7132
|
}
|
|
7074
7133
|
async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE2s2sSnapshotOrefs, sysParams, lucid, currentSlot) {
|
|
7075
7134
|
const network = lucid.config().network;
|
|
7076
|
-
const currentTime = BigInt((0,
|
|
7135
|
+
const currentTime = BigInt((0, import_lucid29.slotToUnixTime)(network, currentSlot));
|
|
7077
7136
|
const stabilityPoolScriptRef = (0, import_cardano_offchain_common18.matchSingle)(
|
|
7078
7137
|
await lucid.utxosByOutRef([
|
|
7079
7138
|
fromSystemParamsScriptRef(
|
|
@@ -7089,7 +7148,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7089
7148
|
getInlineDatumOrThrow(stabilityPoolUtxo)
|
|
7090
7149
|
);
|
|
7091
7150
|
const baseRefInputs = [iAssetUtxo, stabilityPoolScriptRef];
|
|
7092
|
-
const validFrom = (0,
|
|
7151
|
+
const validFrom = (0, import_lucid29.slotToUnixTime)(network, currentSlot - 1);
|
|
7093
7152
|
const tx = lucid.newTx().validFrom(validFrom).validTo(validFrom + sysParams.stabilityPoolParams.accountProcessingBiasMs).readFrom(baseRefInputs).collectFrom([stabilityPoolUtxo], {
|
|
7094
7153
|
kind: "selected",
|
|
7095
7154
|
inputs: [stabilityPoolUtxo, accountUtxo],
|
|
@@ -7102,7 +7161,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7102
7161
|
});
|
|
7103
7162
|
if (!accountDatum.request) throw new Error("Account Request is null");
|
|
7104
7163
|
const iassetAssetClass = {
|
|
7105
|
-
currencySymbol: (0,
|
|
7164
|
+
currencySymbol: (0, import_lucid29.fromHex)(
|
|
7106
7165
|
sysParams.stabilityPoolParams.assetSymbol.unCurrencySymbol
|
|
7107
7166
|
),
|
|
7108
7167
|
tokenName: stabilityPoolDatum.iasset
|
|
@@ -7137,7 +7196,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7137
7196
|
fromSystemParamsAsset(sysParams.stabilityPoolParams.accountToken),
|
|
7138
7197
|
1n
|
|
7139
7198
|
),
|
|
7140
|
-
|
|
7199
|
+
import_lucid29.Data.void()
|
|
7141
7200
|
).pay.ToContract(
|
|
7142
7201
|
poolAddr,
|
|
7143
7202
|
{
|
|
@@ -7160,7 +7219,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7160
7219
|
)
|
|
7161
7220
|
})
|
|
7162
7221
|
},
|
|
7163
|
-
(0,
|
|
7222
|
+
(0, import_lucid29.addAssets)(
|
|
7164
7223
|
stabilityPoolUtxo.assets,
|
|
7165
7224
|
(0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, requestDepositAmt),
|
|
7166
7225
|
(0, import_cardano_offchain_common18.mkLovelacesOf)(
|
|
@@ -7188,7 +7247,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7188
7247
|
}
|
|
7189
7248
|
})
|
|
7190
7249
|
},
|
|
7191
|
-
(0,
|
|
7250
|
+
(0, import_lucid29.addAssets)(
|
|
7192
7251
|
(0, import_cardano_offchain_common18.mkAssetsOf)(
|
|
7193
7252
|
fromSystemParamsAsset(sysParams.stabilityPoolParams.accountToken),
|
|
7194
7253
|
1n
|
|
@@ -7265,13 +7324,13 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7265
7324
|
}
|
|
7266
7325
|
})
|
|
7267
7326
|
},
|
|
7268
|
-
(0,
|
|
7327
|
+
(0, import_lucid29.addAssets)(
|
|
7269
7328
|
stabilityPoolUtxo.assets,
|
|
7270
7329
|
(0, import_cardano_offchain_common18.negateAssets)(reward),
|
|
7271
7330
|
(0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, accountBalanceChange + withdrawalFeeAmt)
|
|
7272
7331
|
)
|
|
7273
7332
|
);
|
|
7274
|
-
const theoreticalOwnerOutputVal = (0,
|
|
7333
|
+
const theoreticalOwnerOutputVal = (0, import_lucid29.addAssets)(
|
|
7275
7334
|
reward,
|
|
7276
7335
|
isDepositOrRewardWithdrawal ? {} : (0, import_cardano_offchain_common18.mkAssetsOf)(
|
|
7277
7336
|
iassetAssetClass,
|
|
@@ -7280,7 +7339,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7280
7339
|
);
|
|
7281
7340
|
const ownerOutputDat = serialiseActionReturnDatum({
|
|
7282
7341
|
IndigoStabilityPoolAccountAdjustment: {
|
|
7283
|
-
txHash: (0,
|
|
7342
|
+
txHash: (0, import_lucid29.fromHex)(accountUtxo.txHash),
|
|
7284
7343
|
outputIndex: BigInt(accountUtxo.outputIndex)
|
|
7285
7344
|
}
|
|
7286
7345
|
});
|
|
@@ -7291,7 +7350,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7291
7350
|
{ InlineDatum: { datum: ownerOutputDat } }
|
|
7292
7351
|
);
|
|
7293
7352
|
const extraOwnerOutputLovelacesAmt = (0, import_cardano_offchain_common18.lovelacesAmt)(theoreticalOwnerOutputVal) >= ownerOutputMinUtxoLovelace ? 0n : ownerOutputMinUtxoLovelace - (0, import_cardano_offchain_common18.lovelacesAmt)(theoreticalOwnerOutputVal);
|
|
7294
|
-
const actualOwnerOutputVal = (0,
|
|
7353
|
+
const actualOwnerOutputVal = (0, import_lucid29.addAssets)(
|
|
7295
7354
|
theoreticalOwnerOutputVal,
|
|
7296
7355
|
(0, import_cardano_offchain_common18.mkLovelacesOf)(extraOwnerOutputLovelacesAmt)
|
|
7297
7356
|
);
|
|
@@ -7329,7 +7388,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7329
7388
|
kind: "inline",
|
|
7330
7389
|
value: accountOutputDat
|
|
7331
7390
|
},
|
|
7332
|
-
(0,
|
|
7391
|
+
(0, import_lucid29.addAssets)(
|
|
7333
7392
|
accountOutputValWithoutAda,
|
|
7334
7393
|
(0, import_cardano_offchain_common18.mkLovelacesOf)(accountOutputAdaAmt)
|
|
7335
7394
|
)
|
|
@@ -7409,7 +7468,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7409
7468
|
fromSystemParamsAsset(sysParams.stabilityPoolParams.accountToken),
|
|
7410
7469
|
-1n
|
|
7411
7470
|
),
|
|
7412
|
-
|
|
7471
|
+
import_lucid29.Data.void()
|
|
7413
7472
|
).pay.ToContract(
|
|
7414
7473
|
stabilityPoolUtxo.address,
|
|
7415
7474
|
{
|
|
@@ -7421,7 +7480,7 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7421
7480
|
}
|
|
7422
7481
|
})
|
|
7423
7482
|
},
|
|
7424
|
-
(0,
|
|
7483
|
+
(0, import_lucid29.addAssets)(
|
|
7425
7484
|
stabilityPoolUtxo.assets,
|
|
7426
7485
|
(0, import_cardano_offchain_common18.negateAssets)(reward),
|
|
7427
7486
|
(0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, -withdrawnAmt + withdrawalFeeAmt)
|
|
@@ -7432,12 +7491,12 @@ async function processSpRequest(stabilityPoolUtxo, accountUtxo, iAssetUtxo, allE
|
|
|
7432
7491
|
kind: "inline",
|
|
7433
7492
|
value: serialiseActionReturnDatum({
|
|
7434
7493
|
IndigoStabilityPoolAccountClosure: {
|
|
7435
|
-
txHash: (0,
|
|
7494
|
+
txHash: (0, import_lucid29.fromHex)(accountUtxo.txHash),
|
|
7436
7495
|
outputIndex: BigInt(accountUtxo.outputIndex)
|
|
7437
7496
|
}
|
|
7438
7497
|
})
|
|
7439
7498
|
},
|
|
7440
|
-
(0,
|
|
7499
|
+
(0, import_lucid29.addAssets)(
|
|
7441
7500
|
(0, import_cardano_offchain_common18.mkLovelacesOf)((0, import_cardano_offchain_common18.lovelacesAmt)(accountUtxo.assets)),
|
|
7442
7501
|
reward,
|
|
7443
7502
|
(0, import_cardano_offchain_common18.mkAssetsOf)(iassetAssetClass, withdrawnAmt - withdrawalFeeAmt)
|
|
@@ -7480,7 +7539,7 @@ async function createE2s2sSnapshots(stabilityPoolOref, sysParams, lucid) {
|
|
|
7480
7539
|
serialiseStabilityPoolRedeemer("RecordEpochToScaleToSum")
|
|
7481
7540
|
).mintAssets(
|
|
7482
7541
|
(0, import_cardano_offchain_common18.mkAssetsOf)(snapshotAc, BigInt(newSnapshotDatums.length)),
|
|
7483
|
-
|
|
7542
|
+
import_lucid29.Data.void()
|
|
7484
7543
|
).pay.ToContract(
|
|
7485
7544
|
spUtxo.address,
|
|
7486
7545
|
{
|
|
@@ -7517,7 +7576,7 @@ async function annulRequest(accountUtxo, params, lucid) {
|
|
|
7517
7576
|
const oldAccountDatum = parseAccountDatumOrThrow(
|
|
7518
7577
|
getInlineDatumOrThrow(accountUtxo)
|
|
7519
7578
|
);
|
|
7520
|
-
const tx = lucid.newTx().readFrom([stabilityPoolRefScriptUtxo]).collectFrom([accountUtxo], serialiseStabilityPoolRedeemer("AnnulRequest")).addSignerKey((0,
|
|
7579
|
+
const tx = lucid.newTx().readFrom([stabilityPoolRefScriptUtxo]).collectFrom([accountUtxo], serialiseStabilityPoolRedeemer("AnnulRequest")).addSignerKey((0, import_lucid29.toHex)(oldAccountDatum.owner));
|
|
7521
7580
|
if (oldAccountDatum.request !== "Create") {
|
|
7522
7581
|
tx.pay.ToContract(
|
|
7523
7582
|
accountUtxo.address,
|
|
@@ -7540,7 +7599,7 @@ async function annulRequest(accountUtxo, params, lucid) {
|
|
|
7540
7599
|
}
|
|
7541
7600
|
|
|
7542
7601
|
// src/contracts/staking/transactions.ts
|
|
7543
|
-
var
|
|
7602
|
+
var import_lucid30 = require("@lucid-evolution/lucid");
|
|
7544
7603
|
var import_cardano_offchain_common19 = require("@3rd-eye-labs/cardano-offchain-common");
|
|
7545
7604
|
async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
|
|
7546
7605
|
const [pkh, _] = await addrDetails(lucid);
|
|
@@ -7566,18 +7625,18 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
|
|
|
7566
7625
|
}
|
|
7567
7626
|
};
|
|
7568
7627
|
const stakingPositionDatum = {
|
|
7569
|
-
owner: (0,
|
|
7628
|
+
owner: (0, import_lucid30.fromHex)(pkh.hash),
|
|
7570
7629
|
lockedAmount: [],
|
|
7571
7630
|
positionSnapshot: {
|
|
7572
7631
|
snapshotAda: stakingManagerOut.datum.managerSnapshot.snapshotAda
|
|
7573
7632
|
}
|
|
7574
7633
|
};
|
|
7575
|
-
const stakingToken = params.stakingParams.stakingToken[0].unCurrencySymbol + (0,
|
|
7576
|
-
const indyToken = params.stakingParams.indyToken[0].unCurrencySymbol + (0,
|
|
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);
|
|
7577
7636
|
return lucid.newTx().collectFrom(
|
|
7578
7637
|
[stakingManagerOut.utxo],
|
|
7579
7638
|
serialiseStakingRedeemer({
|
|
7580
|
-
CreateStakingPosition: { creatorPkh: (0,
|
|
7639
|
+
CreateStakingPosition: { creatorPkh: (0, import_lucid30.fromHex)(pkh.hash) }
|
|
7581
7640
|
})
|
|
7582
7641
|
).readFrom([stakingRefScriptUtxo]).pay.ToContract(
|
|
7583
7642
|
stakingManagerOut.utxo.address,
|
|
@@ -7590,7 +7649,7 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
|
|
|
7590
7649
|
{
|
|
7591
7650
|
[stakingToken]: 1n
|
|
7592
7651
|
},
|
|
7593
|
-
|
|
7652
|
+
import_lucid30.Data.void()
|
|
7594
7653
|
).pay.ToContract(
|
|
7595
7654
|
stakingManagerOut.utxo.address,
|
|
7596
7655
|
{
|
|
@@ -7605,7 +7664,7 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
|
|
|
7605
7664
|
}
|
|
7606
7665
|
async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, currentSlot, stakingManagerRef) {
|
|
7607
7666
|
const network = lucid.config().network;
|
|
7608
|
-
const now = BigInt((0,
|
|
7667
|
+
const now = BigInt((0, import_lucid30.slotToUnixTime)(network, currentSlot));
|
|
7609
7668
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
7610
7669
|
stakingPositionRef,
|
|
7611
7670
|
lucid
|
|
@@ -7644,7 +7703,7 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
|
|
|
7644
7703
|
totalStake: stakingManagerOut.datum.totalStake + amount
|
|
7645
7704
|
})
|
|
7646
7705
|
},
|
|
7647
|
-
(0,
|
|
7706
|
+
(0, import_lucid30.addAssets)(stakingManagerOut.utxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(-adaReward))
|
|
7648
7707
|
).pay.ToContract(
|
|
7649
7708
|
stakingPositionOut.utxo.address,
|
|
7650
7709
|
{
|
|
@@ -7654,12 +7713,12 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
|
|
|
7654
7713
|
lockedAmount: newLockedAmount
|
|
7655
7714
|
})
|
|
7656
7715
|
},
|
|
7657
|
-
(0,
|
|
7658
|
-
).addSignerKey((0,
|
|
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));
|
|
7659
7718
|
}
|
|
7660
7719
|
async function closeStakingPosition(stakingPositionRef, params, lucid, currentSlot, stakingManagerRef) {
|
|
7661
7720
|
const network = lucid.config().network;
|
|
7662
|
-
const now = BigInt((0,
|
|
7721
|
+
const now = BigInt((0, import_lucid30.slotToUnixTime)(network, currentSlot));
|
|
7663
7722
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
7664
7723
|
stakingPositionRef,
|
|
7665
7724
|
lucid
|
|
@@ -7701,11 +7760,11 @@ async function closeStakingPosition(stakingPositionRef, params, lucid, currentSl
|
|
|
7701
7760
|
totalStake: stakingManagerOut.datum.totalStake - existingIndyAmount
|
|
7702
7761
|
})
|
|
7703
7762
|
},
|
|
7704
|
-
(0,
|
|
7763
|
+
(0, import_lucid30.addAssets)(stakingManagerOut.utxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(-adaReward))
|
|
7705
7764
|
).mintAssets(
|
|
7706
7765
|
(0, import_cardano_offchain_common19.mkAssetsOf)(fromSystemParamsAsset(params.stakingParams.stakingToken), -1n),
|
|
7707
|
-
|
|
7708
|
-
).addSignerKey((0,
|
|
7766
|
+
import_lucid30.Data.void()
|
|
7767
|
+
).addSignerKey((0, import_lucid30.toHex)(stakingPositionOut.datum.owner));
|
|
7709
7768
|
}
|
|
7710
7769
|
var MIN_UTXO_AMOUNT = 2000000n;
|
|
7711
7770
|
async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
|
|
@@ -7713,7 +7772,7 @@ async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
|
|
|
7713
7772
|
const stakingManagerDatum = parseStakingManagerDatum(
|
|
7714
7773
|
(0, import_cardano_offchain_common19.getInlineDatumOrThrow)(stakingManagerUtxo)
|
|
7715
7774
|
);
|
|
7716
|
-
const collectorUtxos = (await lucid.utxosByOutRef(collectorRefs)).filter((utxo) => utxo.datum && utxo.datum ===
|
|
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);
|
|
7717
7776
|
if (collectorUtxos.length === 0) {
|
|
7718
7777
|
throw new Error("No available collectors found");
|
|
7719
7778
|
}
|
|
@@ -7750,12 +7809,12 @@ async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
|
|
|
7750
7809
|
managerSnapshot: { snapshotAda: newSnapshot }
|
|
7751
7810
|
})
|
|
7752
7811
|
},
|
|
7753
|
-
(0,
|
|
7812
|
+
(0, import_lucid30.addAssets)(stakingManagerUtxo.assets, (0, import_cardano_offchain_common19.mkLovelacesOf)(adaRewardCollected))
|
|
7754
7813
|
);
|
|
7755
7814
|
for (const collectorUtxo of collectorUtxos) {
|
|
7756
7815
|
tx.pay.ToContract(
|
|
7757
7816
|
collectorUtxo.address,
|
|
7758
|
-
{ kind: "inline", value:
|
|
7817
|
+
{ kind: "inline", value: import_lucid30.Data.void() },
|
|
7759
7818
|
(0, import_cardano_offchain_common19.mkLovelacesOf)(MIN_UTXO_AMOUNT)
|
|
7760
7819
|
);
|
|
7761
7820
|
}
|
|
@@ -7763,47 +7822,47 @@ async function distributeAda(stakingManagerRef, collectorRefs, params, lucid) {
|
|
|
7763
7822
|
}
|
|
7764
7823
|
|
|
7765
7824
|
// src/contracts/staking/types.ts
|
|
7766
|
-
var
|
|
7767
|
-
var StakingParamsSchema =
|
|
7825
|
+
var import_lucid31 = require("@lucid-evolution/lucid");
|
|
7826
|
+
var StakingParamsSchema = import_lucid31.Data.Object({
|
|
7768
7827
|
stakingManagerNft: AssetClassSchema2,
|
|
7769
7828
|
stakingToken: AssetClassSchema2,
|
|
7770
7829
|
indyToken: AssetClassSchema2,
|
|
7771
7830
|
pollToken: AssetClassSchema2,
|
|
7772
7831
|
versionRecordToken: AssetClassSchema2,
|
|
7773
|
-
collectorValHash:
|
|
7832
|
+
collectorValHash: import_lucid31.Data.Bytes()
|
|
7774
7833
|
});
|
|
7775
7834
|
var StakingParams = StakingParamsSchema;
|
|
7776
7835
|
function castStakingParams(params) {
|
|
7777
|
-
return
|
|
7836
|
+
return import_lucid31.Data.castTo(params, StakingParams);
|
|
7778
7837
|
}
|
|
7779
7838
|
|
|
7780
7839
|
// src/contracts/interest-oracle/transactions.ts
|
|
7781
|
-
var
|
|
7840
|
+
var import_lucid37 = require("@lucid-evolution/lucid");
|
|
7782
7841
|
|
|
7783
7842
|
// src/contracts/one-shot/transactions.ts
|
|
7784
|
-
var
|
|
7843
|
+
var import_lucid34 = require("@lucid-evolution/lucid");
|
|
7785
7844
|
|
|
7786
7845
|
// src/contracts/one-shot/scripts.ts
|
|
7787
|
-
var
|
|
7846
|
+
var import_lucid33 = require("@lucid-evolution/lucid");
|
|
7788
7847
|
|
|
7789
7848
|
// src/contracts/one-shot/types.ts
|
|
7790
|
-
var
|
|
7791
|
-
var OneShotParamsSchema =
|
|
7792
|
-
referenceOutRef:
|
|
7793
|
-
txHash:
|
|
7794
|
-
outputIdx:
|
|
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()
|
|
7795
7854
|
}),
|
|
7796
|
-
mintAmounts:
|
|
7797
|
-
|
|
7855
|
+
mintAmounts: import_lucid32.Data.Array(
|
|
7856
|
+
import_lucid32.Data.Object({
|
|
7798
7857
|
/// Use hex encoded string
|
|
7799
|
-
tokenName:
|
|
7800
|
-
amount:
|
|
7858
|
+
tokenName: import_lucid32.Data.Bytes(),
|
|
7859
|
+
amount: import_lucid32.Data.Integer()
|
|
7801
7860
|
})
|
|
7802
7861
|
)
|
|
7803
7862
|
});
|
|
7804
7863
|
var OneShotParams = OneShotParamsSchema;
|
|
7805
7864
|
function castOneShotParams(params) {
|
|
7806
|
-
return
|
|
7865
|
+
return import_lucid32.Data.castTo(params, OneShotParams);
|
|
7807
7866
|
}
|
|
7808
7867
|
|
|
7809
7868
|
// src/contracts/one-shot/scripts.ts
|
|
@@ -7814,7 +7873,7 @@ var oneShotPolicyData = {
|
|
|
7814
7873
|
function mkOneShotPolicy(params) {
|
|
7815
7874
|
return {
|
|
7816
7875
|
type: oneShotPolicyData.type,
|
|
7817
|
-
script: (0,
|
|
7876
|
+
script: (0, import_lucid33.applyParamsToScript)(oneShotPolicyData.cborHex, [
|
|
7818
7877
|
castOneShotParams(params)
|
|
7819
7878
|
])
|
|
7820
7879
|
};
|
|
@@ -7824,7 +7883,7 @@ function mkOneShotPolicy(params) {
|
|
|
7824
7883
|
var import_Array = require("fp-ts/lib/Array");
|
|
7825
7884
|
async function oneShotMintTx(lucid, params) {
|
|
7826
7885
|
const oneShotPolicy = mkOneShotPolicy(params);
|
|
7827
|
-
const policyId = (0,
|
|
7886
|
+
const policyId = (0, import_lucid34.mintingPolicyToId)(oneShotPolicy);
|
|
7828
7887
|
const refUtxo = matchSingle(
|
|
7829
7888
|
await lucid.utxosByOutRef([
|
|
7830
7889
|
{
|
|
@@ -7840,11 +7899,11 @@ async function oneShotMintTx(lucid, params) {
|
|
|
7840
7899
|
lucid.newTx().collectFrom([refUtxo]).mintAssets(
|
|
7841
7900
|
(0, import_Array.reduce)(
|
|
7842
7901
|
{},
|
|
7843
|
-
(acc, entry) => (0,
|
|
7844
|
-
[(0,
|
|
7902
|
+
(acc, entry) => (0, import_lucid34.addAssets)(acc, {
|
|
7903
|
+
[(0, import_lucid34.toUnit)(policyId, entry.tokenName)]: entry.amount
|
|
7845
7904
|
})
|
|
7846
7905
|
)(params.mintAmounts),
|
|
7847
|
-
|
|
7906
|
+
import_lucid34.Data.void()
|
|
7848
7907
|
).attach.MintingPolicy(oneShotPolicy),
|
|
7849
7908
|
policyId
|
|
7850
7909
|
];
|
|
@@ -7857,18 +7916,18 @@ async function runOneShotMintTx(lucid, params) {
|
|
|
7857
7916
|
}
|
|
7858
7917
|
|
|
7859
7918
|
// src/contracts/interest-oracle/scripts.ts
|
|
7860
|
-
var
|
|
7919
|
+
var import_lucid36 = require("@lucid-evolution/lucid");
|
|
7861
7920
|
|
|
7862
7921
|
// src/contracts/interest-oracle/types.ts
|
|
7863
|
-
var
|
|
7864
|
-
var InterestOracleParamsSchema =
|
|
7922
|
+
var import_lucid35 = require("@lucid-evolution/lucid");
|
|
7923
|
+
var InterestOracleParamsSchema = import_lucid35.Data.Object({
|
|
7865
7924
|
/** Milliseconds */
|
|
7866
|
-
biasTime:
|
|
7867
|
-
owner:
|
|
7925
|
+
biasTime: import_lucid35.Data.Integer(),
|
|
7926
|
+
owner: import_lucid35.Data.Bytes()
|
|
7868
7927
|
});
|
|
7869
7928
|
var InterestOracleParams = InterestOracleParamsSchema;
|
|
7870
7929
|
function castInterestOracleParams(params) {
|
|
7871
|
-
return
|
|
7930
|
+
return import_lucid35.Data.castTo(params, InterestOracleParams);
|
|
7872
7931
|
}
|
|
7873
7932
|
|
|
7874
7933
|
// src/validators/interest-oracle-validator.ts
|
|
@@ -7882,7 +7941,7 @@ var _interestOracleValidator = {
|
|
|
7882
7941
|
function mkInterestOracleValidator(params) {
|
|
7883
7942
|
return {
|
|
7884
7943
|
type: "PlutusV3",
|
|
7885
|
-
script: (0,
|
|
7944
|
+
script: (0, import_lucid36.applyParamsToScript)(_interestOracleValidator.cborHex, [
|
|
7886
7945
|
castInterestOracleParams(params)
|
|
7887
7946
|
])
|
|
7888
7947
|
};
|
|
@@ -7908,14 +7967,14 @@ async function startInterestOracle(initialUnitaryInterest, initialInterestRate,
|
|
|
7908
7967
|
},
|
|
7909
7968
|
mintAmounts: [
|
|
7910
7969
|
{
|
|
7911
|
-
tokenName: (0,
|
|
7970
|
+
tokenName: (0, import_lucid37.fromText)(tokenName),
|
|
7912
7971
|
amount: 1n
|
|
7913
7972
|
}
|
|
7914
7973
|
]
|
|
7915
7974
|
});
|
|
7916
7975
|
const validator = mkInterestOracleValidator(oracleParams);
|
|
7917
7976
|
tx.pay.ToContract(
|
|
7918
|
-
(0,
|
|
7977
|
+
(0, import_lucid37.validatorToAddress)(network, validator),
|
|
7919
7978
|
{
|
|
7920
7979
|
kind: "inline",
|
|
7921
7980
|
value: serialiseInterestOracleDatum({
|
|
@@ -7928,12 +7987,12 @@ async function startInterestOracle(initialUnitaryInterest, initialInterestRate,
|
|
|
7928
7987
|
},
|
|
7929
7988
|
{
|
|
7930
7989
|
lovelace: 2500000n,
|
|
7931
|
-
[(0,
|
|
7990
|
+
[(0, import_lucid37.toUnit)(policyId, (0, import_lucid37.fromText)(tokenName))]: 1n
|
|
7932
7991
|
}
|
|
7933
7992
|
);
|
|
7934
7993
|
if (withScriptRef) {
|
|
7935
7994
|
tx.pay.ToAddressWithData(
|
|
7936
|
-
(0,
|
|
7995
|
+
(0, import_lucid37.validatorToAddress)(network, validator),
|
|
7937
7996
|
void 0,
|
|
7938
7997
|
void 0,
|
|
7939
7998
|
validator
|
|
@@ -7942,8 +8001,8 @@ async function startInterestOracle(initialUnitaryInterest, initialInterestRate,
|
|
|
7942
8001
|
return [
|
|
7943
8002
|
tx,
|
|
7944
8003
|
{
|
|
7945
|
-
currencySymbol: (0,
|
|
7946
|
-
tokenName: (0,
|
|
8004
|
+
currencySymbol: (0, import_lucid37.fromHex)(policyId),
|
|
8005
|
+
tokenName: (0, import_lucid37.fromHex)((0, import_lucid37.fromText)(tokenName))
|
|
7947
8006
|
}
|
|
7948
8007
|
];
|
|
7949
8008
|
}
|
|
@@ -7954,7 +8013,7 @@ async function feedInterestOracle(params, newInterestRate, lucid, currentSlot, a
|
|
|
7954
8013
|
utxo = await findInterestOracle(lucid, assetClass);
|
|
7955
8014
|
}
|
|
7956
8015
|
const network = lucid.config().network;
|
|
7957
|
-
const now = BigInt((0,
|
|
8016
|
+
const now = BigInt((0, import_lucid37.slotToUnixTime)(network, currentSlot));
|
|
7958
8017
|
const tx = lucid.newTx();
|
|
7959
8018
|
const datum = parseInterestOracleDatum(getInlineDatumOrThrow(utxo));
|
|
7960
8019
|
if (scriptRef2) {
|
|
@@ -7992,10 +8051,10 @@ async function feedInterestOracle(params, newInterestRate, lucid, currentSlot, a
|
|
|
7992
8051
|
}
|
|
7993
8052
|
|
|
7994
8053
|
// src/contracts/interest-collection/helpers.ts
|
|
7995
|
-
var
|
|
8054
|
+
var import_lucid38 = require("@lucid-evolution/lucid");
|
|
7996
8055
|
function signersAllOf(multisig) {
|
|
7997
8056
|
if ("Signature" in multisig) {
|
|
7998
|
-
return [(0,
|
|
8057
|
+
return [(0, import_lucid38.toHex)(multisig.Signature.keyHash)];
|
|
7999
8058
|
} else {
|
|
8000
8059
|
return multisig.AtLeast.authSignatories.map((signatory) => {
|
|
8001
8060
|
try {
|
|
@@ -8008,24 +8067,24 @@ function signersAllOf(multisig) {
|
|
|
8008
8067
|
}
|
|
8009
8068
|
|
|
8010
8069
|
// src/contracts/interest-collection/types.ts
|
|
8011
|
-
var
|
|
8012
|
-
var InterestCollectionParamsSchema =
|
|
8070
|
+
var import_lucid39 = require("@lucid-evolution/lucid");
|
|
8071
|
+
var InterestCollectionParamsSchema = import_lucid39.Data.Object({
|
|
8013
8072
|
versionRecordNft: AssetClassSchema2,
|
|
8014
8073
|
multisigUtxoNft: AssetClassSchema2,
|
|
8015
8074
|
cdpAuthTk: AssetClassSchema2,
|
|
8016
8075
|
collateralAssetAuthTk: AssetClassSchema2,
|
|
8017
8076
|
govAuthTk: AssetClassSchema2,
|
|
8018
|
-
cdpAssetSymbol:
|
|
8019
|
-
cdpBiasTime:
|
|
8020
|
-
interestSettlementCooldown:
|
|
8077
|
+
cdpAssetSymbol: import_lucid39.Data.Bytes(),
|
|
8078
|
+
cdpBiasTime: import_lucid39.Data.Integer(),
|
|
8079
|
+
interestSettlementCooldown: import_lucid39.Data.Integer()
|
|
8021
8080
|
});
|
|
8022
8081
|
var InterestCollectionParams = InterestCollectionParamsSchema;
|
|
8023
8082
|
function castInterestCollectionParams(params) {
|
|
8024
|
-
return
|
|
8083
|
+
return import_lucid39.Data.castTo(params, InterestCollectionParams);
|
|
8025
8084
|
}
|
|
8026
8085
|
|
|
8027
8086
|
// src/contracts/interest-collection/scripts.ts
|
|
8028
|
-
var
|
|
8087
|
+
var import_lucid40 = require("@lucid-evolution/lucid");
|
|
8029
8088
|
|
|
8030
8089
|
// src/validators/interest-collection-validator.ts
|
|
8031
8090
|
var _interestCollectionValidator = {
|
|
@@ -8038,7 +8097,7 @@ var _interestCollectionValidator = {
|
|
|
8038
8097
|
function mkInterestCollectionValidator(params) {
|
|
8039
8098
|
return {
|
|
8040
8099
|
type: "PlutusV3",
|
|
8041
|
-
script: (0,
|
|
8100
|
+
script: (0, import_lucid40.applyParamsToScript)(_interestCollectionValidator.cborHex, [
|
|
8042
8101
|
castInterestCollectionParams(params)
|
|
8043
8102
|
])
|
|
8044
8103
|
};
|
|
@@ -8046,7 +8105,7 @@ function mkInterestCollectionValidator(params) {
|
|
|
8046
8105
|
var mkInterestCollectionValidatorFromSP = (params) => {
|
|
8047
8106
|
return {
|
|
8048
8107
|
type: "PlutusV3",
|
|
8049
|
-
script: (0,
|
|
8108
|
+
script: (0, import_lucid40.applyParamsToScript)(_interestCollectionValidator.cborHex, [
|
|
8050
8109
|
castInterestCollectionParams({
|
|
8051
8110
|
versionRecordNft: fromSystemParamsAssetLucid(params.versionRecordNft),
|
|
8052
8111
|
multisigUtxoNft: fromSystemParamsAssetLucid(params.multisigUtxoNft),
|
|
@@ -8064,17 +8123,17 @@ var mkInterestCollectionValidatorFromSP = (params) => {
|
|
|
8064
8123
|
};
|
|
8065
8124
|
|
|
8066
8125
|
// src/contracts/version-registry/types.ts
|
|
8067
|
-
var
|
|
8068
|
-
var VersionRecordTokenParamsSchema =
|
|
8126
|
+
var import_lucid41 = require("@lucid-evolution/lucid");
|
|
8127
|
+
var VersionRecordTokenParamsSchema = import_lucid41.Data.Object({
|
|
8069
8128
|
upgradeToken: AssetClassSchema2
|
|
8070
8129
|
});
|
|
8071
8130
|
var VersionRecordTokenParams = VersionRecordTokenParamsSchema;
|
|
8072
8131
|
function castVersionRecordTokenParams(params) {
|
|
8073
|
-
return
|
|
8132
|
+
return import_lucid41.Data.castTo(params, VersionRecordTokenParams);
|
|
8074
8133
|
}
|
|
8075
8134
|
|
|
8076
8135
|
// src/contracts/version-registry/scripts.ts
|
|
8077
|
-
var
|
|
8136
|
+
var import_lucid42 = require("@lucid-evolution/lucid");
|
|
8078
8137
|
|
|
8079
8138
|
// src/validators/version-record-policy.ts
|
|
8080
8139
|
var _versionRecordTokenPolicy = {
|
|
@@ -8094,7 +8153,7 @@ var _versionRegistryValidator = {
|
|
|
8094
8153
|
function mkVersionRecordTokenPolicy(params) {
|
|
8095
8154
|
return {
|
|
8096
8155
|
type: "PlutusV3",
|
|
8097
|
-
script: (0,
|
|
8156
|
+
script: (0, import_lucid42.applyParamsToScript)(_versionRecordTokenPolicy.cborHex, [
|
|
8098
8157
|
castVersionRecordTokenParams(params)
|
|
8099
8158
|
])
|
|
8100
8159
|
};
|
|
@@ -8107,7 +8166,7 @@ var mkVersionRegistryValidator = () => {
|
|
|
8107
8166
|
};
|
|
8108
8167
|
|
|
8109
8168
|
// src/contracts/collector/scripts.ts
|
|
8110
|
-
var
|
|
8169
|
+
var import_lucid43 = require("@lucid-evolution/lucid");
|
|
8111
8170
|
|
|
8112
8171
|
// src/validators/collector-validator.ts
|
|
8113
8172
|
var _collectorValidator = {
|
|
@@ -8120,19 +8179,19 @@ var _collectorValidator = {
|
|
|
8120
8179
|
var mkCollectorValidatorFromSP = (params) => {
|
|
8121
8180
|
return {
|
|
8122
8181
|
type: "PlutusV3",
|
|
8123
|
-
script: (0,
|
|
8124
|
-
new
|
|
8125
|
-
new
|
|
8182
|
+
script: (0, import_lucid43.applyParamsToScript)(_collectorValidator.cborHex, [
|
|
8183
|
+
new import_lucid43.Constr(0, [
|
|
8184
|
+
new import_lucid43.Constr(0, [
|
|
8126
8185
|
params.stakingManagerNFT[0].unCurrencySymbol,
|
|
8127
|
-
(0,
|
|
8186
|
+
(0, import_lucid43.fromText)(params.stakingManagerNFT[1].unTokenName)
|
|
8128
8187
|
]),
|
|
8129
|
-
new
|
|
8188
|
+
new import_lucid43.Constr(0, [
|
|
8130
8189
|
params.stakingToken[0].unCurrencySymbol,
|
|
8131
|
-
(0,
|
|
8190
|
+
(0, import_lucid43.fromText)(params.stakingToken[1].unTokenName)
|
|
8132
8191
|
]),
|
|
8133
|
-
new
|
|
8192
|
+
new import_lucid43.Constr(0, [
|
|
8134
8193
|
params.versionRecordToken[0].unCurrencySymbol,
|
|
8135
|
-
(0,
|
|
8194
|
+
(0, import_lucid43.fromText)(params.versionRecordToken[1].unTokenName)
|
|
8136
8195
|
])
|
|
8137
8196
|
])
|
|
8138
8197
|
])
|
|
@@ -8140,7 +8199,7 @@ var mkCollectorValidatorFromSP = (params) => {
|
|
|
8140
8199
|
};
|
|
8141
8200
|
|
|
8142
8201
|
// src/contracts/treasury/scripts.ts
|
|
8143
|
-
var
|
|
8202
|
+
var import_lucid45 = require("@lucid-evolution/lucid");
|
|
8144
8203
|
|
|
8145
8204
|
// src/validators/treasury-validator.ts
|
|
8146
8205
|
var _treasuryValidator = {
|
|
@@ -8150,22 +8209,22 @@ var _treasuryValidator = {
|
|
|
8150
8209
|
};
|
|
8151
8210
|
|
|
8152
8211
|
// src/contracts/treasury/types.ts
|
|
8153
|
-
var
|
|
8154
|
-
var TreasuryParamsSchema =
|
|
8212
|
+
var import_lucid44 = require("@lucid-evolution/lucid");
|
|
8213
|
+
var TreasuryParamsSchema = import_lucid44.Data.Object({
|
|
8155
8214
|
upgradeToken: AssetClassSchema2,
|
|
8156
8215
|
versionRecordToken: AssetClassSchema2,
|
|
8157
|
-
treasuryUtxosStakeCredential:
|
|
8216
|
+
treasuryUtxosStakeCredential: import_lucid44.Data.Nullable(StakeCredentialSchema)
|
|
8158
8217
|
});
|
|
8159
8218
|
var TreasuryParams = TreasuryParamsSchema;
|
|
8160
8219
|
function castTreasuryParams(params) {
|
|
8161
|
-
return
|
|
8220
|
+
return import_lucid44.Data.castTo(params, TreasuryParams);
|
|
8162
8221
|
}
|
|
8163
8222
|
|
|
8164
8223
|
// src/contracts/treasury/scripts.ts
|
|
8165
8224
|
var mkTreasuryValidatorFromSP = (params) => {
|
|
8166
8225
|
return {
|
|
8167
8226
|
type: "PlutusV3",
|
|
8168
|
-
script: (0,
|
|
8227
|
+
script: (0, import_lucid45.applyParamsToScript)(_treasuryValidator.cborHex, [
|
|
8169
8228
|
castTreasuryParams({
|
|
8170
8229
|
upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
|
|
8171
8230
|
versionRecordToken: fromSystemParamsAssetLucid(
|
|
@@ -8178,8 +8237,8 @@ var mkTreasuryValidatorFromSP = (params) => {
|
|
|
8178
8237
|
};
|
|
8179
8238
|
|
|
8180
8239
|
// src/contracts/execute/types.ts
|
|
8181
|
-
var
|
|
8182
|
-
var ExecuteParamsSchema =
|
|
8240
|
+
var import_lucid46 = require("@lucid-evolution/lucid");
|
|
8241
|
+
var ExecuteParamsSchema = import_lucid46.Data.Object({
|
|
8183
8242
|
govNFT: AssetClassSchema2,
|
|
8184
8243
|
upgradeToken: AssetClassSchema2,
|
|
8185
8244
|
iAssetToken: AssetClassSchema2,
|
|
@@ -8188,19 +8247,19 @@ var ExecuteParamsSchema = import_lucid45.Data.Object({
|
|
|
8188
8247
|
cdpCreatorToken: AssetClassSchema2,
|
|
8189
8248
|
cdpToken: AssetClassSchema2,
|
|
8190
8249
|
versionRecordToken: AssetClassSchema2,
|
|
8191
|
-
iassetValHash:
|
|
8192
|
-
cdpValHash:
|
|
8193
|
-
sPoolValHash:
|
|
8194
|
-
versionRegistryValHash:
|
|
8195
|
-
treasuryValHash:
|
|
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()
|
|
8196
8255
|
});
|
|
8197
8256
|
var ExecuteParams = ExecuteParamsSchema;
|
|
8198
8257
|
function castExecuteParams(params) {
|
|
8199
|
-
return
|
|
8258
|
+
return import_lucid46.Data.castTo(params, ExecuteParams);
|
|
8200
8259
|
}
|
|
8201
8260
|
|
|
8202
8261
|
// src/contracts/execute/scripts.ts
|
|
8203
|
-
var
|
|
8262
|
+
var import_lucid47 = require("@lucid-evolution/lucid");
|
|
8204
8263
|
|
|
8205
8264
|
// src/validators/execute-validator.ts
|
|
8206
8265
|
var _executeValidator = {
|
|
@@ -8213,8 +8272,8 @@ var _executeValidator = {
|
|
|
8213
8272
|
var mkExecuteValidator = (params) => {
|
|
8214
8273
|
return {
|
|
8215
8274
|
type: "PlutusV3",
|
|
8216
|
-
script: (0,
|
|
8217
|
-
(0,
|
|
8275
|
+
script: (0, import_lucid47.applySingleCborEncoding)(
|
|
8276
|
+
(0, import_lucid47.applyParamsToScript)(_executeValidator.cborHex, [
|
|
8218
8277
|
castExecuteParams(params)
|
|
8219
8278
|
])
|
|
8220
8279
|
)
|
|
@@ -8223,8 +8282,8 @@ var mkExecuteValidator = (params) => {
|
|
|
8223
8282
|
var mkExecuteValidatorFromSP = (params) => {
|
|
8224
8283
|
return {
|
|
8225
8284
|
type: "PlutusV3",
|
|
8226
|
-
script: (0,
|
|
8227
|
-
(0,
|
|
8285
|
+
script: (0, import_lucid47.applySingleCborEncoding)(
|
|
8286
|
+
(0, import_lucid47.applyParamsToScript)(_executeValidator.cborHex, [
|
|
8228
8287
|
castExecuteParams({
|
|
8229
8288
|
govNFT: fromSystemParamsAssetLucid(params.govNFT),
|
|
8230
8289
|
upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
|
|
@@ -8252,21 +8311,21 @@ var mkExecuteValidatorFromSP = (params) => {
|
|
|
8252
8311
|
};
|
|
8253
8312
|
|
|
8254
8313
|
// src/contracts/price-oracle/types.ts
|
|
8255
|
-
var
|
|
8256
|
-
var PriceOracleParamsSchema =
|
|
8257
|
-
owner:
|
|
8314
|
+
var import_lucid48 = require("@lucid-evolution/lucid");
|
|
8315
|
+
var PriceOracleParamsSchema = import_lucid48.Data.Object({
|
|
8316
|
+
owner: import_lucid48.Data.Bytes(),
|
|
8258
8317
|
/** Milliseconds */
|
|
8259
|
-
biasTime:
|
|
8318
|
+
biasTime: import_lucid48.Data.Integer(),
|
|
8260
8319
|
/** Milliseconds */
|
|
8261
|
-
expirationPeriod:
|
|
8320
|
+
expirationPeriod: import_lucid48.Data.Integer()
|
|
8262
8321
|
});
|
|
8263
8322
|
var PriceOracleParams = PriceOracleParamsSchema;
|
|
8264
8323
|
function castPriceOracleParams(params) {
|
|
8265
|
-
return
|
|
8324
|
+
return import_lucid48.Data.castTo(params, PriceOracleParams);
|
|
8266
8325
|
}
|
|
8267
8326
|
|
|
8268
8327
|
// src/contracts/rob/helpers.ts
|
|
8269
|
-
var
|
|
8328
|
+
var import_lucid49 = require("@lucid-evolution/lucid");
|
|
8270
8329
|
|
|
8271
8330
|
// src/contracts/rob/types-new.ts
|
|
8272
8331
|
var import_evolution19 = require("@evolution-sdk/evolution");
|
|
@@ -8388,7 +8447,7 @@ function robAmountToSpend(utxo, datum, sysParams) {
|
|
|
8388
8447
|
}
|
|
8389
8448
|
}).with({ SellIAssetOrder: import_ts_pattern19.P.any }, (_) => {
|
|
8390
8449
|
return (0, import_cardano_offchain_common22.assetClassValueOf)(utxo.assets, {
|
|
8391
|
-
currencySymbol: (0,
|
|
8450
|
+
currencySymbol: (0, import_lucid49.fromHex)(
|
|
8392
8451
|
sysParams.cdpParams.cdpAssetSymbol.unCurrencySymbol
|
|
8393
8452
|
),
|
|
8394
8453
|
tokenName: datum.iasset
|
|
@@ -8405,7 +8464,7 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
|
|
|
8405
8464
|
tx,
|
|
8406
8465
|
(idx, acc, [robUtxo, spendAmt]) => {
|
|
8407
8466
|
const robDatum = parseRobDatumOrThrow(getInlineDatumOrThrow(robUtxo));
|
|
8408
|
-
if ((0,
|
|
8467
|
+
if ((0, import_lucid49.toHex)(robDatum.iasset) !== (0, import_lucid49.toHex)(iasset)) {
|
|
8409
8468
|
throw new Error("Only same iAsset");
|
|
8410
8469
|
}
|
|
8411
8470
|
const [robOutputVal, sellOrderAllowedAssetsIdx] = (0, import_ts_pattern19.match)(
|
|
@@ -8425,12 +8484,12 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
|
|
|
8425
8484
|
price
|
|
8426
8485
|
)
|
|
8427
8486
|
);
|
|
8428
|
-
const resultVal = (0,
|
|
8487
|
+
const resultVal = (0, import_lucid49.addAssets)(
|
|
8429
8488
|
robUtxo.assets,
|
|
8430
8489
|
(0, import_cardano_offchain_common22.mkAssetsOf)(collateralAsset, -collateralForRedemption),
|
|
8431
8490
|
(0, import_cardano_offchain_common22.mkAssetsOf)(
|
|
8432
8491
|
{
|
|
8433
|
-
currencySymbol: (0,
|
|
8492
|
+
currencySymbol: (0, import_lucid49.fromHex)(
|
|
8434
8493
|
sysParams.robParams.iassetPolicyId.unCurrencySymbol
|
|
8435
8494
|
),
|
|
8436
8495
|
tokenName: robDatum.iasset
|
|
@@ -8460,12 +8519,12 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
|
|
|
8460
8519
|
price
|
|
8461
8520
|
)
|
|
8462
8521
|
);
|
|
8463
|
-
const resultVal = (0,
|
|
8522
|
+
const resultVal = (0, import_lucid49.addAssets)(
|
|
8464
8523
|
robUtxo.assets,
|
|
8465
8524
|
(0, import_cardano_offchain_common22.mkAssetsOf)(collateralAsset, payoutCollateralAmt),
|
|
8466
8525
|
(0, import_cardano_offchain_common22.mkAssetsOf)(
|
|
8467
8526
|
{
|
|
8468
|
-
currencySymbol: (0,
|
|
8527
|
+
currencySymbol: (0, import_lucid49.fromHex)(
|
|
8469
8528
|
sysParams.robParams.iassetPolicyId.unCurrencySymbol
|
|
8470
8529
|
),
|
|
8471
8530
|
tokenName: robDatum.iasset
|
|
@@ -8498,7 +8557,7 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
|
|
|
8498
8557
|
...robDatum,
|
|
8499
8558
|
robRefInput: {
|
|
8500
8559
|
outputIndex: BigInt(robUtxo.outputIndex),
|
|
8501
|
-
txHash: (0,
|
|
8560
|
+
txHash: (0, import_lucid49.fromHex)(robUtxo.txHash)
|
|
8502
8561
|
}
|
|
8503
8562
|
})
|
|
8504
8563
|
},
|
|
@@ -8510,21 +8569,21 @@ function buildRedemptionsTx(redemptions, iasset, collateralAsset, price, redempt
|
|
|
8510
8569
|
}
|
|
8511
8570
|
|
|
8512
8571
|
// src/contracts/rob/types.ts
|
|
8513
|
-
var
|
|
8514
|
-
var RobParamsSchema =
|
|
8572
|
+
var import_lucid50 = require("@lucid-evolution/lucid");
|
|
8573
|
+
var RobParamsSchema = import_lucid50.Data.Object({
|
|
8515
8574
|
versionRecordToken: AssetClassSchema2,
|
|
8516
8575
|
iassetAuthToken: AssetClassSchema2,
|
|
8517
8576
|
collateralAssetAuthToken: AssetClassSchema2,
|
|
8518
|
-
iassetPolicyId:
|
|
8519
|
-
iassetValHash:
|
|
8577
|
+
iassetPolicyId: import_lucid50.Data.Bytes(),
|
|
8578
|
+
iassetValHash: import_lucid50.Data.Bytes()
|
|
8520
8579
|
});
|
|
8521
8580
|
var RobParams = RobParamsSchema;
|
|
8522
8581
|
function castRobParams(params) {
|
|
8523
|
-
return
|
|
8582
|
+
return import_lucid50.Data.castTo(params, RobParams);
|
|
8524
8583
|
}
|
|
8525
8584
|
|
|
8526
8585
|
// src/contracts/rob/transactions.ts
|
|
8527
|
-
var
|
|
8586
|
+
var import_lucid51 = require("@lucid-evolution/lucid");
|
|
8528
8587
|
var import_fp_ts18 = require("fp-ts");
|
|
8529
8588
|
var import_Array2 = require("fp-ts/lib/Array");
|
|
8530
8589
|
var import_cardano_offchain_common23 = require("@3rd-eye-labs/cardano-offchain-common");
|
|
@@ -8533,11 +8592,11 @@ async function openRob(assetTokenNameAscii, depositAmt, orderType, lucid, sysPar
|
|
|
8533
8592
|
const network = lucid.config().network;
|
|
8534
8593
|
const [ownPkh, _] = await addrDetails(lucid);
|
|
8535
8594
|
const newDatum = {
|
|
8536
|
-
owner: (0,
|
|
8537
|
-
iasset: (0,
|
|
8595
|
+
owner: (0, import_lucid51.fromHex)(ownPkh.hash),
|
|
8596
|
+
iasset: (0, import_lucid51.fromHex)((0, import_lucid51.fromText)(assetTokenNameAscii)),
|
|
8538
8597
|
orderType,
|
|
8539
8598
|
robRefInput: {
|
|
8540
|
-
txHash: (0,
|
|
8599
|
+
txHash: (0, import_lucid51.fromHex)(
|
|
8541
8600
|
"0000000000000000000000000000000000000000000000000000000000000000"
|
|
8542
8601
|
),
|
|
8543
8602
|
outputIndex: 0n
|
|
@@ -8550,7 +8609,7 @@ async function openRob(assetTokenNameAscii, depositAmt, orderType, lucid, sysPar
|
|
|
8550
8609
|
{ SellIAssetOrder: import_ts_pattern20.P.any },
|
|
8551
8610
|
(_2) => (0, import_cardano_offchain_common23.mkAssetsOf)(
|
|
8552
8611
|
{
|
|
8553
|
-
currencySymbol: (0,
|
|
8612
|
+
currencySymbol: (0, import_lucid51.fromHex)(
|
|
8554
8613
|
sysParams.cdpParams.cdpAssetSymbol.unCurrencySymbol
|
|
8555
8614
|
),
|
|
8556
8615
|
tokenName: newDatum.iasset
|
|
@@ -8568,7 +8627,7 @@ async function openRob(assetTokenNameAscii, depositAmt, orderType, lucid, sysPar
|
|
|
8568
8627
|
kind: "inline",
|
|
8569
8628
|
value: serialiseRobDatum(newDatum)
|
|
8570
8629
|
},
|
|
8571
|
-
(0,
|
|
8630
|
+
(0, import_lucid51.addAssets)(depositVal, (0, import_cardano_offchain_common23.mkLovelacesOf)(MIN_ROB_COLLATERAL_AMT))
|
|
8572
8631
|
);
|
|
8573
8632
|
}
|
|
8574
8633
|
async function cancelRob(robOutRef, sysParams, lucid) {
|
|
@@ -8583,7 +8642,7 @@ async function cancelRob(robOutRef, sysParams, lucid) {
|
|
|
8583
8642
|
(_) => new Error("Expected a single ROB UTXO.")
|
|
8584
8643
|
);
|
|
8585
8644
|
const robDatum = parseRobDatumOrThrow(getInlineDatumOrThrow(robUtxo));
|
|
8586
|
-
return lucid.newTx().readFrom([robScriptRefUtxo]).collectFrom([robUtxo], serialiseRobRedeemer("Cancel")).addSignerKey((0,
|
|
8645
|
+
return lucid.newTx().readFrom([robScriptRefUtxo]).collectFrom([robUtxo], serialiseRobRedeemer("Cancel")).addSignerKey((0, import_lucid51.toHex)(robDatum.owner));
|
|
8587
8646
|
}
|
|
8588
8647
|
async function redeemRob(redemptionRobsData, priceOracleOutRef, iassetOutRef, collateralAssetOutRef, lucid, sysParams, currentSlot, pythMessage = void 0, pythStateOutRef = void 0) {
|
|
8589
8648
|
const robScriptRefUtxo = matchSingle(
|
|
@@ -8635,7 +8694,7 @@ async function redeemRob(redemptionRobsData, priceOracleOutRef, iassetOutRef, co
|
|
|
8635
8694
|
);
|
|
8636
8695
|
tx.validFrom(interval.validFrom).validTo(interval.validTo);
|
|
8637
8696
|
allRefInputs.push(...referenceInputs);
|
|
8638
|
-
const refInputIdxs = (0,
|
|
8697
|
+
const refInputIdxs = (0, import_lucid51.getInputIndices)(allRefInputs, allRefInputs);
|
|
8639
8698
|
buildRedemptionsTx(
|
|
8640
8699
|
redemptionRobs,
|
|
8641
8700
|
iassetDatum.assetName,
|
|
@@ -8675,7 +8734,7 @@ async function adjustRob(lucid, robOutRef, adjustmentAmt, newLimitPrice, sysPara
|
|
|
8675
8734
|
);
|
|
8676
8735
|
}
|
|
8677
8736
|
const iassetAc = {
|
|
8678
|
-
currencySymbol: (0,
|
|
8737
|
+
currencySymbol: (0, import_lucid51.fromHex)(
|
|
8679
8738
|
sysParams.robParams.iassetPolicyId.unCurrencySymbol
|
|
8680
8739
|
),
|
|
8681
8740
|
tokenName: robDatum.iasset
|
|
@@ -8691,7 +8750,7 @@ async function adjustRob(lucid, robOutRef, adjustmentAmt, newLimitPrice, sysPara
|
|
|
8691
8750
|
(acc, [asset, _]) => {
|
|
8692
8751
|
const amt = (0, import_cardano_offchain_common23.assetClassValueOf)(robUtxo.assets, asset) - // in case of ADA, the min has to stay.
|
|
8693
8752
|
((0, import_cardano_offchain_common23.isSameAssetClass)(asset, import_cardano_offchain_common23.adaAssetClass) ? MIN_ROB_COLLATERAL_AMT : 0n);
|
|
8694
|
-
return (0,
|
|
8753
|
+
return (0, import_lucid51.addAssets)(acc, (0, import_cardano_offchain_common23.mkAssetsOf)(asset, amt));
|
|
8695
8754
|
}
|
|
8696
8755
|
)
|
|
8697
8756
|
);
|
|
@@ -8743,19 +8802,19 @@ async function adjustRob(lucid, robOutRef, adjustmentAmt, newLimitPrice, sysPara
|
|
|
8743
8802
|
}).exhaustive()
|
|
8744
8803
|
})
|
|
8745
8804
|
},
|
|
8746
|
-
(0,
|
|
8805
|
+
(0, import_lucid51.addAssets)(
|
|
8747
8806
|
robUtxo.assets,
|
|
8748
8807
|
(0, import_cardano_offchain_common23.mkAssetsOf)(depositAsset, adjustmentAmt),
|
|
8749
8808
|
(0, import_cardano_offchain_common23.negateAssets)(rewardVal)
|
|
8750
8809
|
)
|
|
8751
|
-
).addSignerKey((0,
|
|
8810
|
+
).addSignerKey((0, import_lucid51.toHex)(robDatum.owner));
|
|
8752
8811
|
}
|
|
8753
8812
|
async function claimRob(lucid, robOutRef, sysParams) {
|
|
8754
8813
|
return adjustRob(lucid, robOutRef, 0n, void 0, sysParams);
|
|
8755
8814
|
}
|
|
8756
8815
|
|
|
8757
8816
|
// src/contracts/rob/scripts.ts
|
|
8758
|
-
var
|
|
8817
|
+
var import_lucid52 = require("@lucid-evolution/lucid");
|
|
8759
8818
|
|
|
8760
8819
|
// src/validators/rob-validator.ts
|
|
8761
8820
|
var _robValidator = {
|
|
@@ -8768,13 +8827,13 @@ var _robValidator = {
|
|
|
8768
8827
|
var mkRobValidator = (params) => {
|
|
8769
8828
|
return {
|
|
8770
8829
|
type: "PlutusV3",
|
|
8771
|
-
script: (0,
|
|
8830
|
+
script: (0, import_lucid52.applyParamsToScript)(_robValidator.cborHex, [castRobParams(params)])
|
|
8772
8831
|
};
|
|
8773
8832
|
};
|
|
8774
8833
|
var mkRobValidatorFromSP = (params) => {
|
|
8775
8834
|
return {
|
|
8776
8835
|
type: "PlutusV3",
|
|
8777
|
-
script: (0,
|
|
8836
|
+
script: (0, import_lucid52.applyParamsToScript)(_robValidator.cborHex, [
|
|
8778
8837
|
castRobParams({
|
|
8779
8838
|
versionRecordToken: fromSystemParamsAssetLucid(
|
|
8780
8839
|
params.versionRecordToken
|
|
@@ -8791,10 +8850,10 @@ var mkRobValidatorFromSP = (params) => {
|
|
|
8791
8850
|
};
|
|
8792
8851
|
|
|
8793
8852
|
// src/contracts/price-oracle/transactions.ts
|
|
8794
|
-
var
|
|
8853
|
+
var import_lucid54 = require("@lucid-evolution/lucid");
|
|
8795
8854
|
|
|
8796
8855
|
// src/contracts/price-oracle/scripts.ts
|
|
8797
|
-
var
|
|
8856
|
+
var import_lucid53 = require("@lucid-evolution/lucid");
|
|
8798
8857
|
|
|
8799
8858
|
// src/validators/price-oracle-validator.ts
|
|
8800
8859
|
var _priceOracleValidator = {
|
|
@@ -8807,7 +8866,7 @@ var _priceOracleValidator = {
|
|
|
8807
8866
|
function mkPriceOracleValidator(params) {
|
|
8808
8867
|
return {
|
|
8809
8868
|
type: "PlutusV3",
|
|
8810
|
-
script: (0,
|
|
8869
|
+
script: (0, import_lucid53.applyParamsToScript)(_priceOracleValidator.cborHex, [
|
|
8811
8870
|
castPriceOracleParams(params)
|
|
8812
8871
|
])
|
|
8813
8872
|
};
|
|
@@ -8818,7 +8877,7 @@ var import_cardano_offchain_common24 = require("@3rd-eye-labs/cardano-offchain-c
|
|
|
8818
8877
|
var Core2 = __toESM(require("@evolution-sdk/evolution"));
|
|
8819
8878
|
async function startPriceOracleTx(lucid, assetName, startPrice, oracleParams, currentSlot, refOutRef, auxiliaryData) {
|
|
8820
8879
|
const network = lucid.config().network;
|
|
8821
|
-
const now = BigInt((0,
|
|
8880
|
+
const now = BigInt((0, import_lucid54.slotToUnixTime)(network, currentSlot));
|
|
8822
8881
|
if (!refOutRef) {
|
|
8823
8882
|
refOutRef = (await lucid.wallet().getUtxos())[0];
|
|
8824
8883
|
}
|
|
@@ -8829,31 +8888,31 @@ async function startPriceOracleTx(lucid, assetName, startPrice, oracleParams, cu
|
|
|
8829
8888
|
},
|
|
8830
8889
|
mintAmounts: [
|
|
8831
8890
|
{
|
|
8832
|
-
tokenName: (0,
|
|
8891
|
+
tokenName: (0, import_lucid54.fromText)(assetName),
|
|
8833
8892
|
amount: 1n
|
|
8834
8893
|
}
|
|
8835
8894
|
]
|
|
8836
8895
|
});
|
|
8837
8896
|
const priceOracleNft = {
|
|
8838
|
-
currencySymbol: (0,
|
|
8839
|
-
tokenName: (0,
|
|
8897
|
+
currencySymbol: (0, import_lucid54.fromHex)(oracleNftPolicyId),
|
|
8898
|
+
tokenName: (0, import_lucid54.fromHex)((0, import_lucid54.fromText)(assetName))
|
|
8840
8899
|
};
|
|
8841
8900
|
const oracleValidator = mkPriceOracleValidator(oracleParams);
|
|
8842
8901
|
const oracleDatum = {
|
|
8843
8902
|
price: startPrice,
|
|
8844
8903
|
expirationTime: BigInt(now) + oracleParams.expirationPeriod,
|
|
8845
|
-
auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(
|
|
8904
|
+
auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(import_lucid54.Data.void())
|
|
8846
8905
|
};
|
|
8847
8906
|
tx.pay.ToContract(
|
|
8848
|
-
(0,
|
|
8907
|
+
(0, import_lucid54.validatorToAddress)(lucid.config().network, oracleValidator),
|
|
8849
8908
|
{ kind: "inline", value: serialisePriceOracleDatum(oracleDatum) },
|
|
8850
|
-
(0,
|
|
8909
|
+
(0, import_lucid54.addAssets)((0, import_cardano_offchain_common24.mkAssetsOf)(priceOracleNft, 1n))
|
|
8851
8910
|
);
|
|
8852
8911
|
return [tx, priceOracleNft];
|
|
8853
8912
|
}
|
|
8854
8913
|
async function feedPriceOracleTx(lucid, oracleOref, newPrice, oracleParams, currentSlot, auxiliaryData) {
|
|
8855
8914
|
const network = lucid.config().network;
|
|
8856
|
-
const currentTime = BigInt((0,
|
|
8915
|
+
const currentTime = BigInt((0, import_lucid54.slotToUnixTime)(network, currentSlot));
|
|
8857
8916
|
const priceOracleUtxo = matchSingle(
|
|
8858
8917
|
await lucid.utxosByOutRef([oracleOref]),
|
|
8859
8918
|
(_) => new Error("Expected a single price oracle UTXO")
|
|
@@ -8872,7 +8931,7 @@ async function feedPriceOracleTx(lucid, oracleOref, newPrice, oracleParams, curr
|
|
|
8872
8931
|
value: serialisePriceOracleDatum({
|
|
8873
8932
|
price: newPrice,
|
|
8874
8933
|
expirationTime: currentTime + oracleParams.expirationPeriod,
|
|
8875
|
-
auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(
|
|
8934
|
+
auxiliaryData: auxiliaryData ?? Core2.Data.fromCBORHex(import_lucid54.Data.void())
|
|
8876
8935
|
})
|
|
8877
8936
|
},
|
|
8878
8937
|
priceOracleUtxo.assets
|
|
@@ -8880,7 +8939,7 @@ async function feedPriceOracleTx(lucid, oracleOref, newPrice, oracleParams, curr
|
|
|
8880
8939
|
}
|
|
8881
8940
|
|
|
8882
8941
|
// src/utils/helper-txs.ts
|
|
8883
|
-
var
|
|
8942
|
+
var import_lucid55 = require("@lucid-evolution/lucid");
|
|
8884
8943
|
|
|
8885
8944
|
// src/scripts/always-fail-validator.ts
|
|
8886
8945
|
var alwaysFailValidator = {
|
|
@@ -8890,7 +8949,7 @@ var alwaysFailValidator = {
|
|
|
8890
8949
|
|
|
8891
8950
|
// src/utils/helper-txs.ts
|
|
8892
8951
|
async function runCreateScriptRefTx(lucid, scriptRefValidator, network) {
|
|
8893
|
-
const scriptAddr = (0,
|
|
8952
|
+
const scriptAddr = (0, import_lucid55.validatorToAddress)(network, alwaysFailValidator);
|
|
8894
8953
|
const txHash = await lucid.newTx().pay.ToAddressWithData(scriptAddr, void 0, {}, scriptRefValidator).complete().then((tx) => tx.sign.withWallet().complete()).then((tx) => tx.submit());
|
|
8895
8954
|
await lucid.awaitTx(txHash);
|
|
8896
8955
|
return { txHash, outputIndex: 0 };
|
|
@@ -8901,7 +8960,7 @@ var import_lucid59 = require("@lucid-evolution/lucid");
|
|
|
8901
8960
|
var import_cardano_offchain_common25 = require("@3rd-eye-labs/cardano-offchain-common");
|
|
8902
8961
|
|
|
8903
8962
|
// src/scripts/auth-token-policy.ts
|
|
8904
|
-
var
|
|
8963
|
+
var import_lucid56 = require("@lucid-evolution/lucid");
|
|
8905
8964
|
var authPolicyData = {
|
|
8906
8965
|
type: "PlutusV2",
|
|
8907
8966
|
cborHex: "5904d95904d60100003232323232323232323232323232323232323232323232323232223232223232323253355335533357346042660166018a00200e03026464666ae68cdc419806980728019980b9999aa999ab9a3370e90030008990911118020029aba1302400215333573466e1d20040011321222230020053574260480042a666ae68c08c0044c848888c004014d5d098120010a999ab9a30220011321222230030053574260480040424c40024c4c016900100a80d98120009baa3500201d01813357389213d4d75737420636f6e73756d65204e4654206f7220746f6b656e2070726576696f75736c79206d696e746564207573696e67207468697320706f6c6963790001301415335738920103505435001613253335734604060460022646464646464646464646464646464646464646464642466666666666600202e02a02602201e01a01601200e00a0060046ae84d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d118118011aba1302200101f37546a002036a666ae68c078c0840084c8c848cc00400c008d5d09aba2302100335742604000403aa666ae68c074c080dd500180880e1baa00153335734603260380022646601e6ae84004d5d09aba2001301b00101837540044464646603a4466a0029000111a801112999ab9a3375e0040102660464466a0029000111a801112999ab9a3375e00401a20022600c0060022600c0060086a00402a6a0020264666aa6020026660144466aa601c02a46a002446601e00466aa602203046a0024466024004666a0026e012000700466e0000520000013355300e015235001223300f00233350012335530120192350012233013002300e0010012233300a0090020012335530120192350012233013002301000100133300500400200100e232333008200133008200175a6aa666ae68c05cc0680044c8c8c8c8c8c848cccc00401c01400c008d5d09aba2002357420026ae88008d5d08009aba2301a00235742603200202c44440066ea8d400404ccc06488cccd55cf800900891919809a999ab9a3019301c001132321233001003002357426ae88c070008d5d0980d80080c18021aba200337546ae84008054dd61a80091111111111100611199ab9a3375e00400201c010444666aa601602601e66aa601802646a002446601a0046010002666aa6016026446a00444a66a666aa602802e6601c4466601402e004002601002c46a002446601400400a00c200626602600800601c00266aa601802646a002446601a0046603844a66a002260180064426a00444a66a6601800401022444660040140082600c00600800446600244a66a004018200200a4244460060084446602c446666aae7c00480388c8cc040cc02cc01cc064004c018c060004c010d5d10019aba1002012375600242444600200820142014442466002006004601c4422444a66a00220044426600a004666aa600e01e00a008002601a442244a66a00200a44266012600800466aa600c01a00800220022006442446600200800660124422444a66a00226a00600e442666a00a0106008004666aa600e01400a0080024400444002240022a66ae71241035054310016370e90001b874800955cf2ab9d2323001001223300330020020011"
|
|
@@ -8909,15 +8968,15 @@ var authPolicyData = {
|
|
|
8909
8968
|
function mkAuthTokenPolicy(ac, tn) {
|
|
8910
8969
|
return {
|
|
8911
8970
|
type: authPolicyData.type,
|
|
8912
|
-
script: (0,
|
|
8913
|
-
new
|
|
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)]),
|
|
8914
8973
|
tn
|
|
8915
8974
|
])
|
|
8916
8975
|
};
|
|
8917
8976
|
}
|
|
8918
8977
|
|
|
8919
8978
|
// src/contracts/iasset/scripts.ts
|
|
8920
|
-
var
|
|
8979
|
+
var import_lucid57 = require("@lucid-evolution/lucid");
|
|
8921
8980
|
|
|
8922
8981
|
// src/validators/iasset-validator.ts
|
|
8923
8982
|
var _iassetValidator = {
|
|
@@ -8927,8 +8986,8 @@ var _iassetValidator = {
|
|
|
8927
8986
|
};
|
|
8928
8987
|
|
|
8929
8988
|
// src/contracts/iasset/scripts.ts
|
|
8930
|
-
var
|
|
8931
|
-
var IAssetScriptParamsSchema =
|
|
8989
|
+
var import_lucid58 = require("@lucid-evolution/lucid");
|
|
8990
|
+
var IAssetScriptParamsSchema = import_lucid58.Data.Object({
|
|
8932
8991
|
upgradeToken: AssetClassSchema2,
|
|
8933
8992
|
versionRecordToken: AssetClassSchema2
|
|
8934
8993
|
});
|
|
@@ -8936,8 +8995,8 @@ var IAssetScriptParams = IAssetScriptParamsSchema;
|
|
|
8936
8995
|
var mkIAssetValidatorFromSP = (params) => {
|
|
8937
8996
|
return {
|
|
8938
8997
|
type: "PlutusV3",
|
|
8939
|
-
script: (0,
|
|
8940
|
-
|
|
8998
|
+
script: (0, import_lucid57.applyParamsToScript)(_iassetValidator.cborHex, [
|
|
8999
|
+
import_lucid58.Data.castTo(
|
|
8941
9000
|
{
|
|
8942
9001
|
upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
|
|
8943
9002
|
versionRecordToken: fromSystemParamsAssetLucid(
|
|
@@ -8950,40 +9009,6 @@ var mkIAssetValidatorFromSP = (params) => {
|
|
|
8950
9009
|
};
|
|
8951
9010
|
};
|
|
8952
9011
|
|
|
8953
|
-
// src/contracts/gov/scripts.ts
|
|
8954
|
-
var import_lucid58 = require("@lucid-evolution/lucid");
|
|
8955
|
-
|
|
8956
|
-
// src/validators/governance-validator.ts
|
|
8957
|
-
var _governanceValidator = {
|
|
8958
|
-
type: "PlutusScriptV3",
|
|
8959
|
-
description: "Generated by Aiken",
|
|
8960
|
-
cborHex: "593056593053010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cdc3a400530090024888966002600460126ea800e33001300a3754007223233001001003223300300130020029b87480026e2520049b874801a6e1d200e9b874801260126ea8011222222229800980a8044c054c0580224464b30013009001899192cc004c06c00a0091640606eb8c064004c054dd5001c566002601a003159800980a9baa00380145901645901220243013375400522232598009805000c4c8c96600260380050048b2032375c6034002602c6ea800e2b3001300e00189919912cc004c07400626601c6eb0c07000489660020050078cc004026603c00513001301f002402480e22c80d0dd6980d000980d800980b1baa0038b2026404c60286ea800a44b300130083013375400513232332259800980e001c0162c80c8dd6980c8009bad30190023019001301437540051640452232598009804800c4c8c96600260360050048b2030375c6032002602a6ea800e2b3001300d001899192cc004c06c00a0091640606eb8c064004c054dd5001c590122024301337540052259800980418099baa0028991919912cc004c07000e00b1640646eb8c064004dd7180c801180c800980a1baa0028b202248888888c8c8cc8966002602201913232323298009812000cdd698120024dd71812001a444b3001302800489919912cc004c06c00a264b3001302c0018992cc004c074c0a0dd5000c4c8c8c8c8c8ca60026064003375c606400d30320049819001cc0c80092222259800981c00344cc078c0dc0284cc07800c4cc0780084cc0780044cc07801403a2c81a8606400260620026060002605e002605c00260526ea80062c8130c0ac0062c8148c09cdd5001c566002603e005132598009816000c4c966002603a60506ea80062646464646465300130320019bae303200698190024c0c800e6064004911112cc004c0e001a26603c606e01426603c00626603c00426603c00226603c00a01d1640d4303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b300130170028992cc004c0b0006264b3001301d30283754003132323232323232323298009bad30350019bae30350099bad3035007981a8034c0d4016606a0093035003981a801244444444b3001303e009899811181e80809980f00289981100209981200189981200109981200080a45903b0c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0a4dd5000c590261815800c5902918139baa0038acc004c06400a264b3001302c0018992cc004c074c0a0dd5000c4c8c8c8c8c8c8c8c8ca60026eb4c0d40066eb8c0d40266eb4c0d401e606a00d3035005981a8024c0d400e606a004911111112cc004c0f8026266044607a02026603c00a2660440082660480062660480042660480020291640ec303500130340013033001303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900400144c966002605800313259800980e98141baa00189919191919191919194c004dd7181a800cdd7181a804cc0d401e606a00d3035005981a8024dd6981a801cdd6981a801244444444b3001303e009899811181e80809981200309981200289981200209981300180a45903b0c0d4004c0d0004c0cc004c0c8004c0c4004c0c0004c0bc004c0b8004c0a4dd5000c590261815800c5902918139baa0038acc004cdc3a4014005132598009816000c4c966002603a60506ea8006264646464646464646464653001375c606e003375c606e0173037009981b8044c0dc01e64b300130350018acc004c0a0c0d00062d1302d303400140c91640d86ea8c0dc01a64b300130350018acc004c0a0c0d00062d1302d303400140c91640d86ea8c0dc016606e009375a606e007375a606e00491111111112cc004c10802e26604c608202826605001026605000e26605000c2660540060311640fc30370013036001303500130340013033001303200130310013030001302f001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900600144c966002605800313300e302b0010028b205230273754007159800980c00144c966002605800313259800980e98141baa00189919912cc004c0c00062660426eb0c0bc004896600200500889919912cc004c0d4006264b30013026303137540031323259800981c00144c01cc0e00222c81a8dd7181b00098191baa0018b205e30340018b2064375c606400260660026eb0c0c400902f45902d1bad302d001302e0013029375400316409860560031640a4604e6ea800e2b30013370e900800144c8c966002605a0050038b2054375c6056002604e6ea800e2c8121024204840908121024204840908120c090dd50008992cc004c068006264b3001302b0018992cc004c070c09cdd5000c4c8c8c966002605e0051332259800981098161baa00289919192cc004c0d000a2660326066006264b300130250018992cc004c0d800626464b300130280018992cc004c0e400626603c60700020131640d860686ea800a2b3001302c00189919194c004dd6981d000cdd6981d001cdd6981d0012444b3001303e00480745903b0c0e8004c0e4004c0d0dd5001459031206230323754002606a0031640cc60626ea800a2b300130290018acc004c0c4dd500140162c81922c817102e18179baa0018b206230320013032001302d37540051640a8605c00626604000244b300100280944c9660026044605a6ea800626464653001375a6068003375c6068007375c60680049112cc004c0e00122601060700131640d430340013033001302e37540031640ac606000481722c8160dd61816800981680098141baa0018b204a302a0018b20503026375400b159800980f000c566002604c6ea801601716409d16408c8118c090dd50021813802c590250c090004c08c004c088004c074dd500bc566002602a0191323259800981180140122c8100dd69810800980e9baa0178acc004c0340322b3001301d375402f0028b203c8acc004c03c0322b3001301d375402f0028b203c8b2034406880d101a0cc004dd2a40012301f30203020001911919800800801912cc00400629422b30013371e6eb8c08800400e2946266004004604600280e102048c07cc0800064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204289980280298140022042375c60420026eb4c088004c090005022191919800800803112cc00400600713233225980099b910090028acc004cdc78048014400600c811226600a00a60520088110dd718110009bab30230013025001408c297adef6c6014800244646600200200644b30010018a5eb8226644b3001300500289981180119802002000c4cc01001000501e18110009811800a0409b88480024b3001300c301b37540031301f301c37540031640652301f30203020302030200014888888888c8cc89660026032604c6ea80862646644b3001301e3029375400313259800981198151baa001899912cc004c0c4006264b30013022302d3754003132332259800981a800c4cc098dd6181a000912cc00400a264b3001302830333754003133017300c3756602260686ea80acdd7181b981a1baa0018b206232330010013758602c60686ea801c896600200314c0103d87a80008992cc006600266ebc00530103d87a8000a50a5140cd1001899801801981d0012066325980099b8f375c60720020171301b330383039303a0014bd7045300103d87a800040cc6eb0c0e000503644c8c8cc8966002607600713005303b0068b2070375c60700026eb8c0e0008c0e0004dd6181b00120688b2064375a60640026066002605c6ea80062c8158c02cc044c0b4dd5180798169baa30300018b205c375c605c60566ea800660026eb0c034c0acdd50114c020c0acdd5018d30103d879800040191640a0605a60546ea8c0b4c0a8dd5180618151baa302d302a375400316409c6002002660046eb0c0acc0a0dd500f80b112cc004006297ae089981598141816000998010011816800a0548acc004c06cc098dd500a44c9660026038604e6ea8006264646464653001375a6060003375a606000b375a6060007375a606000491112cc004c0d401626602e6068010264b300130263031375400313233225980099800a48113496e636f727265637420476f7620696e70757400330113756602e606a6ea8c05cc0d4dd5001981c181a9baa03b8cc004c0d0dd5017c8888c8cc004004014896600200313303d337606ea4014dd400225eb7bdb1822653001375c6076003375a6078003304000248896600266e4002400e26608266ec0dd48049ba80080058acc004cdc7804801c6600201300880148cc108cdd81ba900a37500020051001401d133041337606ea400cdd400119803003000a07840f0303e00140f1222232330010010052259800800c4cc0f4cdd81ba9005374c00897adef6c608994c004dd7181d800cdd5981e000cc1000092225980099b9000900389982099bb037520126e980200162b30013371e01200719800804c022005233042337606ea4028dd30008014400500744cc104cdd81ba9003374c0046600c00c00281e103c0c0f800503c496600200314a314a081ba24444464b3001302f00180144c00c00503819b800040039b81480026e2520009112cc004c0b0006297adef6c608991919800800a5eb7bdb180896600200313303d337606ea4018dd3001a5eb7bdb1822653001375c607600337566078003304000248896600266e4002800e26608266ec0dd48051ba60070058acc004cdc7805001c4cc104cdd81ba900a374c00e003133041337606ea400cdd300119803003000a07840f0303e00140f0646600200297adef6c602259800800c4cc0f0cdd81ba9004375000697adef6c608994c004dd7181d000cdd6981d800cc0fc0092225980099b9000800389982019bb037520106ea001c0162b30013371e010007133040337606ea4020dd4003800c4cc100cdd81ba900337500046600c00c00281d903b0c0f400503b206a914c00400a6eb8c0e8c0dcdd5000cdd7180c981b9baa001406123039303a303a303a303a303a303a303a303a303a0019181c981d181d181d181d181d181d000cdd2a4005374a90024dd79809181a9baa02c488888888888888cc88cc896600260760251980098239baa041912cc00400629344c966002003149a264b3001337206eb8c128c13800cdd71825000c4cc010010cc134004c13c00a2a66092921326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f7264657200164120609a0028258c13400504a4dc024005223259800981f000c566002607c60926ea800a298103d87a80008a6103d8798000411d159800981d000c566002607460926ea800a2980103d87a80008a6103d87b8000411d13322598009822000c4c96600266e2000c0062980103d87980008acc004cdc4000801c530103d87b80008a6103d87a800041288250dd6982798261baa0048acc004c100006298103d87b80008a6103d879800041248248dd6982698251baa00330493754004823904718241baa002912cc004c0f4006298103d87a80008acc004cdc4000a40011302e3304b302e3304b3750601e004660966ea0c03c0052f5c097ae089817198259817198259ba80023304b375000297ae04bd70208c4119225980099b900020018a60103d87980008acc004cdc7801000c530103d87a80008a6103d87b8000411882324605a660946ea0004cc12930010101004bd704888cc88cc010cdc11bad304f002375a609e60a000266e08dd698278009bad304f3050002304a375400660946ea800646096609860986098609860986098609860986098609800314820225ea46096609860986098609860980032304b304c304c304c001918259826182618261826182618261826000c8c12cc130c130c130c130c130c130c130c1300064464b30013001480422b30013001480022900044cdc724508010204081020408000002411d1598009800a40811337049040021980180199b800024803e266e092080808080203300300333700004901fa08e411c6e200066ebd300103d8798000912cc004006297ae0899198261ba9001330030033233001001304f0032259800800c52f5c11332259800cc004cdc7801002d28528a0968998281ba900233004004001899802002000a096375c609e00260a00028268dd71826000a0949bac304a304b304b3047375407c9111111111111111114c004c17404a6eb4c17004a60220232259800800c520008980919801001182f800a0b89181f9982e192cc004c14cc168dd5000c4c96600260a860b66ea8c0f8c170dd5182f982e1baa0038980e1982f1ba80014bd7044c070cc178dd41809800a5eb810591bad305e305b37540031001416060ba60b46ea8c174c168dd50009982e192cc004c14cc168dd5000c4c96600260a860b66ea8c0f8c170dd5181f182e1baa0038980e1982f1ba80014bd7044c070cc178dd419b80001480052f5c082c8dd6982f182d9baa0018800a0b0305d305a3754607860b46ea80052f5c12222259800998152492c44656274206d696e74696e672066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001802a0208cc0040164466e240080066022900120208a50416d15980099815249344c69717569646174696f6e2070726f63657373696e672066656520726174696f206973206265747765656e205b30252c2035255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b89002001802a0228cc0040164466e2400800660c460be6ea8005011452820b88b20b8330134802920c8018acc004cc0a924013953746162696c69747920706f6f6c207769746864726177616c2066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001801a0208cc00400e4466e240080066022900120208a50416d1598009981524933526564656d7074696f6e207265696d62757273656d656e7420726174696f20696e206265747765656e205b30252c203235255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b89002001801a0228cc00400e4466e2400800660c460be6ea8005011452820b88b20b833013480c920c801899815248134526564656d7074696f6e2070726f63657373696e672066656520726174696f20696e206265747765656e205b30252c203130255d0032598009829982f1baa0018acc006600298106d8799f0001ff009119b8900200180120228cc00400a4466e2400800660c460be6ea8005011452820b88b20b8330134805120c8018a50416d14a082da294105b452820b69192cc004c13cc168dd5000c4c178c16cdd5000c54cc1652401263c65787065637465643e2044656e6f6d696e61746f722063616e6e6f74206265207a65726f2e001641606601e6eb4c174c168dd50009bad303c305a375400322225980099814a4811e524d52206973206265747765656e205b313030252c2031305f303030255d0059800cc004c04120029119b89002001802201e8cc0040124466e240080066020906400a01e8a50416915980099814a491d4d52206973206265747765656e205b313030252c2031305f303030255d0059800cc004c04120029119b89002001801a01e8cc00400e4466e240080066020906400a01e8a50416915980099814a491f4d61696e74656e616e636520726174696f206d757374206265203e3d204c52009800801c88cdc4800801400900f456600266052921214c69717569646174696f6e20726174696f206d757374206265203e3d20313030250098009808240052233712004003002403d133029491174d696e20636f6c6c61746572616c20706f73697469766500303c0018a50416914a082d2294105a452820b491111112cc004cc0b12401236941737365742063616e6e6f74206265206120636f6c6c61746572616c20617373657400980099b8f375c60c660c06ea801c00694294505d45660026605892012c436f6c6c61746572616c20617373657420746f2069417373657420726174696f20697320706f73697469766500300a332233225980099b880020018a6103d87980008acc004cdc40008014530103d87b80008a6103d87a800041848308cdc11bad3065002375a60ca60cc00266e08dd698328009bad3065306600230603754980106d8799f0001ff003060375400d159800acc004cc0b12401274d696e74696e672066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b89002001802a0248cc0040164466e240080066026900120248a50417513302c49012a526564656d7074696f6e2066656520726174696f206973206265747765656e205b30252c20313030255d0059800cc005300106d8799f0001ff009119b8900200180220248cc0040124466e240080066026900120248a50417514a082ea2b30013302c491224d696e206d696e74696e6720616d6f756e74206973206e6f6e2d6e65676174697665003025003899816249254d696e20726564656d7074696f6e20616d6f756e74206973206e6f6e2d6e656761746976650030250028a50417514a082ea294105d452820ba4888888888cc8a600260ce0053067306800298009bad304630643754608c60c86ea80f66eb8c19c02d222259800acc004c180c19cdd5001c528c4c8c9660026606c921415472656173757279207769746864726177616c2063616e6e6f742062652061626f7665207769746864726177616c206c696d697420666f72206c6f76656c61636500337133001001a44100a44100412c6eb4c05cc1a8dd5182618351baa0438acc004cc0d924013d5472656173757279207769746864726177616c2063616e6e6f742062652061626f7665207769746864726177616c206c696d697420666f7220494e445900337126605a002603060d46ea81c0dd6980b18351baa304c306a37540871598009981b249295472656173757279207769746864726177616c2076616c75652063616e6e6f7420626520656d70747900980099baf374c002980101a000a50a51419d1598009981b249355472656173757279207769746864726177616c2063616e6e6f7420726571756573742044414f206964656e7469747920746f6b656e00305e3302d001302c306a37540e11598009981b24812f5472656173757279207769746864726177616c2063616e20636f6e7461696e206d6178206f6620382061737365747300337126601c01c6eb0c130c1a8dd5001240211330364901355472656173757279207769746864726177616c2063616e20636f6e7461696e206f6e6c7920706f73697469766520616d6f756e74730032330010013758609a60d66ea800c896600200314a315980098259bad306f30703070306c375460de00313300200230700018a5041a4836a2941067452820ce8a50419d14a0833a2941067191980080099198008009bac304d306b375400644b30010018a5eb822660dc6e9cc8c8cc1c0c1c4008cc1c0c1c4004cc1c0c1c4c1c80052f5c060e200260d86ea8c1bc004cc008008c1c000506d112cc004006297adef6c60899194c004dd71838000cdd698381838800ccc010010c1c400e6eb8c1c00092222598009832801c400a33001002800cc8c8008c05c004cc1cccdd81ba9004375000697adef6c6091111192cc004c0fc0060051300300141d06530010048054026444453001005801c0120050014018820940f503a20dc18380009bac306e00141b060d660d06ea800d06545660026606892011b496e636f727265637420476f7665726e616e6365206f75747075740098008084c0a0cc1a80d52f5c130273306a3232304f3306c375060426eb4c1b4c1a8dd50219983618368011983618368009983618369837000998361ba83021375a608e60d46ea810d2f5c060da00260d860d06ea81052f5c13022306b306837540dd4c0103d87a8000408d1598009981a24927546865207472616e73616374696f6e206d757374206265207369676e6564206279206f776e6572003304b3758602860d06ea817c0062b30013303449012850726f706f73616c20696e636f6d70617469626c6520776974682063757272656e742073746174650059800982c98339baa004899b87375a60d660d06ea8c1acc1a0dd5002180f9bad304c3068375408314a2832a2b30013303449010d496e76616c6964207054696d6500332259800992cc004c16c00629462b300130630018a518a5041a08340c1a4dd519810183698351baa002306d306a375400313259800982f800c528c56600260c600314a314a0834106818349baa33020304c306a3754004609860d46ea800629410671805980a98341baa05f300b304d3306a304d3306a30283306a375066e04038dd6980a18341baa06e4bd70198354c00528d30103d87a8000a60103d8798000419497ae03306a304d3306a30283306a3750600a6eb4c050c1a0dd503725eb80cc1aa6002946980103d87a8000a60103d8798000419497ae04bd704566002660689201245472616e73616374696f6e206d696e742065786163746c79203120706f6c6c546f6b656e003026374c6044609460d06ea81ba2b300133034490113496e76616c696420506f6c6c206f75747075740098008084c0a0cc1a8c134cc1a8c0a0cc1a8c0a4c1a0dd503725eb80cc1a9300103d87a80004bd7025eb82604e660d4609a660d4609a660d46ea0c07cdd6983598341baa0413306a3752002660d4008660d4006660d498106d8799f0000ff003306a3750004660d49810100003306a4c10100003306a301730683754609460d06ea8104cc1a8dd418029bad304530683754609460d06ea8104cc1a8dd419b80002375a602c60d06ea8c128c1a0dd502099835182618341baa0413306a302930683754609460d06ea81052f5c097ae04bd704cc090c088c128c1a0dd5037194c004dd7183618349baa0019bae304b30693754003337046eb4c1b0c1a4dd5182598349baa04233014014375a608c60d26ea810902d180b18341baa06ea60103d87a8000408d13259800982e800c4c8c8c8c8cc8966003300130103072005980818390024c040c1c800e602060e4005301030723073002404515980098319bad301d306f375409114a313259800983a000c4c96600266ebcc0c4cc1ccc078c1c4dd503ba5eb80c1d0c1c4dd5183a18389baa30533071375400313259800983318389baa0018992cc004c1dc006264b300130683073375400313232323232323232329800984000800cdd7184000804cdd69840008044c2000401a61000200b308001004984000801cc96600260fc0031598009838983e800c5a260ec60fa00283da2c83f8dd5184000801244444444b3001308901009899837984400807899837802899837802099837801899837801099838804099828a4812469417373657420776974682073616d65206e616d6520616c7265616479206578697374730059800acc004c1f4c21004dd518191842809baa012898179981c80b9bae308801308501375402514a084100a29462b30013375e6607202e6eb8c22004c21404dd5009260103d87b80008992cc004c1e8c21404dd5000c4c0c0cc0e8060dd71844809843009baa0018a51420c046062610a026ea804a2941082012104028b210c02184000800983f800983f000983e800983e000983d800983d000983c800983a1baa0018b20e230760018b20e8307237540031641bc609e60aa60e26ea8c14cc1c4dd5000c54cc1bd2401193c65787065637465643e204d697865642076657273696f6e73001641b860e60031641c53001375860a260de6ea819a604060de6ea81d698103d879800041288362294106c18388009bae30700043070001306f001306e0013069375460d860d26ea80162b300130610018991919194c004c038c1c0012601c60e0007300e307000298071838000cc038c1c0c1c400500f183800098378009837000983698349baa306c3069375400b159800982c800c4c8c8c8c9660033001300e3070003980718380014c038c1c00066eb4c1c0c1c400500d456600260c260d86ea8c1c00122942294506a452820d43070001306f001306e306e001306d306d306d3069375460d860d26ea80162b3001305b00189919194c004c034c1bc00e601a60de005300d306f0019bad306f3070001403060de00260dc00260da60da60da60da60da60d26ea8c1b0c1a4dd5002c56600266e1d2008001899191919194c004c1c4016601e60e2009300f3071003980798388014dd69838800cdd698389839000cdd7180e98371baa074403460e260e200260e000260de00260dc00260da60d26ea8c1b0c1a4dd5002c56600266e1d200a001899191919194c004c1c4016601e60e2009300f3071003980798388014dd69838800cdd698389839000cdd7180e98371baa074403460e260e260e260e200260e000260de00260dc00260da60d26ea8c1b0c1a4dd5002c56600266e1d200c0018992cc004cc0d924012a50726f706f73616c206465706f73697420696e2072616e6765205b302c2031305f30303020494e44595d005980098179bad306d306a37540031337126eb4c1b4c1a8dd500099b82482827005406a294106745660026606c92128566f74696e6720706572696f6420696e2072616e6765205b3120686f75722c2031206d6f6e74685d005980099b8948202eadc0cdd6982618351baa001899b89375a609860d46ea80052080a0f6a7138a50419d1598009981b249264566666563746976652064656c617920696e2072616e6765205b302c20313220686f7572735d005980098179bad304e306a37540031337126eb4c138c1a8dd5000a410171325314a0833a2b30013303649012b45787069726174696f6e20706572696f6420696e2072616e6765205b31206461792c2031206d6f6e74685d005980099b8948203c2c948dd6980c18351baa001899b89375a603060d46ea80052080a0f6a7138a50419d1598009981b2492b50726f706f73696e6720706572696f6420696e2072616e6765205b3120686f75722c2031206d6f6e74685d005980099b8948202eadc0cdd6982398351baa001899b89375a608e60d46ea80052080a0f6a7138a50419d1598009981b2492950726f706f73696e6720706572696f64203c20566f74696e6720706572696f64202d203120686f757200337106eb4c11cc1a8dd500099b80375a609860d46ea800520ffb9b7038acc004cc0d92411f546f74616c2073686172647320696e2072616e6765205b312c20313030305d005980099b8948008dd6980c98351baa001899b89375a603260d46ea800520d00f8a50419d1598009981b249234d696e2071756f72756d20696e2072616e6765205b302c2031306d696c20494e44595d005980098179bad302b306a37540031337126eb4c0acc1a8dd500099b82482036b1025406a294106745660026606c92127456c6563746f7261746520696e2072616e6765205b31356d696c2c2033356d696c20494e44595d005980099b8933704904043d387280d1bad301b306a37540031337126eb4c06cc1a8dd500099b8248202eec085406a294106745660026606c921384d6178207472656173757279206c6f76656c616365207370656e6420696e2072616e6765205b302c2034352062696c6c696f6e204144415d005980098179bad3017306a37540031337126eb4c05cc1a8dd500099b824820222b28f3c09406a294106744cc0d92401354d617820747265617375727920494e4459207370656e6420696e2072616e6765205b302c203335206d696c6c696f6e20494e44595d005980098179bad3016306a37540031337126eb4c058c1a8dd500099b8248202eec085406a2941067452820ce8a50419d14a0833a2941067452820ce8a50419d14a0833a2941067452820ce8a50419c60d860d26ea80162b3001305a0018991981b2491d43616e6e6f7420636f6e7461696e206475706c6963617465206b657973003375e6e9ccc04c04c004dd380099198008009bac306d306e306a375460da60d46ea8018896600200314bd7044cc1b4c1b8dd61837000998010011837800a0d889981aa491e5465787450726f706f73616c2773206c656e677468206973203c3d20363400337126e34dd7183618349baa005482000506620cc4198833106620cc41988330c19cdd5002452820ca8a50419514a0832a2941065452820ca8a50419514a0832860cc0126e000208acc004c0fc04a26644b3001304d0018992cc004cc05924010e4d697865642076657273696f6e73003375e609a60946ea8c134c128dd5181618251baa001300a3304c300b304a37540a097ae08acc004cc05924012e706f6c6c206d616e6167657220696e707574206d75737420757365207468652072696768742072656465656d657200323322598009820800c4c8c96600260a60050048b20a0375a60a2002609a6ea800e2b30013045001899192cc004c14c00a0091641406eb4c144004c134dd5001c566002607a0031323259800982980140122c8280dd6982880098269baa0038b2094412882504cdd78009818198269ba80044bd7018251baa0013259800981f98251baa0018982718259baa0018b20903232330010013756601c60986ea810c896600200314c0103d87a80008992cc004cdd78021826800c4c0cccc140c1380052f5c11330030033052002412c60a00028270c028cc130c134c128dd5000a5eb822b30013301649114496e636f727265637420676f76206f75747075740098009bac302e304a3754083300a3304c0174bd704c024cc130c8c8c8c0c8cc13cc14000ccc13cc140008cc13cc140004cc13cc140c144004cc13cdd419b80375a6054609a6ea809920014bd701828000982780098251baa0234bd704c010c134c128dd5028530103d87a8000401513301649013b4d757374206275726e203120706f6c6c20746f6b656e20616e64206f7074696f6e616c6c79206d696e7420616e207570677261646520746f6b656e005980098041ba63300630073004302c304a37540a06008605c60946ea81422946260106e98c01cc010c0b0c128dd5028208e8a50411d14a0823a29410471826000c5904a1bad304a30473754083300137586094608e6ea80fa6052608e6ea8136980103d87980004089159800981b80944cc04d24011d5370656e642065786163746c792031205570677261646520546f6b656e00303f323322330020020012259800800c52000899b8033002002304e0013300d3756605860946ea8c0b0c128dd51826800801a0963758609660906ea80fcc0acc11cdd5026c54cc1152410472646d72001641108221044111111919800800998158032cc004c0fcc128dd5002c48c8cdd7982818269baa3050304d3754004002609e60986ea801a246466ebcc140c134dd5001000982798261baa006412044b30010018a508acc004c96600266ebcc0c4c134dd500080344c96600200314a31598009829000c4c8ca60026eb8c14c0066eb4c14cc1500066eb8c14c0092225980099b8f001489008acc004cdc7801a441008acc004c11cc148dd50054566002603000513371200490404df701452820a08980c00120a08a50414114a0828060a60026eb0c144006294104f209e32330010013300a37566060609c6ea8008c02c018896600200314bd7044c8cc88cc88cc008008004896600200310038991982b9ba733057375200a660ae60a8002660ae60aa00297ae0330030033059002305700141546eacc14800cdd7182780099801801982a0011829000a0a08a504128609e00314a3133002002305000141248268a60026eb8c124c118dd5000cdd7181418231baa001a400480508c8cc004004008896600200314bd6f7b63044c8cc124cdd818230009ba632330010013756609000444b30010018a5eb7bdb1822646609866ec0c124004dd418081bad304a00133003003304e002304c00141286600600660960046092002823888ca60020030038012002222598008014400626530010049826801e6002005375c609000337566092003222223259800980b800c00a260060028260c8ca6002003006802a00222259800801440062653001004982b801e6002005375c60a4003375a60a600300540748020c154009053280aa02440106096004824914a08190c0d8c0ccdd5180a98199baa0012259800800c40062a6606600420028190c0d4c0c8dd5000c5902f198059bac30343031375405003f1640c83030001302f001302e001302d001302837540031640946054604e6ea80522c8121024111191980480211801180618151baa00159800980e18139baa00189198029bab300b3029375400200712300898009bab300b30293754003375c605860526ea800e6eb8c02cc0a4dd5001a014409444646600200200644b30010018a6103d87a80008992cc004cdd7981698151baa0010048980799816000a5eb82266006006605c0048138c0b000502a11180f4c00400a6eb8c0a4c098dd5000cdd7180418131baa001401c2232598009809000c4c966002604600313300930220010038b2040301e3754007159800980b000c4c966002604600313300730220010038b2040301e37540071598009807000c4c8c96600260480050048b2042375c6044002603c6ea800e2c80d901b2036301c375400444b30013010301b3754005132323232323232323232323298009815800cdd698158064dd69815805cdd698158054dd69815804cdd698158044dd69815803cdd698158034dd69815802cdd698158024dd69815801244444444444b3001303700c89980f981b00709980d00580c4590340c0ac004c0a8004c0a4004c0a0004c09c004c098004c094004c090004c08c004c088004c084004c070dd50014590191802002116401c300900130043754013149a26cac8009"
|
|
8961
|
-
};
|
|
8962
|
-
|
|
8963
|
-
// src/contracts/gov/scripts.ts
|
|
8964
|
-
var mkGovValidatorFromSP = (params) => {
|
|
8965
|
-
return {
|
|
8966
|
-
type: "PlutusV3",
|
|
8967
|
-
script: (0, import_lucid58.applyParamsToScript)(_governanceValidator.cborHex, [
|
|
8968
|
-
castGovParams({
|
|
8969
|
-
gBiasTime: BigInt(params.gBiasTime),
|
|
8970
|
-
govNFT: fromSystemParamsAssetLucid(params.govNFT),
|
|
8971
|
-
pollToken: fromSystemParamsAssetLucid(params.pollToken),
|
|
8972
|
-
upgradeToken: fromSystemParamsAssetLucid(params.upgradeToken),
|
|
8973
|
-
indyAsset: fromSystemParamsAssetLucid(params.indyAsset),
|
|
8974
|
-
versionRecordToken: fromSystemParamsAssetLucid(
|
|
8975
|
-
params.versionRecordToken
|
|
8976
|
-
),
|
|
8977
|
-
iassetSymbol: params.iassetSymbol.unCurrencySymbol,
|
|
8978
|
-
iassetValHash: params.iassetValHash,
|
|
8979
|
-
pollManagerValHash: params.pollManagerValHash,
|
|
8980
|
-
daoIdentityToken: fromSystemParamsAssetLucid(params.daoIdentityToken),
|
|
8981
|
-
iAssetAuthToken: fromSystemParamsAssetLucid(params.iAssetAuthToken)
|
|
8982
|
-
})
|
|
8983
|
-
])
|
|
8984
|
-
};
|
|
8985
|
-
};
|
|
8986
|
-
|
|
8987
9012
|
// src/contracts/initialize/helpers.ts
|
|
8988
9013
|
var import_ts_pattern21 = require("ts-pattern");
|
|
8989
9014
|
|
|
@@ -9430,6 +9455,14 @@ var _stableswapValidator = {
|
|
|
9430
9455
|
};
|
|
9431
9456
|
|
|
9432
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
|
+
};
|
|
9433
9466
|
var mkStableswapValidatorFromSP = (params) => {
|
|
9434
9467
|
return {
|
|
9435
9468
|
type: "PlutusV3",
|
|
@@ -10697,6 +10730,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
10697
10730
|
ExecuteParams,
|
|
10698
10731
|
GovParams,
|
|
10699
10732
|
IAssetPriceInfoSchema,
|
|
10733
|
+
IAssetScriptParams,
|
|
10700
10734
|
INIT_TOKEN_NAMES,
|
|
10701
10735
|
InterestCollectionParamsSchema,
|
|
10702
10736
|
InterestOracleDatumSchema,
|
|
@@ -10736,6 +10770,7 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
10736
10770
|
adjustStakingPosition,
|
|
10737
10771
|
alwaysFailValidator,
|
|
10738
10772
|
annulRequest,
|
|
10773
|
+
attachOracle,
|
|
10739
10774
|
balance,
|
|
10740
10775
|
batchCollectInterest,
|
|
10741
10776
|
batchProcessStableswapOrders,
|
|
@@ -10849,7 +10884,10 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
10849
10884
|
mkCollectorValidatorFromSP,
|
|
10850
10885
|
mkExecuteValidator,
|
|
10851
10886
|
mkExecuteValidatorFromSP,
|
|
10887
|
+
mkGovValidator,
|
|
10888
|
+
mkGovValidatorFromSP,
|
|
10852
10889
|
mkIAssetTokenPolicy,
|
|
10890
|
+
mkIAssetValidatorFromSP,
|
|
10853
10891
|
mkInterestCollectionValidator,
|
|
10854
10892
|
mkInterestCollectionValidatorFromSP,
|
|
10855
10893
|
mkInterestOracleValidator,
|
|
@@ -10863,6 +10901,10 @@ async function updateStableswapPoolFees(stableswapPoolOutRef, stableswapFeeOutRe
|
|
|
10863
10901
|
mkRobValidatorFromSP,
|
|
10864
10902
|
mkSPInteger,
|
|
10865
10903
|
mkStabilityPoolAddr,
|
|
10904
|
+
mkStabilityPoolValidator,
|
|
10905
|
+
mkStabilityPoolValidatorFromSP,
|
|
10906
|
+
mkStableswapValidator,
|
|
10907
|
+
mkStableswapValidatorFromSP,
|
|
10866
10908
|
mkStakingValidatorFromSP,
|
|
10867
10909
|
mkTreasuryAddr,
|
|
10868
10910
|
mkTreasuryValidatorFromSP,
|