🏗️」 wip: started doing the api for the contract

This commit is contained in:
2025-07-28 21:49:48 +02:00
parent 443a5a4099
commit 0449ad7ad2
7 changed files with 151 additions and 3 deletions

View File

@ -0,0 +1,13 @@
import { evm } from '@avalabs/avalanchejs';
import scoreDB from '../../utils/scoreDB.js';
import { getTx } from './getTx.js';
/**
* @param {import('fastify').FastifyInstance} fastify
* @param {import('fastify').FastifyPluginOptions} options
*/
export default async function(fastify, options) {
fastify.get("/:id", async (request, reply) => {
return getTx(request, reply, fastify);
});
}

View File

@ -0,0 +1,19 @@
import scoreDB from "../../utils/scoreDB.js";
/**
* @async
* @param {import("fastify".FastifyRequest)} request
* @param {import("fastify").FastifyReply} reply
* @param {import("fastify").FastifyInstance} fastify
*
* @returns {import('fastify').FastifyReply}
*/
export async function getTx(request, reply, fastify) {
try {
} catch (err) {
fastify.log.error(err);
return reply.code(500).send({ error: "Internal server error" });
}
}