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

fix(#patch); Uniswap Forks; Upgrade Pricing Mechanism #2040

Merged
merged 6 commits into from
Apr 24, 2023
Merged
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
58 changes: 29 additions & 29 deletions deployment/deployment.json
Original file line number Diff line number Diff line change
@@ -1308,7 +1308,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.2",
"subgraph": "1.0.3",
"methodology": "1.0.0"
},
"files": {
@@ -4508,7 +4508,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4530,7 +4530,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4560,7 +4560,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.5",
"subgraph": "1.0.6",
"methodology": "1.0.0"
},
"files": {
@@ -4582,7 +4582,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.2",
"subgraph": "1.0.3",
"methodology": "1.0.0"
},
"files": {
@@ -4612,7 +4612,7 @@
"status": "dev",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.6",
"subgraph": "1.0.7",
"methodology": "1.0.0"
},
"files": {
@@ -4642,7 +4642,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.8",
"subgraph": "1.1.9",
"methodology": "1.0.0"
},
"files": {
@@ -4672,7 +4672,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.6",
"subgraph": "1.1.7",
"methodology": "1.0.0"
},
"files": {
@@ -4702,7 +4702,7 @@
"status": "dev",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.8",
"subgraph": "1.1.9",
"methodology": "1.0.0"
},
"files": {
@@ -4732,7 +4732,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4754,7 +4754,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4776,7 +4776,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4798,7 +4798,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4824,7 +4824,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4846,7 +4846,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4868,7 +4868,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.2.0",
"subgraph": "1.2.1",
"methodology": "1.0.0"
},
"files": {
@@ -4894,7 +4894,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.11",
"subgraph": "1.1.12",
"methodology": "1.0.0"
},
"files": {
@@ -4916,7 +4916,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.11",
"subgraph": "1.1.12",
"methodology": "1.0.0"
},
"files": {
@@ -4938,7 +4938,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4960,7 +4960,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -4982,7 +4982,7 @@
"status": "prod",
"versions": {
"schema": "1.3.1",
"subgraph": "1.1.11",
"subgraph": "1.1.12",
"methodology": "1.0.0"
},
"files": {
@@ -5016,7 +5016,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -5046,7 +5046,7 @@
"status": "dev",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.5",
"subgraph": "1.0.6",
"methodology": "1.0.0"
},
"files": {
@@ -5076,7 +5076,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -5110,7 +5110,7 @@
"status": "dev",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.6",
"subgraph": "1.1.7",
"methodology": "1.0.0"
},
"files": {
@@ -5140,7 +5140,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.10",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
@@ -5170,7 +5170,7 @@
"status": "prod",
"versions": {
"schema": "1.3.1",
"subgraph": "1.0.8",
"subgraph": "1.0.9",
"methodology": "1.0.1"
},
"files": {
@@ -5196,7 +5196,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.6",
"subgraph": "1.0.7",
"methodology": "1.0.1"
},
"files": {
@@ -6936,7 +6936,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.4",
"subgraph": "1.0.5",
"methodology": "1.0.0"
},
"services": {
2 changes: 1 addition & 1 deletion subgraphs/uniswap-forks/configurations/configure.mustache
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { getNetworkConfigurations } from "./configurations/configurations";
import { Deploy } from "./configurations/deploy";

// Select the deployment protocol and network
let deployment = Deploy.{{ deployment }};
const deployment = Deploy.{{ deployment }};

// export const NetworkConfigs = configurationsMap.get(deployment)!
export const NetworkConfigs = getNetworkConfigurations(deployment);
2 changes: 1 addition & 1 deletion subgraphs/uniswap-forks/configurations/configure.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { getNetworkConfigurations } from "./configurations/configurations";
import { Deploy } from "./configurations/deploy";

// Select the deployment protocol and network
const deployment = Deploy.PANGOLIN_AVALANCHE;
const deployment = Deploy.TRADER_JOE_AVALANCHE;

// export const NetworkConfigs = configurationsMap.get(deployment)!
export const NetworkConfigs = getNetworkConfigurations(deployment);
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.1.7",
"subgraph": "1.1.11",
"methodology": "1.0.0"
},
"files": {
Original file line number Diff line number Diff line change
@@ -61,9 +61,9 @@ export function handleReward(
return;
}

const rewardToken = getOrCreateToken(NetworkConfigs.getRewardToken());
const rewardToken = getOrCreateToken(event, NetworkConfigs.getRewardToken());
pool.rewardTokens = [
getOrCreateRewardToken(NetworkConfigs.getRewardToken()).id,
getOrCreateRewardToken(event, NetworkConfigs.getRewardToken()).id,
];

// Update staked amounts
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ export function updateMasterChef(
return;
}

const rewardToken = getOrCreateToken(NetworkConfigs.getRewardToken());
const rewardToken = getOrCreateToken(event, NetworkConfigs.getRewardToken());
pool.rewardTokens = [
getOrCreateRewardToken(NetworkConfigs.getRewardToken()).id,
getOrCreateRewardToken(event, NetworkConfigs.getRewardToken()).id,
];

// Get the amount of Banana tokens emitted for all pools per second.
Original file line number Diff line number Diff line change
@@ -75,8 +75,8 @@ export function createLiquidityPool(
const protocol = getOrCreateProtocol();

// create the tokens and tokentracker
const token0 = getOrCreateToken(token0Address);
const token1 = getOrCreateToken(token1Address);
const token0 = getOrCreateToken(event, token0Address);
const token1 = getOrCreateToken(event, token1Address);
const LPtoken = getOrCreateLPToken(poolAddress, token0, token1);

updateTokenWhitelists(token0, token1, poolAddress);
@@ -136,13 +136,13 @@ export function createLiquidityPool(

// Add reward token to liquidity pool from HoneyFarm add contract call (PoolAdded event)
export function createPoolRewardToken(
poolAddress: string,
blockNumber: BigInt
event: ethereum.Event,
poolAddress: string
): void {
const pool = getLiquidityPool(poolAddress, blockNumber);
const pool = getLiquidityPool(poolAddress, event.block.number);

pool.rewardTokens = [
getOrCreateRewardToken(NetworkConfigs.getRewardToken()).id,
getOrCreateRewardToken(event, NetworkConfigs.getRewardToken()).id,
];

pool.save();
Original file line number Diff line number Diff line change
@@ -14,10 +14,7 @@ import { handleReward } from "../common/handlers";
// WIP: HoneyFarm subgraph handlers currently not used in Honeyswap subgraph deployment
export function handlePoolAdded(event: PoolAddedEvent): void {
log.debug("poolToken added: {}", [event.params.poolToken.toHexString()]);
createPoolRewardToken(
event.params.poolToken.toHexString(),
event.block.number
);
createPoolRewardToken(event, event.params.poolToken.toHexString());
}

// WIP: HoneyFarm subgraph handlers currently not used in Honeyswap subgraph deployment
Original file line number Diff line number Diff line change
@@ -61,9 +61,9 @@ export function handleReward(
return;
}

const rewardToken = getOrCreateToken(NetworkConfigs.getRewardToken());
const rewardToken = getOrCreateToken(event, NetworkConfigs.getRewardToken());
pool.rewardTokens = [
getOrCreateRewardToken(NetworkConfigs.getRewardToken()).id,
getOrCreateRewardToken(event, NetworkConfigs.getRewardToken()).id,
];

// Update staked amounts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"network": "avalanche",
"status": "dev",
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.0",
"subgraph": "1.0.5",
"methodology": "1.0.0"
},
"services": {
"hosted-service": {
"slug": "pangolin-avalanche",
"query-id": "pangolin-avalanche"
}
},
"files": {
"template": "pangolin.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": true
},
"services": {
"hosted-service": {
"slug": "pangolin-avalanche",
"query-id": "pangolin-avalanche"
}
},
"protocol": "pangolin",
"base": "uniswap-forks",
"schema": "dex-amm",
Loading