Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5003c20
refactor: streamline code by removing unused imports and entities, an…
graykode Jan 5, 2026
d798996
refactor: remove unused entities and event handlers from subgraph tem…
graykode Jan 5, 2026
c7295f8
feat: add bookId validation in handleTake function to filter specific…
graykode Jan 5, 2026
0fe8af8
fix: update callCount type to BigInt and ensure transaction.to is def…
graykode Jan 5, 2026
f31a59c
fix: redefine ZERO_BI and ONE_BI constants as BigInt in take.ts
graykode Jan 5, 2026
63c9d4e
fix: update subgraph deployment commands to use interaction-contracts…
graykode Jan 5, 2026
e2c0ec1
Revert "fix: redefine ZERO_BI and ONE_BI constants as BigInt in take.ts"
graykode Jan 6, 2026
b215361
fix: save cloberDayData after updating callCount in take function
graykode Jan 6, 2026
6a0f05d
fix: add volumeUSD calculation and initialization in handleTake function
graykode Jan 6, 2026
f9af194
fix: add volumeUSD field to schema for accumulated volume tracking
graykode Jan 6, 2026
e61788b
fix: associate cloberDayData with contractInteractionDayData in take …
graykode Jan 6, 2026
066e8f4
fix: add ContractInteraction type and update volumeUSD tracking in ta…
graykode Jan 6, 2026
0210672
fix: save contractInteraction and contractInteractionDayData after up…
graykode Jan 6, 2026
7a1f118
feat: add chain and config files for token definitions and network co…
graykode Feb 19, 2026
07a9b71
feat: add base network configuration to prepare-network.ts
graykode Feb 19, 2026
1a1313d
feat: define BID_BOOK_ID and ASK_BOOK_ID constants in chain.ts; simpl…
graykode Feb 19, 2026
457fdcb
fix: consolidate BID_BOOK_ID and ASK_BOOK_ID imports in take.ts
graykode Feb 19, 2026
ec141d5
fix: correct book ID check in take function to use BID_BOOK_ID
graykode Feb 19, 2026
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
70 changes: 70 additions & 0 deletions config/base/chain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { Address, BigDecimal, BigInt } from '@graphprotocol/graph-ts'
export const SKIP_CHART = true
export const SKIP_TAKE_AND_SWAP = true
export const SKIP_TX_ANALYTICS = true
export const SKIP_USER_ANALYTICS = true

export const OPERATOR = '0x00f7a0c7e66f0e3a10d9e980e0854ebe0e308625'
export const LIQUIDITY_VAULT = '0xca1f6e4ae690d06e3bf943b9019c5ca060c0b834'

export class TokenDefinition {
address: Address
symbol: string
name: string
decimals: BigInt
}

export const NATIVE_TOKEN_DEFINITION: TokenDefinition = {
address: Address.fromString('0x0000000000000000000000000000000000000000'),
symbol: 'ETH',
name: 'Ethereum',
decimals: BigInt.fromI32(18),
}

export const NATIVE_TOKEN_BOOK_ID: BigInt = BigInt.fromString(
'305798090575971420747066887426250327115295993737352425987', // bid book in ETH/USDC
)

export const BID_BOOK_ID: BigInt = BigInt.fromString(
'305798090575971420747066887426250327115295993737352425987', // bid book in ETH/USDC
)

export const ASK_BOOK_ID: BigInt = BigInt.fromString(
'195945309878431825165287262143162122266744910429476987829', // ask book in ETH/USDC
)

export const STABLE_COINS: string[] = [
'0x833589fcd6edb6e08f4c7c32d4f71b54bda02913', // USDC
'0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca', // USDbC
]

export const MINIMUM_USD_LOCKED = BigDecimal.fromString('0')

export const REFERENCE_TOKEN = '0x4200000000000000000000000000000000000006'

export const STATIC_TOKEN_DEFINITIONS: TokenDefinition[] = [
{
address: Address.fromString('0x0000000000000000000000000000000000000000'),
symbol: 'ETH',
name: 'Ethereum',
decimals: BigInt.fromI32(18),
},
{
address: Address.fromString('0x4200000000000000000000000000000000000006'),
symbol: 'WETH',
name: 'Wrapped Ether',
decimals: BigInt.fromI32(18),
},
{
address: Address.fromString('0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'),
symbol: 'USDC',
name: 'USD Coin',
decimals: BigInt.fromI32(6),
},
{
address: Address.fromString('0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca'),
symbol: 'USDbC',
name: 'USD Base Coin',
decimals: BigInt.fromI32(6),
},
]
16 changes: 16 additions & 0 deletions config/base/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"network": "base",
"BookManager": {
"address": "0x8ca3a6f4a6260661fcb9a25584c796a1fa380112",
"startBlock": 40941003
},
"LiquidityVault": {
"address": "0xca1f6e4ae690d06e3bf943b9019c5ca060c0b834",
"startBlock": 41325337
},
"SimpleOracleStrategy": {
"address": "0x29e07197ccf70d0ac6cb0a3c307627819f5f2777",
"startBlock": 41325337
},
"hasRouterGateway": false
}
8 changes: 8 additions & 0 deletions config/monad/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ export const NATIVE_TOKEN_BOOK_ID: BigInt = BigInt.fromString(
'5954885684956363054050231031211743946744177791604395877538',
)

export const BID_BOOK_ID: BigInt = BigInt.fromString(
'5954885684956363054050231031211743946744177791604395877538', // bid book in ETH/USDC
)

export const ASK_BOOK_ID: BigInt = BigInt.fromString(
'3875727077379471850923186002296331935053867847116966170720', // bid book in ETH/USDC
)

export const STABLE_COINS: string[] = [
'0x754704bc059f8c67012fed69bc8a327a5aafb603', // USDC
'0xe7cd86e13ac4309349f30b3435a9d337750fc82d', // USDT
Expand Down
Loading