|
| 1 | +// SPDX-License-Identifier: MIT |
| 2 | +pragma solidity ^0.8.0; |
| 3 | + |
| 4 | +// Author: Cujo |
| 5 | + |
| 6 | +import "../AppStorage.sol"; |
| 7 | +import "../C.sol"; |
| 8 | + |
| 9 | +// It is expected that this contract is customized if you want to deploy your diamond |
| 10 | +// with data from a deployment script. Use the init function to initialize state variables |
| 11 | +// of your diamond. Add parameters to the init funciton if you need to. |
| 12 | + |
| 13 | +contract InitCrossPoolSwap { |
| 14 | + AppStorage internal s; |
| 15 | + |
| 16 | + function init() external { |
| 17 | + |
| 18 | + // s.swap[Final Token][Source token] |
| 19 | + |
| 20 | + // {SOURCE} <> KLIMA <> BCT Swaps |
| 21 | + s.swap[C.bct()][C.nct()].swapDexes = [0]; |
| 22 | + s.swap[C.bct()][C.nct()].ammRouters = [C.sushiRouter()]; |
| 23 | + s.swap[C.bct()][C.nct()].swapPaths[0] = [C.nct(), C.klima(), C.bct()]; |
| 24 | + |
| 25 | + s.swap[C.bct()][C.ubo()].swapDexes = [1, 0]; |
| 26 | + s.swap[C.bct()][C.ubo()].ammRouters = [C.sushiTridentRouter(), C.sushiRouter()]; |
| 27 | + s.swap[C.bct()][C.ubo()].swapPaths[0] = [C.ubo(), C.klima()]; |
| 28 | + s.swap[C.bct()][C.ubo()].swapPaths[1] = [C.klima(), C.bct()]; |
| 29 | + |
| 30 | + s.swap[C.bct()][C.nbo()].swapDexes = [1, 0]; |
| 31 | + s.swap[C.bct()][C.nbo()].ammRouters = [C.sushiTridentRouter(), C.sushiRouter()]; |
| 32 | + s.swap[C.bct()][C.nbo()].swapPaths[0] = [C.nbo(), C.klima()]; |
| 33 | + s.swap[C.bct()][C.nbo()].swapPaths[1] = [C.klima(), C.bct()]; |
| 34 | + |
| 35 | + s.swap[C.bct()][C.mco2()].swapDexes = [0, 0]; |
| 36 | + s.swap[C.bct()][C.mco2()].ammRouters = [C.quickswapRouter(), C.sushiRouter()]; |
| 37 | + s.swap[C.bct()][C.mco2()].swapPaths[0] = [C.mco2(), C.klima()]; |
| 38 | + s.swap[C.bct()][C.mco2()].swapPaths[1] = [C.klima(), C.bct()]; |
| 39 | + |
| 40 | + |
| 41 | + // {SOURCE} <> KLIMA <> NCT Swaps |
| 42 | + s.swap[C.nct()][C.bct()].swapDexes = [0]; |
| 43 | + s.swap[C.nct()][C.bct()].ammRouters = [C.sushiRouter()]; |
| 44 | + s.swap[C.nct()][C.bct()].swapPaths[0] = [C.nct(), C.klima(), C.nct()]; |
| 45 | + |
| 46 | + s.swap[C.nct()][C.ubo()].swapDexes = [1, 0]; |
| 47 | + s.swap[C.nct()][C.ubo()].ammRouters = [C.sushiTridentRouter(), C.sushiRouter()]; |
| 48 | + s.swap[C.nct()][C.ubo()].swapPaths[0] = [C.ubo(), C.klima()]; |
| 49 | + s.swap[C.nct()][C.ubo()].swapPaths[1] = [C.klima(), C.nct()]; |
| 50 | + |
| 51 | + s.swap[C.nct()][C.nbo()].swapDexes = [1, 0]; |
| 52 | + s.swap[C.nct()][C.nbo()].ammRouters = [C.sushiTridentRouter(), C.sushiRouter()]; |
| 53 | + s.swap[C.nct()][C.nbo()].swapPaths[0] = [C.nbo(), C.klima()]; |
| 54 | + s.swap[C.nct()][C.nbo()].swapPaths[1] = [C.klima(), C.nct()]; |
| 55 | + |
| 56 | + s.swap[C.nct()][C.mco2()].swapDexes = [0, 0]; |
| 57 | + s.swap[C.nct()][C.mco2()].ammRouters = [C.quickswapRouter(), C.sushiRouter()]; |
| 58 | + s.swap[C.nct()][C.mco2()].swapPaths[0] = [C.mco2(), C.klima()]; |
| 59 | + s.swap[C.nct()][C.mco2()].swapPaths[1] = [C.klima(), C.nct()]; |
| 60 | + |
| 61 | + // {SOURCE} <> KLIMA <> MCO2 Swaps |
| 62 | + s.swap[C.mco2()][C.bct()].swapDexes = [0, 0]; |
| 63 | + s.swap[C.mco2()][C.bct()].ammRouters = [C.sushiRouter(), C.quickswapRouter()]; |
| 64 | + s.swap[C.mco2()][C.bct()].swapPaths[0] = [C.bct(), C.klima()]; |
| 65 | + s.swap[C.mco2()][C.bct()].swapPaths[0] = [C.klima(), C.mco2()]; |
| 66 | + |
| 67 | + s.swap[C.mco2()][C.nct()].swapDexes = [0, 0]; |
| 68 | + s.swap[C.mco2()][C.nct()].ammRouters = [C.sushiRouter(), C.quickswapRouter()]; |
| 69 | + s.swap[C.mco2()][C.nct()].swapPaths[0] = [C.nct(), C.klima()]; |
| 70 | + s.swap[C.mco2()][C.nct()].swapPaths[0] = [C.klima(), C.mco2()]; |
| 71 | + |
| 72 | + s.swap[C.mco2()][C.ubo()].swapDexes = [1, 0]; |
| 73 | + s.swap[C.mco2()][C.ubo()].ammRouters = [C.sushiTridentRouter(), C.quickswapRouter()]; |
| 74 | + s.swap[C.mco2()][C.ubo()].swapPaths[0] = [C.ubo(), C.klima()]; |
| 75 | + s.swap[C.mco2()][C.ubo()].swapPaths[1] = [C.klima(), C.mco2()]; |
| 76 | + |
| 77 | + s.swap[C.mco2()][C.nbo()].swapDexes = [1, 0]; |
| 78 | + s.swap[C.mco2()][C.nbo()].ammRouters = [C.sushiTridentRouter(), C.quickswapRouter()]; |
| 79 | + s.swap[C.mco2()][C.nbo()].swapPaths[0] = [C.nbo(), C.klima()]; |
| 80 | + s.swap[C.mco2()][C.nbo()].swapPaths[1] = [C.klima(), C.mco2()]; |
| 81 | + |
| 82 | + // {SOURCE} <> KLIMA <> UBO Swaps |
| 83 | + s.swap[C.ubo()][C.bct()].swapDexes = [0, 1]; |
| 84 | + s.swap[C.ubo()][C.bct()].ammRouters = [C.sushiRouter(), C.sushiTridentRouter()]; |
| 85 | + s.swap[C.ubo()][C.bct()].swapPaths[0] = [C.bct(), C.klima()]; |
| 86 | + s.swap[C.ubo()][C.bct()].swapPaths[1] = [C.klima(), C.ubo()]; |
| 87 | + |
| 88 | + s.swap[C.ubo()][C.nct()].swapDexes = [0, 1]; |
| 89 | + s.swap[C.ubo()][C.nct()].ammRouters = [C.sushiRouter(), C.sushiTridentRouter()]; |
| 90 | + s.swap[C.ubo()][C.nct()].swapPaths[0] = [C.nct(), C.klima()]; |
| 91 | + s.swap[C.ubo()][C.nct()].swapPaths[1] = [C.klima(), C.ubo()]; |
| 92 | + |
| 93 | + s.swap[C.ubo()][C.mco2()].swapDexes = [1, 0]; |
| 94 | + s.swap[C.ubo()][C.mco2()].ammRouters = [C.quickswapRouter(), C.sushiTridentRouter()]; |
| 95 | + s.swap[C.ubo()][C.mco2()].swapPaths[0] = [C.mco2(), C.klima()]; |
| 96 | + s.swap[C.ubo()][C.mco2()].swapPaths[1] = [C.klima(), C.ubo()]; |
| 97 | + |
| 98 | + s.swap[C.ubo()][C.nbo()].swapDexes = [1]; |
| 99 | + s.swap[C.ubo()][C.nbo()].ammRouters = [C.sushiTridentRouter()]; |
| 100 | + s.swap[C.ubo()][C.nbo()].swapPaths[0] = [C.nbo(), C.klima(), C.ubo()]; |
| 101 | + |
| 102 | + // {SOURCE} <> KLIMA <> NBO Swaps |
| 103 | + s.swap[C.nbo()][C.bct()].swapDexes = [0, 1]; |
| 104 | + s.swap[C.nbo()][C.bct()].ammRouters = [C.sushiRouter(), C.sushiTridentRouter()]; |
| 105 | + s.swap[C.nbo()][C.bct()].swapPaths[0] = [C.bct(), C.klima()]; |
| 106 | + s.swap[C.nbo()][C.bct()].swapPaths[1] = [C.klima(), C.nbo()]; |
| 107 | + |
| 108 | + s.swap[C.nbo()][C.nct()].swapDexes = [0, 1]; |
| 109 | + s.swap[C.nbo()][C.nct()].ammRouters = [C.sushiRouter(), C.sushiTridentRouter()]; |
| 110 | + s.swap[C.nbo()][C.nct()].swapPaths[0] = [C.nct(), C.klima()]; |
| 111 | + s.swap[C.nbo()][C.nct()].swapPaths[1] = [C.klima(), C.nbo()]; |
| 112 | + |
| 113 | + s.swap[C.nbo()][C.mco2()].swapDexes = [1, 0]; |
| 114 | + s.swap[C.nbo()][C.mco2()].ammRouters = [C.quickswapRouter(), C.sushiTridentRouter()]; |
| 115 | + s.swap[C.nbo()][C.mco2()].swapPaths[0] = [C.mco2(), C.klima()]; |
| 116 | + s.swap[C.nbo()][C.mco2()].swapPaths[1] = [C.klima(), C.nbo()]; |
| 117 | + |
| 118 | + s.swap[C.nbo()][C.ubo()].swapDexes = [1]; |
| 119 | + s.swap[C.nbo()][C.ubo()].ammRouters = [C.sushiTridentRouter()]; |
| 120 | + s.swap[C.nbo()][C.ubo()].swapPaths[0] = [C.ubo(), C.klima(), C.nbo()]; |
| 121 | + } |
| 122 | +} |
0 commit comments