Skip to content

Commit

Permalink
refactor(api): enable additional EVM chains and adjust NFT limit
Browse files Browse the repository at this point in the history
  • Loading branch information
preschian committed Aug 4, 2024
1 parent 31ae128 commit fa495f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ogi/server/api/evm/[chain]/item/[id].ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { createThirdwebClient, getContract } from 'thirdweb'
import {
base,
// optimism,
// avalanche,
// polygon,
optimism,
avalanche,
polygon,
type ChainOptions,
} from 'thirdweb/chains'
import { getNFT, getNFTs, totalSupply } from 'thirdweb/extensions/erc721'

// evm chains
const chains: { [key: string]: Readonly<ChainOptions & { rpc: string }> } = {
base,
// optimism,
// avalanche,
// polygon,
optimism,
avalanche,
polygon,
}

export default defineEventHandler(async (event) => {
Expand All @@ -33,7 +33,7 @@ export default defineEventHandler(async (event) => {
})
const [item, items, supply] = await Promise.all([
getNFT({ contract, tokenId: token }),
getNFTs({ contract, count: 10000 }),
getNFTs({ contract, count: 1000 }),
totalSupply({ contract }),
])
const claimed = items.filter((item) => item.tokenURI).length
Expand Down

0 comments on commit fa495f8

Please sign in to comment.