Skip to content

Commit

Permalink
Fix indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Mar 22, 2024
1 parent a6ff11b commit ca5cd46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"deploy-local": "graph deploy beefyfinance/beefy-cl --node http://127.0.0.1:8020 --ipfs http://localhost:5001",
"remove-local": "graph remove beefyfinance/beefy-cl --node http://127.0.0.1:8020",
"deploy:all": "yarn --silent prepare:arbitrum && yarn --silent deploy:arbitrum && yarn --silent prepare:optimism && yarn --silent deploy:optimism",
"deploy:arbitrum": "yarn --silent prepare:arbitrum && yarn --silent publish:arbitrum",
"deploy:optimism": "yarn --silent prepare:optimism && yarn --silent publish:optimism",
"prepare:arbitrum": "mustache config/arbitrum.json subgraph.template.yaml > subgraph.yaml && mustache config/arbitrum.json src/config.template.ts > src/config.ts ",
"prepare:optimism": "mustache config/optimism.json subgraph.template.yaml > subgraph.yaml && mustache config/optimism.json src/config.template.ts > src/config.ts ",
"deploy:arbitrum": "0xgraph remove beefyfinance/clm-arbitrum && sleep 10 && 0xgraph create beefyfinance/clm-arbitrum && yarn --silent codegen && 0xgraph build && sleep 5 && 0xgraph deploy beefyfinance/clm-arbitrum --version-label=v0.0.1",
"deploy:optimism": "0xgraph remove beefyfinance/clm-optimism && sleep 10 && 0xgraph create beefyfinance/clm-optimism && yarn --silent codegen && 0xgraph build && sleep 5 && 0xgraph deploy beefyfinance/clm-optimism --version-label=v0.0.1"
"publish:arbitrum": "0xgraph remove beefyfinance/clm-arbitrum && sleep 10 && 0xgraph create beefyfinance/clm-arbitrum && yarn --silent codegen && 0xgraph build && sleep 5 && 0xgraph deploy beefyfinance/clm-arbitrum --version-label=v0.0.1",
"publish:optimism": "0xgraph remove beefyfinance/clm-optimism && sleep 10 && 0xgraph create beefyfinance/clm-optimism && yarn --silent codegen && 0xgraph build && sleep 5 && 0xgraph deploy beefyfinance/clm-optimism --version-label=v0.0.1"
},
"main": "./bin/index.js",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions src/mapping/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ export function getVaultPriceRangeInToken1(strategyAddress: Bytes, throwOnError:
}
// this is purposely inverted as we want prices in token1
const encodingDecimals = BigInt.fromU32(36)
const rangeMinToken1Price = tokenAmountToDecimal(BigInt.fromI32(rangeRes.value.value0), encodingDecimals)
const rangeMaxToken1Price = tokenAmountToDecimal(BigInt.fromI32(rangeRes.value.value1), encodingDecimals)
const rangeMinToken1Price = tokenAmountToDecimal(BigInt.fromU64(rangeRes.value.value0), encodingDecimals)
const rangeMaxToken1Price = tokenAmountToDecimal(BigInt.fromU64(rangeRes.value.value1), encodingDecimals)
return new PriceRange(rangeMinToken1Price, rangeMaxToken1Price)
}

Expand Down

0 comments on commit ca5cd46

Please sign in to comment.