Skip to content

Commit

Permalink
Deploy subgraphs to DN (#2575)
Browse files Browse the repository at this point in the history
  • Loading branch information
steegecs authored Jul 1, 2024
1 parent cf96da2 commit fb5ec7b
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 27 deletions.
54 changes: 27 additions & 27 deletions deployment/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@
},
"decentralized-network": {
"slug": "kinza-finance-bsc",
"query-id": "todo"
"query-id": "435cubRAqNsFYKzyQHRRiHvR7oJjh828r5Aqe4cZC586"
}
}
}
Expand All @@ -720,7 +720,7 @@
"status": "prod",
"versions": {
"schema": "3.1.0",
"subgraph": "1.0.0",
"subgraph": "1.0.1",
"methodology": "1.0.0"
},
"files": {
Expand All @@ -737,7 +737,7 @@
},
"decentralized-network": {
"slug": "seismic-blast",
"query-id": "todo"
"query-id": "d7gMk1zkEyCQuNVeirBYA6keCZv8hTLheCZ4DBCjRfz"
}
}
}
Expand All @@ -754,7 +754,7 @@
"status": "prod",
"versions": {
"schema": "3.1.0",
"subgraph": "1.0.0",
"subgraph": "1.0.1",
"methodology": "1.0.0"
},
"files": {
Expand All @@ -771,7 +771,7 @@
},
"decentralized-network": {
"slug": "pac-finance-blast",
"query-id": "todo"
"query-id": "ERsfyKMQTpTEN6LtyWvFwhDENLf6aAAggbtrNEnFKLpx"
}
}
}
Expand Down Expand Up @@ -805,7 +805,7 @@
},
"decentralized-network": {
"slug": "zerolend-ethereum",
"query-id": "todo"
"query-id": "4Zf4doH54RDit9KVsfCp3MkjrP3szhJZwvw2z5PHczx9"
}
}
},
Expand All @@ -831,7 +831,7 @@
},
"decentralized-network": {
"slug": "zerolend-blast",
"query-id": "todo"
"query-id": "6JP9542ArawumBSYczerbWGu6k7uu3hqk6qJnSkrgTM5"
}
}
},
Expand All @@ -857,7 +857,7 @@
},
"decentralized-network": {
"slug": "zerolend-zksync-era",
"query-id": "todo"
"query-id": "3CHaJvCkTMqXa4PRKNshVecE9JqgNFCdsXNyGLZXFeM2"
}
}
},
Expand All @@ -883,7 +883,7 @@
},
"decentralized-network": {
"slug": "zerolend-linea",
"query-id": "todo"
"query-id": "DLzwo1WFaKy7R7MgQWrnBXr19EbGwPRubu9YmsSmRMfC"
}
}
},
Expand All @@ -909,7 +909,7 @@
},
"decentralized-network": {
"slug": "zerolend-xlayer",
"query-id": "todo"
"query-id": "NRh6ScvPKoieeSH7tRiKyXJ97DR9aYraas8eREPQ8e3"
}
}
}
Expand Down Expand Up @@ -2554,7 +2554,7 @@
"status": "prod",
"versions": {
"schema": "2.0.1",
"subgraph": "1.4.0",
"subgraph": "1.4.1",
"methodology": "1.0.0"
},
"files": {
Expand Down Expand Up @@ -2666,7 +2666,7 @@
"status": "prod",
"versions": {
"schema": "3.1.0",
"subgraph": "2.2.3",
"subgraph": "2.3.0",
"methodology": "1.0.0"
},
"files": {
Expand Down Expand Up @@ -5802,7 +5802,7 @@
"status": "prod",
"versions": {
"schema": "1.3.2",
"subgraph": "1.5.2",
"subgraph": "1.2.2",
"methodology": "1.0.0"
},
"files": {
Expand Down Expand Up @@ -6030,7 +6030,7 @@
"status": "prod",
"versions": {
"schema": "1.3.2",
"subgraph": "1.1.15",
"subgraph": "1.1.16",
"methodology": "1.0.0"
},
"files": {
Expand Down Expand Up @@ -11093,7 +11093,7 @@
},
"decentralized-network": {
"slug": "karak-ethereum",
"query-id": "todo"
"query-id": "2vzPTkDT2DddrRoXtg25AGK55nviKXeJiG21Cu56nurg"
}
}
},
Expand All @@ -11119,7 +11119,7 @@
},
"decentralized-network": {
"slug": "karak-arbitrum",
"query-id": "todo"
"query-id": "7kCkjx6GK67WZrVo54UcLWZ7kBx65TogBW1CD316XZgn"
}
}
},
Expand All @@ -11145,7 +11145,7 @@
},
"decentralized-network": {
"slug": "karak-bsc",
"query-id": "todo"
"query-id": "8YGDQQgExT7zLJioLRQdcSQko1qgiCjfwVg7TBV6eR7W"
}
}
}
Expand Down Expand Up @@ -11179,7 +11179,7 @@
},
"decentralized-network": {
"slug": "renzo-ethereum",
"query-id": "TODO"
"query-id": "91jPrEeA5BPzDHmjKjVwmgDvGEQpAwh5yusTbHCQiQbM"
}
}
},
Expand All @@ -11205,7 +11205,7 @@
},
"decentralized-network": {
"slug": "renzo-arbitrum",
"query-id": "TODO"
"query-id": "5P79EkkSDxiXxWgiYcpsvML7Q3MSu64sHi8LF2xVggQz"
}
}
},
Expand All @@ -11231,11 +11231,11 @@
},
"decentralized-network": {
"slug": "renzo-base",
"query-id": "TODO"
"query-id": "Atj9RDj7hzmUd6a3PTzpPCpjJPzqMbvPLdxMfF2BFy5B"
}
}
},
"renzo-blast-mainnet": {
"renzo-blast": {
"network": "blast-mainnet",
"status": "prod",
"versions": {
Expand All @@ -11252,12 +11252,12 @@
},
"services": {
"hosted-service": {
"slug": "renzo-blast-mainnet",
"query-id": "renzo-blast-mainnet"
"slug": "renzo-blast",
"query-id": "renzo-blast"
},
"decentralized-network": {
"slug": "renzo-blast-mainnet",
"query-id": "TODO"
"slug": "renzo-blast",
"query-id": "HXWd4suSQ4TztRznBCi1dWdBKrHvkDPZBA2hy5nng1eL"
}
}
},
Expand All @@ -11283,7 +11283,7 @@
},
"decentralized-network": {
"slug": "renzo-bsc",
"query-id": "TODO"
"query-id": "JD3KpTX2bdwVMtZvX3HmPKSGQsVYP8FRkUJs51vZBJPR"
}
}
},
Expand All @@ -11309,7 +11309,7 @@
},
"decentralized-network": {
"slug": "renzo-mode",
"query-id": "TODO"
"query-id": "AUcw3uDfWmRQDHKgnQ6C7P2139scRwvzMfrJovSGbACW"
}
}
}
Expand Down
167 changes: 167 additions & 0 deletions subgraphs/balancer-forks/src/common/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts";

