@indigo-labs/indigo-sdk 0.2.41 → 0.2.43
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 +35 -47
- package/dist/index.d.ts +35 -47
- package/dist/index.js +127 -160
- package/dist/index.mjs +96 -126
- package/package.json +1 -1
- package/src/contracts/gov/transactions.ts +5 -5
- package/src/contracts/stability-pool/transactions.ts +1 -3
- package/src/index.ts +0 -3
package/dist/index.mjs
CHANGED
|
@@ -3183,7 +3183,7 @@ async function createProposal(proposalContent, treasuryWithdrawal, sysParams, lu
|
|
|
3183
3183
|
)
|
|
3184
3184
|
)
|
|
3185
3185
|
)
|
|
3186
|
-
).validFrom(Number(currentTime) - ONE_SECOND).validTo(Number(currentTime + sysParams.govParams.gBiasTime) - ONE_SECOND).addSigner(ownAddr),
|
|
3186
|
+
).validFrom(Number(currentTime) - ONE_SECOND).validTo(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND).addSigner(ownAddr),
|
|
3187
3187
|
newPollId
|
|
3188
3188
|
];
|
|
3189
3189
|
}
|
|
@@ -3228,7 +3228,7 @@ async function createShardsChunks(chunkSize, pollManager, sysParams, currentSlot
|
|
|
3228
3228
|
);
|
|
3229
3229
|
const pollNft = fromSystemParamsAsset(sysParams.govParams.pollToken);
|
|
3230
3230
|
const tx = lucid.newTx().validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
3231
|
-
Number(currentTime + sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
|
|
3231
|
+
Number(currentTime) + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
|
|
3232
3232
|
).mintAssets(mkAssetsOf(pollNft, shardsCount), Data19.void()).readFrom([pollAuthTokenPolicyRefScriptUtxo, pollManagerRefScriptUtxo]).collectFrom(
|
|
3233
3233
|
[pollManagerUtxo],
|
|
3234
3234
|
serialisePollManagerRedeemer({ CreateShards: { currentTime } })
|
|
@@ -3422,7 +3422,7 @@ async function mergeShards(pollManager, shardsOutRefs, sysParams, lucid, current
|
|
|
3422
3422
|
)(shardUtxos);
|
|
3423
3423
|
const pollNft = fromSystemParamsAsset(sysParams.govParams.pollToken);
|
|
3424
3424
|
return lucid.newTx().validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
3425
|
-
Number(currentTime + sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
|
|
3425
|
+
Number(currentTime) + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
|
|
3426
3426
|
).readFrom([
|
|
3427
3427
|
pollShardRefScriptUtxo,
|
|
3428
3428
|
pollManagerRefScriptUtxo,
|
|
@@ -3523,7 +3523,7 @@ async function endProposal(pollManager, gov, sysParams, lucid, currentSlot) {
|
|
|
3523
3523
|
1n
|
|
3524
3524
|
);
|
|
3525
3525
|
const tx = lucid.newTx().validFrom(Number(currentTime) - ONE_SECOND).validTo(
|
|
3526
|
-
Number(currentTime + sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
|
|
3526
|
+
Number(currentTime) + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
|
|
3527
3527
|
).readFrom([
|
|
3528
3528
|
pollManagerRefScriptUtxo,
|
|
3529
3529
|
govRefScriptUtxo,
|
|
@@ -3931,7 +3931,7 @@ async function executeProposal(execute, gov, treasuryWithdrawal, allIAssetOrefs,
|
|
|
3931
3931
|
govUtxo.assets
|
|
3932
3932
|
);
|
|
3933
3933
|
}).exhaustive();
|
|
3934
|
-
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(Number(currentTime + sysParams.govParams.gBiasTime) - ONE_SECOND).collectFrom([executeUtxo], Data19.void()).mintAssets(
|
|
3934
|
+
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo]).validFrom(Number(currentTime) - ONE_SECOND).validTo(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND).collectFrom([executeUtxo], Data19.void()).mintAssets(
|
|
3935
3935
|
mkAssetsOf(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
|
|
3936
3936
|
Data19.void()
|
|
3937
3937
|
).addSigner(ownAddr);
|
|
@@ -4353,7 +4353,7 @@ async function processSpRequest(asset, stabilityPoolUtxo, accountUtxo, govUtxo,
|
|
|
4353
4353
|
{
|
|
4354
4354
|
lovelace: stabilityPoolUtxo.assets.lovelace + BigInt(params.stabilityPoolParams.accountAdjustmentFeeLovelaces) - reward,
|
|
4355
4355
|
[params.stabilityPoolParams.stabilityPoolToken[0].unCurrencySymbol + fromText5(params.stabilityPoolParams.stabilityPoolToken[1].unTokenName)]: 1n,
|
|
4356
|
-
[params.stabilityPoolParams.assetSymbol.unCurrencySymbol + fromText5(asset)]: stabilityPoolUtxo.assets[params.stabilityPoolParams.assetSymbol.unCurrencySymbol + fromText5(asset)] + balanceChange + withdrawalFee
|
|
4356
|
+
[params.stabilityPoolParams.assetSymbol.unCurrencySymbol + fromText5(asset)]: stabilityPoolUtxo.assets[params.stabilityPoolParams.assetSymbol.unCurrencySymbol + fromText5(asset)] ?? 0n + balanceChange + withdrawalFee
|
|
4357
4357
|
}
|
|
4358
4358
|
);
|
|
4359
4359
|
tx.pay.ToContract(
|
|
@@ -5016,92 +5016,6 @@ async function feedInterestOracle(params, newInterestRate, lucid, assetClass, ut
|
|
|
5016
5016
|
return tx;
|
|
5017
5017
|
}
|
|
5018
5018
|
|
|
5019
|
-
// src/contracts/price-oracle/transactions.ts
|
|
5020
|
-
import {
|
|
5021
|
-
addAssets as addAssets8,
|
|
5022
|
-
fromText as fromText8,
|
|
5023
|
-
slotToUnixTime as slotToUnixTime6,
|
|
5024
|
-
validatorToAddress as validatorToAddress2
|
|
5025
|
-
} from "@lucid-evolution/lucid";
|
|
5026
|
-
|
|
5027
|
-
// src/contracts/price-oracle/scripts.ts
|
|
5028
|
-
import {
|
|
5029
|
-
applyParamsToScript as applyParamsToScript8
|
|
5030
|
-
} from "@lucid-evolution/lucid";
|
|
5031
|
-
var priceOracleValidatorData = {
|
|
5032
|
-
type: "PlutusV2",
|
|
5033
|
-
cborHex: "590ba5590ba20100003232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323233027222232325335333006533357346074607e0022646605a60586ae84004dd69aba135744002607c00206e64a666ae68c0ecc1000044c8c8c848cc00400c008c0b8d5d09aba2002375a6ae84004c0fc0040e0dd50022999ab9a303a303f002132321233001003002357426ae88c0fc00cd5d0981f00101b8890008a99ab9c49103505435001637540086ea8004cc09c8888c8d4014888d40188c88c94cd54cd4ccd54c0d40e0c0a80a4c0ac01ccc0b08004d40048888888888880100e44cd5ce24812d546865207472616e73616374696f6e206973206e6f74207369676e6564206279206f7261636c65206f776e657200030132533553355335333553036039302b02a253335302135001202103e215333573466ebcc118cd5d0182319aba0375000a6ec4080cd5d01ba835500b03937620400022a66a666036446a0044466603e446a00444a666ae68c12c004400c4cc11848ccc00401c00c00800c00c0040c0cd54c0e80ec8d400488cc0e0008cd54c0f40f88d400488cc0ec008ccd4004dc0a4000e048cdc0800a400000266aa607407646a0024466070004666a002466aa607c07e46a0024466078004604600200244666038066004002466aa607c07e46a0024466078004604000200266602e05c666050400204e6a004404e0060784426a004444a66a0082a666ae68cdd78018238a999ab9a3375e00408e2a666ae68cdc4000a400006e2666ae68cdc4800a410125e80206a07006e06e44072064407e6044014074266ae712401024c310003103a1335738921156f757470757420646f6573206e6f74206d6174636800031153355333573466e2400d20001335738921165072696365206d75737420626520706f7369746976650003103a15335533535353301275a6a00407e06e44a666a00442a666ae68cdc419b8000100935500c03a0331333573466e24004d540300e80c40d00c80c84d4cc049d69a80101f911a801112999a99980980a980f19b8100900b0021533500113330120150030081333012015003008034133301201500300803003a13357389212345787069726174696f6e2074696d65206973206e6f742070726f7065726c792073657400031030030333025200102435302635533530270092100116036202402f302d350080393302f3016337000020060542a666a602e6aa66a60320022602602a442a66a0022004442602e032402e02842a66a6666666ae900048c94ccd5cd181d98200008991999aab9f001202d23233335573e002405e46666aae7cd5d1001119299a9999999aba400123253335734608660900022646666aae7c00480d48cccd55cf9aba20022533530203574200642605e00206a406c07a078608e0020646ea800880c880c880c880c80e4854cd4c070d5d08029098159981a8010008188181aba1005203003703635744004068607e0020546ea800880a880a880a880a80c48400405480548c94ccd5cd181b181d800899191919091998008028018011bad357426ae88008dd69aba10013574460760046ae84c0e80040ccdd50009111a801111a801912999a9998040038020010a99a8018800819814819911192999a80190a999a80190a999a80290980200b0980180a8a999a80210980200b0980180a80c0060a999a80210980180a8980100a0a999a80190980180a8980100a00b8a999a801100700b0068a999a80110a999a80210980180a8980100a0a999a80190980180a8980100a00b8058a999a80190980100a098008098a999a80110980100a0980080980b12999a80110a999a80210a999a802109998040038010008b0b0b0060a999a80190a999a801909998038030010008b0b0b00580691a80091111111003891999999980091199ab9a3370e00400204004644a666ae68cdc38010008098a999ab9a3371200400201401044666ae68cdc400100081001191199ab9a3371200400204004644666ae68cdc480100081181011199ab9a3371000400204604044a666ae68cdc480100088008801112999ab9a33712004002200420024464a666ae68c0c8c0dc0044c8c8cc0994ccd5cd181a181c801099813198038029aba130380023006357426ae88c0e00080c54ccd5cd181a181c800899813198038029aba130380013006357426ae88c0e00040c4dd51aba135744606e0046ea8d5d0981b0008179baa0012325333573460620020522a666ae68c0c000407c0b4c0d0dd50009119192999ab9a303300100815333573460640022601460086ae84c0d400854ccd5cd1818800803017181a8009baa00122233355302302702a335530260272350012233024002300b001333553023027223500222533533355302802b301d01c235001223300a002005006100313302e00400301c001335530260272350012233024002330382253350011300a003221350022253353300c002008112223300200a0041300600300400211009212223001004112220012230302253350011003221330060023004001212223003004233333335748002403040304030460206eb4008806007c94cd5ce2481286578706563746564206f6e6c7920612073696e676c6520636f6e74696e75696e67206f7574707574001615335738920117496e76616c696420646174756d20696e206f757470757400164988880088c8c94ccd5cd1813000899091118010021aba13028002153335734604a002264244460020086ae84c0a000854ccd5cd181200080201098140009baa00111003253353007001213335530150192235300535300935003019222200422353007350042222004225333573466ebc01000854ccd5cd19baf0030011330220060051005100500e3300d00735300f3500201b22222222222200a15335738921024c660016232533357346040604a0022646424660020060046ae84d5d118128011aba1302400101d3754002444006660024002eb4888cc09088cccd55cf80090071191980e9980a180398138009803181300098021aba2003357420040306eac0048c94ccd5cd180e181080089919191919190919998008038028018011aba1357440046ae84004d5d10011aba10013574460420046ae84c080004064dd5000919191999aa999ab9a3370e90030008990911118020029aba13020002153335734603c00226424444600400a6ae84c08000854ccd5cd180e8008990911118008029aba13020002153335734603800226424444600600a6ae84c0800080648034803480348ccd54c048054cc03c894cd40088400c400403494ccd5cd19baf002350010181300600100d3300923253335734603e60480022646424660020060046ae84d5d118120011aba1302300101c37540026a60166a00802e44444444444401860400026ea8d40040408488c00800c48cc004894cd400804c40040208cc02488ccd400c04c008004d400403488ccd5cd19baf002001004007223301c2233335573e002400c466028600a6ae84008c00cd5d10010081bac001100d23253335734602860320022646464646464646464646464646464646464646464642466666666666600202e02a02602201e01a01601200e00a0060046ae84d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d1180c8011aba1301800101137540022002200c464a666ae68c044c0580044dd69aba1301500100e37540024424660020060044446006600400260244422444a66a00220044426600a004666aa600e01600a00800260224422444a66a00226a00600c442666a00a0186008004666aa600e01400a00800244002601e442244a66a00200c44266014600800466aa600c00e00800224002220024400444244660020080062a66ae712411f496e76616c696420646174756d20746f20636865636b4f776e4f757470757400161533573892010350543100162222222222220054c1014000370e90001b8748008dc3a40086e9520005573caae748c8c00400488cc00cc008008005"
|
|
5034
|
-
};
|
|
5035
|
-
function mkPriceOracleValidator(params) {
|
|
5036
|
-
return {
|
|
5037
|
-
type: priceOracleValidatorData.type,
|
|
5038
|
-
script: applyParamsToScript8(priceOracleValidatorData.cborHex, [
|
|
5039
|
-
castPriceOracleParams(params)
|
|
5040
|
-
])
|
|
5041
|
-
};
|
|
5042
|
-
}
|
|
5043
|
-
|
|
5044
|
-
// src/contracts/price-oracle/transactions.ts
|
|
5045
|
-
async function startPriceOracleTx(lucid, assetName, startPrice, oracleParams, now = Date.now(), refOutRef) {
|
|
5046
|
-
if (!refOutRef) {
|
|
5047
|
-
refOutRef = (await lucid.wallet().getUtxos())[0];
|
|
5048
|
-
}
|
|
5049
|
-
const [tx, oracleNftPolicyId] = await oneShotMintTx(lucid, {
|
|
5050
|
-
referenceOutRef: {
|
|
5051
|
-
txHash: refOutRef.txHash,
|
|
5052
|
-
outputIdx: BigInt(refOutRef.outputIndex)
|
|
5053
|
-
},
|
|
5054
|
-
mintAmounts: [
|
|
5055
|
-
{
|
|
5056
|
-
tokenName: fromText8(assetName),
|
|
5057
|
-
amount: 1n
|
|
5058
|
-
}
|
|
5059
|
-
]
|
|
5060
|
-
});
|
|
5061
|
-
const priceOracleNft = {
|
|
5062
|
-
currencySymbol: oracleNftPolicyId,
|
|
5063
|
-
tokenName: fromText8(assetName)
|
|
5064
|
-
};
|
|
5065
|
-
const oracleValidator = mkPriceOracleValidator(oracleParams);
|
|
5066
|
-
const oracleDatum = {
|
|
5067
|
-
price: startPrice,
|
|
5068
|
-
expiration: BigInt(now) + oracleParams.expiration
|
|
5069
|
-
};
|
|
5070
|
-
tx.pay.ToContract(
|
|
5071
|
-
validatorToAddress2(lucid.config().network, oracleValidator),
|
|
5072
|
-
{ kind: "inline", value: serialisePriceOracleDatum(oracleDatum) },
|
|
5073
|
-
addAssets8(mkLovelacesOf(5000000n), mkAssetsOf(priceOracleNft, 1n))
|
|
5074
|
-
);
|
|
5075
|
-
return [tx, { oracleNft: priceOracleNft }];
|
|
5076
|
-
}
|
|
5077
|
-
async function feedPriceOracleTx(lucid, oracle, newPrice, oracleParams, currentSlot) {
|
|
5078
|
-
const network = lucid.config().network;
|
|
5079
|
-
const currentTime = BigInt(slotToUnixTime6(network, currentSlot));
|
|
5080
|
-
const priceOracleUtxo = await resolveUtxo(
|
|
5081
|
-
oracle,
|
|
5082
|
-
lucid,
|
|
5083
|
-
"Expected a single price oracle UTXO"
|
|
5084
|
-
);
|
|
5085
|
-
const oracleValidator = mkPriceOracleValidator(oracleParams);
|
|
5086
|
-
return lucid.newTx().validFrom(Number(currentTime - oracleParams.biasTime) + ONE_SECOND).validTo(Number(currentTime + oracleParams.biasTime) - ONE_SECOND).attach.SpendingValidator(oracleValidator).collectFrom(
|
|
5087
|
-
[priceOracleUtxo],
|
|
5088
|
-
serialisePriceOracleRedeemer({
|
|
5089
|
-
currentTime,
|
|
5090
|
-
newPrice
|
|
5091
|
-
})
|
|
5092
|
-
).pay.ToContract(
|
|
5093
|
-
priceOracleUtxo.address,
|
|
5094
|
-
{
|
|
5095
|
-
kind: "inline",
|
|
5096
|
-
value: serialisePriceOracleDatum({
|
|
5097
|
-
price: newPrice,
|
|
5098
|
-
expiration: currentTime + oracleParams.expiration
|
|
5099
|
-
})
|
|
5100
|
-
},
|
|
5101
|
-
priceOracleUtxo.assets
|
|
5102
|
-
).addSignerKey(oracleParams.owner);
|
|
5103
|
-
}
|
|
5104
|
-
|
|
5105
5019
|
// src/contracts/version-registry/types.ts
|
|
5106
5020
|
import { Data as Data25 } from "@lucid-evolution/lucid";
|
|
5107
5021
|
var VersionRecordTokenParamsSchema = Data25.Object({
|
|
@@ -5114,7 +5028,7 @@ function castVersionRecordTokenParams(params) {
|
|
|
5114
5028
|
|
|
5115
5029
|
// src/contracts/version-registry/scripts.ts
|
|
5116
5030
|
import {
|
|
5117
|
-
applyParamsToScript as
|
|
5031
|
+
applyParamsToScript as applyParamsToScript8
|
|
5118
5032
|
} from "@lucid-evolution/lucid";
|
|
5119
5033
|
|
|
5120
5034
|
// src/validators/version-record-policy.ts
|
|
@@ -5135,7 +5049,7 @@ var _versionRegistryValidator = {
|
|
|
5135
5049
|
function mkVersionRecordTokenPolicy(params) {
|
|
5136
5050
|
return {
|
|
5137
5051
|
type: "PlutusV2",
|
|
5138
|
-
script:
|
|
5052
|
+
script: applyParamsToScript8(_versionRecordTokenPolicy.cborHex, [
|
|
5139
5053
|
castVersionRecordTokenParams(params)
|
|
5140
5054
|
])
|
|
5141
5055
|
};
|
|
@@ -5149,9 +5063,9 @@ var mkVersionRegistryValidator = () => {
|
|
|
5149
5063
|
|
|
5150
5064
|
// src/contracts/collector/scripts.ts
|
|
5151
5065
|
import {
|
|
5152
|
-
applyParamsToScript as
|
|
5066
|
+
applyParamsToScript as applyParamsToScript9,
|
|
5153
5067
|
Constr as Constr4,
|
|
5154
|
-
fromText as
|
|
5068
|
+
fromText as fromText8
|
|
5155
5069
|
} from "@lucid-evolution/lucid";
|
|
5156
5070
|
|
|
5157
5071
|
// src/validators/collector-validator.ts
|
|
@@ -5165,19 +5079,19 @@ var _collectorValidator = {
|
|
|
5165
5079
|
var mkCollectorValidatorFromSP = (params) => {
|
|
5166
5080
|
return {
|
|
5167
5081
|
type: "PlutusV2",
|
|
5168
|
-
script:
|
|
5082
|
+
script: applyParamsToScript9(_collectorValidator.cborHex, [
|
|
5169
5083
|
new Constr4(0, [
|
|
5170
5084
|
new Constr4(0, [
|
|
5171
5085
|
params.stakingManagerNFT[0].unCurrencySymbol,
|
|
5172
|
-
|
|
5086
|
+
fromText8(params.stakingManagerNFT[1].unTokenName)
|
|
5173
5087
|
]),
|
|
5174
5088
|
new Constr4(0, [
|
|
5175
5089
|
params.stakingToken[0].unCurrencySymbol,
|
|
5176
|
-
|
|
5090
|
+
fromText8(params.stakingToken[1].unTokenName)
|
|
5177
5091
|
]),
|
|
5178
5092
|
new Constr4(0, [
|
|
5179
5093
|
params.versionRecordToken[0].unCurrencySymbol,
|
|
5180
|
-
|
|
5094
|
+
fromText8(params.versionRecordToken[1].unTokenName)
|
|
5181
5095
|
])
|
|
5182
5096
|
])
|
|
5183
5097
|
])
|
|
@@ -5186,9 +5100,9 @@ var mkCollectorValidatorFromSP = (params) => {
|
|
|
5186
5100
|
|
|
5187
5101
|
// src/contracts/treasury/scripts.ts
|
|
5188
5102
|
import {
|
|
5189
|
-
applyParamsToScript as
|
|
5103
|
+
applyParamsToScript as applyParamsToScript10,
|
|
5190
5104
|
Constr as Constr5,
|
|
5191
|
-
fromText as
|
|
5105
|
+
fromText as fromText9
|
|
5192
5106
|
} from "@lucid-evolution/lucid";
|
|
5193
5107
|
|
|
5194
5108
|
// src/validators/treasury-validator.ts
|
|
@@ -5202,15 +5116,15 @@ var _treasuryValidator = {
|
|
|
5202
5116
|
var mkTreasuryValidatorFromSP = (params) => {
|
|
5203
5117
|
return {
|
|
5204
5118
|
type: "PlutusV2",
|
|
5205
|
-
script:
|
|
5119
|
+
script: applyParamsToScript10(_treasuryValidator.cborHex, [
|
|
5206
5120
|
new Constr5(0, [
|
|
5207
5121
|
new Constr5(0, [
|
|
5208
5122
|
params.upgradeToken[0].unCurrencySymbol,
|
|
5209
|
-
|
|
5123
|
+
fromText9(params.upgradeToken[1].unTokenName)
|
|
5210
5124
|
]),
|
|
5211
5125
|
new Constr5(0, [
|
|
5212
5126
|
params.versionRecordToken[0].unCurrencySymbol,
|
|
5213
|
-
|
|
5127
|
+
fromText9(params.versionRecordToken[1].unTokenName)
|
|
5214
5128
|
]),
|
|
5215
5129
|
params.treasuryUtxosStakeCredential ? new Constr5(0, [
|
|
5216
5130
|
new Constr5(0, [
|
|
@@ -5226,7 +5140,7 @@ var mkTreasuryValidatorFromSP = (params) => {
|
|
|
5226
5140
|
|
|
5227
5141
|
// src/contracts/execute/scripts.ts
|
|
5228
5142
|
import {
|
|
5229
|
-
applyParamsToScript as
|
|
5143
|
+
applyParamsToScript as applyParamsToScript11,
|
|
5230
5144
|
applySingleCborEncoding
|
|
5231
5145
|
} from "@lucid-evolution/lucid";
|
|
5232
5146
|
|
|
@@ -5242,7 +5156,7 @@ var mkExecuteValidator = (params) => {
|
|
|
5242
5156
|
return {
|
|
5243
5157
|
type: "PlutusV2",
|
|
5244
5158
|
script: applySingleCborEncoding(
|
|
5245
|
-
|
|
5159
|
+
applyParamsToScript11(_executeValidator.cborHex, [
|
|
5246
5160
|
castExecuteParams(params)
|
|
5247
5161
|
])
|
|
5248
5162
|
)
|
|
@@ -5252,7 +5166,7 @@ var mkExecuteValidatorFromSP = (params) => {
|
|
|
5252
5166
|
return {
|
|
5253
5167
|
type: "PlutusV2",
|
|
5254
5168
|
script: applySingleCborEncoding(
|
|
5255
|
-
|
|
5169
|
+
applyParamsToScript11(_executeValidator.cborHex, [
|
|
5256
5170
|
castExecuteParams({
|
|
5257
5171
|
govNFT: fromSystemParamsAsset(params.govNFT),
|
|
5258
5172
|
upgradeToken: fromSystemParamsAsset(params.upgradeToken),
|
|
@@ -5271,7 +5185,7 @@ var mkExecuteValidatorFromSP = (params) => {
|
|
|
5271
5185
|
};
|
|
5272
5186
|
|
|
5273
5187
|
// src/contracts/lrp/helpers.ts
|
|
5274
|
-
import { addAssets as
|
|
5188
|
+
import { addAssets as addAssets8 } from "@lucid-evolution/lucid";
|
|
5275
5189
|
|
|
5276
5190
|
// src/contracts/lrp/types.ts
|
|
5277
5191
|
import { Data as Data26 } from "@lucid-evolution/lucid";
|
|
@@ -5442,7 +5356,7 @@ function buildRedemptionsTx(redemptions, price, redemptionReimbursementPercentag
|
|
|
5442
5356
|
);
|
|
5443
5357
|
const lrpRawInlineDatum = getInlineDatumOrThrow(lrpUtxo);
|
|
5444
5358
|
const lrpDatum = parseLrpDatumOrThrow(lrpRawInlineDatum);
|
|
5445
|
-
const resultVal =
|
|
5359
|
+
const resultVal = addAssets8(
|
|
5446
5360
|
lrpUtxo.assets,
|
|
5447
5361
|
mkLovelacesOf(-lovelacesForRedemption + reimburstmentLovelaces),
|
|
5448
5362
|
mkAssetsOf(
|
|
@@ -5570,9 +5484,9 @@ function randomLrpsSubsetSatisfyingTargetLovelaces(iasset, targetLovelacesToSpen
|
|
|
5570
5484
|
|
|
5571
5485
|
// src/contracts/lrp/transactions.ts
|
|
5572
5486
|
import {
|
|
5573
|
-
addAssets as
|
|
5487
|
+
addAssets as addAssets9,
|
|
5574
5488
|
unixTimeToSlot as unixTimeToSlot2,
|
|
5575
|
-
slotToUnixTime as
|
|
5489
|
+
slotToUnixTime as slotToUnixTime6
|
|
5576
5490
|
} from "@lucid-evolution/lucid";
|
|
5577
5491
|
import { unzip, zip } from "fp-ts/lib/Array";
|
|
5578
5492
|
async function openLrp(assetTokenName, lovelacesAmt2, maxPrice, lucid, sysParams, lrpStakeCredential) {
|
|
@@ -5643,7 +5557,7 @@ async function redeemLrp(redemptionLrpsData, priceOracle, iasset, lucid, sysPara
|
|
|
5643
5557
|
0n
|
|
5644
5558
|
);
|
|
5645
5559
|
return lucid.newTx().validTo(
|
|
5646
|
-
|
|
5560
|
+
slotToUnixTime6(
|
|
5647
5561
|
network,
|
|
5648
5562
|
unixTimeToSlot2(network, Number(priceOracleDatum.expiration)) - 1
|
|
5649
5563
|
)
|
|
@@ -5686,7 +5600,7 @@ async function adjustLrp(lucid, lrp, lovelacesAdjustAmt, newMaxPrice, sysParams)
|
|
|
5686
5600
|
maxPrice: newMaxPrice ? newMaxPrice : lrpDatum.maxPrice
|
|
5687
5601
|
})
|
|
5688
5602
|
},
|
|
5689
|
-
|
|
5603
|
+
addAssets9(
|
|
5690
5604
|
lrpUtxo.assets,
|
|
5691
5605
|
mkAssetsOf(rewardAssetClass, -rewardAssetsAmt),
|
|
5692
5606
|
mkLovelacesOf(lovelacesAdjustAmt)
|
|
@@ -5698,7 +5612,7 @@ async function claimLrp(lucid, lrp, sysParams) {
|
|
|
5698
5612
|
}
|
|
5699
5613
|
|
|
5700
5614
|
// src/contracts/lrp/scripts.ts
|
|
5701
|
-
import { applyParamsToScript as
|
|
5615
|
+
import { applyParamsToScript as applyParamsToScript12 } from "@lucid-evolution/lucid";
|
|
5702
5616
|
|
|
5703
5617
|
// src/validators/lrp-validator.ts
|
|
5704
5618
|
var _lrpValidator = {
|
|
@@ -5711,13 +5625,13 @@ var _lrpValidator = {
|
|
|
5711
5625
|
var mkLrpValidator = (params) => {
|
|
5712
5626
|
return {
|
|
5713
5627
|
type: "PlutusV2",
|
|
5714
|
-
script:
|
|
5628
|
+
script: applyParamsToScript12(_lrpValidator.cborHex, [castLrpParams(params)])
|
|
5715
5629
|
};
|
|
5716
5630
|
};
|
|
5717
5631
|
var mkLrpValidatorFromSP = (params) => {
|
|
5718
5632
|
return {
|
|
5719
5633
|
type: "PlutusV2",
|
|
5720
|
-
script:
|
|
5634
|
+
script: applyParamsToScript12(_lrpValidator.cborHex, [
|
|
5721
5635
|
castLrpParams({
|
|
5722
5636
|
versionRecordToken: fromSystemParamsAsset(params.versionRecordToken),
|
|
5723
5637
|
iassetNft: fromSystemParamsAsset(params.iassetNft),
|
|
@@ -5730,7 +5644,7 @@ var mkLrpValidatorFromSP = (params) => {
|
|
|
5730
5644
|
|
|
5731
5645
|
// src/utils/helper-txs.ts
|
|
5732
5646
|
import {
|
|
5733
|
-
validatorToAddress as
|
|
5647
|
+
validatorToAddress as validatorToAddress2
|
|
5734
5648
|
} from "@lucid-evolution/lucid";
|
|
5735
5649
|
|
|
5736
5650
|
// src/scripts/always-fail-validator.ts
|
|
@@ -5741,7 +5655,7 @@ var alwaysFailValidator = {
|
|
|
5741
5655
|
|
|
5742
5656
|
// src/utils/helper-txs.ts
|
|
5743
5657
|
async function runCreateScriptRefTx(lucid, scriptRefValidator, network) {
|
|
5744
|
-
const scriptAddr =
|
|
5658
|
+
const scriptAddr = validatorToAddress2(network, alwaysFailValidator);
|
|
5745
5659
|
const txHash = await lucid.newTx().pay.ToAddressWithData(scriptAddr, void 0, {}, scriptRefValidator).complete().then((tx) => tx.sign.withWallet().complete()).then((tx) => tx.submit());
|
|
5746
5660
|
await lucid.awaitTx(txHash);
|
|
5747
5661
|
return { txHash, outputIndex: 0 };
|
|
@@ -5749,8 +5663,8 @@ async function runCreateScriptRefTx(lucid, scriptRefValidator, network) {
|
|
|
5749
5663
|
|
|
5750
5664
|
// src/contracts/leverage/transactions.ts
|
|
5751
5665
|
import {
|
|
5752
|
-
addAssets as
|
|
5753
|
-
slotToUnixTime as
|
|
5666
|
+
addAssets as addAssets10,
|
|
5667
|
+
slotToUnixTime as slotToUnixTime7,
|
|
5754
5668
|
Data as Data27
|
|
5755
5669
|
} from "@lucid-evolution/lucid";
|
|
5756
5670
|
|
|
@@ -5929,7 +5843,7 @@ function calculateLeverageFromCollateralRatio(iasset, collateralRatioPercentage,
|
|
|
5929
5843
|
// src/contracts/leverage/transactions.ts
|
|
5930
5844
|
async function leverageCdpWithLrp(leverage, baseCollateral, priceOracle, iasset, cdpCreator, interestOracle, collector, sysParams, lucid, allLrps, currentSlot) {
|
|
5931
5845
|
const network = lucid.config().network;
|
|
5932
|
-
const currentTime = BigInt(
|
|
5846
|
+
const currentTime = BigInt(slotToUnixTime7(network, currentSlot));
|
|
5933
5847
|
const [pkh, skh] = await addrDetails(lucid);
|
|
5934
5848
|
const lrpScriptRefUtxo = matchSingle(
|
|
5935
5849
|
await lucid.utxosByOutRef([
|
|
@@ -6088,7 +6002,7 @@ async function leverageCdpWithLrp(leverage, baseCollateral, priceOracle, iasset,
|
|
|
6088
6002
|
}
|
|
6089
6003
|
})
|
|
6090
6004
|
},
|
|
6091
|
-
|
|
6005
|
+
addAssets10(cdpNftVal, mkLovelacesOf(collateralAmt))
|
|
6092
6006
|
).pay.ToContract(
|
|
6093
6007
|
cdpCreatorUtxo.address,
|
|
6094
6008
|
{ kind: "inline", value: Data27.void() },
|
|
@@ -6148,6 +6062,65 @@ import {
|
|
|
6148
6062
|
validatorToScriptHash as validatorToScriptHash3
|
|
6149
6063
|
} from "@lucid-evolution/lucid";
|
|
6150
6064
|
|
|
6065
|
+
// src/contracts/price-oracle/transactions.ts
|
|
6066
|
+
import {
|
|
6067
|
+
addAssets as addAssets11,
|
|
6068
|
+
fromText as fromText10,
|
|
6069
|
+
slotToUnixTime as slotToUnixTime8,
|
|
6070
|
+
validatorToAddress as validatorToAddress3
|
|
6071
|
+
} from "@lucid-evolution/lucid";
|
|
6072
|
+
|
|
6073
|
+
// src/contracts/price-oracle/scripts.ts
|
|
6074
|
+
import {
|
|
6075
|
+
applyParamsToScript as applyParamsToScript13
|
|
6076
|
+
} from "@lucid-evolution/lucid";
|
|
6077
|
+
var priceOracleValidatorData = {
|
|
6078
|
+
type: "PlutusV2",
|
|
6079
|
+
cborHex: "590ba5590ba20100003232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323233027222232325335333006533357346074607e0022646605a60586ae84004dd69aba135744002607c00206e64a666ae68c0ecc1000044c8c8c848cc00400c008c0b8d5d09aba2002375a6ae84004c0fc0040e0dd50022999ab9a303a303f002132321233001003002357426ae88c0fc00cd5d0981f00101b8890008a99ab9c49103505435001637540086ea8004cc09c8888c8d4014888d40188c88c94cd54cd4ccd54c0d40e0c0a80a4c0ac01ccc0b08004d40048888888888880100e44cd5ce24812d546865207472616e73616374696f6e206973206e6f74207369676e6564206279206f7261636c65206f776e657200030132533553355335333553036039302b02a253335302135001202103e215333573466ebcc118cd5d0182319aba0375000a6ec4080cd5d01ba835500b03937620400022a66a666036446a0044466603e446a00444a666ae68c12c004400c4cc11848ccc00401c00c00800c00c0040c0cd54c0e80ec8d400488cc0e0008cd54c0f40f88d400488cc0ec008ccd4004dc0a4000e048cdc0800a400000266aa607407646a0024466070004666a002466aa607c07e46a0024466078004604600200244666038066004002466aa607c07e46a0024466078004604000200266602e05c666050400204e6a004404e0060784426a004444a66a0082a666ae68cdd78018238a999ab9a3375e00408e2a666ae68cdc4000a400006e2666ae68cdc4800a410125e80206a07006e06e44072064407e6044014074266ae712401024c310003103a1335738921156f757470757420646f6573206e6f74206d6174636800031153355333573466e2400d20001335738921165072696365206d75737420626520706f7369746976650003103a15335533535353301275a6a00407e06e44a666a00442a666ae68cdc419b8000100935500c03a0331333573466e24004d540300e80c40d00c80c84d4cc049d69a80101f911a801112999a99980980a980f19b8100900b0021533500113330120150030081333012015003008034133301201500300803003a13357389212345787069726174696f6e2074696d65206973206e6f742070726f7065726c792073657400031030030333025200102435302635533530270092100116036202402f302d350080393302f3016337000020060542a666a602e6aa66a60320022602602a442a66a0022004442602e032402e02842a66a6666666ae900048c94ccd5cd181d98200008991999aab9f001202d23233335573e002405e46666aae7cd5d1001119299a9999999aba400123253335734608660900022646666aae7c00480d48cccd55cf9aba20022533530203574200642605e00206a406c07a078608e0020646ea800880c880c880c880c80e4854cd4c070d5d08029098159981a8010008188181aba1005203003703635744004068607e0020546ea800880a880a880a880a80c48400405480548c94ccd5cd181b181d800899191919091998008028018011bad357426ae88008dd69aba10013574460760046ae84c0e80040ccdd50009111a801111a801912999a9998040038020010a99a8018800819814819911192999a80190a999a80190a999a80290980200b0980180a8a999a80210980200b0980180a80c0060a999a80210980180a8980100a0a999a80190980180a8980100a00b8a999a801100700b0068a999a80110a999a80210980180a8980100a0a999a80190980180a8980100a00b8058a999a80190980100a098008098a999a80110980100a0980080980b12999a80110a999a80210a999a802109998040038010008b0b0b0060a999a80190a999a801909998038030010008b0b0b00580691a80091111111003891999999980091199ab9a3370e00400204004644a666ae68cdc38010008098a999ab9a3371200400201401044666ae68cdc400100081001191199ab9a3371200400204004644666ae68cdc480100081181011199ab9a3371000400204604044a666ae68cdc480100088008801112999ab9a33712004002200420024464a666ae68c0c8c0dc0044c8c8cc0994ccd5cd181a181c801099813198038029aba130380023006357426ae88c0e00080c54ccd5cd181a181c800899813198038029aba130380013006357426ae88c0e00040c4dd51aba135744606e0046ea8d5d0981b0008179baa0012325333573460620020522a666ae68c0c000407c0b4c0d0dd50009119192999ab9a303300100815333573460640022601460086ae84c0d400854ccd5cd1818800803017181a8009baa00122233355302302702a335530260272350012233024002300b001333553023027223500222533533355302802b301d01c235001223300a002005006100313302e00400301c001335530260272350012233024002330382253350011300a003221350022253353300c002008112223300200a0041300600300400211009212223001004112220012230302253350011003221330060023004001212223003004233333335748002403040304030460206eb4008806007c94cd5ce2481286578706563746564206f6e6c7920612073696e676c6520636f6e74696e75696e67206f7574707574001615335738920117496e76616c696420646174756d20696e206f757470757400164988880088c8c94ccd5cd1813000899091118010021aba13028002153335734604a002264244460020086ae84c0a000854ccd5cd181200080201098140009baa00111003253353007001213335530150192235300535300935003019222200422353007350042222004225333573466ebc01000854ccd5cd19baf0030011330220060051005100500e3300d00735300f3500201b22222222222200a15335738921024c660016232533357346040604a0022646424660020060046ae84d5d118128011aba1302400101d3754002444006660024002eb4888cc09088cccd55cf80090071191980e9980a180398138009803181300098021aba2003357420040306eac0048c94ccd5cd180e181080089919191919190919998008038028018011aba1357440046ae84004d5d10011aba10013574460420046ae84c080004064dd5000919191999aa999ab9a3370e90030008990911118020029aba13020002153335734603c00226424444600400a6ae84c08000854ccd5cd180e8008990911118008029aba13020002153335734603800226424444600600a6ae84c0800080648034803480348ccd54c048054cc03c894cd40088400c400403494ccd5cd19baf002350010181300600100d3300923253335734603e60480022646424660020060046ae84d5d118120011aba1302300101c37540026a60166a00802e44444444444401860400026ea8d40040408488c00800c48cc004894cd400804c40040208cc02488ccd400c04c008004d400403488ccd5cd19baf002001004007223301c2233335573e002400c466028600a6ae84008c00cd5d10010081bac001100d23253335734602860320022646464646464646464646464646464646464646464642466666666666600202e02a02602201e01a01601200e00a0060046ae84d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d10011aba1001357440046ae84004d5d1180c8011aba1301800101137540022002200c464a666ae68c044c0580044dd69aba1301500100e37540024424660020060044446006600400260244422444a66a00220044426600a004666aa600e01600a00800260224422444a66a00226a00600c442666a00a0186008004666aa600e01400a00800244002601e442244a66a00200c44266014600800466aa600c00e00800224002220024400444244660020080062a66ae712411f496e76616c696420646174756d20746f20636865636b4f776e4f757470757400161533573892010350543100162222222222220054c1014000370e90001b8748008dc3a40086e9520005573caae748c8c00400488cc00cc008008005"
|
|
6080
|
+
};
|
|
6081
|
+
function mkPriceOracleValidator(params) {
|
|
6082
|
+
return {
|
|
6083
|
+
type: priceOracleValidatorData.type,
|
|
6084
|
+
script: applyParamsToScript13(priceOracleValidatorData.cborHex, [
|
|
6085
|
+
castPriceOracleParams(params)
|
|
6086
|
+
])
|
|
6087
|
+
};
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
// src/contracts/price-oracle/transactions.ts
|
|
6091
|
+
async function startPriceOracleTx(lucid, assetName, startPrice, oracleParams, now = Date.now(), refOutRef) {
|
|
6092
|
+
if (!refOutRef) {
|
|
6093
|
+
refOutRef = (await lucid.wallet().getUtxos())[0];
|
|
6094
|
+
}
|
|
6095
|
+
const [tx, oracleNftPolicyId] = await oneShotMintTx(lucid, {
|
|
6096
|
+
referenceOutRef: {
|
|
6097
|
+
txHash: refOutRef.txHash,
|
|
6098
|
+
outputIdx: BigInt(refOutRef.outputIndex)
|
|
6099
|
+
},
|
|
6100
|
+
mintAmounts: [
|
|
6101
|
+
{
|
|
6102
|
+
tokenName: fromText10(assetName),
|
|
6103
|
+
amount: 1n
|
|
6104
|
+
}
|
|
6105
|
+
]
|
|
6106
|
+
});
|
|
6107
|
+
const priceOracleNft = {
|
|
6108
|
+
currencySymbol: oracleNftPolicyId,
|
|
6109
|
+
tokenName: fromText10(assetName)
|
|
6110
|
+
};
|
|
6111
|
+
const oracleValidator = mkPriceOracleValidator(oracleParams);
|
|
6112
|
+
const oracleDatum = {
|
|
6113
|
+
price: startPrice,
|
|
6114
|
+
expiration: BigInt(now) + oracleParams.expiration
|
|
6115
|
+
};
|
|
6116
|
+
tx.pay.ToContract(
|
|
6117
|
+
validatorToAddress3(lucid.config().network, oracleValidator),
|
|
6118
|
+
{ kind: "inline", value: serialisePriceOracleDatum(oracleDatum) },
|
|
6119
|
+
addAssets11(mkLovelacesOf(5000000n), mkAssetsOf(priceOracleNft, 1n))
|
|
6120
|
+
);
|
|
6121
|
+
return [tx, { oracleNft: priceOracleNft }];
|
|
6122
|
+
}
|
|
6123
|
+
|
|
6151
6124
|
// src/scripts/auth-token-policy.ts
|
|
6152
6125
|
import {
|
|
6153
6126
|
applyParamsToScript as applyParamsToScript14,
|
|
@@ -7015,7 +6988,6 @@ export {
|
|
|
7015
6988
|
endProposal,
|
|
7016
6989
|
executeProposal,
|
|
7017
6990
|
feedInterestOracle,
|
|
7018
|
-
feedPriceOracleTx,
|
|
7019
6991
|
findStakingManager,
|
|
7020
6992
|
findStakingManagerByOutRef,
|
|
7021
6993
|
findStakingPositionByOutRef,
|
|
@@ -7069,7 +7041,6 @@ export {
|
|
|
7069
7041
|
openCdp,
|
|
7070
7042
|
openLrp,
|
|
7071
7043
|
openStakingPosition,
|
|
7072
|
-
oracleExpirationAwareValidity,
|
|
7073
7044
|
parseAccountDatum,
|
|
7074
7045
|
parseCdpDatum,
|
|
7075
7046
|
parseCdpDatumOrThrow,
|
|
@@ -7135,7 +7106,6 @@ export {
|
|
|
7135
7106
|
spMul,
|
|
7136
7107
|
spSub,
|
|
7137
7108
|
startInterestOracle,
|
|
7138
|
-
startPriceOracleTx,
|
|
7139
7109
|
submitAndAwaitTx,
|
|
7140
7110
|
summarizeActualLeverageRedemptions,
|
|
7141
7111
|
toSystemParamsAsset,
|
package/package.json
CHANGED
|
@@ -241,7 +241,7 @@ export async function createProposal(
|
|
|
241
241
|
),
|
|
242
242
|
)
|
|
243
243
|
.validFrom(Number(currentTime) - ONE_SECOND)
|
|
244
|
-
.validTo(Number(currentTime + sysParams.govParams.gBiasTime) - ONE_SECOND)
|
|
244
|
+
.validTo(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND)
|
|
245
245
|
.addSigner(ownAddr),
|
|
246
246
|
newPollId,
|
|
247
247
|
];
|
|
@@ -315,7 +315,7 @@ export async function createShardsChunks(
|
|
|
315
315
|
.newTx()
|
|
316
316
|
.validFrom(Number(currentTime) - ONE_SECOND)
|
|
317
317
|
.validTo(
|
|
318
|
-
Number(currentTime + sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
|
|
318
|
+
Number(currentTime) + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
|
|
319
319
|
)
|
|
320
320
|
.mintAssets(mkAssetsOf(pollNft, shardsCount), Data.void())
|
|
321
321
|
// Ref scripts
|
|
@@ -587,7 +587,7 @@ export async function mergeShards(
|
|
|
587
587
|
.newTx()
|
|
588
588
|
.validFrom(Number(currentTime) - ONE_SECOND)
|
|
589
589
|
.validTo(
|
|
590
|
-
Number(currentTime + sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
|
|
590
|
+
Number(currentTime) + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
|
|
591
591
|
)
|
|
592
592
|
.readFrom([
|
|
593
593
|
pollShardRefScriptUtxo,
|
|
@@ -718,7 +718,7 @@ export async function endProposal(
|
|
|
718
718
|
.newTx()
|
|
719
719
|
.validFrom(Number(currentTime) - ONE_SECOND)
|
|
720
720
|
.validTo(
|
|
721
|
-
Number(currentTime + sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
|
|
721
|
+
Number(currentTime) + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
|
|
722
722
|
)
|
|
723
723
|
.readFrom([
|
|
724
724
|
pollManagerRefScriptUtxo,
|
|
@@ -1226,7 +1226,7 @@ export async function executeProposal(
|
|
|
1226
1226
|
|
|
1227
1227
|
tx.readFrom([upgradeTokenPolicyRefScriptUtxo, executeRefScriptUtxo])
|
|
1228
1228
|
.validFrom(Number(currentTime) - ONE_SECOND)
|
|
1229
|
-
.validTo(Number(currentTime + sysParams.govParams.gBiasTime) - ONE_SECOND)
|
|
1229
|
+
.validTo(Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND)
|
|
1230
1230
|
.collectFrom([executeUtxo], Data.void())
|
|
1231
1231
|
.mintAssets(
|
|
1232
1232
|
mkAssetsOf(fromSystemParamsAsset(sysParams.govParams.upgradeToken), -1n),
|
|
@@ -491,9 +491,7 @@ export async function processSpRequest(
|
|
|
491
491
|
stabilityPoolUtxo.assets[
|
|
492
492
|
params.stabilityPoolParams.assetSymbol.unCurrencySymbol +
|
|
493
493
|
fromText(asset)
|
|
494
|
-
] +
|
|
495
|
-
balanceChange +
|
|
496
|
-
withdrawalFee,
|
|
494
|
+
] ?? 0n + balanceChange + withdrawalFee,
|
|
497
495
|
},
|
|
498
496
|
);
|
|
499
497
|
tx.pay.ToContract(
|
package/src/index.ts
CHANGED
|
@@ -20,9 +20,6 @@ export * from './contracts/interest-oracle/transactions';
|
|
|
20
20
|
export * from './contracts/interest-oracle/types';
|
|
21
21
|
export * from './contracts/interest-oracle/scripts';
|
|
22
22
|
export * from './contracts/interest-oracle/helpers';
|
|
23
|
-
export * from './contracts/price-oracle/transactions';
|
|
24
|
-
export * from './contracts/price-oracle/types';
|
|
25
|
-
export * from './contracts/price-oracle/helpers';
|
|
26
23
|
export * from './contracts/version-registry/types';
|
|
27
24
|
export * from './contracts/version-registry/scripts';
|
|
28
25
|
export * from './contracts/treasury/transactions';
|