Skip to content

Instantly share code, notes, and snippets.

@tienshaoku
Last active May 19, 2020 14:47
Show Gist options
  • Save tienshaoku/21dd7f54861de2a68bc15f579ff1d07c to your computer and use it in GitHub Desktop.
Save tienshaoku/21dd7f54861de2a68bc15f579ff1d07c to your computer and use it in GitHub Desktop.
IUniswapV2Router01 immutable uniswapV2Router01;
ERC20 immutable Dai;
CErc20 immutable cDai;
address public WETHAddress;
address public DaiAddress;
address public cDaiAddress;
uint public DaiAmount;
uint public ETHAmount;
uint[3] public addLiquidityResult;
constructor () public {
WETHAddress = 0xc778417E063141139Fce010982780140Aa0cD5Ab;
DaiAddress = 0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa;
cDaiAddress = 0x6D7F0754FFeb405d23C51CE938289d4835bE3b14;
Dai = ERC20(DaiAddress);
cDai = CErc20(cDaiAddress);
uniswapV2Router01 = IUniswapV2Router01(0xf164fC0Ec4E93095b804a4795bBe1e041497b92a);
// Let's say the initial supply in liquidity pool is 1 ETH and 200 Dai
DaiAmount = 200000000000000000000;
ETHAmount = 1 ether; // 1000000000000000000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment