Expand description
FeeManager interface for managing gas fee collection and distribution.
IMPORTANT: FeeManager inherits from TIPFeeAMM and shares the same storage layout. This means:
- FeeManager has all the functionality of TIPFeeAMM (pool management, swaps, liquidity operations)
- Both contracts use the same storage slots for AMM data (pools, reserves, liquidity balances)
- FeeManager extends TIPFeeAMM with additional storage slots (4-15) for fee-specific data
- When deployed, FeeManager IS a TIPFeeAMM with additional fee management capabilities
Storage layout:
- Slots 0-3: TIPFeeAMM storage (pools, pool exists, liquidity data)
- Slots 4+: FeeManager-specific storage (validator tokens, user tokens, collected fees, etc.)
interface IFeeManager {
struct FeeInfo { uint128 amount; bool hasBeenSet; }
function userTokens(address user) external view returns (address);
function validatorTokens(address validator) external view returns (address);
function setUserToken(address token) external;
function setValidatorToken(address token) external;
function getFeeTokenBalance(address sender, address validator) external view returns (address, uint256);
function executeBlock() external;
event UserTokenSet(address indexed user, address indexed token);
event ValidatorTokenSet(address indexed validator, address indexed token);
error OnlyValidator();
error OnlySystemContract();
error InvalidToken();
error PoolDoesNotExist();
error InsufficientFeeTokenBalance();
error InternalError();
error CannotChangeWithinBlock();
error CannotChangeWithPendingFees();
error TokenPolicyForbids();
}Modules§
- abi
- Contains dynamic ABI definitions for this contract.
Structs§
- Cannot
Change With Pending Fees - Custom error with signature
CannotChangeWithPendingFees()and selector0x23b88650. - Cannot
Change Within Block - Custom error with signature
CannotChangeWithinBlock()and selector0x82946ea1. - FeeInfo
- IFee
Manager Instance - A
IFeeManagerinstance. - Insufficient
FeeToken Balance - Custom error with signature
InsufficientFeeTokenBalance()and selector0x04ae7426. - Internal
Error - Custom error with signature
InternalError()and selector0xfe835e35. - Invalid
Token - Custom error with signature
InvalidToken()and selector0xc1ab6dc1. - Only
System Contract - Custom error with signature
OnlySystemContract()and selector0xc7e4f419. - Only
Validator - Custom error with signature
OnlyValidator()and selector0x1aa1e815. - Pool
Does NotExist - Custom error with signature
PoolDoesNotExist()and selector0x9c8787c0. - Token
Policy Forbids - Custom error with signature
TokenPolicyForbids()and selector0xa92399ec. - User
Token Set - Event with signature
UserTokenSet(address,address)and selector0xabc7758d4ca817ce0d125eb731121a1304c36077b791253be835b95472368856. - Validator
Token Set - Event with signature
ValidatorTokenSet(address,address)and selector0x6eb51f8f7e857fb2caf4257da4219a86adeed7128412764e41334968165f5f0c. - execute
Block Call - Function with signature
executeBlock()and selector0xb306cc70. - execute
Block Return - Container type for the return parameters of the
executeBlock()function. - getFee
Token Balance Call - Function with signature
getFeeTokenBalance(address,address)and selector0x7f5bb383. - getFee
Token Balance Return - Container type for the return parameters of the
getFeeTokenBalance(address,address)function. - setUser
Token Call - Function with signature
setUserToken(address)and selector0xe7897444. - setUser
Token Return - Container type for the return parameters of the
setUserToken(address)function. - setValidator
Token Call - Function with signature
setValidatorToken(address)and selector0xb60d2ddb. - setValidator
Token Return - Container type for the return parameters of the
setValidatorToken(address)function. - user
Tokens Call - Function with signature
userTokens(address)and selector0xed498fa8. - user
Tokens Return - Container type for the return parameters of the
userTokens(address)function. - validator
Tokens Call - Function with signature
validatorTokens(address)and selector0x6dc54a7a. - validator
Tokens Return - Container type for the return parameters of the
validatorTokens(address)function.
Enums§
- IFee
Manager Calls - Container for all the
IFeeManagerfunction calls. - IFee
Manager Errors - Container for all the
IFeeManagercustom errors. - IFee
Manager Events - Container for all the
IFeeManagerevents.
Functions§
- new
- Creates a new wrapper around an on-chain
IFeeManagercontract instance.