Skip to content

Commit

Permalink
add superrare
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Oct 17, 2023
1 parent eba3bd3 commit a357fc0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions projects/superrare/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { request, gql } = require("graphql-request");

async function staking(_time, block){
const query = gql`query AllRareLocked ($block: Int) {
pools(first: 1000, block: { number: $block }) {
totalRareLocked
}
}`
const result = await request("https://gateway-arbitrum.network.thegraph.com/api/5fba66cce34542163f90501c363f99e8/subgraphs/id/Cc4fyxiBkZYdzATQDhTv3zLzfEwRupygp7HB2WWQciw5", query, {
block,
});
return {
"0xba5BDe662c17e2aDFF1075610382B9B691296350": result.pools.reduce((sum, a)=>sum+Number(a.totalRareLocked), 0)
}
}

module.exports={
ethereum:{
staking,
tvl: async()=>({})
}
}

0 comments on commit a357fc0

Please sign in to comment.