Skip to content

Commit 6fc9837

Browse files
committed
chore: on-chain -> onchain
1 parent 0c79dbe commit 6fc9837

4 files changed

Lines changed: 24 additions & 24 deletions

File tree

contracts/interfaces/IOrionStrategist.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface IOrionStrategist is IERC165 {
1313
/// @param vault_ The vault address to link to this strategist.
1414
function setVault(address vault_) external;
1515

16-
/// @notice Compute the current portfolio intent from on-chain state and submit it to the linked vault.
16+
/// @notice Compute the current portfolio intent from onchain state and submit it to the linked vault.
1717
/// @dev Permissioned access is strongly recommended for security.
1818
function submitIntent() external;
1919
}

contracts/vaults/OrionVault.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ abstract contract OrionVault is Initializable, ERC4626Upgradeable, ReentrancyGua
426426
emit StrategistUpdated(newStrategist);
427427
}
428428

429-
/// @dev Tells on-chain strategists which vault they manage; skips EOAs and wallets that are not Orion strategists.
429+
/// @dev Tells onchain strategists which vault they manage; skips EOAs and wallets that are not Orion strategists.
430430
function _linkStrategistVault(address strategist_) internal {
431431
if (strategist_.code.length == 0) return;
432432
try IERC165(strategist_).supportsInterface(type(IOrionStrategist).interfaceId) returns (bool supported) {

test/LiquidityOrchestratorSlippage.test.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { resetNetwork } from "./helpers/resetNetwork";
1919
*
2020
* Uses LiquidityOrchestratorHarness to directly call the contract's internal
2121
* _calculateMaxWithSlippage and _calculateMinWithSlippage via Solidity (Math.mulDiv),
22-
* ensuring on-chain rounding behavior is validated rather than JS-only arithmetic.
22+
* ensuring onchain rounding behavior is validated rather than JS-only arithmetic.
2323
*/
2424
describe("LiquidityOrchestrator - Centralized Slippage Management", function () {
2525
let orionConfig: OrionConfig;
@@ -151,9 +151,9 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
151151
);
152152
});
153153

154-
describe("Slippage Helper Functions - On-Chain Solidity Validation", function () {
154+
describe("Slippage Helper Functions - onchain Solidity Validation", function () {
155155
describe("_calculateMaxWithSlippage (via harness)", function () {
156-
it("should calculate correct max amount with 2% slippage on-chain", async function () {
156+
it("should calculate correct max amount with 2% slippage onchain", async function () {
157157
await harness.setSlippageTolerance(200);
158158

159159
const estimatedAmount = ethers.parseUnits("1000", 6);
@@ -162,7 +162,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
162162
expect(contractResult).to.equal(ethers.parseUnits("1020", 6));
163163
});
164164

165-
it("should calculate correct max amount with 5% slippage on-chain", async function () {
165+
it("should calculate correct max amount with 5% slippage onchain", async function () {
166166
await harness.setSlippageTolerance(500);
167167

168168
const estimatedAmount = ethers.parseUnits("2000", 6);
@@ -171,7 +171,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
171171
expect(contractResult).to.equal(ethers.parseUnits("2100", 6));
172172
});
173173

174-
it("should handle zero slippage correctly on-chain", async function () {
174+
it("should handle zero slippage correctly onchain", async function () {
175175
await harness.setSlippageTolerance(0);
176176

177177
const estimatedAmount = ethers.parseUnits("5000", 6);
@@ -180,7 +180,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
180180
expect(contractResult).to.equal(estimatedAmount);
181181
});
182182

183-
it("should handle very small amounts on-chain (Solidity rounding)", async function () {
183+
it("should handle very small amounts onchain (Solidity rounding)", async function () {
184184
await harness.setSlippageTolerance(100); // 1%
185185

186186
const estimatedAmount = 100n; // 0.0001 USDC
@@ -190,7 +190,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
190190
expect(contractResult).to.equal(101n);
191191
});
192192

193-
it("should handle very large amounts correctly on-chain", async function () {
193+
it("should handle very large amounts correctly onchain", async function () {
194194
await harness.setSlippageTolerance(300); // 3%
195195

196196
const estimatedAmount = ethers.parseUnits("1000000000", 6); // 1 billion USDC
@@ -201,7 +201,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
201201
});
202202

203203
describe("_calculateMinWithSlippage (via harness)", function () {
204-
it("should calculate correct min amount with 2% slippage on-chain", async function () {
204+
it("should calculate correct min amount with 2% slippage onchain", async function () {
205205
await harness.setSlippageTolerance(200);
206206

207207
const estimatedAmount = ethers.parseUnits("1000", 6);
@@ -210,7 +210,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
210210
expect(contractResult).to.equal(ethers.parseUnits("980", 6));
211211
});
212212

213-
it("should calculate correct min amount with 5% slippage on-chain", async function () {
213+
it("should calculate correct min amount with 5% slippage onchain", async function () {
214214
await harness.setSlippageTolerance(500);
215215

216216
const estimatedAmount = ethers.parseUnits("2000", 6);
@@ -219,7 +219,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
219219
expect(contractResult).to.equal(ethers.parseUnits("1900", 6));
220220
});
221221

222-
it("should handle zero slippage correctly on-chain", async function () {
222+
it("should handle zero slippage correctly onchain", async function () {
223223
await harness.setSlippageTolerance(0);
224224

225225
const estimatedAmount = ethers.parseUnits("5000", 6);
@@ -228,7 +228,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
228228
expect(contractResult).to.equal(estimatedAmount);
229229
});
230230

231-
it("should handle very small amounts on-chain (Solidity rounding)", async function () {
231+
it("should handle very small amounts onchain (Solidity rounding)", async function () {
232232
await harness.setSlippageTolerance(100); // 1%
233233

234234
const estimatedAmount = 100n;
@@ -238,7 +238,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
238238
expect(contractResult).to.equal(99n);
239239
});
240240

241-
it("should handle very large amounts correctly on-chain", async function () {
241+
it("should handle very large amounts correctly onchain", async function () {
242242
await harness.setSlippageTolerance(300); // 3%
243243

244244
const estimatedAmount = ethers.parseUnits("1000000000", 6);
@@ -248,7 +248,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
248248
});
249249
});
250250

251-
describe("Precision and Rounding (on-chain vs JS)", function () {
251+
describe("Precision and Rounding (onchain vs JS)", function () {
252252
it("should match expected Solidity mulDiv rounding for fractional results", async function () {
253253
await harness.setSlippageTolerance(250); // 2.5%
254254

@@ -261,7 +261,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
261261
expect(minResult).to.equal(120370369n);
262262
});
263263

264-
it("should validate on-chain results match JS reference for multiple inputs", async function () {
264+
it("should validate onchain results match JS reference for multiple inputs", async function () {
265265
const amounts = [1n, 999n, 1000000n, 100000000n, ethers.parseUnits("10000", 6)];
266266
const slippages = [50n, 100n, 200n, 500n, 1000n];
267267

@@ -287,7 +287,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
287287
}
288288
});
289289

290-
it("should handle amounts that result in exact division on-chain", async function () {
290+
it("should handle amounts that result in exact division onchain", async function () {
291291
await harness.setSlippageTolerance(250); // 2.5%
292292

293293
const estimatedAmount = 4000000n; // 4 USDC
@@ -379,7 +379,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
379379
});
380380

381381
describe("Edge Cases and Boundary Conditions", function () {
382-
it("should handle maximum possible slippage tolerance on-chain", async function () {
382+
it("should handle maximum possible slippage tolerance onchain", async function () {
383383
const highSlippage = 2000n; // 20%
384384
await harness.setSlippageTolerance(highSlippage);
385385

@@ -391,7 +391,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
391391
expect(contractMin).to.equal(ethers.parseUnits("800", 6));
392392
});
393393

394-
it("should maintain precision with fractional basis points on-chain", async function () {
394+
it("should maintain precision with fractional basis points onchain", async function () {
395395
await harness.setSlippageTolerance(123); // 1.23%
396396

397397
const estimatedAmount = ethers.parseUnits("10000", 6);
@@ -406,7 +406,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
406406
});
407407

408408
describe("Slippage Update Propagation", function () {
409-
it("should immediately reflect slippage changes in on-chain calculations", async function () {
409+
it("should immediately reflect slippage changes in onchain calculations", async function () {
410410
const estimatedAmount = ethers.parseUnits("1000", 6);
411411

412412
await harness.setSlippageTolerance(100); // 1%
@@ -422,7 +422,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
422422
expect(maxAmount).to.equal(ethers.parseUnits("1005", 6));
423423
});
424424

425-
it("should maintain consistency after multiple slippage updates on-chain", async function () {
425+
it("should maintain consistency after multiple slippage updates onchain", async function () {
426426
const estimatedAmount = ethers.parseUnits("5000", 6);
427427
const slippageValues = [100n, 200n, 300n, 150n, 250n];
428428

@@ -438,7 +438,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
438438
});
439439

440440
describe("Symmetry Validation", function () {
441-
it("should validate max and min are symmetric within rounding on-chain", async function () {
441+
it("should validate max and min are symmetric within rounding onchain", async function () {
442442
await harness.setSlippageTolerance(350); // 3.5%
443443

444444
const amounts = [
@@ -461,7 +461,7 @@ describe("LiquidityOrchestrator - Centralized Slippage Management", function ()
461461
}
462462
});
463463

464-
it("should demonstrate single source of truth for slippage on-chain", async function () {
464+
it("should demonstrate single source of truth for slippage onchain", async function () {
465465
await harness.setSlippageTolerance(200); // 2%
466466

467467
const slippage = await harness.slippageTolerance();

test/StrategistLinking.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ describe("Strategist Linking", function () {
398398
await strategy.connect(owner).submitIntent();
399399
const [tokens1, weights1] = await vault.getIntent();
400400

401-
// Submit again from a different caller — same on-chain state → same result
401+
// Submit again from a different caller — same onchain state → same result
402402
await strategy.connect(stranger).submitIntent();
403403
const [tokens2, weights2] = await vault.getIntent();
404404

0 commit comments

Comments
 (0)