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

feat: support json token uri #901

Merged
merged 7 commits into from
Oct 7, 2024
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
12 changes: 5 additions & 7 deletions ci/.env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,14 @@ POSTGRES_DB_TEST=test
MNEMONIC=

# IPFS
IPFS_GATEWAY=
REQUEST_IPFS_TIMEOUT=
IPFS_GATEWAY=http://ipfs.dev.aura.network:8080/ipfs/
REQUEST_IPFS_TIMEOUT=100000
MAX_CONTENT_LENGTH_BYTE=100000000
MAX_BODY_LENGTH_BYTE=100000000

# AWS S3
AWS_SECRET_ACCESS_KEY=
AWS_ACCESS_KEY_ID=
AWS_REGION=
BUCKET=
S3_GATEWAY=

# IPFS
IPFS_GATEWAY=
REQUEST_IPFS_TIMEOUT=
S3_GATEWAY=
10 changes: 3 additions & 7 deletions src/services/evm/erc721.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { Erc721Contract } from '../../models/erc721_contract';
import { BULL_JOB_NAME, SERVICE } from './constant';
import { Erc721Handler } from './erc721_handler';
import * as Erc721MediaHandler from './erc721_media_handler';
import { Erc721MediaHandler, ITokenMediaInfo } from './erc721_media_handler';
import { Erc721Reindexer } from './erc721_reindex';

const { NODE_ENV } = Config;
Expand Down Expand Up @@ -239,9 +239,7 @@ export default class Erc721Service extends BullableService {
jobName: BULL_JOB_NAME.HANDLE_ERC721_TOKEN_MEDIA,
concurrency: config.erc721.concurrencyHandleTokenMedia,
})
async jobHandlerTokenMedia(_payload: {
tokenMedia: Erc721MediaHandler.ITokenMediaInfo;
}) {
async jobHandlerTokenMedia(_payload: { tokenMedia: ITokenMediaInfo }) {
let { tokenMedia } = _payload;
if (tokenMedia.onchain.token_uri) {
try {
Expand Down Expand Up @@ -386,9 +384,7 @@ export default class Erc721Service extends BullableService {
}
}

async getTokensUri(
tokens: Erc721Token[]
): Promise<Erc721MediaHandler.ITokenMediaInfo[]> {
async getTokensUri(tokens: Erc721Token[]): Promise<ITokenMediaInfo[]> {
const contracts = tokens.map((token) =>
getContract({
address: token.erc721_contract_address as `0x${string}`,
Expand Down
Loading
Loading