Skip to content

Commit 1cd84a7

Browse files
committed
Changed OETH collectAndRebase to just collect while rebase is paused.
Fixed prettier
1 parent 1c8c6d9 commit 1cd84a7

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

contracts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
"lint": "yarn run lint:js && yarn run lint:ts && yarn run lint:sol",
3434
"lint:js": "eslint \"test/**/*.js\" \"tasks/**/*.js\" \"deploy/**/*.js\"",
3535
"lint:sol": "solhint \"contracts/**/*.sol\"",
36-
"lint:ts": "eslint \"tasks/actions/**/*.ts\" \"tasks/lib/**/*.ts\" \"cron/**/*.ts\"",
36+
"lint:ts": "eslint \"tasks/actions/**/*.ts\" \"tasks/lib/**/*.ts\"",
3737
"prettier": "yarn run prettier:js && yarn run prettier:ts && yarn run prettier:sol",
3838
"prettier:check": "prettier -c \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
3939
"prettier:js": "prettier --write \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
4040
"prettier:sol": "prettier --write --plugin=prettier-plugin-solidity \"contracts/**/*.sol\"",
41-
"prettier:ts": "prettier --write \"tasks/actions/**/*.ts\" \"tasks/lib/**/*.ts\" \"cron/**/*.ts\"",
41+
"prettier:ts": "prettier --write \"tasks/actions/**/*.ts\" \"tasks/lib/**/*.ts\"",
4242
"typecheck": "tsc --noEmit",
4343
"test": "rm -rf deployments/hardhat && IS_TEST=true npx hardhat test",
4444
"test:base": "rm -rf deployments/hardhat && UNIT_TESTS_NETWORK=base IS_TEST=true npx hardhat test",

contracts/tasks/actions/otokenOusdOethRebase.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const GAS_MULTIPLIER = 1.1;
55

66
action({
77
name: "otokenOusdOethRebase",
8-
description:
9-
"Rebase both OETH (collectAndRebase) and OUSD (rebase) on mainnet",
8+
description: "Collect OETH and rebase OUSD on mainnet",
109
chains: [1],
1110
run: async ({ signer, log }) => {
1211
const ethers = hre.ethers;
@@ -23,16 +22,16 @@ action({
2322
const oethDripperWithSigner = oethDripper.connect(signer);
2423
const ousdVaultWithSigner = ousdVault.connect(signer);
2524

26-
// OETH collectAndRebase with gas estimation + 10% buffer
27-
log.info("Estimating gas for OETH collectAndRebase");
28-
const oethGas = await oethDripperWithSigner.estimateGas.collectAndRebase();
25+
// OETH collect with gas estimation + 10% buffer
26+
log.info("Estimating gas for OETH collect");
27+
const oethGas = await oethDripperWithSigner.estimateGas.collect();
2928
const oethGasLimit = oethGas.mul(Math.floor(GAS_MULTIPLIER * 100)).div(100);
30-
const oethTx = await oethDripperWithSigner.collectAndRebase({
29+
const oethTx = await oethDripperWithSigner.collect({
3130
gasLimit: oethGasLimit,
3231
});
3332
await logTxDetails(
3433
oethTx,
35-
`collectAndRebase (gasLimit: ${oethGasLimit.toString()})`
34+
`collect (gasLimit: ${oethGasLimit.toString()})`
3635
);
3736

3837
// OUSD rebase with gas estimation + 10% buffer

contracts/tasks/lib/action.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ export function createActionHandler(
8383
}
8484

8585
await run({ signer, chainId, networkName, log, args: taskArgs });
86-
log.info(
87-
`Completed in ${((Date.now() - startTime) / 1000).toFixed(1)}s`
88-
);
86+
log.info(`Completed in ${((Date.now() - startTime) / 1000).toFixed(1)}s`);
8987
} catch (err: any) {
9088
log.error(`${err?.name ?? "Error"}: ${err?.message ?? String(err)}`);
9189
if (err?.stack) log.error(err.stack);

0 commit comments

Comments
 (0)