Module 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::transfer_strategy

@title Transfer Strategy Module @author Aave @notice Implements functionality to transfer rewards using various strategies

use 0x1::account;
use 0x1::dispatchable_fungible_asset;
use 0x1::event;
use 0x1::fungible_asset;
use 0x1::object;
use 0x1::primary_fungible_store;
use 0x1::signer;
use 0x24e01fa503119e76bf9eea69eec59884fc3da82f5ea23bf5f20f8ce358a4606::acl_manage;
use 0xa888dd108ea636a234c973b8b72b9cadf0c7ae94d6f355c64dde9fdc275724ee::error_config;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::a_token_factory;
use 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::pool_token_logic;

Resource PullRewardsTransferStrategy

@notice An object representing the pull-reward transfer strategy @dev This strategy pulls rewards (as FungibleAsset) from a vault resource account to the recipient address.

#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
struct PullRewardsTransferStrategy has key

Struct EmergencyWithdrawal

@notice Emitted when an emergency withdrawal is performed @param caller The address of the caller @param token The address of the token @param to The address to which tokens are transferred @param amount The amount of tokens transferred

#[event]
struct EmergencyWithdrawal has drop, store

Function pull_rewards_transfer_strategy_get_incentives_controller

@notice Gets the incentives controller for a pull rewards transfer strategy @param strategy The pull rewards transfer strategy object @return The address of the incentives controller

#[view]
public fun pull_rewards_transfer_strategy_get_incentives_controller(strategy: object::Object<transfer_strategy::PullRewardsTransferStrategy>): address

Function pull_rewards_transfer_strategy_get_rewards_admin

@notice Gets the rewards admin for a pull rewards transfer strategy @param strategy The pull rewards transfer strategy object @return The address of the rewards admin

#[view]
public fun pull_rewards_transfer_strategy_get_rewards_admin(strategy: object::Object<transfer_strategy::PullRewardsTransferStrategy>): address

Function pull_rewards_transfer_strategy_get_rewards_vault

@notice Gets the rewards vault for a pull rewards transfer strategy @param strategy The pull rewards transfer strategy object @return The address of the rewards vault

#[view]
public fun pull_rewards_transfer_strategy_get_rewards_vault(strategy: object::Object<transfer_strategy::PullRewardsTransferStrategy>): address

Function create_pull_rewards_transfer_strategy

@notice Creates a new pull rewards transfer strategy @param sender The signer account of the sender @param constructor_ref The constructor reference @param rewards_admin The address of the rewards admin @param incentives_controller The address of the incentives controller @param rewards_vault The signer capability of the rewards vault @return The pull rewards transfer strategy object

public fun create_pull_rewards_transfer_strategy(sender: &signer, constructor_ref: &object::ConstructorRef, rewards_admin: address, incentives_controller: address, rewards_vault: account::SignerCapability): object::Object<transfer_strategy::PullRewardsTransferStrategy>

Function pull_rewards_transfer_strategy_emergency_withdrawal

@notice Performs an emergency withdrawal of rewards @param caller The signer account of the caller @param token The address of the token @param to The address to which tokens are transferred @param amount The amount of tokens to transfer @param strategy The pull rewards transfer strategy object

public fun pull_rewards_transfer_strategy_emergency_withdrawal(caller: &signer, token: address, to: address, amount: u256, strategy: object::Object<transfer_strategy::PullRewardsTransferStrategy>)

Function pull_rewards_transfer_strategy_perform_transfer

@notice Performs a transfer using a pull rewards transfer strategy @param incentives_controller The address of the incentives controller @param to The address to which rewards are transferred @param reward The address of the reward @param amount The amount of rewards to transfer @param strategy The pull rewards transfer strategy object @return Whether the transfer was successful

public(friend) fun pull_rewards_transfer_strategy_perform_transfer(incentives_controller: address, to: address, reward: address, amount: u256, strategy: object::Object<transfer_strategy::PullRewardsTransferStrategy>): bool