Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cove mappings and update api version #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"deploy:optimism": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-optimism --debug",
"deploy:moonbeam": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-moonbeam --debug",
"deploy:ethereum": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-mainnet --debug",
"deploy:arbitrum": "graph deploy --node https://api.thegraph.com/deploy/ edoapp/clipper-arbitrum --debug"
"deploy:arbitrum": "graph deploy --studio clipper-arbitrum"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.21.0",
"@graphprotocol/graph-ts": "0.20.0"
"@graphprotocol/graph-cli": "0.73.0",
"@graphprotocol/graph-ts": "0.35.1"
},
"devDependencies": {
"@types/glob": "^7.2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/coveMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ export function handleCoveSwapped(event: CoveSwapped): void {
swap.recipient = event.params.recipient
swap.amountIn = inAmount
swap.amountOut = outAmount
swap.amountInRaw = event.params.inAmount
swap.amountOutRaw = event.params.outAmount
swap.logIndex = event.logIndex
swap.pricePerInputToken = inputPrice
swap.pricePerOutputToken = outputPrice
Expand Down
4 changes: 2 additions & 2 deletions src/entities/Pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getDailyPoolStatus(pool: Pool, timestamp: BigInt): DailyPoolStat
.concat(from.toString())
.concat(to.toString())

let dailyPoolStatus = DailyPoolStatus.load(id) as DailyPoolStatus
let dailyPoolStatus = DailyPoolStatus.load(id)

if (!dailyPoolStatus) {
dailyPoolStatus = new DailyPoolStatus(id)
Expand Down Expand Up @@ -101,7 +101,7 @@ export function getHourlyPoolStatus(pool: Pool, timestamp: BigInt): HourlyPoolSt
.concat(from.toString())
.concat(to.toString())

let hourlyPoolStatus = HourlyPoolStatus.load(id) as HourlyPoolStatus
let hourlyPoolStatus = HourlyPoolStatus.load(id)

if (!hourlyPoolStatus) {
hourlyPoolStatus = new HourlyPoolStatus(id)
Expand Down
2 changes: 1 addition & 1 deletion src/entities/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { User } from '../../types/schema'
import { BIG_DECIMAL_ZERO, BIG_INT_ONE, BIG_INT_ZERO } from '../constants'

export function upsertUser(userWallet: string, txTimestamp: BigInt, txVolume: BigDecimal): boolean {
let user = User.load(userWallet) as User
let user = User.load(userWallet)
let isNewUser = false

if (!user) {
Expand Down
6 changes: 3 additions & 3 deletions templates/subgraph.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
specVersion: 0.0.2
specVersion: 1.2.0
schema:
file: ./schema.graphql

Expand All @@ -12,7 +12,7 @@ dataSources:
startBlock: {{startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- Deposited
Expand Down Expand Up @@ -46,7 +46,7 @@ dataSources:
startBlock: {{coveStartBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.4
apiVersion: 0.0.9
language: wasm/assemblyscript
entities:
- CoveSwapped
Expand Down
Loading