The Clanker
contract is designed to facilitate the deployment and management of tokens, including their liquidity pools and associated rewards. It allows the owner to configure various parameters, deploy new tokens, and manage admin roles while ensuring security through ownership checks and reentrancy guards. The contract also provides functionalities for users to claim rewards and retrieve information about deployed tokens.
Token Deployment and Configuration:
deployToken
: Deploys a new token and configures its liquidity pool, validating the deployment configuration and optionally vaulting a portion of the token. Emits the TokenCreated
event with details of the new token.deployTokenWithCustomTeamRewardRecipient
: Similar to deployToken
, but allows specifying a custom team reward recipient. It verifies admin authorization and sets the team reward recipient after deploying the token.deployTokenZeroSupply
: Deploys a token with zero initial supply on a non-originating chain, ensuring the call is made from the correct chain.Contract Management:
initialize
: Sets up core parameters for the contract, including Uniswap and liquidity locker settings, and enables contract functionalities by setting deprecated
to false
.setAdmin
: Allows the owner to set or update the admin status of a specified address, emitting the SetAdmin
event.setDeprecated
: Enables the owner to set the deprecation status of the contract, emitting the SetDeprecated
event.updateLiquidityLocker
: Updates the address of the liquidity locker, emitting the LiquidityLockerUpdated
event.updateVault
: Updates the address of the vault, emitting the VaultUpdated
event.transferOwnership
: Transfers ownership of the contract to a new address, emitting the OwnershipTransferred
event.renounceOwnership
: Allows the current owner to relinquish ownership, emitting the OwnershipTransferred
event.Reward Management:
claimRewards
: Allows users to claim rewards associated with a specific token by calling the collectRewards
function from the ILpLockerv2
interface.