Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/contracts/mocks/MockNonRebasing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ contract MockNonRebasing {
}

function redeemOusd(address _vaultContract, uint256 _amount) public {
IVault(_vaultContract).redeem(_amount, 0);
IVault(_vaultContract).requestWithdrawal(_amount);
}

function approveFor(
Expand Down
40 changes: 0 additions & 40 deletions contracts/contracts/vault/VaultCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -623,46 +623,6 @@ abstract contract VaultCore is VaultInitializer {
return balance + queue.claimed - queue.queued;
}

/**
* @notice Deprecated. Use calculateRedeemOutput instead.
*/
function calculateRedeemOutputs(uint256 _amount)
external
view
returns (uint256[] memory outputs)
{
outputs = new uint256[](1);
outputs[0] = _calculateRedeemOutput(_amount);
}

/**
* @notice Calculate the amount of asset received on redeeming OToken.
* @param _amount Amount of OToken to redeem
* @return Amount of asset received
*/
function calculateRedeemOutput(uint256 _amount)
external
view
returns (uint256)
{
return _calculateRedeemOutput(_amount);
}

/**
* @dev Calculate the amount of asset received on redeeming OToken.
* @param _amount Amount of OToken to redeem
* @return Amount of asset received
*/
function _calculateRedeemOutput(uint256 _amount)
internal
view
virtual
returns (uint256)
{
// Redeem 1:1 with asynchronous withdrawals
return _amount.scaleBy(assetDecimals, 18);
}

/**
* @notice Adds WETH to the withdrawal queue if there is a funding shortfall.
* @dev is called from the Native Staking strategy when validator withdrawals are processed.
Expand Down
8 changes: 5 additions & 3 deletions contracts/deploy/deployActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ const configureVault = async () => {
await withConfirmation(
cVault.connect(sGovernor).setStrategistAddr(strategistAddr)
);

// Set withdrawal claim delay to 10m
await withConfirmation(
cVault.connect(sGovernor).setWithdrawalClaimDelay(10 * 60)
);
};

/**
Expand Down Expand Up @@ -331,9 +336,6 @@ const configureOETHVault = async () => {
cVault.connect(sGovernor).setStrategistAddr(strategistAddr)
);

// Redeem fee to 0
await withConfirmation(cVault.connect(sGovernor).setRedeemFeeBps(0));

// Allocate threshold
await withConfirmation(
cVault
Expand Down
2 changes: 0 additions & 2 deletions contracts/node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ main()
done
printf "\n"
echo "🟢 Node initialized"

FORK_NETWORK_NAME=$FORK_NETWORK_NAME FORK=true npx hardhat fund --amount 100000 --network localhost --accountsfromenv true &

# wait for subprocesses to finish
for job in `jobs -p`
Expand Down
4 changes: 2 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"lint:js": "eslint \"test/**/*.js\" \"tasks/**/*.js\" \"deploy/**/*.js\"",
"lint:sol": "solhint \"contracts/**/*.sol\"",
"prettier": "yarn run prettier:js && yarn run prettier:sol",
"prettier:check": "prettier -c \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"smoke/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
"prettier:js": "prettier --write \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"smoke/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
"prettier:check": "prettier -c \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
"prettier:js": "prettier --write \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
"prettier:sol": "prettier --write --plugin=prettier-plugin-solidity \"contracts/**/*.sol\"",
"test": "rm -rf deployments/hardhat && IS_TEST=true npx hardhat test",
"test:base": "rm -rf deployments/hardhat && UNIT_TESTS_NETWORK=base IS_TEST=true npx hardhat test",
Expand Down
206 changes: 0 additions & 206 deletions contracts/smoke/mintRedeemTest.js

This file was deleted.

Loading
Loading