Skip to content

Commit

Permalink
Configure clock tick
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Mar 16, 2024
1 parent dcf0e26 commit 34436be
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
**/tests/.*/
.vscode

subgraph.yaml
1 change: 1 addition & 0 deletions config/arbitrum-one.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

"vaultFactoryAddress": "0xef79A90A93084e1d2a2b4ecD1F783e937C80Ef4C",
"vaultFactoryStartBlock": 190612486,
"clockTickBlocks": 3600,

"wrappedNativeAddress": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
"wrappedNativeDecimals": 18,
Expand Down
1 change: 1 addition & 0 deletions config/optimism.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

"vaultFactoryAddress": "0xf0C7eD247e22Bb0BaACA1F7975C8F02D79954198",
"vaultFactoryStartBlock": 117428248,
"clockTickBlocks": 750,

"wrappedNativeAddress": "0x4200000000000000000000000000000000000006",
"wrappedNativeDecimals": 18,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"scripts": {
"prepare": "husky install",
"postinstall": "yarn run --silent prepare:arbitrum-one && yarn run --silent codegen",
"codegen": "rm -Rf generated && graph codegen",
"build": "graph build",
"format": "prettier . --write",
Expand Down
28 changes: 1 addition & 27 deletions subgraph.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,11 @@ dataSources:
- handler: handleClockTick
filter:
kind: polling
every: 3600 # trigger every ~15min with 1 block every 250ms
every: {{clockTickBlocks}}
templates:
- name: BeefyCLVault
kind: ethereum/contract
network: {{network}}
context:
wrappedNativeDecimals:
type: BigInt
data: "{{wrappedNativeDecimals}}"
uniswapV3QuoterV2Address:
type: Bytes
data: "{{uniswapV3QuoterV2Address}}"
chainlinkNativePriceFeedAddress:
type: Bytes
data: "{{chainlinkNativePriceFeedAddress}}"
chainlinkNativePriceFeedDecimals:
type: BigInt
data: "{{chainlinkNativePriceFeedDecimals}}"
source:
abi: BeefyVaultConcLiq
mapping:
Expand Down Expand Up @@ -155,19 +142,6 @@ templates:
- name: BeefyCLStrategy
kind: ethereum/contract
network: {{network}}
context:
wrappedNativeDecimals:
type: BigInt
data: "{{wrappedNativeDecimals}}"
uniswapV3QuoterV2Address:
type: Bytes
data: "{{uniswapV3QuoterV2Address}}"
chainlinkNativePriceFeedAddress:
type: Bytes
data: "{{chainlinkNativePriceFeedAddress}}"
chainlinkNativePriceFeedDecimals:
type: BigInt
data: "{{chainlinkNativePriceFeedDecimals}}"
source:
abi: StrategyPassiveManagerUniswap
mapping:
Expand Down

0 comments on commit 34436be

Please sign in to comment.