////////////////////////
///// Schema Enums /////
////////////////////////

// The network names corresponding to the Network enum in the schema.
// They also correspond to the ones in `dataSource.network()` after converting to lower case.
// See below for a complete list:
// https://thegraph.com/docs/en/hosted-service/what-is-hosted-service/#supported-networks-on-the-hosted-service
export namespace Network {
export const ARBITRUM_ONE = "ARBITRUM_ONE";
export const ARWEAVE_MAINNET = "ARWEAVE_MAINNET";
export const AVALANCHE = "AVALANCHE";
export const BOBA = "BOBA";
export const AURORA = "AURORA";
export const BSC = "BSC"; // aka BNB Chain
export const CELO = "CELO";
export const COSMOS = "COSMOS";
export const CRONOS = "CRONOS";
export const MAINNET = "MAINNET"; // Ethereum mainnet
export const FANTOM = "FANTOM";
export const FUSE = "FUSE";
export const HARMONY = "HARMONY";
export const JUNO = "JUNO";
export const MOONBEAM = "MOONBEAM";
export const MOONRIVER = "MOONRIVER";
export const NEAR_MAINNET = "NEAR_MAINNET";
export const OPTIMISM = "OPTIMISM";
export const OSMOSIS = "OSMOSIS";
export const MATIC = "MATIC"; // aka Polygon
export const XDAI = "XDAI"; // aka Gnosis Chain
}

export namespace ProtocolType {
export const EXCHANGE = "EXCHANGE";
export const LENDING = "LENDING";
export const YIELD = "YIELD";
export const BRIDGE = "BRIDGE";
export const GENERIC = "GENERIC";
}

export namespace LiquidityPoolFeeType {
export const FIXED_TRADING_FEE = "FIXED_TRADING_FEE";
export const TIERED_TRADING_FEE = "TIERED_TRADING_FEE";
export const DYNAMIC_TRADING_FEE = "DYNAMIC_TRADING_FEE";
export const FIXED_LP_FEE = "FIXED_LP_FEE";
export const DYNAMIC_LP_FEE = "DYNAMIC_LP_FEE";
export const FIXED_PROTOCOL_FEE = "FIXED_PROTOCOL_FEE";
export const DYNAMIC_PROTOCOL_FEE = "DYNAMIC_PROTOCOL_FEE";
}

export namespace RewardTokenType {
export const DEPOSIT = "DEPOSIT";
export const BORROW = "BORROW";
}

export namespace LendingType {
export const CDP = "CDP";
export const POOLED = "POOLED";
}

export namespace RiskType {
export const GLOBAL = "GLOBAL";
export const ISOLATED = "ISOLATED";
}

