Implementation
Initializing a Token Manager is simple. We have an approved, audited collection of managers available to deploy. This example will run through the deployment and initialization of a RevenueManager, and subsequent deposit of flaunched tokens.
1. Initialize Manager
// Contract addresses are valid for Base Sepolia
TreasuryManagerFactory factory = TreasuryManagerFactory(0xd2f3c6185e06925dcbe794c6574315b2202e9ccd);
address manager = factory.deployAndInitializeManager({
_managerImplementation: 0x1216c723853dac0449c01d01d6e529d751d9c0c8, // RevenueManager
_owner: address(this),
_data: abi.encode(
RevenueManager.InitializeParams({
protocolRecipient: payable(address(this)),
protocolFee: 1000 // 10%
})
)
});Fields
2. Deposit Token(s)
Once your Token Manager is initialized, you can deposit Flaunch tokens into it.
Fields
3. Flaunch Tokens Directly to Manager
Rather than depositing an existing Flaunch ERC721, it's possible to transfer it directly to the manager when flaunching. When flaunching via the Flaunch Zap, the caller can specify TreasuryManagerParams in the call.
This will result in the flaunched token being sent directly to the manager; for a simplified example:
4. ???
5. Profit!
Last updated
Was this helpful?