Skip to content

Commit 2fd09b6

Browse files
authored
feat: add transaction mode support to ERC20, ERC721, and ERC1155 v4 SDK routes (#832)
1 parent dd2d8e2 commit 2fd09b6

28 files changed

+59
-3
lines changed

src/server/routes/contract/extensions/erc1155/write/airdrop.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export async function erc1155airdrop(fastify: FastifyInstance) {
8181
"x-backend-wallet-address": walletAddress,
8282
"x-account-address": accountAddress,
8383
"x-idempotency-key": idempotencyKey,
84+
"x-transaction-mode": transactionMode,
8485
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
8586
const chainId = await getChainIdFromChain(chain);
8687
const contract = await getContract({
@@ -98,6 +99,7 @@ export async function erc1155airdrop(fastify: FastifyInstance) {
9899
extension: "erc1155",
99100
idempotencyKey,
100101
txOverrides,
102+
transactionMode,
101103
});
102104
reply.status(StatusCodes.OK).send({
103105
result: {

src/server/routes/contract/extensions/erc1155/write/burn-batch.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export async function erc1155burnBatch(fastify: FastifyInstance) {
6969
"x-backend-wallet-address": walletAddress,
7070
"x-account-address": accountAddress,
7171
"x-idempotency-key": idempotencyKey,
72+
"x-transaction-mode": transactionMode,
7273
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
7374

7475
const chainId = await getChainIdFromChain(chain);
@@ -87,6 +88,7 @@ export async function erc1155burnBatch(fastify: FastifyInstance) {
8788
extension: "erc1155",
8889
idempotencyKey,
8990
txOverrides,
91+
transactionMode,
9092
});
9193

9294
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/burn.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export async function erc1155burn(fastify: FastifyInstance) {
6363
"x-backend-wallet-address": walletAddress,
6464
"x-account-address": accountAddress,
6565
"x-idempotency-key": idempotencyKey,
66+
"x-transaction-mode": transactionMode,
6667
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
6768

6869
const chainId = await getChainIdFromChain(chain);
@@ -81,6 +82,7 @@ export async function erc1155burn(fastify: FastifyInstance) {
8182
extension: "erc1155",
8283
idempotencyKey,
8384
txOverrides,
85+
transactionMode,
8486
});
8587

8688
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/lazy-mint.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export async function erc1155lazyMint(fastify: FastifyInstance) {
6969
"x-backend-wallet-address": walletAddress,
7070
"x-account-address": accountAddress,
7171
"x-idempotency-key": idempotencyKey,
72+
"x-transaction-mode": transactionMode,
7273
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
7374

7475
const chainId = await getChainIdFromChain(chain);
@@ -87,6 +88,7 @@ export async function erc1155lazyMint(fastify: FastifyInstance) {
8788
extension: "erc1155",
8889
idempotencyKey,
8990
txOverrides,
91+
transactionMode,
9092
});
9193

9294
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/mint-additional-supply-to.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export async function erc1155mintAdditionalSupplyTo(fastify: FastifyInstance) {
7070
"x-backend-wallet-address": walletAddress,
7171
"x-account-address": accountAddress,
7272
"x-idempotency-key": idempotencyKey,
73+
"x-transaction-mode": transactionMode,
7374
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
7475

7576
const chainId = await getChainIdFromChain(chain);
@@ -92,6 +93,7 @@ export async function erc1155mintAdditionalSupplyTo(fastify: FastifyInstance) {
9293
extension: "erc1155",
9394
idempotencyKey,
9495
txOverrides,
96+
transactionMode,
9597
});
9698

9799
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/mint-batch-to.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export async function erc1155mintBatchTo(fastify: FastifyInstance) {
8686
"x-backend-wallet-address": walletAddress,
8787
"x-account-address": accountAddress,
8888
"x-idempotency-key": idempotencyKey,
89+
"x-transaction-mode": transactionMode,
8990
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
9091

9192
const chainId = await getChainIdFromChain(chain);
@@ -107,6 +108,7 @@ export async function erc1155mintBatchTo(fastify: FastifyInstance) {
107108
extension: "erc1155",
108109
idempotencyKey,
109110
txOverrides,
111+
transactionMode,
110112
});
111113

112114
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/set-approval-for-all.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export async function erc1155SetApprovalForAll(fastify: FastifyInstance) {
6666
"x-backend-wallet-address": walletAddress,
6767
"x-account-address": accountAddress,
6868
"x-idempotency-key": idempotencyKey,
69+
"x-transaction-mode": transactionMode,
6970
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
7071

7172
const chainId = await getChainIdFromChain(chain);
@@ -87,6 +88,7 @@ export async function erc1155SetApprovalForAll(fastify: FastifyInstance) {
8788
extension: "erc1155",
8889
idempotencyKey,
8990
txOverrides,
91+
transactionMode,
9092
});
9193

9294
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/set-batch-claim-conditions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export async function erc1155SetBatchClaimConditions(fastify: FastifyInstance) {
7070
"x-backend-wallet-address": walletAddress,
7171
"x-account-address": accountAddress,
7272
"x-idempotency-key": idempotencyKey,
73+
"x-transaction-mode": transactionMode,
7374
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
7475

7576
const chainId = await getChainIdFromChain(chain);
@@ -118,6 +119,7 @@ export async function erc1155SetBatchClaimConditions(fastify: FastifyInstance) {
118119
extension: "erc1155",
119120
idempotencyKey,
120121
txOverrides,
122+
transactionMode,
121123
});
122124

123125
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/set-claim-conditions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export async function erc1155SetClaimCondition(fastify: FastifyInstance) {
6767
"x-backend-wallet-address": walletAddress,
6868
"x-account-address": accountAddress,
6969
"x-idempotency-key": idempotencyKey,
70+
"x-transaction-mode": transactionMode,
7071
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
7172

7273
const chainId = await getChainIdFromChain(chain);
@@ -105,6 +106,7 @@ export async function erc1155SetClaimCondition(fastify: FastifyInstance) {
105106
extension: "erc1155",
106107
idempotencyKey,
107108
txOverrides,
109+
transactionMode,
108110
});
109111

110112
reply.status(StatusCodes.OK).send({

src/server/routes/contract/extensions/erc1155/write/signature-mint.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export async function erc1155SignatureMint(fastify: FastifyInstance) {
6262
"x-backend-wallet-address": walletAddress,
6363
"x-account-address": accountAddress,
6464
"x-idempotency-key": idempotencyKey,
65+
"x-transaction-mode": transactionMode,
6566
} = request.headers as Static<typeof walletWithAAHeaderSchema>;
6667

6768
const chainId = await getChainIdFromChain(chain);
@@ -91,6 +92,7 @@ export async function erc1155SignatureMint(fastify: FastifyInstance) {
9192
extension: "erc1155",
9293
idempotencyKey,
9394
txOverrides,
95+
transactionMode,
9496
});
9597

9698
reply.status(StatusCodes.OK).send({

0 commit comments

Comments
 (0)