Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: some docs cleanup #269

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/api/backend-wallet/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function transfer(fastify: FastifyInstance) {
method: "POST",
url: "/backend-wallet/:chain/transfer",
schema: {
summary: "Transfer",
summary: "Transfer tokens",
description:
"Transfer native or ERC20 tokens from this wallet to another wallet",
tags: ["Backend Wallet"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function getDefaultRoyaltyInfo(fastify: FastifyInstance) {
method: "GET",
url: "/contract/:chain/:contractAddress/royalties/get-default-royalty-info",
schema: {
summary: "Get Default Royalty Info",
summary: "Get royalty details",
description:
"Gets the royalty recipient and BPS (basis points) of the smart contract.",
tags: ["Contract-Royalties"],
Expand Down
2 changes: 1 addition & 1 deletion server/api/contract/royalties/read/getTokenRoyaltyInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function getTokenRoyaltyInfo(fastify: FastifyInstance) {
method: "GET",
url: "/contract/:chain/:contractAddress/royalties/get-token-royalty-info/:token_id",
schema: {
summary: "Get Token Royalty Info",
summary: "Get token royalty details",
description:
"Gets the royalty recipient and BPS (basis points) of a particular token in the contract.",
tags: ["Contract-Royalties"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function setDefaultRoyaltyInfo(fastify: FastifyInstance) {
method: "POST",
url: "/contract/:chain/:contractAddress/royalties/set-default-royalty-info",
schema: {
summary: "Set Default Royalty Info",
summary: "Set royalty details",
description: "Set the royalty recipient and fee for the smart contract.",
tags: ["Contract-Royalties"],
operationId: "setDefaultRoyaltyInfo",
Expand Down
2 changes: 1 addition & 1 deletion server/api/contract/royalties/write/setTokenRoyaltyInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function setTokenRoyaltyInfo(fastify: FastifyInstance) {
method: "POST",
url: "/contract/:chain/:contractAddress/royalties/set-token-royalty-info",
schema: {
summary: "Set Token Royalty Info",
summary: "Set token royalty details",
description:
"Set the royalty recipient and fee for a particular token in the contract.",
tags: ["Contract-Royalties"],
Expand Down
20 changes: 8 additions & 12 deletions server/api/transaction/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,29 @@ import { cancelTransactionAndUpdate } from "../../utils/transaction";
// INPUT
const requestBodySchema = Type.Object({
queueId: Type.String({
description: "Transaction Queue ID",
description: "Transaction queue ID",
examples: ["9eb88b00-f04f-409b-9df7-7dcc9003bc35"],
}),
});

requestBodySchema.examples = [
{
queueId: "9eb88b00-f04f-409b-9df7-7dcc9003bc35",
},
];

// OUTPUT
export const responseBodySchema = Type.Object({
result: Type.Object({
queueId: Type.String({
description: "Transaction Queue ID",
description: "Transaction queue ID",
examples: ["9eb88b00-f04f-409b-9df7-7dcc9003bc35"],
}),
status: Type.String({
description: "Response Status",
description: "Response status",
examples: ["success, error"],
}),
message: Type.String({
description: "Response Message",
description: "Response message",
examples: ["Transaction cancelled on-chain successfully"],
}),
transactionHash: Type.Optional(
Type.String({
description: "Transaction Hash of the on-chain cancel transaction",
description: "Transaction hash of the on-chain cancel transaction",
examples: [
"0x0514076b5b7e3062c8dc17e10f7c0befe88e6efb7e97f16e3c14afb36c296467",
],
Expand All @@ -59,7 +53,9 @@ export async function cancelTransaction(fastify: FastifyInstance) {
method: "POST",
url: "/transaction/cancel",
schema: {
description: "Cancel Transaction",
summary: "Cancel transaction",
description:
"Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled.",
tags: ["Transaction"],
operationId: "cancel",
body: requestBodySchema,
Expand Down
3 changes: 1 addition & 2 deletions server/api/transaction/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import { retryTx } from "../../../src/db/transactions/retryTx";
import { standardResponseSchema } from "../../schemas/sharedApiSchemas";

// INPUT

const requestBodySchema = Type.Object({
queueId: Type.String({
description: "Transaction Queue ID",
description: "Transaction queue ID",
examples: ["9eb88b00-f04f-409b-9df7-7dcc9003bc35"],
}),
maxFeePerGas: Type.String(),
Expand Down
2 changes: 1 addition & 1 deletion server/api/transaction/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
// INPUT
const requestSchema = Type.Object({
queueId: Type.String({
description: "Transaction Queue ID",
description: "Transaction queue ID",
examples: ["9eb88b00-f04f-409b-9df7-7dcc9003bc35"],
}),
});
Expand Down