You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(zenrock): add historical query support with x-cosmos-block-height header
- Add timestampToBlockHeight function with hybrid estimation + binary search
to ensure accuracy within 60 seconds
- Add apiRequest helper function to pass x-cosmos-block-height header
for all API calls to api.diamond.zenrocklabs.io
- Update zcashTvl to use historical queries for timestamps > 1 hour ago
- Update bitcoin tvl to pass blockHeight to zenrock fetcher
- Update zenrock fetcher to accept blockHeight parameter and use header
for all treasury API endpoints
- Support historical queries for last ~274k blocks (~16 days)
- Enable timetravel: true for DefiLlama historical charts
// If historical query failed (state not available), return empty balances
158
+
if(!supplyData){
159
+
returnbalances;
160
+
}
161
+
47
162
// Find ASSET_ZENZEC in supplies array
48
163
constzenZecSupply=supplyData.supplies?.find(
49
164
item=>item.supply?.asset==='ASSET_ZENZEC'
@@ -62,6 +177,8 @@ async function zcashTvl() {
62
177
}
63
178
64
179
module.exports={
180
+
timetravel: true,
181
+
start: GENESIS_TIMESTAMP,
65
182
methodology: 'zrchain locks native assets through its decentralized MPC network. zenBTC, Zenrock\'s flagship product, is a yield-bearing wrapped Bitcoin issued on Solana and EVM chains. TVL represents the total Bitcoin locked in zrchain treasury addresses. All zenBTC is fully backed by native Bitcoin, with the price of zenBTC anticipated to increase as yield payments are made continuously.',
0 commit comments