mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
uniswapExchange instance for gas optimization
This commit is contained in:
parent
99786654ef
commit
fc3c03d852
|
@ -107,13 +107,14 @@ contract InstaUniswapPool is Helper {
|
||||||
uint totalSupply,
|
uint totalSupply,
|
||||||
uint ethReserve,
|
uint ethReserve,
|
||||||
uint tokenReserve
|
uint tokenReserve
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
UniswapPool uniswapExchange = UniswapPool(poolAddress);
|
||||||
poolAddress = getAddressPool(token);
|
poolAddress = getAddressPool(token);
|
||||||
name = UniswapPool(poolAddress).name();
|
name = uniswapExchange.name();
|
||||||
symbol = UniswapPool(poolAddress).symbol();
|
symbol = uniswapExchange.symbol();
|
||||||
decimals = UniswapPool(poolAddress).decimals();
|
decimals = uniswapExchange.decimals();
|
||||||
totalSupply = UniswapPool(poolAddress).totalSupply();
|
totalSupply = uniswapExchange.totalSupply();
|
||||||
(ethReserve, tokenReserve) = getBal(token, poolAddress);
|
(ethReserve, tokenReserve) = getBal(token, poolAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user