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

Portfolio specialized #3

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
146 changes: 0 additions & 146 deletions abis/priceOracle.json

This file was deleted.

6 changes: 0 additions & 6 deletions bsc-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ dataSources:
file: ./abis/comptroller.json
- name: CToken
file: ./abis/ctoken.json
- name: PriceOracle
file: ./abis/priceOracle.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
Expand All @@ -41,8 +39,6 @@ dataSources:
handler: handleNewCollateralFactor
- event: NewLiquidationIncentive(uint256,uint256)
handler: handleNewLiquidationIncentive
- event: NewMaxAssets(uint256,uint256)
handler: handleNewMaxAssets
- event: NewPriceOracle(address,address)
handler: handleNewPriceOracle
templates:
Expand All @@ -63,8 +59,6 @@ templates:
abis:
- name: CToken
file: ./abis/ctoken.json
- name: PriceOracle
file: ./abis/priceOracle.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
Expand Down
82 changes: 82 additions & 0 deletions ftm-subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
specVersion: 0.0.2
description: C.R.E.A.M. Finance is a blockchain agnostic, decentralized peer to peer lending platform based on a fork of Compound Finance.
repository: https://github.com/CreamFi/compound-v2-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Comptroller
network: fantom
source:
address: "0x4250A6D3BD57455d7C6821eECb6206F507576cD2"
abi: Comptroller
startBlock: 2380512
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/comptroller.ts
entities:
- Comptroller
- Market
abis:
- name: Comptroller
file: ./abis/comptroller.json
- name: CToken
file: ./abis/ctoken.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
- event: MarketListed(address)
handler: handleMarketListed
- event: MarketEntered(address,address)
handler: handleMarketEntered
- event: MarketExited(address,address)
handler: handleMarketExited
- event: NewCloseFactor(uint256,uint256)
handler: handleNewCloseFactor
- event: NewCollateralFactor(address,uint256,uint256)
handler: handleNewCollateralFactor
- event: NewLiquidationIncentive(uint256,uint256)
handler: handleNewLiquidationIncentive
- event: NewPriceOracle(address,address)
handler: handleNewPriceOracle
templates:
- name: CToken
kind: ethereum/contract
network: fantom
source:
abi: CToken
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/ctoken.ts
entities:
- User
- Market
- CTokenInfo
abis:
- name: CToken
file: ./abis/ctoken.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
- event: Mint(address,uint256,uint256)
handler: handleMint
- event: Redeem(address,uint256,uint256)
handler: handleRedeem
- event: Borrow(address,uint256,uint256,uint256)
handler: handleBorrow
- event: RepayBorrow(address,address,uint256,uint256,uint256)
handler: handleRepayBorrow
- event: LiquidateBorrow(address,address,uint256,address,uint256)
handler: handleLiquidateBorrow
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
- event: NewReserveFactor(uint256,uint256)
handler: handleNewReserveFactor
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: NewMarketInterestRateModel(address,address)
handler: handleNewMarketInterestRateModel
82 changes: 82 additions & 0 deletions ib-subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
specVersion: 0.0.2
description: C.R.E.A.M. Finance is a blockchain agnostic, decentralized peer to peer lending platform based on a fork of Compound Finance.
repository: https://github.com/CreamFi/compound-v2-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Comptroller
network: mainnet
source:
address: "0xab1c342c7bf5ec5f02adea1c2270670bca144cbb"
abi: Comptroller
startBlock: 11384868
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/comptroller.ts
entities:
- Comptroller
- Market
abis:
- name: Comptroller
file: ./abis/comptroller.json
- name: CToken
file: ./abis/ctoken.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
- event: MarketListed(address)
handler: handleMarketListed
- event: MarketEntered(address,address)
handler: handleMarketEntered
- event: MarketExited(address,address)
handler: handleMarketExited
- event: NewCloseFactor(uint256,uint256)
handler: handleNewCloseFactor
- event: NewCollateralFactor(address,uint256,uint256)
handler: handleNewCollateralFactor
- event: NewLiquidationIncentive(uint256,uint256)
handler: handleNewLiquidationIncentive
- event: NewPriceOracle(address,address)
handler: handleNewPriceOracle
templates:
- name: CToken
kind: ethereum/contract
network: mainnet
source:
abi: CToken
mapping:
kind: ethereum/events
apiVersion: 0.0.4
language: wasm/assemblyscript
file: ./src/mappings/ctoken.ts
entities:
- User
- Market
- CTokenInfo
abis:
- name: CToken
file: ./abis/ctoken.json
- name: ERC20
file: ./abis/erc20.json
eventHandlers:
- event: Mint(address,uint256,uint256)
handler: handleMint
- event: Redeem(address,uint256,uint256)
handler: handleRedeem
- event: Borrow(address,uint256,uint256,uint256)
handler: handleBorrow
- event: RepayBorrow(address,address,uint256,uint256,uint256)
handler: handleRepayBorrow
- event: LiquidateBorrow(address,address,uint256,address,uint256)
handler: handleLiquidateBorrow
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
- event: NewReserveFactor(uint256,uint256)
handler: handleNewReserveFactor
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: NewMarketInterestRateModel(address,address)
handler: handleNewMarketInterestRateModel
Loading