@indigo-labs/indigo-sdk 0.3.23 → 0.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -4
- package/dist/index.mjs +35 -38
- package/package.json +1 -1
- package/src/contracts/stability-pool/transactions.ts +2 -6
package/dist/index.js
CHANGED
|
@@ -7218,16 +7218,14 @@ async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
|
|
|
7218
7218
|
const datum = {
|
|
7219
7219
|
owner: (0, import_lucid29.fromHex)(pkh.hash),
|
|
7220
7220
|
iasset,
|
|
7221
|
-
state: initSpState,
|
|
7221
|
+
state: { ...initSpState, depositVal: mkSPInteger(amount) },
|
|
7222
7222
|
assetSums: [],
|
|
7223
7223
|
request: "Create",
|
|
7224
7224
|
lastRequestProcessingTime: 0n
|
|
7225
7225
|
};
|
|
7226
7226
|
return lucid.newTx().pay.ToContract(
|
|
7227
7227
|
(0, import_lucid29.credentialToAddress)(lucid.config().network, {
|
|
7228
|
-
hash:
|
|
7229
|
-
mkStabilityPoolValidatorFromSP(sysParams.stabilityPoolParams)
|
|
7230
|
-
),
|
|
7228
|
+
hash: sysParams.validatorHashes.stabilityPoolHash,
|
|
7231
7229
|
type: "Script"
|
|
7232
7230
|
}),
|
|
7233
7231
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -6956,7 +6956,6 @@ var mkGovValidatorFromSP = (params) => {
|
|
|
6956
6956
|
// src/contracts/stability-pool/transactions.ts
|
|
6957
6957
|
import {
|
|
6958
6958
|
fromText as fromText5,
|
|
6959
|
-
validatorToScriptHash as validatorToScriptHash3,
|
|
6960
6959
|
Data as Data32,
|
|
6961
6960
|
credentialToAddress as credentialToAddress3,
|
|
6962
6961
|
fromHex as fromHex9,
|
|
@@ -6989,16 +6988,14 @@ async function requestSpAccountCreation(assetAscii, amount, sysParams, lucid) {
|
|
|
6989
6988
|
const datum = {
|
|
6990
6989
|
owner: fromHex9(pkh.hash),
|
|
6991
6990
|
iasset,
|
|
6992
|
-
state: initSpState,
|
|
6991
|
+
state: { ...initSpState, depositVal: mkSPInteger(amount) },
|
|
6993
6992
|
assetSums: [],
|
|
6994
6993
|
request: "Create",
|
|
6995
6994
|
lastRequestProcessingTime: 0n
|
|
6996
6995
|
};
|
|
6997
6996
|
return lucid.newTx().pay.ToContract(
|
|
6998
6997
|
credentialToAddress3(lucid.config().network, {
|
|
6999
|
-
hash:
|
|
7000
|
-
mkStabilityPoolValidatorFromSP(sysParams.stabilityPoolParams)
|
|
7001
|
-
),
|
|
6998
|
+
hash: sysParams.validatorHashes.stabilityPoolHash,
|
|
7002
6999
|
type: "Script"
|
|
7003
7000
|
}),
|
|
7004
7001
|
{
|
|
@@ -9670,7 +9667,7 @@ import {
|
|
|
9670
9667
|
fromHex as fromHex16,
|
|
9671
9668
|
fromText as fromText11,
|
|
9672
9669
|
mintingPolicyToId as mintingPolicyToId2,
|
|
9673
|
-
validatorToScriptHash as
|
|
9670
|
+
validatorToScriptHash as validatorToScriptHash3
|
|
9674
9671
|
} from "@lucid-evolution/lucid";
|
|
9675
9672
|
import {
|
|
9676
9673
|
assetClassToUnit as assetClassToUnit2,
|
|
@@ -9832,7 +9829,7 @@ async function initCollector(lucid, collectorParams, numCollectors) {
|
|
|
9832
9829
|
tx.pay.ToContract(
|
|
9833
9830
|
createScriptAddress(
|
|
9834
9831
|
lucid.config().network,
|
|
9835
|
-
|
|
9832
|
+
validatorToScriptHash3(mkCollectorValidatorFromSP(collectorParams))
|
|
9836
9833
|
),
|
|
9837
9834
|
{
|
|
9838
9835
|
kind: "inline",
|
|
@@ -9877,7 +9874,7 @@ async function initCDPCreator(lucid, cdpCreatorParams, numCdpCreators) {
|
|
|
9877
9874
|
for (let i = 0; i < Number(numCdpCreators); i++) {
|
|
9878
9875
|
tx.pay.ToContract(
|
|
9879
9876
|
credentialToAddress4(lucid.config().network, {
|
|
9880
|
-
hash:
|
|
9877
|
+
hash: validatorToScriptHash3(
|
|
9881
9878
|
mkCDPCreatorValidatorFromSP(cdpCreatorParams)
|
|
9882
9879
|
),
|
|
9883
9880
|
type: "Script"
|
|
@@ -9893,7 +9890,7 @@ async function initCDPCreator(lucid, cdpCreatorParams, numCdpCreators) {
|
|
|
9893
9890
|
async function initTreasury(lucid, treasuryParams, daoAsset, indyAsset, treasuryIndyAmount, numTreasuryCollectors) {
|
|
9894
9891
|
const treasuryAddr = createScriptAddress(
|
|
9895
9892
|
lucid.config().network,
|
|
9896
|
-
|
|
9893
|
+
validatorToScriptHash3(mkTreasuryValidatorFromSP(treasuryParams)),
|
|
9897
9894
|
treasuryParams.treasuryUtxosStakeCredential != null ? fromSysParamsCredential(treasuryParams.treasuryUtxosStakeCredential) : void 0
|
|
9898
9895
|
);
|
|
9899
9896
|
const tx = lucid.newTx().pay.ToContract(
|
|
@@ -9916,7 +9913,7 @@ async function initStakingManager(lucid, stakingParams) {
|
|
|
9916
9913
|
const tx = lucid.newTx().pay.ToContract(
|
|
9917
9914
|
createScriptAddress(
|
|
9918
9915
|
lucid.config().network,
|
|
9919
|
-
|
|
9916
|
+
validatorToScriptHash3(mkStakingValidatorFromSP(stakingParams))
|
|
9920
9917
|
),
|
|
9921
9918
|
{
|
|
9922
9919
|
kind: "inline",
|
|
@@ -10006,7 +10003,7 @@ async function initializeAsset(lucid, iassetParams, iassetToken, collateralAsset
|
|
|
10006
10003
|
const collateralAssetTx = lucid.newTx().pay.ToContract(
|
|
10007
10004
|
createScriptAddress(
|
|
10008
10005
|
lucid.config().network,
|
|
10009
|
-
|
|
10006
|
+
validatorToScriptHash3(mkIAssetValidatorFromSP(iassetParams))
|
|
10010
10007
|
),
|
|
10011
10008
|
{
|
|
10012
10009
|
kind: "inline",
|
|
@@ -10043,7 +10040,7 @@ async function initializeAsset(lucid, iassetParams, iassetToken, collateralAsset
|
|
|
10043
10040
|
lucid.newTx().pay.ToContract(
|
|
10044
10041
|
createScriptAddress(
|
|
10045
10042
|
lucid.config().network,
|
|
10046
|
-
|
|
10043
|
+
validatorToScriptHash3(mkCdpValidatorFromSP(cdpParams))
|
|
10047
10044
|
),
|
|
10048
10045
|
{
|
|
10049
10046
|
kind: "inline",
|
|
@@ -10067,7 +10064,7 @@ async function initializeAsset(lucid, iassetParams, iassetToken, collateralAsset
|
|
|
10067
10064
|
const assetTx = lucid.newTx().pay.ToContract(
|
|
10068
10065
|
createScriptAddress(
|
|
10069
10066
|
lucid.config().network,
|
|
10070
|
-
|
|
10067
|
+
validatorToScriptHash3(mkIAssetValidatorFromSP(iassetParams))
|
|
10071
10068
|
),
|
|
10072
10069
|
{
|
|
10073
10070
|
kind: "inline",
|
|
@@ -10083,7 +10080,7 @@ async function initializeAsset(lucid, iassetParams, iassetToken, collateralAsset
|
|
|
10083
10080
|
};
|
|
10084
10081
|
const spTx = lucid.newTx().pay.ToContract(
|
|
10085
10082
|
credentialToAddress4(lucid.config().network, {
|
|
10086
|
-
hash:
|
|
10083
|
+
hash: validatorToScriptHash3(
|
|
10087
10084
|
mkStabilityPoolValidatorFromSP(stabilityPoolParams)
|
|
10088
10085
|
),
|
|
10089
10086
|
type: "Script"
|
|
@@ -10110,7 +10107,7 @@ async function initGovernance(lucid, governanceParams, govToken, initialAssets,
|
|
|
10110
10107
|
};
|
|
10111
10108
|
const tx = lucid.newTx().pay.ToContract(
|
|
10112
10109
|
credentialToAddress4(lucid.config().network, {
|
|
10113
|
-
hash:
|
|
10110
|
+
hash: validatorToScriptHash3(mkGovValidatorFromSP(governanceParams)),
|
|
10114
10111
|
type: "Script"
|
|
10115
10112
|
}),
|
|
10116
10113
|
{ kind: "inline", value: serialiseGovDatum(datum) },
|
|
@@ -10145,7 +10142,7 @@ import {
|
|
|
10145
10142
|
mintingPolicyToId as mintingPolicyToId3,
|
|
10146
10143
|
scriptHashToCredential as scriptHashToCredential4,
|
|
10147
10144
|
toHex as toHex16,
|
|
10148
|
-
validatorToScriptHash as
|
|
10145
|
+
validatorToScriptHash as validatorToScriptHash5
|
|
10149
10146
|
} from "@lucid-evolution/lucid";
|
|
10150
10147
|
import {
|
|
10151
10148
|
mkAssetsOf as mkAssetsOf15,
|
|
@@ -10248,7 +10245,7 @@ import {
|
|
|
10248
10245
|
credentialToRewardAddress as credentialToRewardAddress3,
|
|
10249
10246
|
fromHex as fromHex17,
|
|
10250
10247
|
fromText as fromText12,
|
|
10251
|
-
validatorToScriptHash as
|
|
10248
|
+
validatorToScriptHash as validatorToScriptHash4
|
|
10252
10249
|
} from "@lucid-evolution/lucid";
|
|
10253
10250
|
|
|
10254
10251
|
// src/validators/always-succeed-validator.ts
|
|
@@ -10274,7 +10271,7 @@ async function initPyth(lucid) {
|
|
|
10274
10271
|
currencySymbol: fromHex17(pythStatePolicyId),
|
|
10275
10272
|
tokenName: fromHex17(pythStateName)
|
|
10276
10273
|
};
|
|
10277
|
-
const alwaysSucceedsValidatorHash =
|
|
10274
|
+
const alwaysSucceedsValidatorHash = validatorToScriptHash4(
|
|
10278
10275
|
alwaysSucceedValidator
|
|
10279
10276
|
);
|
|
10280
10277
|
const pythStateDatum = {
|
|
@@ -10313,7 +10310,7 @@ async function initPyth(lucid) {
|
|
|
10313
10310
|
lucid,
|
|
10314
10311
|
lucid.newTx().pay.ToContract(
|
|
10315
10312
|
credentialToAddress5(lucid.config().network, {
|
|
10316
|
-
hash:
|
|
10313
|
+
hash: validatorToScriptHash4(alwaysSucceedValidator),
|
|
10317
10314
|
type: "Script"
|
|
10318
10315
|
}),
|
|
10319
10316
|
{ kind: "inline", value: serialisePythStateDatum(pythStateDatum) },
|
|
@@ -10325,7 +10322,7 @@ async function initPyth(lucid) {
|
|
|
10325
10322
|
lucid,
|
|
10326
10323
|
lucid.newTx().register.Stake(
|
|
10327
10324
|
credentialToRewardAddress3(lucid.config().network, {
|
|
10328
|
-
hash:
|
|
10325
|
+
hash: validatorToScriptHash4(alwaysSucceedValidator),
|
|
10329
10326
|
type: "Script"
|
|
10330
10327
|
})
|
|
10331
10328
|
)
|
|
@@ -10349,7 +10346,7 @@ async function initPythConfig(lucid, initialAssets, pythStateAsset) {
|
|
|
10349
10346
|
const pythFeedValidator = mkPythFeedValidator(
|
|
10350
10347
|
fromSysParamsPythFeedParams(val.pythFeedParams)
|
|
10351
10348
|
);
|
|
10352
|
-
const pythFeedValHash =
|
|
10349
|
+
const pythFeedValHash = validatorToScriptHash5(pythFeedValidator);
|
|
10353
10350
|
const pythFeedValScriptRef = await initScriptRef(
|
|
10354
10351
|
lucid,
|
|
10355
10352
|
pythFeedValidator
|
|
@@ -10358,7 +10355,7 @@ async function initPythConfig(lucid, initialAssets, pythStateAsset) {
|
|
|
10358
10355
|
lucid,
|
|
10359
10356
|
lucid.newTx().register.Stake(
|
|
10360
10357
|
credentialToRewardAddress4(lucid.config().network, {
|
|
10361
|
-
hash:
|
|
10358
|
+
hash: validatorToScriptHash5(pythFeedValidator),
|
|
10362
10359
|
type: "Script"
|
|
10363
10360
|
})
|
|
10364
10361
|
)
|
|
@@ -10424,7 +10421,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10424
10421
|
tokenName: fromHex18(fromText13(tn.versionRecord))
|
|
10425
10422
|
};
|
|
10426
10423
|
const versionRegistryValidator = mkVersionRegistryValidator();
|
|
10427
|
-
const versionRegistryValHash =
|
|
10424
|
+
const versionRegistryValHash = validatorToScriptHash5(
|
|
10428
10425
|
versionRegistryValidator
|
|
10429
10426
|
);
|
|
10430
10427
|
const cdpCreatorAsset = await mintOneTimeAsset(
|
|
@@ -10445,7 +10442,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10445
10442
|
versionRecordToken: toSystemParamsAsset(versionRecordToken)
|
|
10446
10443
|
};
|
|
10447
10444
|
const collectorValidator = mkCollectorValidatorFromSP(collectorParams);
|
|
10448
|
-
const collectorValHash =
|
|
10445
|
+
const collectorValHash = validatorToScriptHash5(collectorValidator);
|
|
10449
10446
|
const stakingParams = {
|
|
10450
10447
|
stakingManagerNFT: toSystemParamsAsset(stakingManagerAsset),
|
|
10451
10448
|
stakingToken: toSystemParamsAsset(stakingToken),
|
|
@@ -10454,7 +10451,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10454
10451
|
indyToken: toSystemParamsAsset(indyAsset),
|
|
10455
10452
|
collectorValHash
|
|
10456
10453
|
};
|
|
10457
|
-
const stakingValHash =
|
|
10454
|
+
const stakingValHash = validatorToScriptHash5(
|
|
10458
10455
|
mkStakingValidatorFromSP(stakingParams)
|
|
10459
10456
|
);
|
|
10460
10457
|
await initStakingManager(lucid, stakingParams);
|
|
@@ -10463,7 +10460,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10463
10460
|
versionRecordToken: toSystemParamsAsset(versionRecordToken)
|
|
10464
10461
|
};
|
|
10465
10462
|
const iassetValidator = mkIAssetValidatorFromSP(iassetParams);
|
|
10466
|
-
const iassetValHash =
|
|
10463
|
+
const iassetValHash = validatorToScriptHash5(iassetValidator);
|
|
10467
10464
|
const assetSymbolPolicy = mkIAssetTokenPolicy(cdpToken);
|
|
10468
10465
|
const assetSymbol = mintingPolicyToId3(assetSymbolPolicy);
|
|
10469
10466
|
const snapshotEpochToScaleToSumToken = deriveAuthToken(
|
|
@@ -10488,14 +10485,14 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10488
10485
|
stakeCredential: spStakingCred
|
|
10489
10486
|
};
|
|
10490
10487
|
const stabilityPoolValidator = mkStabilityPoolValidatorFromSP(stabilityPoolParams);
|
|
10491
|
-
const stabilityPoolValHash =
|
|
10488
|
+
const stabilityPoolValHash = validatorToScriptHash5(stabilityPoolValidator);
|
|
10492
10489
|
const treasuryParams = {
|
|
10493
10490
|
upgradeToken: toSystemParamsAsset(upgradeToken),
|
|
10494
10491
|
versionRecordToken: toSystemParamsAsset(versionRecordToken),
|
|
10495
10492
|
treasuryUtxosStakeCredential: treasuryStakingCred
|
|
10496
10493
|
};
|
|
10497
10494
|
const treasuryValidator = mkTreasuryValidatorFromSP(treasuryParams);
|
|
10498
|
-
const treasuryValHash =
|
|
10495
|
+
const treasuryValHash = validatorToScriptHash5(treasuryValidator);
|
|
10499
10496
|
await initTreasury(
|
|
10500
10497
|
lucid,
|
|
10501
10498
|
treasuryParams,
|
|
@@ -10518,7 +10515,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10518
10515
|
const interestCollectionValidator = mkInterestCollectionValidatorFromSP(
|
|
10519
10516
|
interestCollectionParams
|
|
10520
10517
|
);
|
|
10521
|
-
const interestCollectionValHash =
|
|
10518
|
+
const interestCollectionValHash = validatorToScriptHash5(
|
|
10522
10519
|
interestCollectionValidator
|
|
10523
10520
|
);
|
|
10524
10521
|
await initInterestCollector(
|
|
@@ -10547,7 +10544,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10547
10544
|
biasTime
|
|
10548
10545
|
};
|
|
10549
10546
|
const cdpRedeemValidator = mkCdpRedeemValidatorFromSP(cdpRedeemParams);
|
|
10550
|
-
const cdpRedeemValHash =
|
|
10547
|
+
const cdpRedeemValHash = validatorToScriptHash5(cdpRedeemValidator);
|
|
10551
10548
|
const cdpRedeemRewardAddr = credentialToRewardAddress4(
|
|
10552
10549
|
lucid.config().network,
|
|
10553
10550
|
scriptHashToCredential4(cdpRedeemValHash)
|
|
@@ -10569,7 +10566,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10569
10566
|
biasTime
|
|
10570
10567
|
};
|
|
10571
10568
|
const cdpValidator = mkCdpValidatorFromSP(cdpParams);
|
|
10572
|
-
const cdpValHash =
|
|
10569
|
+
const cdpValHash = validatorToScriptHash5(cdpValidator);
|
|
10573
10570
|
const cdpCreatorParams = {
|
|
10574
10571
|
cdpCreatorNft: toSystemParamsAsset(cdpCreatorAsset),
|
|
10575
10572
|
cdpAssetCs: { unCurrencySymbol: assetSymbol },
|
|
@@ -10584,7 +10581,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10584
10581
|
biasTime: cdpParams.biasTime
|
|
10585
10582
|
};
|
|
10586
10583
|
const cdpCreatorValidator = mkCDPCreatorValidatorFromSP(cdpCreatorParams);
|
|
10587
|
-
const cdpCreatorValHash =
|
|
10584
|
+
const cdpCreatorValHash = validatorToScriptHash5(cdpCreatorValidator);
|
|
10588
10585
|
const stableswapParams = {
|
|
10589
10586
|
iassetSymbol: { unCurrencySymbol: assetSymbol },
|
|
10590
10587
|
cdpToken: toSystemParamsAsset(cdpToken),
|
|
@@ -10593,7 +10590,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10593
10590
|
treasuryValHash
|
|
10594
10591
|
};
|
|
10595
10592
|
const stableswapValidator = mkStableswapValidatorFromSP(stableswapParams);
|
|
10596
|
-
const stableswapValHash =
|
|
10593
|
+
const stableswapValHash = validatorToScriptHash5(stableswapValidator);
|
|
10597
10594
|
await initCollector(lucid, collectorParams, numCollectors);
|
|
10598
10595
|
const assetInfos = [];
|
|
10599
10596
|
if (initialAssets.length > 0) {
|
|
@@ -10696,7 +10693,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10696
10693
|
treasuryValHash
|
|
10697
10694
|
};
|
|
10698
10695
|
const executeValidator = mkExecuteValidatorFromSP(executeParams);
|
|
10699
|
-
const executeValHash =
|
|
10696
|
+
const executeValHash = validatorToScriptHash5(executeValidator);
|
|
10700
10697
|
const pollShardParams = {
|
|
10701
10698
|
pollToken: toSystemParamsAsset(pollToken),
|
|
10702
10699
|
stakingToken: toSystemParamsAsset(stakingToken),
|
|
@@ -10704,7 +10701,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10704
10701
|
stakingValHash
|
|
10705
10702
|
};
|
|
10706
10703
|
const pollShardValidator = mkPollShardValidatorFromSP(pollShardParams);
|
|
10707
|
-
const pollShardValHash =
|
|
10704
|
+
const pollShardValHash = validatorToScriptHash5(pollShardValidator);
|
|
10708
10705
|
const pollManagerParams = {
|
|
10709
10706
|
govNFT: toSystemParamsAsset(govNftAsset),
|
|
10710
10707
|
pollToken: toSystemParamsAsset(pollToken),
|
|
@@ -10716,7 +10713,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10716
10713
|
treasuryValHash
|
|
10717
10714
|
};
|
|
10718
10715
|
const pollManagerValidator = mkPollManagerValidatorFromSP(pollManagerParams);
|
|
10719
|
-
const pollManagerValHash =
|
|
10716
|
+
const pollManagerValHash = validatorToScriptHash5(pollManagerValidator);
|
|
10720
10717
|
const govParams = {
|
|
10721
10718
|
gBiasTime: gBiasTime ? BigInt(gBiasTime) : BigInt(biasTime),
|
|
10722
10719
|
govNFT: toSystemParamsAsset(govNftAsset),
|
|
@@ -10731,7 +10728,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10731
10728
|
iassetSymbol: { unCurrencySymbol: assetSymbol }
|
|
10732
10729
|
};
|
|
10733
10730
|
const govValidator = mkGovValidatorFromSP(govParams);
|
|
10734
|
-
const govValHash =
|
|
10731
|
+
const govValHash = validatorToScriptHash5(govValidator);
|
|
10735
10732
|
await initGovernance(
|
|
10736
10733
|
lucid,
|
|
10737
10734
|
govParams,
|
|
@@ -10747,7 +10744,7 @@ async function init(lucid, defaultInitialAssets, currentSlot, mkPythBasedAssets
|
|
|
10747
10744
|
versionRecordToken: cdpParams.versionRecordToken
|
|
10748
10745
|
};
|
|
10749
10746
|
const robValidator = mkRobValidatorFromSP(robParams);
|
|
10750
|
-
const robValHash =
|
|
10747
|
+
const robValHash = validatorToScriptHash5(robValidator);
|
|
10751
10748
|
const cdpTokenPolicy = mkAuthTokenPolicy(cdpCreatorAsset, fromText13(tn.cdp));
|
|
10752
10749
|
const iassetTokenPolicy = mkAuthTokenPolicy(
|
|
10753
10750
|
upgradeToken,
|
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
fromText,
|
|
3
3
|
LucidEvolution,
|
|
4
4
|
TxBuilder,
|
|
5
|
-
validatorToScriptHash,
|
|
6
5
|
Data,
|
|
7
6
|
UTxO,
|
|
8
7
|
credentialToAddress,
|
|
@@ -18,7 +17,6 @@ import {
|
|
|
18
17
|
SystemParams,
|
|
19
18
|
} from '../../types/system-params';
|
|
20
19
|
import { addrDetails, getInlineDatumOrThrow } from '../../utils/lucid-utils';
|
|
21
|
-
import { mkStabilityPoolValidatorFromSP } from './scripts';
|
|
22
20
|
import {
|
|
23
21
|
BASE_MAX_TX_FEE,
|
|
24
22
|
createProcessRequestAccountRedeemer,
|
|
@@ -81,7 +79,7 @@ export async function requestSpAccountCreation(
|
|
|
81
79
|
const datum: AccountContent = {
|
|
82
80
|
owner: fromHex(pkh.hash),
|
|
83
81
|
iasset: iasset,
|
|
84
|
-
state: initSpState,
|
|
82
|
+
state: { ...initSpState, depositVal: mkSPInteger(amount) },
|
|
85
83
|
assetSums: [],
|
|
86
84
|
request: 'Create',
|
|
87
85
|
lastRequestProcessingTime: 0n,
|
|
@@ -91,9 +89,7 @@ export async function requestSpAccountCreation(
|
|
|
91
89
|
.newTx()
|
|
92
90
|
.pay.ToContract(
|
|
93
91
|
credentialToAddress(lucid.config().network!, {
|
|
94
|
-
hash:
|
|
95
|
-
mkStabilityPoolValidatorFromSP(sysParams.stabilityPoolParams),
|
|
96
|
-
),
|
|
92
|
+
hash: sysParams.validatorHashes.stabilityPoolHash,
|
|
97
93
|
type: 'Script',
|
|
98
94
|
}),
|
|
99
95
|
{
|