|
17 | 17 | SolChainSelector = ccipocr3.ChainSelector(sel.SOLANA_DEVNET.Selector) |
18 | 18 | EvmChainSelector = ccipocr3.ChainSelector(sel.ETHEREUM_TESTNET_SEPOLIA.Selector) |
19 | 19 | AptChainSelector = ccipocr3.ChainSelector(sel.APTOS_TESTNET.Selector) |
| 20 | + SuiChainSelector = ccipocr3.ChainSelector(sel.SUI_TESTNET.Selector) |
20 | 21 | TonChainSelector = ccipocr3.ChainSelector(sel.TON_TESTNET.Selector) |
21 | 22 | ) |
22 | 23 |
|
@@ -198,6 +199,28 @@ func TestCalculateUsdPerUnitGas(t *testing.T) { |
198 | 199 | chainSelector: AptChainSelector, |
199 | 200 | exp: big.NewInt(0 * 1 * 1e10), // gasprice * USD per APT * (USD / APT) |
200 | 201 | }, |
| 202 | + { |
| 203 | + name: "sui high fee case", |
| 204 | + sourceGasPrice: big.NewInt(100000), |
| 205 | + // usdPerFeeCoin = $4 * 1e9 * 1e18 = 4e27 |
| 206 | + usdPerFeeCoin: new(big.Int).Mul(big.NewInt(4), new(big.Int).Mul(big.NewInt(1e9), big.NewInt(1e18))), |
| 207 | + chainSelector: SuiChainSelector, |
| 208 | + exp: big.NewInt(100000 * 4e9), |
| 209 | + }, |
| 210 | + { |
| 211 | + name: "sui low fee case", |
| 212 | + sourceGasPrice: big.NewInt(100), |
| 213 | + usdPerFeeCoin: new(big.Int).Mul(big.NewInt(4), new(big.Int).Mul(big.NewInt(1e9), big.NewInt(1e18))), |
| 214 | + chainSelector: SuiChainSelector, |
| 215 | + exp: big.NewInt(100 * 4e9), |
| 216 | + }, |
| 217 | + { |
| 218 | + name: "sui 0 fee case", |
| 219 | + sourceGasPrice: big.NewInt(0), |
| 220 | + usdPerFeeCoin: new(big.Int).Mul(big.NewInt(4), new(big.Int).Mul(big.NewInt(1e9), big.NewInt(1e18))), |
| 221 | + chainSelector: SuiChainSelector, |
| 222 | + exp: big.NewInt(0), |
| 223 | + }, |
201 | 224 | { |
202 | 225 | name: "ton base case", |
203 | 226 | sourceGasPrice: big.NewInt(400), |
|
0 commit comments