Skip to content

Commit

Permalink
minor update vvs, cetus
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-sentio committed Jan 29, 2024
1 parent cd9789d commit 715dc26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion projects/cetus/src/helper/cetus-clmm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SuiObjectProcessor, SuiContext, SuiObjectContext } from "@sentio/sdk/su
import { getPriceByType, token } from "@sentio/sdk/utils"
import * as constant from '../constant-cetus.js'
import { SuiNetwork } from "@sentio/sdk/sui"
import { pool } from "../types/sui/testnet/clmm.js"
import { pool } from "../types/sui/clmm.js"

//get coin address without suffix
export function getCoinObjectAddress(type: string) {
Expand Down
2 changes: 2 additions & 0 deletions projects/vvs/src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ async function onSwap(evt: SwapEvent, ctx: VVSPairContext) {
const usd0 = await getUsdValue(ctx, poolInfo.token0, poolInfo.token0Address, amount0)
// const usd1 = await getUsdValue(ctx, poolInfo.token1, poolInfo.token0Address, amount1)
const sender = evt.args.sender
const to = evt.args.to
let exchangePrice: BigDecimal
if (amount1.eq(0)) {
exchangePrice = BigDecimal(-1)
Expand Down Expand Up @@ -185,6 +186,7 @@ async function onSwap(evt: SwapEvent, ctx: VVSPairContext) {
message: `${sender} swapped ${amount0} ${poolInfo.token0.symbol} for ${amount1} ${poolInfo.token1.symbol}`,
distinctId: sender,
sender: sender,
to: to,
token0: poolInfo.token0.symbol,
token1: poolInfo.token1.symbol,
amount0: amount0,
Expand Down

0 comments on commit 715dc26

Please sign in to comment.