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

Testnet #232

Merged
merged 50 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
7eb9564
chore(release): 1.1.0-testnet.3 [skip ci]
toolsvenus Dec 13, 2024
c3d8729
chore(release): 1.1.0-testnet.4 [skip ci]
toolsvenus Dec 13, 2024
87ef873
fix: update querying underlying token for wbeth
coreyar Dec 16, 2024
65ad840
fix: bump semantic release version
coreyar Dec 17, 2024
0bccca3
fix: switch from semantic-release-yarn to @semantic-release/npm
coreyar Dec 17, 2024
eb82be0
fix: revert bump in semantic release version for compatibility with m…
coreyar Dec 17, 2024
a7fd7b4
fix: relock in prepare script
coreyar Dec 17, 2024
de4aeae
chore(release): 1.1.0-testnet.5 [skip ci]
toolsvenus Dec 17, 2024
de149c3
fix: hardchade underlying weth token to avoid errors querying before …
coreyar Dec 18, 2024
50ff78e
fix: hardchade underlying ankrstakedbnb token to avoid errors queryin…
coreyar Dec 18, 2024
5e3fa88
chore(release): 1.1.0-testnet.6 [skip ci]
toolsvenus Dec 19, 2024
b8bdb85
chore(release): 1.4.0-testnet.8 [skip ci]
toolsvenus Dec 19, 2024
5365ae9
chore(release): 1.2.0-testnet.6 [skip ci]
toolsvenus Dec 19, 2024
0c90faf
fix: version string
coreyar Dec 12, 2024
1fdcf0d
fix: update querying underlying token for wbeth
coreyar Dec 16, 2024
b27e418
fix: bump semantic release version
coreyar Dec 17, 2024
92c5e56
fix: switch from semantic-release-yarn to @semantic-release/npm
coreyar Dec 17, 2024
8a661d7
fix: revert bump in semantic release version for compatibility with m…
coreyar Dec 17, 2024
e15546a
fix: relock in prepare script
coreyar Dec 17, 2024
1e6d188
chore(release): 1.1.0-testnet.2 [skip ci]
toolsvenus Dec 17, 2024
175b0bb
fix: hardchade underlying weth token to avoid errors querying before …
coreyar Dec 18, 2024
12903b3
fix: hardchade underlying ankrstakedbnb token to avoid errors queryin…
coreyar Dec 18, 2024
86a56e4
chore: update cross chain governance deployment scripts
coreyar Dec 20, 2024
297f14c
chore(release): 1.2.0-testnet.2 [skip ci]
toolsvenus Dec 20, 2024
8340865
chore(release): 1.1.0-testnet.7 [skip ci]
toolsvenus Dec 20, 2024
b4211bd
chore(release): 1.4.0-testnet.9 [skip ci]
toolsvenus Dec 20, 2024
68f09b9
chore(release): 1.2.0-testnet.7 [skip ci]
toolsvenus Dec 20, 2024
0744509
chore(release): 1.2.0-testnet.7 [skip ci]
toolsvenus Dec 20, 2024
6aab59b
chore(release): 1.1.1-testnet.1 [skip ci]
toolsvenus Jan 4, 2025
6dfcc0b
chore(release): 1.1.3-testnet.1 [skip ci]
toolsvenus Jan 4, 2025
d0f16f5
fix: version string
coreyar Dec 12, 2024
0781ce1
chore(release): 1.0.3-testnet.1 [skip ci]
toolsvenus Jan 4, 2025
1fadcdc
fix: update querying underlying token for wbeth
coreyar Dec 16, 2024
6bf5643
fix: bump semantic release version
coreyar Dec 17, 2024
dadda31
fix: switch from semantic-release-yarn to @semantic-release/npm
coreyar Dec 17, 2024
0ddfd81
fix: revert bump in semantic release version for compatibility with m…
coreyar Dec 17, 2024
151aa7a
fix: relock in prepare script
coreyar Dec 17, 2024
0994701
fix: hardchade underlying weth token to avoid errors querying before …
coreyar Dec 18, 2024
d59ff7b
fix: hardchade underlying ankrstakedbnb token to avoid errors queryin…
coreyar Dec 18, 2024
2c1b003
refactor: support underlying UpdatedImplementation events
coreyar Jan 3, 2025
d945e74
fix: log address instead of id
coreyar Jan 3, 2025
22bfbb7
fix: log address as hex
coreyar Jan 3, 2025
b6e00c8
Merge pull request #233 from VenusProtocol/update-underlying-names
coreyar Jan 4, 2025
eed3419
chore(release): 1.1.1-testnet.1 [skip ci]
toolsvenus Jan 4, 2025
aecae44
chore(release): 1.0.3-testnet.1 [skip ci]
toolsvenus Jan 4, 2025
10f08be
chore(release): 1.3.1-testnet.1 [skip ci]
toolsvenus Jan 4, 2025
1f35457
chore(release): 1.1.1-testnet.2 [skip ci]
toolsvenus Jan 4, 2025
2d6c009
chore(release): 1.1.3-testnet.2 [skip ci]
toolsvenus Jan 4, 2025
2b0727b
fix: make executable
coreyar Jan 4, 2025
05941bd
fix: allow relock
coreyar Jan 4, 2025
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
13 changes: 13 additions & 0 deletions packages/isolated-pools-abis/Bep20.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,18 @@
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
}
]
2 changes: 1 addition & 1 deletion packages/utils/src/testing.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import assert from 'assert';

export const assertEqual = (
entity: any,

Check warning on line 4 in packages/utils/src/testing.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
contractValue: any,

Check warning on line 5 in packages/utils/src/testing.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
key: string,
transform?: (val: any) => any,

Check warning on line 7 in packages/utils/src/testing.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 7 in packages/utils/src/testing.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
) => {
const subgraphValue = transform ? transform(entity[key]) : entity[key]?.toString();
try {
Expand All @@ -13,7 +13,7 @@
subgraphValue,
`
${key} incorrect on ${
entity.id
entity.address
} Contract: ${contractValue?.toString()}; Subgraph: ${subgraphValue};`,
);
} catch (e) {
Expand All @@ -21,7 +21,7 @@
}
};

export const tryCall = async (func: () => any, defaultValue: any) => {

Check warning on line 24 in packages/utils/src/testing.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 24 in packages/utils/src/testing.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
try {
return await func();
} catch (e) {
Expand Down
6 changes: 3 additions & 3 deletions subgraphs/cross-chain-governance/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/cross-chain-governance-subgraph",
"version": "1.2.0-testnet.1",
"version": "1.1.1-testnet.1",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand All @@ -11,7 +11,7 @@
],
"scripts": {
"codegen": "graph codegen",
"create:docker": "yarn graph create venusprotocol/venus-subgraph --node http://graph-node:8020/",
"create:docker": "yarn graph create venusprotocol/crosschain-governance --node http://graph-node:8020/",
"build:docker": "yarn graph build --ipfs http://ipfs:5001",
"build:ethereum": "yarn graph build --ipfs https://api.thegraph.com/ipfs/ ",
"deploy:docker": "yarn prepare:docker && yarn graph deploy venusprotocol/crosschain-governance --ipfs http://ipfs:5001 --node http://graph-node:8020/",
Expand All @@ -24,7 +24,7 @@
"deploy:zkSyncSepolia": "yarn prepare:zkSyncSepolia && yarn graph deploy --studio venus-governance-zksyncsepolia",
"deploy:zkSync": "yarn prepare:zkSync && yarn graph deploy --studio venus-governance-zksync",
"deploy:baseSepolia": "yarn prepare:baseSepolia && yarn graph deploy --studio venus-governance-base-sepolia",
"deploy:base": "yarn prepare:baseSepolia && yarn graph deploy --studio venus-governance-base",
"deploy:base": "yarn prepare:base && yarn graph deploy --studio venus-governance-base-mainnet",
"prepare:docker": "NETWORK=docker yarn ts-node config/index.ts",
"prepare:ethereum": "NETWORK=ethereum yarn ts-node config/index.ts",
"prepare:sepolia": "NETWORK=sepolia yarn ts-node config/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/etherfi-promo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/etherfi-promo-subgraph",
"version": "1.0.2",
"version": "1.0.3-testnet.1",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/isolated-pools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/isolated-pools-subgraph",
"version": "1.4.0-testnet.7",
"version": "1.3.1-testnet.1",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/isolated-pools/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type Pool @entity {
"""
ERC20 Token
"""
type Token @entity(immutable: true) {
type Token @entity {
"Address of the asset"
id: Bytes!
"Address of the asset"
Expand Down
11 changes: 11 additions & 0 deletions subgraphs/isolated-pools/src/mappings/underlying.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Upgraded } from '../../generated/templates/Underlying/BEP20';
import { BEP20 } from '../../generated/PoolRegistry/BEP20';
import { getOrCreateToken } from '../operations/getOrCreate';

export function handleUpgraded(event: Upgraded): void {
const token = getOrCreateToken(event.address);
const erc20 = BEP20.bind(event.address);
token.name = erc20.name();
token.symbol = erc20.symbol();
token.save();
}
6 changes: 5 additions & 1 deletion subgraphs/isolated-pools/src/operations/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { Address, BigInt } from '@graphprotocol/graph-ts';

import { Comptroller as ComptrollerContract } from '../../generated/PoolRegistry/Comptroller';
import { PoolRegistry as PoolRegistryContract } from '../../generated/PoolRegistry/PoolRegistry';
import { VToken as VTokenDataSource } from '../../generated/templates';
import {
Underlying as UnderlyingDataSource,
VToken as VTokenDataSource,
} from '../../generated/templates';
import {
BadDebtIncreased,
Borrow,
Expand Down Expand Up @@ -111,6 +114,7 @@ export function createMarket(
const vTokenContract = VTokenContract.bind(vTokenAddress);
const poolComptroller = Comptroller.bind(comptroller);
const underlyingAddress = vTokenContract.underlying();
UnderlyingDataSource.create(underlyingAddress);

const market = new Market(vTokenAddress);

Expand Down
2 changes: 1 addition & 1 deletion subgraphs/isolated-pools/src/operations/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
export const getPool = (comptroller: Address): Pool | null => {
const pool = Pool.load(getPoolId(comptroller));
if (!pool) {
log.error('Pool {} not found', [comptroller.toString()]);
log.error('Pool {} not found', [comptroller.toHexString()]);
}
return pool as Pool;
};
Expand Down
18 changes: 18 additions & 0 deletions subgraphs/isolated-pools/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,24 @@ templates:
handler: handleBadDebtRecovered
- event: HealBorrow(indexed address,indexed address,uint256)
handler: handleHealBorrow
- name: Underlying
kind: ethereum/contract
network: {{ network }}
source:
abi: BEP20
mapping:
abis:
- name: BEP20
file: ../../packages/isolated-pools-abis/Bep20.json
kind: ethereum/events
apiVersion: 0.0.9
language: wasm/assemblyscript
file: ./src/mappings/underlying.ts
entities:
- Token
eventHandlers:
- event: Upgraded(indexed address)
handler: handleUpgraded
- name: RewardsDistributor
kind: ethereum/contract
network: {{ network }}
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/protocol-reserve/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/protocol-reserve-subgraph",
"version": "1.2.0-testnet.6",
"version": "1.1.1-testnet.2",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/venus-governance/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/governance-subgraph",
"version": "1.0.3",
"version": "1.0.3-testnet.1",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/venus-governance/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cd ../..

git pull

YARN_ENABLE_IMMUTABLE_INSTALLS=true yarn
YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
2 changes: 1 addition & 1 deletion subgraphs/venus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@venusprotocol/core-pool-subgraph",
"version": "1.2.0-testnet.5",
"version": "1.1.3-testnet.2",
"license": "MIT",
"repository": {
"url": "https://github.com/VenusProtocol/subgraphs",
Expand Down
Loading