This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This function rotates a sublist of a list, given a starting position and a length. Position can be incremented infinitely. | |
| def rotateSubList(bigList, position, length): | |
| # We check if the left index is still smaller than the right index after the modulo operation. | |
| if position % len(bigList) < (position+length) % len(bigList): | |
| # The order is preserved, so we can safely use the slice notation | |
| return bigList[position%len(bigList): (position+length)%len(bigList)] | |
| else: | |
| # The order is NOT preserved. The resulting array would have been clamped to the right by the slice notation. | |
| # We add the missing part, sourced from the start of the bigList. | |
| return bigList[position%len(bigList): len(bigList)] + bigList[0: (position+length)%len(bigList)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "uniswapV2": { | |
| "factory": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f" | |
| }, | |
| "sushiswapV2": { | |
| "factory": "0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac" | |
| }, | |
| "shibaswapV2": { | |
| "factory": "0x115934131916C8b277DD010Ee02de363c09d037c" | |
| }, |