Skip to content

Commit 84097af

Browse files
fabianbormannnemo83
authored andcommitted
chore: adjust the cardano network settings
1 parent a09e38e commit 84097af

File tree

6 files changed

+418
-14
lines changed

6 files changed

+418
-14
lines changed

cardano/gateway/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ OGMIOS_ENDPOINT=http://127.0.0.1:1337
1212
CARDANO_CHAIN_HOST=127.0.0.1
1313
CARDANO_CHAIN_PORT=3001
1414
CARDANO_NETWORK_MAGIC=42
15-
CARDANO_EPOCH_NONCE_GENESIS="2a3d5a64bba433f7a059a36c50b7023c0285631326ca6bb931c13cf05966a1f1"
15+
CARDANO_EPOCH_NONCE_GENESIS="bf4f4bf6f111f1778bdbe30615f2b6a856412ab7c8669a824465588ba2460e14"
1616

1717
MITHRIL_ENDPOINT=http://127.0.0.1:8080/aggregator
1818
MITHRIL_GENESIS_VERIFICATION_KEY=5b33322c3235332c3138362c3230312c3137372c31312c3131372c3133352c3138372c3136372c3138312c3138382c32322c35392c3230362c3130352c3233312c3135302c3231352c33302c37382c3231322c37362c31362c3235322c3138302c37322c3133342c3133372c3234372c3136312c36385d

cardano/gateway/src/shared/modules/lucid/lucid.service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,16 @@ export class LucidService {
380380
const deploymentConfig = this.configService.get('deployment');
381381
const tx: TxBuilder = this.txFromWallet(dto.constructedAddress);
382382

383+
console.log('Building transaction for ConnectionOpenAck');
384+
console.log('readFrom', [
385+
deploymentConfig.validators.spendConnection.refUtxo,
386+
dto.verifyProofRefUTxO,
387+
dto.clientUtxo,
388+
]);
389+
console.log('collectFrom', [dto.connectionUtxo]);
390+
console.log('pay.ToContract', 'dto.connectionTokenUnit', dto.connectionTokenUnit);
391+
console.log('mintAssets', 'dto.verifyProofPolicyId', dto.verifyProofPolicyId);
392+
383393
tx.readFrom([deploymentConfig.validators.spendConnection.refUtxo, dto.verifyProofRefUTxO])
384394
.collectFrom([dto.connectionUtxo], dto.encodedSpendConnectionRedeemer)
385395
.readFrom([dto.clientUtxo])

cardano/gateway/src/tx/connection.service.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ export class ConnectionService {
138138
* @returns A promise resolving to a message response for connection open ack include the unsigned_tx.
139139
*/
140140
async connectionOpenAck(data: MsgConnectionOpenAck): Promise<MsgConnectionOpenAckResponse> {
141+
this.logger.log('Connection Open Ack is processing', 'connectionOpenAck');
141142
try {
142-
this.logger.log('Connection Open Ack is processing', 'connectionOpenAck');
143143
const { constructedAddress, connectionOpenAckOperator } = validateAndFormatConnectionOpenAckParams(data);
144144
// Build and complete the unsigned transaction
145145
const unsignedConnectionOpenAckTx: TxBuilder = await this.buildUnsignedConnectionOpenAckTx(
@@ -499,6 +499,46 @@ export class ConnectionService {
499499
verifyProofRedeemer,
500500
this.lucidService.LucidImporter,
501501
);
502+
503+
function prettyPrint(obj: any, indent = 2): string {
504+
const seen = new WeakSet();
505+
506+
function replacer(key: string, value: any): any {
507+
// Handle circular references
508+
if (typeof value === 'object' && value !== null) {
509+
if (seen.has(value)) {
510+
return '[Circular Reference]';
511+
}
512+
seen.add(value);
513+
}
514+
515+
// Handle Map objects
516+
if (value instanceof Map) {
517+
const mapEntries: Record<string, any> = {};
518+
value.forEach((v, k) => {
519+
mapEntries[String(k)] = v;
520+
});
521+
return { __type: 'Map', entries: mapEntries };
522+
}
523+
524+
// Handle BigInt values
525+
if (typeof value === 'bigint') {
526+
return { __type: 'BigInt', value: value.toString() };
527+
}
528+
529+
// Handle other special types as needed
530+
// ...
531+
532+
return value;
533+
}
534+
535+
return JSON.stringify(obj, replacer, indent);
536+
}
537+
538+
console.log('verifyProofRedeemer', prettyPrint(verifyProofRedeemer));
539+
console.log('spentConnectionRedeemer', prettyPrint(spendConnectionRedeemer));
540+
console.log('updatedConnectionDatum', prettyPrint(updatedConnectionDatum));
541+
502542
const unsignedConnectionOpenAckParams: UnsignedConnectionOpenAckDto = {
503543
connectionUtxo,
504544
encodedSpendConnectionRedeemer,

0 commit comments

Comments
 (0)