You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`import { BurnType, MintMetadataType, MintType } from "../../types";
import { Label, NFTMetadataDetails, Unit, fromText } from "lucid-cardano";
import { lucid, mintingPolicy, policyId } from ".";
import Burn from "../models/burnModel";
import Mint from "../models/mintModel";
import MintMetadata from "../models/mintMetadata.model";
import { PointsCreatedPublisher } from "../events/publishers/points-created-publisher";
import { Types } from "mongoose";
import { burnNFT } from "./burnNFT";
import { mintNFT } from "./mintNFT";
import { natsClient } from "../nats-client";
import { secretSeed } from "../services/seed";
.validTo(Date.now() + 100) Your problem is here. Transaction is valid for 100 milliseconds from the moment it's build. This is way too short for it to have a chance and be submitted/registered on chain.
`import { BurnType, MintMetadataType, MintType } from "../../types";
import { Label, NFTMetadataDetails, Unit, fromText } from "lucid-cardano";
import { lucid, mintingPolicy, policyId } from ".";
import Burn from "../models/burnModel";
import Mint from "../models/mintModel";
import MintMetadata from "../models/mintMetadata.model";
import { PointsCreatedPublisher } from "../events/publishers/points-created-publisher";
import { Types } from "mongoose";
import { burnNFT } from "./burnNFT";
import { mintNFT } from "./mintNFT";
import { natsClient } from "../nats-client";
import { secretSeed } from "../services/seed";
class NftService {
[x: string]: any;
private mintModel = Mint;
private burnModel = Burn;
private mintMetadataModel = MintMetadata;
private address: string = "";
private MINT_UNIT_VALUE: bigint = 0n;
private mintTxHash: string = "";
private burnTxHash: string = "";
private BURN_UNIT_VALUE: bigint = 0n;
public async getAddress(): Promise {
this.address = await lucid
.selectWalletFromSeed(secretSeed)
.wallet.address();
}
public async mintNft(tokenName?: string): Promise {
const { txHash, UNIT_VALUE } = await mintNFT(tokenName);
}
public async burnNft(tokenName?: string): Promise {
const { txHash, UNIT_VALUE } = await burnNFT(tokenName);
}
public async mintNFTMetadata(data: {
name: any;
email: string;
description: string;
label: Label;
tokenName: string;
managerId: Types.ObjectId;
}): Promise<{
txHash: string;
UNIT_VALUE: bigint;
metadata: NFTMetadataDetails;
}> {
const unit: Unit = policyId + fromText(data.tokenName);
const UNIT_VALUE = 1n;
}
}
export const nftService = new NftService();
import { Listener, ReservationCreatedEvent } from "@c10lms/common";
import { PointsCreatedPublisher } from "../publishers/points-created-publisher";
import { Subjects } from "@c10lms/common/build/events/subjects";
import { natsClient } from "../../nats-client";
import { nftService } from "../../services/nft.db";
import { userService } from "../../services/user.db";
export class ReservationCreatedListener extends Listener {
subject: Subjects.ReservationCreated = Subjects.ReservationCreated;
queueGroupName = "wallet-service";
async onMessage(data: ReservationCreatedEvent["data"], msg: any) {
const {
user: { email, firstname, lastname },
managerId,
} = data;
}
}
`
The Complete Error is this:
file:///app/node_modules/lucid-cardano/esm/src/provider/blockfrost.js:177 [wallet] throw new Error(result.message); [wallet] ^ [wallet] Error: "transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 34773223)}) (SlotNo 34773230))))])" [wallet] at Blockfrost.submitTx (file:///app/node_modules/lucid-cardano/esm/src/provider/blockfrost.js:177:23) [wallet] at processTicksAndRejections (node:internal/process/task_queues:95:5) [wallet] at async Object.submitTx (file:///app/node_modules/lucid-cardano/esm/src/lucid/lucid.js:371:24) [wallet] at async TxSigned.submit (file:///app/node_modules/lucid-cardano/esm/src/lucid/tx_signed.js:21:16) [wallet] at async NftService.mintNFTMetadata (file:///app/src/services/nft.db.ts:132:20) [wallet] at async ReservationCreatedListener.onMessage (file:///app/src/events/listeners/reservation-created-listener.ts:19:46)
The text was updated successfully, but these errors were encountered: