Skip to content

Commit

Permalink
Merge pull request #372 from near/query-storage-deposit
Browse files Browse the repository at this point in the history
Detect likely tokens by querying for `storage_deposit` calls
  • Loading branch information
vgrichina authored Apr 21, 2021
2 parents 150922c + 3161169 commit 40b3616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const findLikelyTokens = withPgClient(async (ctx) => {
join action_receipt_actions using (receipt_id)
where predecessor_account_id = $1
and action_kind = 'FUNCTION_CALL'
and args->>'method_name' like 'ft_%'
and (args->>'method_name' like 'ft_%' or args->>'method_name' = 'storage_deposit')
`;

const { rows } = await client.query([mintedWithBridge, calledByUser].join(' union '), [accountId, BRIDGE_TOKEN_FACTORY_ACCOUNT_ID]);
Expand Down

0 comments on commit 40b3616

Please sign in to comment.