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
4 changes: 2 additions & 2 deletions contracts/contracts/vault/OETHVaultCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract OETHVaultCore is VaultCore {
*/
function cacheWETHAssetIndex() external onlyGovernor {
uint256 assetCount = allAssets.length;
for (uint256 i = 0; i < assetCount; ++i) {
for (uint256 i; i < assetCount; ++i) {
if (allAssets[i] == weth) {
wethAssetIndex = i;
break;
Expand Down Expand Up @@ -268,7 +268,7 @@ contract OETHVaultCore is VaultCore {
_addWithdrawalQueueLiquidity();

amounts = new uint256[](_requestIds.length);
for (uint256 i = 0; i < _requestIds.length; ++i) {
for (uint256 i; i < _requestIds.length; ++i) {
amounts[i] = _claimWithdrawal(_requestIds[i]);
totalAmount += amounts[i];
}
Expand Down
7 changes: 2 additions & 5 deletions contracts/contracts/vault/VaultCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ contract VaultCore is VaultInitializer {
using StableMath for uint256;
/// @dev max signed int
uint256 internal constant MAX_INT = 2**255 - 1;
/// @dev max un-signed int
uint256 internal constant MAX_UINT =
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

/**
* @dev Verifies that the rebasing is not paused.
Expand Down Expand Up @@ -440,7 +437,7 @@ contract VaultCore is VaultInitializer {
returns (uint256 value)
{
uint256 assetCount = allAssets.length;
for (uint256 y = 0; y < assetCount; ++y) {
for (uint256 y; y < assetCount; ++y) {
address assetAddr = allAssets[y];
uint256 balance = IERC20(assetAddr).balanceOf(address(this));
if (balance > 0) {
Expand Down Expand Up @@ -472,7 +469,7 @@ contract VaultCore is VaultInitializer {
{
IStrategy strategy = IStrategy(_strategyAddr);
uint256 assetCount = allAssets.length;
for (uint256 y = 0; y < assetCount; ++y) {
for (uint256 y; y < assetCount; ++y) {
address assetAddr = allAssets[y];
if (strategy.supportsAsset(assetAddr)) {
uint256 balance = strategy.checkBalance(assetAddr);
Expand Down