Skip to content

Conversation

@RomanHiden
Copy link
Contributor

No description provided.

@RomanHiden RomanHiden changed the title initial working TWAP initial working Jun 17, 2021
remappings:
- "@openzeppelin-3.4.0=./node_modules/openzeppelin-3.4.0"
- "@openzeppelin-2.5.0=./node_modules/openzeppelin-2.5.0"
- "@uniswap=./node_modules/@uniswap/"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name it uniswapv3

} else {
uint256 sourceTokenDecimals = decimals[sourceToken];
if (sourceTokenDecimals == 0)
sourceTokenDecimals = ERC20Detailed(sourceToken).decimals();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a mapping (address => uint256) public decimals; cheaper to use


pool = _pool;
(token0, token1) = _tokenA < _tokenB ? (_tokenA,_tokenB):(_tokenB,_tokenA);
baseAmount = uint128(10**(ERC20(token0).decimals())); //set to 10**token0Decimals
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is good

address public token0;
address public token1;
address public assignedToken0;
constructor(address _pool, uint32 _period, address _tokenA, address _tokenB) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants