@@ -3,13 +3,15 @@ import {
3
3
AIRDROP_POOL ,
4
4
DEVELOPER_PROJECTS_GRANTS_POOL ,
5
5
FOUNDATION_AND_ECOSYSTEM_DEVELOPMENT_POOL ,
6
- INFLATION_OFFSETTING_POOL ,
6
+ INITIAL_BALANCE_INFLATION_OFFSETTING_POOL ,
7
7
EDUCATION_BOOTCAMP_PR_EVENT_POOL ,
8
8
PROTOCOL_DEVELOPMENT_POOL ,
9
9
PROTOCOL_RESERVE_POOL ,
10
10
VALIDATOR_INCENTIVES_POOL ,
11
11
MARKET_POOL ,
12
12
CUSTODY ,
13
+ AIRDROP_3RD_PARTY_1 ,
14
+ DECIMALS ,
13
15
} from '../consts.js' ;
14
16
import { totalSupply } from './total-supply.js' ;
15
17
@@ -41,7 +43,7 @@ export async function totalVesting() {
41
43
const locked = withType . unwrap ( ) [ 0 ] . locked . toBigInt ( ) ;
42
44
result += locked ;
43
45
}
44
- const totalVesting = result / BigInt ( 10 ** 12 ) ;
46
+ const totalVesting = result / BigInt ( 10 ** DECIMALS ) ;
45
47
return Number ( totalVesting ) ;
46
48
}
47
49
@@ -59,7 +61,7 @@ export async function totalStaking() {
59
61
total += withType . amount . toBigInt ( ) ;
60
62
}
61
63
}
62
- const totalStaking = total / BigInt ( 10 ** 12 ) ;
64
+ const totalStaking = total / BigInt ( 10 ** DECIMALS ) ;
63
65
return Number ( totalStaking ) ;
64
66
}
65
67
@@ -69,7 +71,7 @@ export async function totalStaking() {
69
71
// return [poolAddr, ...deriveAddr(poolAddr)];
70
72
// }
71
73
72
- // Circulation Supply = Total Supply - (Vesting + Pools);
74
+ // Circulation Supply = Total Supply - (Vesting + Staking + Pools);
73
75
export async function circulationSupply ( ) {
74
76
const addresses = [
75
77
EDUCATION_BOOTCAMP_PR_EVENT_POOL ,
@@ -79,10 +81,11 @@ export async function circulationSupply() {
79
81
VALIDATOR_INCENTIVES_POOL ,
80
82
DEVELOPER_PROJECTS_GRANTS_POOL ,
81
83
AIRDROP_POOL ,
82
- INFLATION_OFFSETTING_POOL ,
83
84
MARKET_POOL ,
85
+ AIRDROP_3RD_PARTY_1 ,
84
86
...CUSTODY ,
85
87
] ;
88
+ // INFLATION_OFFSETTING_POOL;
86
89
87
90
const [ supply , vesting , staking , pools ] = await Promise . all ( [
88
91
totalSupply ( ) ,
@@ -91,7 +94,11 @@ export async function circulationSupply() {
91
94
getBalances ( addresses ) ,
92
95
] ) ;
93
96
94
- const total = pools . reduce ( ( accumulator , current ) => accumulator + current , 0 ) + vesting + staking ;
97
+ const total =
98
+ pools . reduce ( ( accumulator , current ) => accumulator + current , 0 ) +
99
+ vesting +
100
+ staking +
101
+ INITIAL_BALANCE_INFLATION_OFFSETTING_POOL ;
95
102
96
103
return supply - total ;
97
104
}
0 commit comments