-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into bip39-seedGauge-rem…
…ediations
- Loading branch information
Showing
138 changed files
with
226,452 additions
and
41,696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.data | ||
graph-node | ||
seed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,3 +71,4 @@ generated | |
# matchstick binary download info | ||
tests/.latest.json | ||
tests/.bin | ||
tests/.docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libsFolder: ../../node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This configuration is needed when running the matchstick tests in docker. | ||
# This is because the root project directory is bind mounted to the container, as the | ||
# subgraph has some dependencies on other projects in the repo. | ||
testsFolder: repo-mounted/projects/subgraph-beanstalk/tests | ||
libsFolder: repo-mounted/node_modules | ||
manifestPath: repo-mounted/projects/subgraph-beanstalk/subgraph.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,9 @@ | ||
import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts"; | ||
import { ZERO_BI } from "../../subgraph-core/utils/Decimals"; | ||
import { DiamondCut } from "../generated/Diamond/Beanstalk"; | ||
import { loadBeanstalk } from "./utils/Beanstalk"; | ||
import { TOKEN_YIELD_14_000 } from "./utils/HistoricYield"; | ||
import { loadTokenYield } from "./utils/SiloEntities"; | ||
|
||
export function handleDiamondCut(event: DiamondCut): void { | ||
let beanstalk = loadBeanstalk(event.address); | ||
|
||
// Load the historical vAPY figures in bulk at start | ||
if (beanstalk.lastUpgrade == ZERO_BI) { | ||
for (let i = 0; i < TOKEN_YIELD_14_000.length; i++) { | ||
let tokenYield = loadTokenYield(Address.fromString(TOKEN_YIELD_14_000[i][0]), <i32>parseInt(TOKEN_YIELD_14_000[i][1])); | ||
tokenYield.beanAPY = BigDecimal.fromString(TOKEN_YIELD_14_000[i][2]); | ||
tokenYield.stalkAPY = BigDecimal.fromString(TOKEN_YIELD_14_000[i][3]); | ||
tokenYield.createdAt = BigInt.fromString(TOKEN_YIELD_14_000[i][4]); | ||
tokenYield.save(); | ||
} | ||
} | ||
|
||
beanstalk.lastUpgrade = event.block.timestamp; | ||
beanstalk.save(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.