File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed
Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ const { queryV1Beta1 } = require ( '../helper/chain/cosmos' ) ;
2+
3+ async function getCosmosStaking ( ) {
4+ const pool = await queryV1Beta1 ( {
5+ chain : 'allora' ,
6+ url : 'staking/v1beta1/pool'
7+ } ) ;
8+
9+ return pool . pool . bonded_tokens || '0' ;
10+ }
11+
12+ async function getReputationalStaking ( ) {
13+ // Reputational staking endpoint not yet available
14+ return '0' ;
15+ }
16+
17+ async function tvl ( api ) {
18+ // Staking is tracked separately
19+ }
20+
21+ async function staking ( ) {
22+ const validatorStaking = await getCosmosStaking ( ) ;
23+ const reputationalStaking = await getReputationalStaking ( ) ;
24+
25+ const totalStakedUallo = BigInt ( validatorStaking ) + BigInt ( reputationalStaking ) ;
26+ const totalStakedAllo = totalStakedUallo / BigInt ( 1e18 ) ; // 18 decimals
27+
28+ return {
29+ 'allora' : Number ( totalStakedAllo )
30+ } ;
31+ }
32+
33+ module . exports = {
34+ methodology : 'Tracks validator staking on Allora Chain via Cosmos SDK staking module. Reputational staking (workers/reputers) will be added when REST endpoint becomes available.' ,
35+
36+ timetravel : false ,
37+
38+ allora : {
39+ tvl,
40+ staking
41+ } ,
42+
43+ hallmarks : [
44+ [ 1731283200 , "Mainnet Launch" ] ,
45+ ] ,
46+ } ;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ const endPoints = {
5454 pryzm : "https://api.pryzm.zone" ,
5555 // agoric: 'https://as-proxy.gateway.atomscan.com/agoric-lcd',
5656 agoric : 'https://agoric-api.polkachu.com/' ,
57+ allora : 'https://allora-api.polkachu.com' , // TODO: Verify actual mainnet endpoint
5758 band : 'https://laozi1.bandchain.org/api' ,
5859 celestia : 'https://celestia-rest.publicnode.com' ,
5960 dydx : 'https://dydx-rest.publicnode.com' ,
Original file line number Diff line number Diff line change 1111 " aleph_zero" ,
1212 " alephium" ,
1313 " algorand" ,
14+ " allora" ,
1415 " alv" ,
1516 " ancient8" ,
1617 " ao" ,
You can’t perform that action at this time.
0 commit comments