Skip to content

Commit

Permalink
chore: update Sentio sdk (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 authored Jan 14, 2025
1 parent 4271104 commit 60d512a
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 121 deletions.
4 changes: 2 additions & 2 deletions apps/indexer-sentio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"upload:testnet": "sentio upload --name swaylend-testnet --skip-deps --skip-gen"
},
"dependencies": {
"@sentio/sdk": "2.50.1",
"@sentio/sdk": "2.54.2",
"dayjs": "^1.11.13",
"fuels": "0.96.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@sentio/cli": "2.23.0",
"@sentio/cli": "2.24.1",
"typescript": "^5.6.3"
}
}
10 changes: 7 additions & 3 deletions apps/indexer-sentio/src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,13 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
underlyingTokenSymbol: appConfig.assets[asset_id],
underlyingTokenPriceUsd: BigDecimal(0),
availableAmount: 0n,
availableAmountNormalized: BigDecimal(0),
availableAmountUsd: BigDecimal(0),
suppliedAmount: 0n,
suppliedAmountNormalized: BigDecimal(0),
suppliedAmountUsd: BigDecimal(0),
collateralAmount: 0n,
collateralAmountNormalized: BigDecimal(0),
collateralAmountUsd: BigDecimal(0),
collateralFactor: BigDecimal(
borrow_collateral_factor.toString()
Expand All @@ -334,6 +337,7 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
supplyIndex: BigDecimal(0),
supplyApr: BigDecimal(0),
borrowedAmount: 0n,
borrowedAmountNormalized: BigDecimal(0),
borrowedAmountUsd: BigDecimal(0),
borrowIndex: BigDecimal(0),
borrowApr: BigDecimal(0),
Expand Down Expand Up @@ -1128,9 +1132,9 @@ Object.values(appConfig.markets).forEach(({ marketAddress, startBlock }) => {
blockNumber: Number(ctx.transaction.blockNumber),
logIndex: receiptIndex,
transactionHash: ctx.transaction.id,
liquidatorAddress:
liquidator.Address?.bits ?? liquidator.ContractId?.bits,
userAddress: account.Address?.bits ?? account.ContractId?.bits,
liquidatorAddress: (liquidator.Address?.bits ??
liquidator.ContractId?.bits)!,
userAddress: (account.Address?.bits ?? account.ContractId?.bits)!,
poolAddress: ctx.contractAddress,
tokenAddress: marketConfiguration.baseTokenAddress,
amount: BigInt(amount.toFixed(0)),
Expand Down
Loading

0 comments on commit 60d512a

Please sign in to comment.