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

support non standard underlying_coins(uint256) impl #3

Merged
merged 3 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
token address lookup for special meta pool
  • Loading branch information
padoriku committed Apr 19, 2022
commit 2e1f301837c45b901e81bf34b58e52609b1d6da2
7 changes: 5 additions & 2 deletions deploy/codecs/CurveSpecialMetaPoolCodec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as dotenv from 'dotenv';
import { DeployFunction } from 'hardhat-deploy/types';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { verify } from '../configs/functions';
import { getSpecialMetaPoolCodecConfig, verify } from './../configs/functions';

dotenv.config();

Expand All @@ -10,9 +10,12 @@ const deployFunc: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

const chainId = parseInt(await hre.getChainId());

const result = await deploy('CurveSpecialMetaPoolCodec', {
from: deployer,
log: true
log: true,
args: getSpecialMetaPoolCodecConfig(chainId).args
});
await verify(hre, result);
};
Expand Down
16 changes: 5 additions & 11 deletions deploy/configs/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import * as dotenv from 'dotenv';
import { getMetaPoolCodecConfig, getSupportedCurvePools } from './functions';
import {
CurvePoolCodec,
CurveSpecialMetaPoolCodec,
IConfig,
UniswapV2SwapExactTokensForTokensCodec,
UniswapV3ExactInputCodec
} from './types';
import { getMetaPoolCodecConfig, getSpecialMetaPoolCodecConfig, getSupportedCurvePools } from './functions';
import { CurvePoolCodec, IConfig, UniswapV2SwapExactTokensForTokensCodec, UniswapV3ExactInputCodec } from './types';

dotenv.config();

Expand All @@ -22,7 +16,7 @@ export const deploymentConfigs: IConfig = {
{ address: '0xE592427A0AEce92De3Edee1F18E0157C05861564', func: UniswapV3ExactInputCodec.func }, // UniswapV3: SwapRouter
...getSupportedCurvePools(1)
],
codecs: [UniswapV3ExactInputCodec, CurvePoolCodec, CurveSpecialMetaPoolCodec, getMetaPoolCodecConfig(1)]
codecs: [UniswapV3ExactInputCodec, CurvePoolCodec, getSpecialMetaPoolCodecConfig(1), getMetaPoolCodecConfig(1)]
},

// BSC
Expand All @@ -43,7 +37,7 @@ export const deploymentConfigs: IConfig = {
{ address: '0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff', func: UniswapV2SwapExactTokensForTokensCodec.func }, // Quickswap: UniswapV2Router02
...getSupportedCurvePools(137)
],
codecs: [UniswapV2SwapExactTokensForTokensCodec, CurveSpecialMetaPoolCodec, getMetaPoolCodecConfig(137)]
codecs: [UniswapV2SwapExactTokensForTokensCodec, getSpecialMetaPoolCodecConfig(137), getMetaPoolCodecConfig(137)]
},

// Fantom
Expand All @@ -68,7 +62,7 @@ export const deploymentConfigs: IConfig = {
codecs: [
UniswapV2SwapExactTokensForTokensCodec,
CurvePoolCodec,
CurveSpecialMetaPoolCodec,
getSpecialMetaPoolCodecConfig(43114),
getMetaPoolCodecConfig(43114)
]
},
Expand Down