From 2f9d8c73d6976fee8924b00a00d5fe60f3e2a28e Mon Sep 17 00:00:00 2001 From: bytetigers Date: Tue, 13 Aug 2024 21:51:24 +0800 Subject: [PATCH] chore: remove repetitive words Signed-off-by: bytetigers --- packages/common/src/hardhat/tasks/collateralWhitelist.ts | 2 +- .../chain-adapters/Admin_ChildMessenger.sol | 2 +- .../chain-adapters/Arbitrum_ChildMessenger.sol | 2 +- .../chain-adapters/Arbitrum_ParentMessenger.sol | 2 +- .../chain-adapters/Optimism_ChildMessenger.sol | 2 +- .../chain-adapters/Optimism_ParentMessenger.sol | 2 +- .../interfaces/EscalationManagerInterface.sol | 2 +- .../proxy-scripts/uniswap-broker/UniswapV2Broker.sol | 2 +- .../proxy-scripts/uniswap-broker/UniswapV3Broker.sol | 2 +- .../core/deprecated_truffle_scripts/local/liquidateEMP.js | 2 +- packages/core/deprecated_truffle_scripts/umip-3/3_Verify.js | 2 +- packages/core/scripts/SetUpFoundryWithHardhat.sh | 2 +- .../expiring-multiparty/PricelessPositionManager.js | 2 +- .../test/clients/FinancialContractClient.js | 2 +- packages/monitor-v2/src/monitor-og/SnapshotVerification.ts | 2 +- packages/serverless-orchestration/src/ServerlessHub.js | 4 ++-- packages/serverless-orchestration/src/ServerlessSpoke.js | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/common/src/hardhat/tasks/collateralWhitelist.ts b/packages/common/src/hardhat/tasks/collateralWhitelist.ts index 9552b02f83..8174942703 100644 --- a/packages/common/src/hardhat/tasks/collateralWhitelist.ts +++ b/packages/common/src/hardhat/tasks/collateralWhitelist.ts @@ -187,7 +187,7 @@ task("migrate-collateral-whitelist", "Migrate collateral whitelist, extracted fr }); console.log( - `Adding ${filteredCombinedSet.length} tokens the the L2 token whitelist on ${l2TokenWhitelist.options.address}...` + `Adding ${filteredCombinedSet.length} tokens the L2 token whitelist on ${l2TokenWhitelist.options.address}...` ); console.table(filteredCombinedSet); const l2StoreContract = await deployments.get("Store"); diff --git a/packages/core/contracts/cross-chain-oracle/chain-adapters/Admin_ChildMessenger.sol b/packages/core/contracts/cross-chain-oracle/chain-adapters/Admin_ChildMessenger.sol index 165efa81f0..db712b17b0 100644 --- a/packages/core/contracts/cross-chain-oracle/chain-adapters/Admin_ChildMessenger.sol +++ b/packages/core/contracts/cross-chain-oracle/chain-adapters/Admin_ChildMessenger.sol @@ -44,7 +44,7 @@ contract Admin_ChildMessenger is Ownable, Lockable, ChildMessengerInterface { /** * @notice Process a received message from the admin. - * @dev The caller must be the the admin. + * @dev The caller must be the admin. * @param data data message sent from the admin. Should be an encoded function call or packed data. * @param target desired recipient of `data`. Target must implement the `processMessageFromParent` function. Having * this as a param enables the Admin to send messages to arbitrary addresses from the messenger contract. This is diff --git a/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ChildMessenger.sol b/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ChildMessenger.sol index 032648b73b..7eba72a714 100644 --- a/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ChildMessenger.sol +++ b/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ChildMessenger.sol @@ -70,7 +70,7 @@ contract Arbitrum_ChildMessenger is AVM_CrossDomainEnabled, ChildMessengerInterf /** * @notice Process a received message from the parent messenger via the canonical message bridge. - * @dev The caller must be the the parent messenger, sent over the canonical message bridge. + * @dev The caller must be the parent messenger, sent over the canonical message bridge. * @param data data message sent from the L1 messenger. Should be an encoded function call or packed data. * @param target desired recipient of `data`. Target must implement the `processMessageFromParent` function. Having * this as a param enables the L1 Messenger to send messages to arbitrary addresses on the L1. This is primarily diff --git a/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ParentMessenger.sol b/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ParentMessenger.sol index be987a0a08..5392c7fdde 100644 --- a/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ParentMessenger.sol +++ b/packages/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ParentMessenger.sol @@ -137,7 +137,7 @@ contract Arbitrum_ParentMessenger is Arbitrum_Messenger, ParentMessengerInterfac /** * @notice Process a received message from the child messenger via the canonical message bridge. - * @dev The caller must be the the child messenger, sent over the canonical message bridge. + * @dev The caller must be the child messenger, sent over the canonical message bridge. * @dev Note that only the OracleHub can receive messages from the child messenger. Therefore we can always forward * these messages to this contract. The OracleHub must implement processMessageFromChild to handle this message. * @param data data message sent from the child messenger. Should be an encoded function call or packed data. diff --git a/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ChildMessenger.sol b/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ChildMessenger.sol index 121fc6ffed..2deef71e49 100644 --- a/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ChildMessenger.sol +++ b/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ChildMessenger.sol @@ -90,7 +90,7 @@ contract Optimism_ChildMessenger is CrossDomainEnabled, ChildMessengerInterface, /** * @notice Process a received message from the parent messenger via the canonical message bridge. - * @dev The caller must be the the parent messenger, sent over the canonical message bridge. + * @dev The caller must be the parent messenger, sent over the canonical message bridge. * @param data data message sent from the L1 messenger. Should be an encoded function call or packed data. * @param target desired recipient of `data`. Target must implement the `processMessageFromParent` function. Having * this as a param enables the L1 Messenger to send messages to arbitrary addresses on the L2. This is primarily diff --git a/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ParentMessenger.sol b/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ParentMessenger.sol index c460a5c664..c74ee93ef1 100644 --- a/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ParentMessenger.sol +++ b/packages/core/contracts/cross-chain-oracle/chain-adapters/Optimism_ParentMessenger.sol @@ -90,7 +90,7 @@ contract Optimism_ParentMessenger is CrossDomainEnabled, ParentMessengerInterfac /** * @notice Process a received message from the child messenger via the canonical message bridge. - * @dev The caller must be the the child messenger, sent over the canonical message bridge. + * @dev The caller must be the child messenger, sent over the canonical message bridge. * @dev Note that only the OracleHub can receive messages from the child messenger. Therefore we can always forward * these messages to this contract. The OracleHub must implement processMessageFromChild to handle this message. * @param data data message sent from the child messenger. Should be an encoded function call or packed data. diff --git a/packages/core/contracts/optimistic-oracle-v3/interfaces/EscalationManagerInterface.sol b/packages/core/contracts/optimistic-oracle-v3/interfaces/EscalationManagerInterface.sol index 0563110110..edc73763b7 100644 --- a/packages/core/contracts/optimistic-oracle-v3/interfaces/EscalationManagerInterface.sol +++ b/packages/core/contracts/optimistic-oracle-v3/interfaces/EscalationManagerInterface.sol @@ -10,7 +10,7 @@ import "./OptimisticOracleV3CallbackRecipientInterface.sol"; interface EscalationManagerInterface is OptimisticOracleV3CallbackRecipientInterface { // Assertion policy parameters as returned by the escalation manager. struct AssertionPolicy { - bool blockAssertion; // If true, the the assertion should be blocked. + bool blockAssertion; // If true, the assertion should be blocked. bool arbitrateViaEscalationManager; // If true, the escalation manager will arbitrate the assertion. bool discardOracle; // If true, the Optimistic Oracle V3 should discard the oracle price. bool validateDisputers; // If true, the escalation manager will validate the disputers. diff --git a/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV2Broker.sol b/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV2Broker.sol index a423428d7b..0a9b5dab8f 100644 --- a/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV2Broker.sol +++ b/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV2Broker.sol @@ -30,7 +30,7 @@ contract UniswapV2Broker { * @param swappedTokens array of addresses which are to be swapped. The order does not matter as the function will figure * out which tokens need to be exchanged to move the market to the desired "true" price. * @param truePriceTokens array of unit used to represent the true price. 0th value is the numerator of the true price - * and the 1st value is the the denominator of the true price. + * and the 1st value is the denominator of the true price. * @param maxSpendTokens array of unit to represent the max to spend in the two tokens. * @param to recipient of the trade proceeds. * @param deadline to limit when the trade can execute. If the tx is mined after this timestamp then revert. diff --git a/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV3Broker.sol b/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV3Broker.sol index 0173ec35a9..0c42d7ce3a 100644 --- a/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV3Broker.sol +++ b/packages/core/contracts/proxy-scripts/uniswap-broker/UniswapV3Broker.sol @@ -94,7 +94,7 @@ contract UniswapV3Broker { uint256 inputAmountForStep; // If zeroForOne is true, then we are moving the price UP. In this case we need to ensure that if the next - // tick price is more than the target price, we set the set the the next step price to the target price. This + // tick price is more than the target price, we set the set the next step price to the target price. This // ensures that the price does not undershoot when the next tick is the last tick. Else, traverse the whole tick. if (zeroForOne) { step.sqrtPriceNextX96 = nextTickPriceX96 > sqrtRatioTargetX96 ? sqrtRatioTargetX96 : nextTickPriceX96; diff --git a/packages/core/deprecated_truffle_scripts/local/liquidateEMP.js b/packages/core/deprecated_truffle_scripts/local/liquidateEMP.js index 4a33cf9877..4d97fa248b 100644 --- a/packages/core/deprecated_truffle_scripts/local/liquidateEMP.js +++ b/packages/core/deprecated_truffle_scripts/local/liquidateEMP.js @@ -1,5 +1,5 @@ /** - * @notice Liquidates 1000 tokens of the the sponsor's position, where the sponsor is accounts[0] and the liquidator + * @notice Liquidates 1000 tokens of the sponsor's position, where the sponsor is accounts[0] and the liquidator * is accounts[1]. Useful when paired with the `DeployEMP.js` script which deploys an EMP with a minimum * sponsor position of 1000 tokens. * diff --git a/packages/core/deprecated_truffle_scripts/umip-3/3_Verify.js b/packages/core/deprecated_truffle_scripts/umip-3/3_Verify.js index 894d3dcabf..e7679e0d95 100644 --- a/packages/core/deprecated_truffle_scripts/umip-3/3_Verify.js +++ b/packages/core/deprecated_truffle_scripts/umip-3/3_Verify.js @@ -73,7 +73,7 @@ async function runExport() { console.log(" 3. Validating deployed contracts are owned by new governor..."); // The Financial Contracts Admin, identifierWhiteList and Voting are all - // ownable and should be owned by the the new governor + // ownable and should be owned by the new governor await contractOwnedByNewGovernor(FinancialContractsAdmin); await contractOwnedByNewGovernor(IdentifierWhitelist); await contractOwnedByNewGovernor(Voting); diff --git a/packages/core/scripts/SetUpFoundryWithHardhat.sh b/packages/core/scripts/SetUpFoundryWithHardhat.sh index 4b568ab759..9af9fbad7a 100755 --- a/packages/core/scripts/SetUpFoundryWithHardhat.sh +++ b/packages/core/scripts/SetUpFoundryWithHardhat.sh @@ -10,7 +10,7 @@ if ! command -v forge &>/dev/null; then fi # Then, configure the core package to work with foundry. To do this we need to pull out the foundry standard library and -# place it in a way that it can be accessed within the core directory. This amounts the the manual steps listed here +# place it in a way that it can be accessed within the core directory. This amounts the manual steps listed here # https://book.getfoundry.sh/config/hardhat#use-foundry-in-an-existing-hardhat-project without wanting to commit the # foundry lib & standard lib to the repo. diff --git a/packages/core/test/hardhat/financial-templates/expiring-multiparty/PricelessPositionManager.js b/packages/core/test/hardhat/financial-templates/expiring-multiparty/PricelessPositionManager.js index 50c57e54e1..2b11544ec2 100644 --- a/packages/core/test/hardhat/financial-templates/expiring-multiparty/PricelessPositionManager.js +++ b/packages/core/test/hardhat/financial-templates/expiring-multiparty/PricelessPositionManager.js @@ -2967,7 +2967,7 @@ describe("PricelessPositionManager", function () { assert.equal(sponsorsPosition.withdrawalRequestAmount.rawValue, 0); }); it("Optimistic oracle dispute lifecycle", async function () { - // Ensure that a disputed optimistic oracle price request moves the the lifecycle using the expected flow. + // Ensure that a disputed optimistic oracle price request moves the lifecycle using the expected flow. await collateral.methods.approve(pricelessPositionManager.options.address, toWei("100000")).send({ from: sponsor }); const numTokens = toWei("100"); diff --git a/packages/financial-templates-lib/test/clients/FinancialContractClient.js b/packages/financial-templates-lib/test/clients/FinancialContractClient.js index b6538e0805..183fa1092f 100644 --- a/packages/financial-templates-lib/test/clients/FinancialContractClient.js +++ b/packages/financial-templates-lib/test/clients/FinancialContractClient.js @@ -287,7 +287,7 @@ describe("FinancialContractClient.js", function () { ] ); - // Calling create from a new address will create a new position and this should be added the the client. + // Calling create from a new address will create a new position and this should be added the client. await financialContract.methods .create({ rawValue: convertDecimals("100") }, { rawValue: convertDecimals("45") }) .send({ from: sponsor2 }); diff --git a/packages/monitor-v2/src/monitor-og/SnapshotVerification.ts b/packages/monitor-v2/src/monitor-og/SnapshotVerification.ts index ede8a77347..5e8e43b335 100644 --- a/packages/monitor-v2/src/monitor-og/SnapshotVerification.ts +++ b/packages/monitor-v2/src/monitor-og/SnapshotVerification.ts @@ -466,7 +466,7 @@ const verifyProposalChoices = (proposal: SnapshotProposalGraphql, params: Monito return { verified: true }; } - // Verify that the the single-choice proposal has exactly one matching approval choice. + // Verify that the single-choice proposal has exactly one matching approval choice. const matchingChoices = proposal.choices.filter((choice) => params.approvalChoices.map((approvalChoice) => approvalChoice.toLowerCase()).includes(choice.toLowerCase()) ); diff --git a/packages/serverless-orchestration/src/ServerlessHub.js b/packages/serverless-orchestration/src/ServerlessHub.js index 9835a616c0..7aa8611128 100644 --- a/packages/serverless-orchestration/src/ServerlessHub.js +++ b/packages/serverless-orchestration/src/ServerlessHub.js @@ -329,7 +329,7 @@ hub.post("/", async (req, res) => { logger.debug({ at: "ServerlessHub", message: `Bot ${botName} succeeded`, output }); } - await delay(waitForLoggerDelay); // Wait a few seconds to be sure the the winston logs are processed upstream. + await delay(waitForLoggerDelay); // Wait a few seconds to be sure the winston logs are processed upstream. res .status(200) .send({ message: "All calls returned correctly", output: { errorOutputs, validOutputs, retriedOutputs } }); @@ -373,7 +373,7 @@ hub.post("/", async (req, res) => { }); } - await delay(waitForLoggerDelay); // Wait a few seconds to be sure the the winston logs are processed upstream. + await delay(waitForLoggerDelay); // Wait a few seconds to be sure the winston logs are processed upstream. res.status(500).send({ message: errorOutput instanceof Error ? "A fatal error occurred in the hub" : "Some spoke calls returned errors", output: errorOutput instanceof Error ? errorOutput.message : errorOutput, diff --git a/packages/serverless-orchestration/src/ServerlessSpoke.js b/packages/serverless-orchestration/src/ServerlessSpoke.js index f01cab8dac..7dd43f5cd0 100644 --- a/packages/serverless-orchestration/src/ServerlessSpoke.js +++ b/packages/serverless-orchestration/src/ServerlessSpoke.js @@ -71,7 +71,7 @@ spoke.post("/", async (req, res) => { childProcessIdentifier: _getChildProcessIdentifier(req), execResponse, }); - await delay(waitForLoggerDelay); // Wait a few seconds to be sure the the winston logs are processed upstream. + await delay(waitForLoggerDelay); // Wait a few seconds to be sure the winston logs are processed upstream. res.status(200).send({ message: "Process exited with no error", @@ -88,7 +88,7 @@ spoke.post("/", async (req, res) => { jsonBody: req.body, execResponse: execResponse instanceof Error ? execResponse.message : execResponse, }); - await delay(waitForLoggerDelay); // Wait a few seconds to be sure the the winston logs are processed upstream. + await delay(waitForLoggerDelay); // Wait a few seconds to be sure the winston logs are processed upstream. res.status(500).send({ message: "Process exited with error", childProcessIdentifier: _getChildProcessIdentifier(req),