Skip to content

Commit

Permalink
add dapp to dapp analytics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rrozek committed Oct 19, 2024
1 parent 80f9409 commit 26db82f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/dapp-analytics/dapp-analytics.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const saveDapp = async (
res: Response,
): Promise<Response> => {
try {
const { name, logo, blockchain, website, fromBlock, addedBy, abis } =
const { name, logo, blockchain, website, fromBlock, addedBy, abis, airdropContract, airdropCurrencyContract } =
req.body as IDAppData;
const response = await axios.post(`${API_BASE_URL}/dapp-analytics/dapp`, {
name,
Expand All @@ -44,6 +44,8 @@ export const saveDapp = async (
fromBlock,
addedBy,
abis,
airdropContract,
airdropCurrencyContract,
});
logger.info('Response:', response.status, response.data);
if (response.status === 201) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/dapp-analytics/dapp-analytics.validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export const saveDappValidation = {
fromBlock: Joi.number().integer().allow(null),
addedBy: Joi.string().allow(null),
abis: abiSchema.required(),
airdropContract: Joi.string().optional(),
airdropCurrencyContract: Joi.string().optional(),
}),
};

Expand Down
1 change: 1 addition & 0 deletions src/components/node-api/chainstate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const rpcEndpoints: { [key: string]: string } = {
process.env.RPC_ARBITRUM_ONE || 'https://arb1.arbitrum.io/rpc',
'arbitrum-nova':
process.env.RPC_ARBITRUM_NOVA || 'https://nova.arbitrum.io/rpc',
avalanche: process.env.RPC_AVALANCHE || 'https://avalanche.api.onfinality.io/public/ext/bc/C/rpc',
ethereum: process.env.RPC_ETHEREUM || 'https://eth.api.onfinality.io/public',
optimism:
process.env.RPC_OPTIMISM || 'https://optimism.api.onfinality.io/public',
Expand Down

0 comments on commit 26db82f

Please sign in to comment.