k.yr
k.yr
CCConvex Community
Created by k.yr on 11/3/2023 in #support-community
v.record no longer a validator 1.3 -> 1.5
Hello 👋 I've just upgraded from 1.3 to 1.5.1 and I previously had a validator that was parameters: v.record(v.string(), v.any()), Which is now throwing an error as v.record() is not a validator. Is there an alternative for this? Also I was looking into the release notes (may have missed something) and I can only see mentions of potentially supporting v.record and no mentions of it's implementation/removal 😅
5 replies
CCConvex Community
Created by k.yr on 9/24/2023 in #support-community
Discord Bot - Issues responding to interactions
No description
8 replies
CCConvex Community
Created by k.yr on 8/17/2023 in #support-community
Invalid Modules Error with metaplex and web3js packages
Hi all 👋 When utilizing the packages @metaplex-foundation/js and @solana/web3.js I am encountering the following error
400 Bad Request: UnableToPush: Hit an error while pushing:
InvalidModules: Loading the pushed modules encountered the following
error:
Failed to analyze metaplex.js: Assignment to constant variable.
400 Bad Request: UnableToPush: Hit an error while pushing:
InvalidModules: Loading the pushed modules encountered the following
error:
Failed to analyze metaplex.js: Assignment to constant variable.
Here is my action that is utilising the libraries
"use node";
import { action } from "./_generated/server";
import { v } from "convex/values";
import { Connection, PublicKey } from "@solana/web3.js";
import { Metaplex } from "@metaplex-foundation/js";

const solanaRpc = process.env.CHAINSTACK_URL ?? "null";

export const getMetaplexNfts = action({
args: { wallet: v.string() },
handler: async (ctx, args) => {
const walletKey = new PublicKey(args.wallet);

const connection = new Connection(solanaRpc);
const metaplex = new Metaplex(connection);

const nfts = await metaplex.nfts().findAllByOwner({ owner: walletKey });

return nfts;
},
});
"use node";
import { action } from "./_generated/server";
import { v } from "convex/values";
import { Connection, PublicKey } from "@solana/web3.js";
import { Metaplex } from "@metaplex-foundation/js";

const solanaRpc = process.env.CHAINSTACK_URL ?? "null";

export const getMetaplexNfts = action({
args: { wallet: v.string() },
handler: async (ctx, args) => {
const walletKey = new PublicKey(args.wallet);

const connection = new Connection(solanaRpc);
const metaplex = new Metaplex(connection);

const nfts = await metaplex.nfts().findAllByOwner({ owner: walletKey });

return nfts;
},
});
Has anyone had success using web3 and metaplex in their convex projects, is there something that I am overlooking here? Cheers!
10 replies