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

Humanode EVM #113

Merged
merged 1 commit into from
Apr 28, 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
132 changes: 122 additions & 10 deletions Humanode/Humanode-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[SubQuery](https://subquery.network) is a fast, flexible, and reliable open-source data indexer that provides you with custom APIs for your web3 project across all of our supported networks. To learn about how to get started with SubQuery, [visit our docs](https://academy.subquery.network).

**This SubQuery project indexes all transfers, bioauthentication events, and online validator nodes from Humanode chain**
This project can be used as a starting point for developing your SubQuery project. It indexes all transfers, bioauthentication events, and online validator nodes from Humanode chain. Moreover, it indexes the approvals and transfers of HMND token.

## Start

Expand Down Expand Up @@ -41,20 +41,132 @@ For this project, you can try to query with the following GraphQL code to get a
```graphql
{
query {
starterEntities(first: 5) {
transactions(first: 1, orderBy: VALUE_DESC) {
totalCount
nodes {
id
transactionHash
blockHeight
from
to
value
contractAddress
}
}
bioAuths(first: 5) {
nodes {
id
}
}
approvals(first: 1) {
nodes {
id
owner
spender
value
contractAddress
}
}
bioauthNewAuthentications(first: 1) {
nodes {
id
validatorPublicKey
timestamp
blockNumber
}
}
imOnlineSomeOfflines(first: 1) {
nodes {
id
accountIds
timestamp
blockNumber
}
_metadata {
lastProcessedHeight
lastProcessedTimestamp
targetHeight
}
}
```

Afterward, anticipate receiving a result resembling this:

```json
{
"data": {
"query": {
"transactions": {
"nodes": [
{
"id": "7487952-0x030d4ab19a9fa75e093bcbc400f1a10a6e377e52f673bfd1cd490572e9874282-0",
"transactionHash": "0x030d4ab19a9fa75e093bcbc400f1a10a6e377e52f673bfd1cd490572e9874282",
"blockHeight": "7487952",
"from": "0xf591da380c911C7bE9Ba48bD14c451bF784886F7",
"to": "0xe48Cc340B8f1AC0a326577B3c2d1Fe5229ebb1c2",
"value": "9800000000000000000000",
"contractAddress": "0x0000000000000000000000000000000000000802"
}
]
}
},
"approvals": {
"nodes": [
{
"id": "0x909a9c2d5eead83eeba78f8b4cfd789cf1b2fcfc543a33b63a792fe4a8a53b37",
"owner": "0xd5b2bceeaaaccb2bf152207f7e8c4abcaa7d5881",
"spender": "0x8C20a3F5C9A5926d4C83592c25317f602b385441",
"value": "100000000000000000000",
"contractAddress": "0x0000000000000000000000000000000000000802"
}
]
},
"bioauthNewAuthentications": {
"nodes": [
{
"id": "7489527-1",
"validatorPublicKey": "hmsxpGvLUfSbUZxUYFZF9dNm3Jf9xUBdhN1p229qAr4xiktFP",
"timestamp": "2024-04-26T13:34:18",
"blockNumber": 7489527
}
]
},
"imOnlineSomeOfflines": {
"nodes": [
{
"id": "7495265-0",
"accountIds": [
"hmrjcaAhyXhsZ37ndzTTv4BdUEVc8yw9xaNfp75oXzH3YGJgq",
"hmqKroHLbyP9QfREyGT6X9D5AbHwCBnQw5bsrg99EirM6uPpk",
"hmrrvsazEScvkVj1CJdewfxxP7bLz99fydDxSeLkKcHzYp6KY",
"hmpt1bKjZfJBUQ8ZiGLvwJuxv7Fg2cKJMNxojDh7EE3RANHAA",
"hmsbiRJYWozBFpHhzWyiHs99rDy88rMHCVRsN9mXxJBMVyKim",
"hmq7RB5cu3GsVLfD4iUDC8LQmqhL8gmxLLLCbNw1geZa1pMRr",
"hmqNahjGVaaNVZ3GsmyScgfQuWjsAJMyV5vRSBghVa1EkPKt2",
"hmq6hEjFh5wu3zFa2ZNC8nunRhquhpxvTK96ph4jxTjnn9kdF",
"hmpZ6medWcV9suYc4b98SRtVyYc4En7Mmx6kUSZBaaTH7SM9E",
"hmrHE9bXxtse94j8FoqJLdQjVTAwwNxCuietpi84V2WwwpDVq",
"hmpsTmnYR5qLik1FjCWVTkXH3NMu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C72wQNrDVNc8XeSJjucYT1dpfS1ocw2FXkV",
"hmnrJ8M7XUZtGEVLnLbngi6XCwEwKgfUNfkRiyrqjP1iLpRj8",
"hmrQRgz8pU3gT8cEn4XgsRtLUW8nxTtz4SCzXRx6GxdDEtXVF"
],
"timestamp": "2024-04-26T23:32:54",
"blockNumber": 7495265
}
]
}
}
}
Expand Down
222 changes: 222 additions & 0 deletions Humanode/Humanode-starter/erc20.abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "balance",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
]
Loading
Loading