From c47bca410b4fd1b6f26c14164eeee5730ad1366b Mon Sep 17 00:00:00 2001 From: rsalakhov Date: Tue, 30 Jan 2024 15:53:56 +0300 Subject: [PATCH] update ex units --- package.json | 2 +- src/amm/interpreters/ammTxBuilder/unlockTxBuilder.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 580447a..38112da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spectrumlabs/cardano-dex-sdk", - "version": "0.1.261", + "version": "0.1.262", "description": "ErgoDEX SDK for Cardano", "main": "build/main/index.js", "typings": "build/main/index.d.ts", diff --git a/src/amm/interpreters/ammTxBuilder/unlockTxBuilder.ts b/src/amm/interpreters/ammTxBuilder/unlockTxBuilder.ts index 9aa3b2f..c628b02 100644 --- a/src/amm/interpreters/ammTxBuilder/unlockTxBuilder.ts +++ b/src/amm/interpreters/ammTxBuilder/unlockTxBuilder.ts @@ -12,6 +12,7 @@ import {CardanoWasm} from "../../../utils/rustLoader" import {AmmTxFeeMapping} from "../../math/order" import {OpInRefsMainnetV1, OrderAddrs, ScriptCreds} from "../../scripts" import {selectInputs} from "./selectInputs" +import {DEFAULT_EX_UNITS_MEM, DEFAULT_EX_UNITS_STEPS} from "../refundTxBuilder/refundTxBuilder" export interface UnlockParams { readonly changeAddress: Addr; @@ -85,8 +86,8 @@ export class UnlockTxBuilder { datum: boxToUnlock.dataBin, validator: this.scripts.ammLock, redeemer: this.R.PlutusData.new_integer(this.R.BigInt.from_str("0")).to_hex(), - mem: "200000", - steps: "70000000" + mem: DEFAULT_EX_UNITS_MEM, + steps: DEFAULT_EX_UNITS_STEPS } }, ...inputsOrError] const rewardPKH = params.redeemer