Module 0xd5044d9f4b80910ef7b8910a68d2ac257d14319fb9315ddce1ca5190878bc8ea::collector
@title Collector Module @author Aave @notice Implements functionality to manage collected fees in the protocol
- Resource
CollectorData
- Constants
- Function
is_funds_admin
- Function
collector_address
- Function
get_collected_fees
- Function
withdraw
use 0x1::account;
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 CollectorData
@notice Data structure to store the collector's resource account capability
struct CollectorData has key
Constants
@notice Collector name for resource account creation
const COLLECTOR_NAME: vector<u8> = [65, 65, 86, 69, 95, 67, 79, 76, 76, 69, 67, 84, 79, 82];
Function is_funds_admin
@notice Checks if an account is a funds admin @param account The address to check @return True if the account is a funds admin, false otherwise
#[view]
public fun is_funds_admin(account: address): bool
Function collector_address
@notice Returns the address of the collector @return The address of the collector resource account
#[view]
public fun collector_address(): address
Function get_collected_fees
@notice Gets the amount of collected fees for a specific asset @param asset The address of the asset to check @return The amount of collected fees
#[view]
public fun get_collected_fees(asset: address): u64
Function withdraw
@notice Withdraws collected fees from the collector @dev Only callable by funds admin @param sender The signer account of the caller @param asset The address of the asset to withdraw @param receiver The address that will receive the withdrawn assets @param amount The amount to withdraw
public fun withdraw(sender: &signer, asset: address, receiver: address, amount: u64)