Skip to content

Instantly share code, notes, and snippets.

@taylorjdawson
Last active December 11, 2018 22:28
Show Gist options
  • Save taylorjdawson/5cbd94218cd23c6cc19b34f386bb86b8 to your computer and use it in GitHub Desktop.
Save taylorjdawson/5cbd94218cd23c6cc19b34f386bb86b8 to your computer and use it in GitHub Desktop.
export ENS_ADDRESS=0x6090A6e47849629b7245Dfa1Ca21D94cd15878Ef
// Topic hashes
export NEW_BID_EVENT=0xb556ff269c1b6714f432c36431e2041d28436a73b6c3f19c021827bbdc6bfc29
export BID_REVEAL_EVENT=0x7b6c4b278d165a6b33958f8ea5dfb00c8c9d4d0acf1985bef5d10786898bc3e7
// Get total new bid events: 419347
curl \
-X GET \
-H "accept: application/json" \
-H "x-amberdata-api-key: <your-api-key>" \
-H "x-amberdata-blockchain-id: 1c9c969065fcd1cf" \
"https://web3api.io/api/v1/addresses/$ENS_ADDRESS/logs?topic=$NEW_BID_EVENT" \
| jq '.payload.totalRecords'
// Get total bid reveal events: 414130
curl \
-X GET \
-H "accept: application/json" \
-H "x-amberdata-api-key: <your-api-key>" \
-H "x-amberdata-blockchain-id: 1c9c969065fcd1cf" \
"https://web3api.io/api/v1/addresses/$ENS_ADDRESS/logs?topic=$BID_REVEAL_EVENT" \
| jq '.payload.totalRecords'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment