爆发 BaofaBaofa Documentation
中文 Open the App

Frenzy Reference

The generated interface of BaofaFrenzy, the diamond that runs the capped and time-boxed Frenzy trading programme.

Updated 2026-11-04Contracts baofa-rewrite-2026-11-04-a727bfe

Generated from the compiled ABI: BaofaFrenzy.json · 39 function · 21 events · 49 errors

BaofaFrenzy holds the programme's parameters, the trader role, the per-coin and overall deployment counters, the vault and the end-of-window burn. Its write functions are callable by the Frenzy admin and trader only, except the burn, which anyone can call once a coin's window has ended. The tables are generated from the deployment package's ABI; the programme itself is described under Frenzy Mode.

Write Functions#

Function Inputs Returns Selector
acceptOwnership none none 0x79ba5097
attachAmmModule address amm none 0x38b86d8b
burnTokens address coin none 0xb237f7d4
configureFrenzyModules address core, address amm, address fees, address wrappedNative none 0xddf7103a
diamondCut (address,uint8,bytes4[])[] _diamondCut, address _init, bytes _calldata none 0x1f931c1c
frenzyBuy address coin, uint16 retainedReserveBps, uint128 referencePrice, uint16 toleranceBps none 0x71091cb9
frenzyBuyOnPool address pool, uint16 retainedReserveBps, uint128 referencePrice, uint16 toleranceBps none 0xf600b63f
frenzySell address coin, uint16 retainedReserveBps, uint128 referencePrice, uint16 toleranceBps none 0x56c184f6
frenzySellOnPool address pool, uint16 retainedReserveBps, uint128 referencePrice, uint16 toleranceBps none 0x260abeba
initializeFrenzyFeeRecipient uint8 index none 0x11dfcb2f
initializeFrenzyParams address admin, address trader none 0x0fbad01d
initializeFrenzyState address coin none 0x4b375c89
renounceOwnership none none 0x715018a6
rescueNative address to none 0xc8df4230
resetFrenzyDeployed uint8 quoteClass none 0x1f71fbf5
resetFrenzyParams none none 0xd3f8b63b
resumeFrenzyTrading none none 0x28e1f037
stopFrenzyTrading none none 0x3b563017
sweepFrenzyFees address quoteAsset none 0xf359698d
sweepFrenzyFeesAdmin address quoteAsset none 0xf1f49564
transferOwnership address _newOwner none 0xf2fde38b
updateFrenzyAdmin address newAdmin none 0xa355debe
updateFrenzyMaxPerSweep uint8 quoteClass, uint64 cap none 0x990a3561
updateFrenzyParams (uint16,uint32,uint32,uint64,uint64,uint64,uint64,uint8,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64) u none 0x146e5487
updateFrenzyTrader address newTrader none 0xa1034285
withdrawFrenzyVaultAdmin address quoteAsset, uint64 amount none 0x321f256d

Read Functions#

Function Inputs Returns Selector
facetAddress bytes4 _functionSelector address 0xcdffacc6
facetAddresses none address[] 0x52ef6b2c
facetFunctionSelectors address _facet bytes4[] 0xadfca15e
facets none (address,bytes4[])[] facets_ 0x7a0ed627
frenzyFeeRecipient uint8 index (bool,uint64[2],uint64[2]) 0xcd53f418
frenzyModules none address core, address amm, address fees, address wrappedNative, bool configured, bool initialised 0xd8bef52e
frenzyParams none (uint32,uint32,uint64,uint64[2],uint64[2],uint64[2],uint64[2],uint64[2],uint64[2],uint64[2],int128[2],uint8,uint64,uint64,uint32,address,address,bool) 0x3b4c3e8c
frenzyState address coin (bool,uint64,uint64,int128,int128,uint64,uint8,uint64) 0xe72cee17
frenzyVaultBalance address quoteAsset uint64 0x38a5be99
owner none address 0x8da5cb5b
pendingOwner none address 0xe30c3978
supportsInterface bytes4 _interfaceId bool 0x01ffc9a7
trackedCoinBalance address coin uint64 0x88604f03

Events#

Name Parameters Topic 0
DiamondCut (address,uint8,bytes4[])[] _diamondCut, address _init, bytes _calldata 0x8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673
FrenzyAdminUpdated address indexed oldAdmin, address indexed newAdmin 0x0159d3f077b32eb449597d5ab62339d15a3549801fb7588022f8399e37fcffa9
FrenzyAmmModuleAttached address amm 0xfd20f59b18ca075d57d6e3e93ff5dd9973cb54e28ff0b8d9f366b9b6239f83e2
FrenzyBurn address indexed coin, uint64 amount, uint64 timestamp 0x6f34218a5de31986a9efe42bfec4412e4a69aee6f886eee132ecd347cb417f61
FrenzyDeployedReset uint8 indexed quoteClass, int128 oldDeployed 0x353d06e9b495e6a91bf1eca81cd6d7dd9f2c70eb17eaca2925a275be79edaf70
FrenzyFeeRecipientInitialised uint8 indexed index 0x127e68cfa0302ef41cb1e6cfb84a325b4156e74563d4980c46890e86e2c089fb
FrenzyFeesSwept address indexed quoteAsset, uint64 amount, address indexed to, uint64 timestamp 0x91728e2c2cba52b58e8b387e7e123c4ee182ca775fb88bacde18c67d451ea132
FrenzyModulesConfigured address core, address amm, address fees, address wrappedNative 0x504d3b3a0124ae82f2592fe3bb7faf29910fa6539833e2d6afe16f9fd874c8e2
FrenzyParamsInitialised address admin, address trader 0x929ff1ba6e462850aada2f81966ddf95772d56588dde154a92210a0d5b63e11a
FrenzyParamsReset uint32 version 0x9d701b2aeebefb82790eb7d88e0f05f1962a68cfeb57a7c826f5e6dc42bb5c3c
FrenzyParamsUpdated uint32 oldVersion, uint32 newVersion, (uint32,uint32,uint64,uint64[2],uint64[2],uint64[2],uint64[2],uint64[2],uint64[2],uint64[2],int128[2],uint8,uint64,uint64,uint32,address,address,bool) params 0x28abe64ef643cb346e6a29b178e4e2bedda1c2c9629fbfa19873d09b973f0916
FrenzyStateInitialised address indexed coin, uint64 createdAt, uint64 endTimestamp 0x87b24edaf450ac36ef900ded33959d841bfd31c324176a435e36033a267c5edf
FrenzySweepCapUpdated uint8 indexed quoteClass, uint64 oldCap, uint64 newCap 0x8f380a3cc29fd26e81eb9ecf87d3e5fc47212ea05eebfe05b15c1d53ac082022
FrenzyTrade address indexed coin, address indexed quoteAsset, bool indexed isBuy, (address,uint64,uint64,uint64,uint64,int128,int128,int128,uint64,uint64,uint64,uint64,uint64,uint64,uint32,uint16) data 0xb346ee0d9ea39d22cff841ebe4a549eae1865cd6b8a2b7117682fda8ddd4bb1e
FrenzyTraderUpdated address indexed oldTrader, address indexed newTrader 0x39a5b18de604dd60997787df0f5469db68e90b08da53f6c6cad80eefc74f623e
FrenzyTradingResumed none 0xf38ced65e5d31040bb7aa10957238c5d50829d6b7873c95ac5fb00a717bd7a2b
FrenzyTradingStopped none 0x9025479c931d9ce4d4e50f7b757a8b02c549527bb483ca8a6d8721596681e164
FrenzyVaultWithdrawn address indexed quoteAsset, uint64 amount, address indexed admin, uint64 timestamp 0x9eb636f8e1caae980a26dc7645c348bfc8cedd37d97d9196cd94339ef5a6d450
NativeRescued address indexed to, uint256 amount 0xe3eb98b7fe2a0c1d490b92af73eeae611e9b00ab3c3f70b20bd7bb43f67a0f43
OwnershipTransferred address indexed previousOwner, address indexed newOwner 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0
OwnershipTransferStarted address indexed previousOwner, address indexed newOwner 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700

Errors#

Name Parameters Selector
AlreadyConfigured none 0x11b61b6a
CannotAddFunctionToDiamondThatAlreadyExists bytes4 selector 0xebbf5d07
CannotAddSelectorsToZeroAddress bytes4[] selectors 0x0ae3681c
CannotRemoveFunctionThatDoesNotExist bytes4 selector 0x7a08a22d
CannotRemoveImmutableFunction bytes4 selector 0x6fafeb08
CannotReplaceFunctionsFromFacetWithZeroAddress bytes4[] selectors 0xcd98a96f
CannotReplaceFunctionThatDoesNotExists bytes4 selector 0x7479f939
CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet bytes4 selector 0x358d9d1a
CannotReplaceImmutableFunction bytes4 selector 0x520300da
CoinRiskExceeded none 0xd091435f
CoreCallMathOverflow none 0x06565bab
CoreCallSlippage none 0x017daaad
FeeRecipientAlreadyInitialised none 0xdfc8d775
FrenzyCoinNotWithdrawable none 0x523aa2da
FrenzyModeEnded none 0x11ce933a
FrenzyModeNotEnded none 0xde8f8774
IncorrectFacetCutAction uint8 action 0x7fe9a41e
InitializationFunctionReverted address init, bytes data 0x192105d7
InsufficientVault none 0xdba22ba8
InvalidAdmin none 0xb5eba9f0
InvalidQuoteClass none 0x5053983c
InvalidRetainedBps none 0x46e79623
MathOverflow none 0x9d565d4e
MaxFeeRecipientsExceeded none 0xad6fbf97
NativeTransferFailed none 0xf4b3b1bc
NoBytecodeAtAddress address target, string message 0x919834b9
NoSelectorsProvidedForFacet address facet 0x0a7d736a
NotContractOwner address caller, address owner 0xff4127cb
NothingToRescue none 0x00f6b210
NotInitialised none 0x8432e5a2
NotPendingOwner address caller, address pendingOwner 0x3c29cbb6
OverallRiskExceeded none 0x626d70c7
Overflow none 0x35278d12
QuoteReservesTooLow none 0xb7a42146
ReentrancyGuardReentrantCall none 0x3ee5aeb5
RemoveFacetAddressMustBeZeroAddress address facet 0xd091bc81
RescueFailed address to, uint256 amount 0xd68f8239
SafeERC20FailedOperation address token 0x5274afe7
StateAlreadyInitialised none 0xcf325204
SwapCallMathOverflow none 0xd3d761b4
SweepFeeRateLimit none 0x1d1de3ab
TradeRateLimit none 0xdf132845
TradingPaused none 0x02b874a6
Truncation none 0xb60ad24e
UnauthorizedCaller none 0x5c427cd9
UnknownCoin none 0x6c3ce450
UnknownPool none 0xf7139e33
WithdrawRateLimit none 0x655729fa
ZeroAddress none 0xd92e233d

Baofa Documentation. Built from the launch contracts package baofa-rewrite-2026-11-04-a727bfe · 2026-11-04

baofa.fun · X @baofadotfun