export namespace InterestRateType {
export const STABLE = "STABLE";
export const VARIABLE = "VARIABLE";
export const FIXED_TERM = "FIXED_TERM";
}

export namespace InterestRateSide {
export const LENDER = "LENDER";
export const BORROWER = "BORROWER";
}

export namespace UsageType {
export const DEPOSIT = "DEPOSIT";
export const WITHDRAW = "WITHDRAW";
export const SWAP = "SWAP";
}

export namespace RewardIntervalType {
export const BLOCK = "BLOCK";
export const TIMESTAMP = "TIMESTAMP";
}

export namespace NULL {
export const TYPE_STRING = "0x0000000000000000000000000000000000000000";
export const TYPE_ADDRESS = Address.fromString(TYPE_STRING);
}

export namespace Protocol {
export const NAME = "Balancer v2";
export const SLUG = "balancer-v2";
export const NETWORK = Network.MAINNET;
}

export namespace MasterChef {
export const MINICHEF = "MINICHEF";
export const MASTERCHEF = "MASTERCHEF";
export const MASTERCHEFV2 = "MASTERCHEFV2";
export const MASTERCHEFV3 = "MASTERCHEFV3";
}

export const SECONDS_PER_HOUR = 60 * 60;
export const SECONDS_PER_DAY = 60 * 60 * 24;
export const MAX_BPS = BigInt.fromI32(10000);
export const DEFAULT_DECIMALS = BigInt.fromI32(18);

export const INT_ZERO = 0 as i32;
export const INT_ONE = 1 as i32;

export const BIGINT_NEG_ONE = BigInt.fromI32(-1);
export const BIGINT_ZERO = BigInt.fromI32(0);
export const BIGINT_ONE = BigInt.fromI32(1);
export const BIGINT_TEN = BigInt.fromI32(10);
export const BIGINT_HUNDRED = BigInt.fromI32(100);
export const BIGINT_NEGATIVE_ONE = BigInt.fromString("-1");

export const BIGDECIMAL_ZERO = new BigDecimal(BIGINT_ZERO);
export const BIGDECIMAL_ONE = new BigDecimal(BIGINT_ONE);
export const BIGDECIMAL_TEN = new BigDecimal(BIGINT_TEN);
export const BIGDECIMAL_HUNDRED = BigDecimal.fromString("100");
export const BIGDECIMAL_NEGATIVE_ONE = BigDecimal.fromString("-1");
export const BIGDECIMAL_POINT_FOUR = BigDecimal.fromString("0.4");

export const DEFAULT_DECIMALS_DENOMINATOR = BigDecimal.fromString("1000000000000000000");
export const FEE_DENOMINATOR = DEFAULT_DECIMALS_DENOMINATOR;

export const USDC_DECIMALS = 6;
export const USDC_DENOMINATOR = BigDecimal.fromString("1000000");

export const PRICE_CACHING_BLOCKS = BigInt.fromI32(7000);

/////////////////////////////////////
///// Protocol/Network Specific /////
/////////////////////////////////////

export const VAULT_ADDRESS = Address.fromString(
"0xBA12222222228d8Ba445958a75a0704d566BF2C8"
);
export const PROTOCOL_FEES_COLLECTOR_ADDRESS = Address.fromString(
"0xce88686553686DA562CE7Cea497CE749DA109f9F"
);
export const PROTOCOL_TOKEN_ADDRESS = Address.fromString(
"0xba100000625a3754423978a60c9317c58a424e3D"
);
export const GAUGE_CONTROLLER_ADDRESS = Address.fromString(
"0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD"
);
export const AAVE_BOOSTED_POOL_ADDRESS = Address.fromString(
"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2"
);
export const BLACKLISTED_PHANTOM_POOLS: Address[] = [
Address.fromString("0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c"), // Balancer Aave Boosted Pool (USDT) OLD
Address.fromString("0x804cdb9116a10bb78768d3252355a1b18067bf8f"), // Balancer Aave Boosted Pool (DAI) OLD
Address.fromString("0x9210f1204b5a24742eba12f710636d76240df3d0"), // Balancer Aave Boosted Pool (USDC) OLD
Address.fromString("0x2f4eb100552ef93840d5adc30560e5513dfffacb"), // Balancer Aave Boosted Pool (USDT)
Address.fromString("0xae37d54ae477268b9997d4161b96b8200755935c"), // Balancer Aave Boosted Pool (DAI)
Address.fromString("0x82698aecc9e28e9bb27608bd52cf57f704bd1b83"), // Balancer Aave Boosted Pool (USDC)
];

export const INFLATION_INTERVAL = "TIMESTAMP";
export const STARTING_INFLATION_RATE = BigDecimal.fromString((0.23974867724).toString()).times(DEFAULT_DECIMALS_DENOMINATOR);

0 comments on commit fb5ec7b

Please sign in to comment.