CcaLaunchFactory
Creates LaunchToken + CCA/LBP distribution with invite gating and fee hook.
Constants
DEFAULT_POOL_LP_FEE
uint24 public constant DEFAULT_POOL_LP_FEE = 1_000
DEFAULT_HOOK_FEE
uint24 public constant DEFAULT_HOOK_FEE = 4_000
DEFAULT_TICK_SPACING
int24 public constant DEFAULT_TICK_SPACING = 60
DEFAULT_AUCTION_SUPPLY_BPS
uint16 public constant DEFAULT_AUCTION_SUPPLY_BPS = 5_000
DEFAULT_AUCTION_TICK_SPACING
uint256 public constant DEFAULT_AUCTION_TICK_SPACING = 100 << FixedPoint96.RESOLUTION
DEFAULT_FLOOR_PRICE
uint256 public constant DEFAULT_FLOOR_PRICE = 1000 << FixedPoint96.RESOLUTION
launcher
ILiquidityLauncher public immutable launcher
lbpStrategy
ILBPStrategy public immutable lbpStrategy
ccaFactory
IDistributorFactory public immutable ccaFactory
invites
InviteRegistry public immutable invites
distributor
FeeDistributor public immutable distributor
feeHook
LaunchFeeHook public immutable feeHook
positionRecipient
address public immutable positionRecipient
State Variables
launchCount
uint256 public launchCount
launches
mapping(uint256 => Launch) public launches
launchIdByToken
mapping(address => uint256) public launchIdByToken
launchIdByAuction
mapping(address => uint256) public launchIdByAuction
Functions
constructor
constructor(
ILiquidityLauncher launcher_,
ILBPStrategy lbpStrategy_,
IDistributorFactory ccaFactory_,
InviteRegistry invites_,
FeeDistributor distributor_,
LaunchFeeHook feeHook_,
address positionRecipient_
) ;
createLaunch
function createLaunch(CreateParams calldata params)
external
returns (uint256 launchId, address token, address auction);
getLaunch
function getLaunch(uint256 launchId) external view returns (Launch memory);
_buildSteps
function _buildSteps(uint64 auctionBlocks) internal pure returns (bytes memory steps);
_poolKey
function _poolKey(address currency, address token, uint24 fee, address hook)
internal
pure
returns (PoolKey memory key);
Events
LaunchCreated
event LaunchCreated(
uint256 indexed launchId,
address indexed creator,
address token,
address auction,
uint64 endBlock,
uint128 minRaise,
uint24 poolLpFee,
uint24 hookFee
);
Errors
EmptyName
error EmptyName();
InvalidDuration
error InvalidDuration();
InvalidSupplyBps
error InvalidSupplyBps();
InvalidFee
error InvalidFee();
NeedInvites
error NeedInvites();
Structs
Metadata
struct Metadata {
string name;
string symbol;
string description;
string image;
string website;
string twitter;
string telegram;
}
CreateParams
struct CreateParams {
Metadata metadata;
uint64 auctionBlocks;
uint128 minRaise;
uint16 auctionSupplyBps;
uint24 poolLpFee;
uint24 hookFee;
bytes32 salt;
bytes32[] inviteCodes;
}
Launch
struct Launch {
address creator;
address token;
address auction;
uint64 startBlock;
uint64 endBlock;
uint64 claimBlock;
uint128 minRaise;
uint24 poolLpFee;
uint24 hookFee;
}