Skip to content

Commit

Permalink
feat(hasura): add evm_transactions_history and evm_token_history actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Torresmorah committed Aug 10, 2023
1 parent b823b72 commit 710b785
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
24 changes: 24 additions & 0 deletions hasura/metadata/actions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ type Query {
eosrate_stats: [EOSRateStats]
}

type Query {
evm_token_history(
range: String!
): [EVMTokenHistory]
}

type Query {
evm_transactions_history(
range: String!
): [EVMTransaction]
}

type Mutation {
getProducersInfo(
bpParams: GetProducersInfoInput!
Expand Down Expand Up @@ -113,3 +125,15 @@ type EOSRateStats {
trustiness: Float
}

type EVMTransaction {
datetime: String
transactions_count: Int
avg_gas_used: Float
}

type EVMTokenHistory {
datetime: String
incoming: Float
outgoing: Float
}

10 changes: 10 additions & 0 deletions hasura/metadata/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ actions:
handler: '{{HASURA_GRAPHQL_ACTION_BASE_URL}}/get-eos-rate'
permissions:
- role: guest
- name: evm_token_history
definition:
kind: ""
handler: '{{HASURA_GRAPHQL_ACTION_EVM_URL}}/evm-token-history'
- name: evm_transactions_history
definition:
kind: ""
handler: '{{HASURA_GRAPHQL_ACTION_EVM_URL}}/evm-transactions-history'
- name: getProducersInfo
definition:
kind: synchronous
Expand Down Expand Up @@ -72,4 +80,6 @@ custom_types:
- name: TransferFaucetTokensOutput
- name: GetProducersInfoOutput
- name: EOSRateStats
- name: EVMTransaction
- name: EVMTokenHistory
scalars: []

0 comments on commit 710b785

Please sign in to comment.