From c3c251d56c59be2f5f4117a3e260092105f0619c Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Wed, 18 Dec 2024 22:53:27 -0500 Subject: [PATCH] fixed oraichain oraidex cw20 staking queries --- src/formulas/formulas/contract/staking/cw20Stake.ts | 10 ++++++++-- src/wasmCodeTrackers/trackers/index.ts | 1 + src/wasmCodeTrackers/trackers/oraichain.ts | 9 +++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/wasmCodeTrackers/trackers/oraichain.ts diff --git a/src/formulas/formulas/contract/staking/cw20Stake.ts b/src/formulas/formulas/contract/staking/cw20Stake.ts index 16ca316..74e0b18 100644 --- a/src/formulas/formulas/contract/staking/cw20Stake.ts +++ b/src/formulas/formulas/contract/staking/cw20Stake.ts @@ -104,7 +104,10 @@ export const stakedBalanceAtHeight: ContractFormula< const balance = (await snapshotMapMayLoadAtHeight({ - env, + env: { + ...env, + contractAddress, + }, name: 'stakedBalance', key, height, @@ -216,7 +219,10 @@ export const totalStakedAtHeight: ContractFormula< const total = (oraichainToken ? await snapshotMapMayLoadAtHeight({ - env, + env: { + ...env, + contractAddress, + }, name: 'stakedTotal', key: oraichainToken, height, diff --git a/src/wasmCodeTrackers/trackers/index.ts b/src/wasmCodeTrackers/trackers/index.ts index c62c828..105d7fb 100644 --- a/src/wasmCodeTrackers/trackers/index.ts +++ b/src/wasmCodeTrackers/trackers/index.ts @@ -1,2 +1,3 @@ export * from './neutron' +export * from './oraichain' export * from './valence' diff --git a/src/wasmCodeTrackers/trackers/oraichain.ts b/src/wasmCodeTrackers/trackers/oraichain.ts new file mode 100644 index 0000000..60398fb --- /dev/null +++ b/src/wasmCodeTrackers/trackers/oraichain.ts @@ -0,0 +1,9 @@ +import { WasmCodeTracker } from '@/types' + +export const oraichainOraiDexCw20Staking: WasmCodeTracker = { + chainId: 'Oraichain', + codeKey: 'oraichain-cw20-staking', + contractAddresses: new Set([ + 'orai1xu9yw2xwd55d09pjce28yjklvk2kwwrqw4ql9gvyrs607z26kv0sl99040', + ]), +}