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
3 changes: 1 addition & 2 deletions aave-core/aave-config/sources/reserve_config.move
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ module aave_config::reserve_config {
/// bit 152-167 liquidation protocol fee
/// bit 168-175 eMode category
/// bit 212-251 debt ceiling for isolation mode with (ReserveConfigurationMap::DEBT_CEILING_DECIMALS) decimals
/// bit 252: virtual accounting is enabled for the reserve
/// bit 253-255 unused
/// bit 252-255 unused
data: u256
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ module aave_mock_underlyings::mock_underlying_token_factory {
const ENOT_OWNER: u64 = 1;
/// @notice Token with this address already exists
const E_TOKEN_ALREADY_EXISTS: u64 = 2;
/// @notice Account does not exist
const E_ACCOUNT_NOT_EXISTS: u64 = 3;

// Structs
#[resource_group_member(group = aptos_framework::object::ObjectGroup)]
Expand Down
21 changes: 8 additions & 13 deletions aave-core/sources/aave-logic/flashloan_logic.move
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ module aave_pool::flashloan_logic {
vector::push_back(&mut flashloans, flashloan_vars);
};

let flashloan_receipts = vector::map<FlashLoanLocalVars, ComplexFlashLoansReceipt>(
vector::map<FlashLoanLocalVars, ComplexFlashLoansReceipt>(
flashloans,
|flashloan| {
let flashloan: FlashLoanLocalVars = flashloan;
Expand All @@ -588,9 +588,7 @@ module aave_pool::flashloan_logic {
interest_rate_mode
)
}
);

flashloan_receipts
)
}

/// @notice Executes a simple flash loan for a single asset
Expand Down Expand Up @@ -642,15 +640,12 @@ module aave_pool::flashloan_logic {
transfer_underlying_to(&flashloan);

// create and return the flashloan receipt
let flashloan_receipt =
create_simple_flashloan_receipt(
&flashloan,
initiator_address,
referral_code,
receiver_address
);

flashloan_receipt
create_simple_flashloan_receipt(
&flashloan,
initiator_address,
referral_code,
receiver_address
)
}

/// @notice Creates a receipt for a simple flash loan
Expand Down
10 changes: 4 additions & 6 deletions aave-core/sources/aave-periphery/emission_manager.move
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ module aave_pool::emission_manager {
pull_rewards_transfer_strategy: Object<PullRewardsTransferStrategy>
) acquires EmissionManagerData {
only_emission_admin(caller, reward);

let rewards_controller_address = get_rewards_controller_ensure_defined();
// sanity check on the strategy
assert!(
transfer_strategy::pull_rewards_transfer_strategy_get_incentives_controller(
pull_rewards_transfer_strategy
) == get_rewards_controller_ensure_defined(),
) == rewards_controller_address,
error_config::get_eincentives_controller_mismatch()
);

rewards_controller::set_pull_rewards_transfer_strategy(
reward,
object::object_address(&pull_rewards_transfer_strategy),
get_rewards_controller_ensure_defined()
rewards_controller_address
);
}

Expand Down Expand Up @@ -427,9 +427,7 @@ module aave_pool::emission_manager {
);
};

rewards_controller::configure_assets(
config, get_rewards_controller_ensure_defined()
);
rewards_controller::configure_assets(config, rewards_controller);
}

/// @notice Checks if a reward exists in the emission manager
Expand Down
16 changes: 3 additions & 13 deletions aave-core/sources/aave-periphery/rewards_controller.move
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,6 @@ module aave_pool::rewards_controller {
};
};

if (total_rewards == 0) {
return 0
};

total_rewards
}

Expand Down Expand Up @@ -1080,17 +1076,11 @@ module aave_pool::rewards_controller {
let user_asset_balances = vector[];
for (i in 0..vector::length(&assets)) {
let asset = *vector::borrow(&assets, i);

let asset_metadata = object::address_to_object<Metadata>(asset);
let total_supply =
option::destroy_with_default(
fungible_asset::supply(object::address_to_object<Metadata>(asset)),
0
);
option::destroy_with_default(fungible_asset::supply(asset_metadata), 0);

let user_balance =
primary_fungible_store::balance(
user, object::address_to_object<Metadata>(asset)
);
let user_balance = primary_fungible_store::balance(user, asset_metadata);

vector::push_back(
&mut user_asset_balances,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ module aave_pool::ui_pool_data_provider_v3 {
let atoken_account_address =
a_token_factory::get_token_account_address(a_token_address);

let _underlying_asset_metadata =
object::address_to_object<Metadata>(underlying_asset);

let available_liquidity =
if (primary_fungible_store::primary_store_exists(
atoken_account_address, underlying_token
Expand Down
Loading