Skip to content

Commit

Permalink
fix: add json file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gosuto-inzasheru committed Dec 11, 2024
1 parent 9d90329 commit 9f05911
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions action-scripts/gen_morpho_airdrop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from bal_tools import Subgraph

# https://docs.merkl.xyz/merkl-mechanisms/types-of-campaign/airdrop
if __name__ == "__main__":

def get_user_shares(pool="0xd1d7fa8871d84d0e77020fc28b7cd5718c446522"):
query = """{
query PoolShares($where: PoolShare_filter, $block: Block_height) {
poolShares(where: $where, block: $block) {
user {
id
shares {
balance
}
}
}
}
}"""
params = {
"where": {
"balance_gt": 0.001,
"pool_in": [pool],
},
"block": {"number": 37435326},
}
return Subgraph().fetch_graphql_data("apiv3", query, params)

print(get_user_shares())

0 comments on commit 9f05911

Please sign in to comment.