Skip to content

Commit

Permalink
Merge pull request #193 from VenusProtocol/add-vebtc-to-ethereum-promo
Browse files Browse the repository at this point in the history
feat: add vebtc to etherfi eth promo
  • Loading branch information
coreyar authored Nov 20, 2024
2 parents 71e74a7 + 914e2b3 commit b01ee90
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 6 deletions.
10 changes: 7 additions & 3 deletions subgraphs/etherfi-promo/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,29 @@ const main = () => {
docker: {
network: 'hardhat',
vWeEthAddress: sepoliaILDeployments.addresses.VToken_vweETH_LiquidStakedETH,
vWeEthsAddress: sepoliaILDeployments.addresses.VToken_vweETHs_LiquidStakedETH,
vWeEthStartBlock: '0',
vWeEthsAddress: sepoliaILDeployments.addresses.VToken_vweETHs_LiquidStakedETH,
vWeEthsStartBlock: '0',
veBTCAddress: sepoliaILDeployments.addresses.VToken_veBTC,
veBTCStartBlock: '0',
template: 'template.yaml',
},
sepolia: {
network: 'sepolia',
vWeEthAddress: sepoliaILDeployments.addresses.VToken_vweETH_LiquidStakedETH,
vWeEthsAddress: sepoliaILDeployments.addresses.VToken_vweETHs_LiquidStakedETH,
vWeEthStartBlock: '5659827',
vWeEthsAddress: sepoliaILDeployments.addresses.VToken_vweETHs_LiquidStakedETH,
vWeEthsStartBlock: '6536644',
template: 'template.yaml',
},
ethereum: {
network: 'mainnet',
vWeEthAddress: ethereumILDeployments.addresses.VToken_vweETH_LiquidStakedETH,
vWeEthsAddress: ethereumILDeployments.addresses.VToken_vweETHs_LiquidStakedETH,
vWeEthStartBlock: '19638180',
vWeEthsAddress: ethereumILDeployments.addresses.VToken_vweETHs_LiquidStakedETH,
vWeEthsStartBlock: '20583508',
veBTCAddress: ethereumILDeployments.addresses.VToken_veBTC,
veBTCStartBlock: '21079720',
template: 'template.yaml',
},
bsc: {
Expand Down
4 changes: 2 additions & 2 deletions subgraphs/etherfi-promo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "etherfi-promo-subgraph",
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand Down Expand Up @@ -30,7 +30,7 @@
"test:integration": "true"
},
"dependencies": {
"@venusprotocol/isolated-pools": "3.6.0"
"@venusprotocol/isolated-pools": "3.7.0-dev.5"
},
"devDependencies": {
"@graphprotocol/graph-cli": "^0.80.0",
Expand Down
29 changes: 29 additions & 0 deletions subgraphs/etherfi-promo/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,32 @@ dataSources:
handler: handleTransfer
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
- kind: ethereum/contract
name: veBTC
network: {{ network }}
source:
address: "{{ veBTCAddress }}"
abi: VToken
startBlock: {{ veBTCStartBlock }}
mapping:
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
file: ./src/mappings/vToken.ts
entities:
- SupplierAccount
- BorrowerAccount
abis:
- name: VToken
file: ../../node_modules/@venusprotocol/isolated-pools/artifacts/contracts/VToken.sol/VToken.json
- name: ERC20
file: ../../node_modules/@venusprotocol/isolated-pools/artifacts/contracts/test/ERC20.sol/ERC20.json
eventHandlers:
- event: Mint(indexed address,uint256,uint256,uint256)
handler: handleMint
- event: Borrow(indexed address,uint256,uint256,uint256)
handler: handleBorrow
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
19 changes: 18 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4852,6 +4852,23 @@ __metadata:
languageName: node
linkType: hard

"@venusprotocol/isolated-pools@npm:3.7.0-dev.5":
version: 3.7.0-dev.5
resolution: "@venusprotocol/isolated-pools@npm:3.7.0-dev.5"
dependencies:
"@nomiclabs/hardhat-ethers": ^2.2.3
"@openzeppelin/contracts": ^4.8.3
"@openzeppelin/contracts-upgradeable": ^4.8.3
"@openzeppelin/hardhat-upgrades": ^1.21.0
"@solidity-parser/parser": ^0.13.2
"@venusprotocol/solidity-utilities": ^2.0.0
ethers: ^5.7.0
hardhat-deploy: ^0.11.14
module-alias: ^2.2.2
checksum: 0d4cea585025102481d6634ab5ec902b6d8abffcdfee4769b27023d5f4ad6d0fc86ad63ea4e30a73d43bf5f729e05bc5eb786b27233630a4982b366e124a34c6
languageName: node
linkType: hard

"@venusprotocol/oracle@npm:2.6.0":
version: 2.6.0
resolution: "@venusprotocol/oracle@npm:2.6.0"
Expand Down Expand Up @@ -8031,7 +8048,7 @@ __metadata:
resolution: "etherfi-promo-subgraph@workspace:subgraphs/etherfi-promo"
dependencies:
"@graphprotocol/graph-cli": ^0.80.0
"@venusprotocol/isolated-pools": 3.6.0
"@venusprotocol/isolated-pools": 3.7.0-dev.5
ts-node: ^10.9.2
viem: ^2.9.26
languageName: unknown
Expand Down

0 comments on commit b01ee90

Please sign in to comment.