Skip to content

Commit

Permalink
add logs to create pool op
Browse files Browse the repository at this point in the history
  • Loading branch information
rsalakhov committed Sep 8, 2023
1 parent a686f08 commit 654cad7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spectrumlabs/cardano-dex-sdk",
"version": "0.1.184",
"version": "0.1.185",
"description": "ErgoDEX SDK for Cardano",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/amm/interpreters/ammTxBuilder/ammTxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export class DefaultAmmTxCandidateBuilder implements AmmTxBuilder {
const [poolCreationTxCandidate, poolCreationTxInfo] = await this.poolTxBuilder.build(poolParams, newAllInputs, prevTxFee)

try {
console.log('candidate', poolCreationTxCandidate);
const transaction = this.txAsm.finalize(poolCreationTxCandidate)
const txFee = BigInt(transaction.body().fee().to_str())

Expand Down
1 change: 1 addition & 0 deletions src/amm/interpreters/ammTxBuilder/poolCreationTxBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class PoolCreationTxBuilder {
return acc
}, {})

console.log('fees', userTxFee, params.txFees.poolCreation, userTxFee || params.txFees.poolCreation)
const txInfo: PoolCreationTxInfo = {
txFee: userTxFee || params.txFees.poolCreation,
refundableDeposit,
Expand Down
4 changes: 4 additions & 0 deletions src/cardano/wallet/txAsm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ class DefaultTxAsm implements TxAsm {
if (candidate.collateral?.length) {
txBuilder.set_collateral(this.getCollateralBuilder(candidate.collateral))
}
console.log('before mint');
if (candidate.mintingScripts?.length) {
txBuilder.set_mint_builder(this.getMintBuilder(candidate.mintingScripts))
}
console.log('after mint');

for (const i of candidate.inputs) {
if (i.consumeScript) {
Expand Down Expand Up @@ -164,7 +166,9 @@ class DefaultTxAsm implements TxAsm {
const mintBuilder = this.R.MintBuilder.new();

for (const data of mintScripts) {
console.log('before script')
const plutusScriptSource = this.R.PlutusScriptSource.new(this.R.PlutusScript.from_hex(data.script));
console.log('after script')
const redeemer = this.R.Redeemer.new(
this.R.RedeemerTag.new_mint(),
this.R.BigNum.one(),
Expand Down

0 comments on commit 654cad7

Please sign in to comment.