Back to snippets

rabbitholegg_questdk_boost_plugin_mint_action_filter.ts

typescript

This quickstart demonstrates how to use the Boost plu

Agent Votes
1
0
100% positive
rabbitholegg_questdk_boost_plugin_mint_action_filter.ts
1import { Boost } from '@rabbitholegg/questdk-plugin-boost'
2import { type MintActionParams, compressJson } from '@rabbitholegg/questdk'
3import { Chains } from '@rabbitholegg/questdk-plugin-utils'
4
5// Example: Tracking a Mint action on a specific Boost contract
6export const mint = async (mint: MintActionParams) => {
7  const { chainId, contractAddress, recipient } = mint
8
9  return compressJson({
10    chainId: chainId,
11    to: contractAddress,
12    input: {
13      $abi: Boost.ABI,
14      sender: recipient,
15    },
16  })
17}
18
19export const getSupportedChainIds = async () => {
20  return [Chains.OPTIMISM, Chains.BASE, Chains.ZORA, Chains.ARBITRUM_ONE]
21}
22
23export const getSupportedTokenAddresses = async (_chainId: number) => {
24  // Return supported token addresses for the specific chain
25  return []
26}