Kitchen
0x8074ba9503fb5fa409ce19c8ca5341a3fe378e24
Verification
Verified
v0.8.30+commit.73712a01
Type
Contract
10,406 bytes
ABI entries
82
14 read · 22 write
License
none
Contract information
- Address
- 0x8074ba9503fb5fa409ce19c8ca5341a3fe378e24
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.30+commit.73712a01
- Optimization
- Enabled
- Creator
- 0x7B7DE29bc1…C6b0DaB694
- Creation tx
- 0x96499a7fac…6519136c99
Token
Not a token
This contract does not expose ERC-20 metadata.
Read contract (14)
BOOTSTRAP_WINDOW() → uint256
TIMELOCK_DELAY() → uint256
TIMELOCK_GRACE_PERIOD() → uint256
deployedAt() → uint256
deployer() → address
factory() → address
getConfig() → address, address, address, address, address, address
graduation() → address
kitchenBondingCurve() → address
oracle() → address
owner() → address
storageContract() → address
timelockQueue(bytes32) → uint256
validateGraduationEthRange(uint256, uint256, uint256, uint256) → bool, uint256, uint256, uint256
Events (44)
AdvancedDecayProgressAirdropExecutedAntiPvpCooldownUpdatedAuthorizedCallerUpdatedBondingCurveUpdatedBuyClaimModeEnabledClaimedCurveGraduationTriggeredCurveSyncDeployerUpdatedDevFeePaidDevFeeReceivedDevPurchasedUpdatedEmergencyWithdrawFactoryUpdatedGlobalNonceIncrementedGlobalNonceResetGraduationBoundsUpdatedGraduationStipendPaidGraduationUpdatedLPBurnedLPFinalizedLaunchBlockSetLockedLPManualSyncOracleUpdatedOvershootAcceptedOvershootRejectedOwnershipTransferredSellStorageUpdatedTaxAppliedTimelockExecutedTimelockQueuedTokenCreatedTokenDeployedTokenGraduatedTreasuryCutUpdatedTreasuryFeePaidTreasuryUpdatedVanitySaltStoredVanityWriterAuthorizedVolumeResetPeriodUpdated
ABI
[
{
"inputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
},
{
"internalType": "address",
"name": "_kitchenBondingCurve",
"type": "address"
},
{
"internalType": "address",
"name": "_graduation",
"type": "address"
},
{
"internalType": "address",
"name": "_storage",
"type": "address"
},
{
"internalType": "address",
"name": "_deployer",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "currentTax",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "currentMaxTx",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "currentMaxWallet",
"type": "uint256"
}
],
"name": "AdvancedDecayProgress",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalRecipients",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "AirdropExecuted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "newCooldown",
"type": "uint256"
}
],
"name": "AntiPvpCooldownUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "status",
"type": "bool"
}
],
"name": "AuthorizedCallerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldBondingCurve",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newBondingCurve",
"type": "address"
}
],
"name": "BondingCurveUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethIn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokensOut",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "Buy",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "virtualToken",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "enabled",
"type": "bool"
}
],
"name": "ClaimModeEnabled",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "realToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Claimed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "targetCap",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "blockTime",
"type": "uint256"
}
],
"name": "CurveGraduationTriggered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "virtualEth",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "circulatingSupply",
"type": "uint256"
}
],
"name": "CurveSync",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldDeployer",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newDeployer",
"type": "address"
}
],
"name": "DeployerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "payee",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DevFeePaid",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "feeReceiver",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DevFeeReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newTotal",
"type": "uint256"
}
],
"name": "DevPurchasedUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "EmergencyWithdraw",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldFactory",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newFactory",
"type": "address"
}
],
"name": "FactoryUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "oldNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newNonce",
"type": "uint256"
}
],
"name": "GlobalNonceIncremented",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "oldNonce",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newNonce",
"type": "uint256"
}
],
"name": "GlobalNonceReset",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "minUsd",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxUsd",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "overshootBps",
"type": "uint256"
}
],
"name": "GraduationBoundsUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "stipend",
"type": "uint256"
}
],
"name": "GraduationStipendPaid",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldGraduation",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newGraduation",
"type": "address"
}
],
"name": "GraduationUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "burnedAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"name": "LPBurned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "locker",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethAdded",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokensAdded",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "liquidity",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "finalPriceWei",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokensBurned",
"type": "uint256"
}
],
"name": "LPFinalized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "LaunchBlockSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "locker",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lpTokens",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "unlockTime",
"type": "uint256"
}
],
"name": "LockedLP",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethPool",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "supply",
"type": "uint256"
}
],
"name": "ManualSync",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldOracle",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOracle",
"type": "address"
}
],
"name": "OracleUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethIn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "allowedOvershoot",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "actualOvershoot",
"type": "uint256"
}
],
"name": "OvershootAccepted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethIn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "allowedOvershoot",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "actualOvershoot",
"type": "uint256"
}
],
"name": "OvershootRejected",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokensSold",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethOut",
"type": "uint256"
}
],
"name": "Sell",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldStorage",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newStorage",
"type": "address"
}
],
"name": "StorageUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "taxWallet",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "TaxApplied",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "actionHash",
"type": "bytes32"
}
],
"name": "TimelockExecuted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "actionHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "executeAfter",
"type": "uint256"
}
],
"name": "TimelockQueued",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenType",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "isAdvanced",
"type": "bool"
},
{
"indexed": false,
"internalType": "string",
"name": "name",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "curveStartingTax",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxWallet",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxTx",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "gradPoolTarget",
"type": "uint256"
}
],
"name": "TokenCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "isTax",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "isHeaderless",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "v2TaxRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "isSuperSimple",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "isZeroSimple",
"type": "bool"
}
],
"name": "TokenDeployed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "finalSupply",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "ethPool",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "marketCapReached",
"type": "uint256"
}
],
"name": "TokenGraduated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "oldBps",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBps",
"type": "uint256"
}
],
"name": "TreasuryCutUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "TreasuryFeePaid",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldTreasury",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newTreasury",
"type": "address"
}
],
"name": "TreasuryUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
}
],
"name": "VanitySaltStored",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "writer",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "status",
"type": "bool"
}
],
"name": "VanityWriterAuthorized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "newPeriod",
"type": "uint256"
}
],
"name": "VolumeResetPeriodUpdated",
"type": "event"
},
{
"inputs": [],
"name": "BOOTSTRAP_WINDOW",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TIMELOCK_DELAY",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TIMELOCK_GRACE_PERIOD",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "authorizeAllModules",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "buyToken",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "minTokensOut",
"type": "uint256"
}
],
"name": "buyTokenWithMinOut",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "realToken",
"type": "address"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "enum KitchenStorageCore.TokenType",
"name": "tokenType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lpLockDuration",
"type": "uint256"
},
{
"internalType": "bool",
"name": "burnLP",
"type": "bool"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"internalType": "bool",
"name": "removeHeader",
"type": "bool"
}
],
"internalType": "struct IKitchenFactory.BasicParamsAdvanced",
"name": "b",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "curveStartingTax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveTaxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWallet",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWalletDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTx",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTxDuration",
"type": "uint256"
}
],
"internalType": "struct IKitchenFactory.StaticCurveParams",
"name": "s",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "taxDropStep",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "taxDropInterval",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxWalletStep",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxWalletInterval",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTxStep",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTxInterval",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limitRemovalTime",
"type": "uint256"
}
],
"internalType": "struct IKitchenFactory.AdvancedParamsInput",
"name": "a",
"type": "tuple"
},
{
"internalType": "address[4]",
"name": "taxWallets",
"type": "address[4]"
},
{
"internalType": "uint8[4]",
"name": "taxSplits",
"type": "uint8[4]"
}
],
"name": "createAdvancedToken",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "enum KitchenStorageCore.TokenType",
"name": "tokenType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lpLockDuration",
"type": "uint256"
},
{
"internalType": "bool",
"name": "burnLP",
"type": "bool"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"internalType": "bool",
"name": "removeHeader",
"type": "bool"
}
],
"internalType": "struct IKitchenFactory.BasicParamsAdvanced",
"name": "b",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "curveStartingTax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveTaxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWallet",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWalletDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTx",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTxDuration",
"type": "uint256"
}
],
"internalType": "struct IKitchenFactory.StaticCurveParams",
"name": "s",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "taxDropStep",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "taxDropInterval",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxWalletStep",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxWalletInterval",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTxStep",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTxInterval",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limitRemovalTime",
"type": "uint256"
}
],
"internalType": "struct IKitchenFactory.AdvancedParamsInput",
"name": "a",
"type": "tuple"
},
{
"internalType": "address[4]",
"name": "taxWallets",
"type": "address[4]"
},
{
"internalType": "uint8[4]",
"name": "taxSplits",
"type": "uint8[4]"
}
],
"name": "createAdvancedTokenStealth",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "enum KitchenStorageCore.TokenType",
"name": "tokenType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lpLockDuration",
"type": "uint256"
},
{
"internalType": "bool",
"name": "burnLP",
"type": "bool"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"internalType": "bool",
"name": "removeHeader",
"type": "bool"
}
],
"internalType": "struct IKitchenFactory.BasicParamsBasic",
"name": "b",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "curveStartingTax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveTaxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWallet",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWalletDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTx",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTxDuration",
"type": "uint256"
}
],
"internalType": "struct IKitchenFactory.StaticCurveParams",
"name": "s",
"type": "tuple"
}
],
"name": "createBasicToken",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "enum KitchenStorageCore.TokenType",
"name": "tokenType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lpLockDuration",
"type": "uint256"
},
{
"internalType": "bool",
"name": "burnLP",
"type": "bool"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"internalType": "bool",
"name": "removeHeader",
"type": "bool"
}
],
"internalType": "struct IKitchenFactory.BasicParamsBasic",
"name": "b",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint256",
"name": "curveStartingTax",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveTaxDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWallet",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxWalletDuration",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTx",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "curveMaxTxDuration",
"type": "uint256"
}
],
"internalType": "struct IKitchenFactory.StaticCurveParams",
"name": "s",
"type": "tuple"
}
],
"name": "createBasicTokenStealth",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxWallet",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTx",
"type": "uint256"
},
{
"internalType": "enum KitchenStorageCore.TokenType",
"name": "tokenType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"internalType": "bool",
"name": "removeHeader",
"type": "bool"
},
{
"components": [
{
"internalType": "uint256",
"name": "lpLockDuration",
"type": "uint256"
},
{
"internalType": "bool",
"name": "burnLP",
"type": "bool"
}
],
"internalType": "struct KitchenStorageCore.LPLockConfig",
"name": "lpConfig",
"type": "tuple"
}
],
"internalType": "struct KitchenStorageCore.TokenSuperSimple",
"name": "meta",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isStealth",
"type": "bool"
}
],
"name": "createSuperSimpleToken",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "graduationCap",
"type": "uint256"
},
{
"internalType": "enum KitchenStorageCore.TokenType",
"name": "tokenType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "finalTaxRate",
"type": "uint256"
},
{
"internalType": "bool",
"name": "removeHeader",
"type": "bool"
},
{
"components": [
{
"internalType": "uint256",
"name": "lpLockDuration",
"type": "uint256"
},
{
"internalType": "bool",
"name": "burnLP",
"type": "bool"
}
],
"internalType": "struct KitchenStorageCore.LPLockConfig",
"name": "lpConfig",
"type": "tuple"
}
],
"internalType": "struct KitchenStorageCore.TokenZeroSimple",
"name": "meta",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isStealth",
"type": "bool"
}
],
"name": "createZeroSimpleToken",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "deployedAt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "deployer",
"outputs": [
{
"internalType": "contract IKitchenDeployer",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "to",
"type": "address"
}
],
"name": "emergencyWithdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [
{
"internalType": "contract IKitchenFactory",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getConfig",
"outputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
},
{
"internalType": "address",
"name": "_bondingCurve",
"type": "address"
},
{
"internalType": "address",
"name": "_graduation",
"type": "address"
},
{
"internalType": "address",
"name": "_storage",
"type": "address"
},
{
"internalType": "address",
"name": "_deployer",
"type": "address"
},
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "graduateToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "graduation",
"outputs": [
{
"internalType": "contract IKitchenGraduation",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "kitchenBondingCurve",
"outputs": [
{
"internalType": "contract IKitchenBondingCurve",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "oracle",
"outputs": [
{
"internalType": "contract IKitchenOracles",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "actionHash",
"type": "bytes32"
}
],
"name": "queueAction",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "sellToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minEthOut",
"type": "uint256"
}
],
"name": "sellTokenWithMinOut",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_deployer",
"type": "address"
}
],
"name": "setDeployer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
}
],
"name": "setFactory",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_graduation",
"type": "address"
}
],
"name": "setGraduation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_kitchenBondingCurve",
"type": "address"
}
],
"name": "setKitchenBondingCurve",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_oracle",
"type": "address"
}
],
"name": "setOracle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_storage",
"type": "address"
}
],
"name": "setStorage",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "storageContract",
"outputs": [
{
"internalType": "contract KitchenStorage",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "timelockQueue",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "ethPool",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "circ",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "gradCapTokens",
"type": "uint256"
}
],
"name": "validateGraduationEthRange",
"outputs": [
{
"internalType": "bool",
"name": "withinRange",
"type": "bool"
},
{
"internalType": "uint256",
"name": "ethAtCap",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minEth",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxEth",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/* ------------------------------------------------------------
* IMPORTS
* ------------------------------------------------------------ */
import "./KitchenStorage.sol";
import "./KitchenEvents.sol";
import "./KitchenCurveMaths.sol";
import "./vendor/chainlink/AggregatorV3Interface.sol";
import "./interfaces/IKitchenFactory.sol";
import "./KitchenTimelock.sol";
// Use the canonical `IKitchenFactory` interface from `interfaces/IKitchenFactory.sol`.
/* ------------------------------------------------------------
* DEPLOYER INTERFACE
* ------------------------------------------------------------ */
interface IKitchenDeployer {
function deployToken(
string memory name,
string memory symbol,
address creator,
bool isTax,
bool removeHeader,
uint256 finalTaxRate,
uint256 maxSupply
) external payable returns (address);
function mintRealToken(address token, address to, uint256 amount) external;
}
/* ------------------------------------------------------------
* DIRECT LAUNCHER INTERFACE
* ------------------------------------------------------------ */
interface IKitchenDirectLauncher {
struct DecayConfig {
uint64 startTax;
uint64 finalTax;
uint64 decayStep;
uint256 decayInterval;
}
struct LimitsConfig {
uint128 startMaxTx;
uint128 maxTxStep;
uint128 startMaxWallet;
uint128 maxWalletStep;
}
function deployDirectLaunchManual(
string memory name,
string memory symbol,
uint256 supply,
address taxWallet,
address creator,
DecayConfig memory d,
LimitsConfig memory l
) external returns (address);
function deployDirectLaunchStealth(
string memory name,
string memory symbol,
uint256 supply,
address taxWallet,
uint256 lpPercent,
address creator,
DecayConfig memory d,
LimitsConfig memory l
) external payable returns (address);
}
/* ------------------------------------------------------------
* BONDING CURVE INTERFACE
* ------------------------------------------------------------ */
interface IKitchenBondingCurve {
function buyTokenForWithMinOut(address token, address buyer, uint256 minTokensOut) external payable;
function sellTokenForWithMinOut(address token, address seller, uint256 amount, uint256 minEthOut) external;
}
/* ------------------------------------------------------------
* GRADUATION INTERFACE
* ------------------------------------------------------------ */
interface IKitchenGraduation {
function graduateToken(address token, address stipendReceiver) external;
function locker() external view returns (address);
}
/* ------------------------------------------------------------
* ORACLE INTERFACE
* ------------------------------------------------------------ */
interface IKitchenOracles {
function ethUsd() external view returns (uint256 price, uint256 updatedAt);
}
/* ------------------------------------------------------------
* LOCKER INTERFACE
* ------------------------------------------------------------ */
interface ISteakLockersFull {
function claim(address realToken) external;
function claimFor(address realToken, address user) external;
}
/* ------------------------------------------------------------
* MAIN ROUTER CONTRACT
* ------------------------------------------------------------ */
contract Kitchen is KitchenEvents, KitchenTimelock {
/* ------------------------------------------------------------
* STATE VARIABLES
* ------------------------------------------------------------ */
address public owner;
IKitchenFactory public factory;
IKitchenBondingCurve public kitchenBondingCurve;
IKitchenGraduation public graduation;
KitchenStorage public storageContract;
IKitchenDeployer public deployer;
IKitchenOracles public oracle;
/* ------------------------------------------------------------
* MODIFIERS
* ------------------------------------------------------------ */
modifier onlyOwner() {
require(msg.sender == owner, "Not owner");
_;
}
/* ------------------------------------------------------------
* EVENTS
* ------------------------------------------------------------ */
event FactoryUpdated(address indexed oldFactory, address indexed newFactory);
event BondingCurveUpdated(address indexed oldBondingCurve, address indexed newBondingCurve);
event GraduationUpdated(address indexed oldGraduation, address indexed newGraduation);
event StorageUpdated(address indexed oldStorage, address indexed newStorage);
event DeployerUpdated(address indexed oldDeployer, address indexed newDeployer);
event EmergencyWithdraw(address indexed to, uint256 amount);
event OracleUpdated(address indexed oldOracle, address indexed newOracle);
/* ------------------------------------------------------------
* CONSTANTS & VALIDATION
* ------------------------------------------------------------ */
uint256 private constant MIN_SUPPLY = 1e18; // 1 token (18 dp)
uint256 private constant MAX_SUPPLY = 1_000_000_000_000 * 1e18; // 1T tokens
uint256 private constant MW_DIVISOR = 2000; // 0.05% = 1/2000
uint256 private constant MT_DIVISOR = 10000; // 0.01% = 1/10000
uint256 private constant MIN_LP_LOCK_TIME = 30 days; // MAINNET
function _validateLpConfig(KitchenStorage.LPLockConfig calldata lp) internal pure {
if (!lp.burnLP) {
require(lp.lpLockDuration >= MIN_LP_LOCK_TIME, "LP lock < 30d");
}
}
/* ------------------------------------------------------------
* CONSTRUCTOR
* ------------------------------------------------------------ */
constructor(
address _factory,
address _kitchenBondingCurve,
address _graduation,
address _storage,
address _deployer
) {
owner = msg.sender;
factory = IKitchenFactory(_factory);
kitchenBondingCurve = IKitchenBondingCurve(_kitchenBondingCurve);
graduation = IKitchenGraduation(_graduation);
storageContract = KitchenStorage(_storage);
deployer = IKitchenDeployer(_deployer);
}
/* ------------------------------------------------------------
* INTERNAL VALIDATION HELPERS
* ------------------------------------------------------------ */
function _validateVirtualParams(uint256 totalSupply, uint256 curveMaxWallet, uint256 curveMaxTx) internal pure {
require(totalSupply > MIN_SUPPLY && totalSupply <= MAX_SUPPLY, "Invalid supply");
require(curveMaxWallet >= totalSupply / MW_DIVISOR, "maxWallet too small");
require(curveMaxTx >= totalSupply / MT_DIVISOR, "maxTx too small");
}
function _validateGradCapUSDRange(uint256 totalSupply, uint256 graduationCap) internal view {
require(graduationCap > 0 && graduationCap < totalSupply, "Invalid gradCap");
// 1. Get Chainlink ETH/USD price
(uint256 ethUsdPrice, uint256 updatedAt) = oracle.ethUsd();
require(ethUsdPrice > 0 && block.timestamp - updatedAt <= 90_000, "Oracle stale"); // RH ETH/USD heartbeat 24h + grace
// 2. Pull min/max USD caps from storage
(,, uint256 capMinUsd, uint256 capMaxUsd,) = storageContract.getConfig();
// 3. Compute the FDV (USD, 8dp) the token will have once it reaches its graduation cap
uint256 usdFdv = KitchenCurveMaths.fdvUsdAtSupply(
totalSupply,
graduationCap,
ethUsdPrice
);
// 5. Enforce FDV bounds
require(usdFdv >= capMinUsd && usdFdv <= capMaxUsd, "Graduation Mcap (FDV) out of USD bounds");
}
/* ------------------------------------------------------------
* AUTHORIZATION / GOVERNANCE
* ------------------------------------------------------------ */
function authorizeAllModules()
public
onlyOwner
timelocked(keccak256("AUTHORIZE_MODULES"))
{
storageContract.authorizeCaller(address(this), true);
storageContract.authorizeCaller(address(factory), true);
storageContract.authorizeCaller(address(kitchenBondingCurve), true);
storageContract.authorizeCaller(address(graduation), true);
}
/* ---------------- ADMIN SETTERS (TIMELOCKED) ---------------- */
function setFactory(address _factory)
external
onlyOwner
timelocked(keccak256("UPDATE_MODULES"))
{
address old = address(factory);
factory = IKitchenFactory(_factory);
emit FactoryUpdated(old, _factory);
}
function setKitchenBondingCurve(address _kitchenBondingCurve)
external
onlyOwner
timelocked(keccak256("UPDATE_MODULES"))
{
address old = address(kitchenBondingCurve);
kitchenBondingCurve = IKitchenBondingCurve(_kitchenBondingCurve);
emit BondingCurveUpdated(old, _kitchenBondingCurve);
}
function setGraduation(address _graduation)
external
onlyOwner
timelocked(keccak256("UPDATE_MODULES"))
{
address old = address(graduation);
graduation = IKitchenGraduation(_graduation);
emit GraduationUpdated(old, _graduation);
}
function setStorage(address _storage)
external
onlyOwner
timelocked(keccak256("UPDATE_MODULES"))
{
address old = address(storageContract);
storageContract = KitchenStorage(_storage);
emit StorageUpdated(old, _storage);
}
function setDeployer(address _deployer)
external
onlyOwner
timelocked(keccak256("UPDATE_MODULES"))
{
address old = address(deployer);
deployer = IKitchenDeployer(_deployer);
emit DeployerUpdated(old, _deployer);
}
function setOracle(address _oracle)
external
onlyOwner
timelocked(keccak256("UPDATE_ORACLE"))
{
require(_oracle != address(0), "Invalid oracle");
emit OracleUpdated(address(oracle), _oracle);
oracle = IKitchenOracles(_oracle);
}
function transferOwnership(address newOwner)
external
onlyOwner
timelocked(keccak256("TRANSFER_OWNERSHIP"))
{
address old = owner;
owner = newOwner;
emit OwnershipTransferred(old, newOwner);
}
/* ------------------------------------------------------------
* TOKEN CREATION — CURVE-BASED FLOWS
* ------------------------------------------------------------ */
function createBasicToken(IKitchenFactory.BasicParamsBasic calldata b, IKitchenFactory.StaticCurveParams calldata s)
external
payable
{
_validateVirtualParams(b.totalSupply, s.curveMaxWallet, s.curveMaxTx);
_validateGradCapUSDRange(b.totalSupply, b.graduationCap);
if (!b.burnLP) {require(b.lpLockDuration >= 30 days, "LP lock < 30d");}
require(b.graduationCap > 0 && b.graduationCap <= b.totalSupply, "Invalid graduation cap");
factory.createBasicToken{value: msg.value}(b, s, msg.sender);
}
function createBasicTokenStealth(
IKitchenFactory.BasicParamsBasic calldata b,
IKitchenFactory.StaticCurveParams calldata s
) external payable {
_validateVirtualParams(b.totalSupply, s.curveMaxWallet, s.curveMaxTx);
_validateGradCapUSDRange(b.totalSupply, b.graduationCap);
if (!b.burnLP) {require(b.lpLockDuration >= 30 days, "LP lock < 30d");}
require(b.graduationCap > 0 && b.graduationCap <= b.totalSupply, "Invalid graduation cap");
factory.createBasicTokenStealth{value: msg.value}(b, s, msg.sender);
}
function createAdvancedToken(
IKitchenFactory.BasicParamsAdvanced calldata b,
IKitchenFactory.StaticCurveParams calldata s,
IKitchenFactory.AdvancedParamsInput calldata a,
address[4] calldata taxWallets,
uint8[4] calldata taxSplits
) external payable {
_validateVirtualParams(b.totalSupply, s.curveMaxWallet, s.curveMaxTx);
_validateGradCapUSDRange(b.totalSupply, b.graduationCap);
if (!b.burnLP) {require(b.lpLockDuration >= 30 days, "LP lock < 30d");}
require(b.graduationCap > 0 && b.graduationCap <= b.totalSupply, "Invalid graduation cap");
factory.createAdvancedToken{value: msg.value}(b, s, a, msg.sender, taxWallets, taxSplits);
}
function createAdvancedTokenStealth(
IKitchenFactory.BasicParamsAdvanced calldata b,
IKitchenFactory.StaticCurveParams calldata s,
IKitchenFactory.AdvancedParamsInput calldata a,
address[4] calldata taxWallets,
uint8[4] calldata taxSplits
) external payable {
_validateVirtualParams(b.totalSupply, s.curveMaxWallet, s.curveMaxTx);
_validateGradCapUSDRange(b.totalSupply, b.graduationCap);
if (!b.burnLP) {require(b.lpLockDuration >= 30 days, "LP lock < 30d");}
require(b.graduationCap > 0 && b.graduationCap <= b.totalSupply, "Invalid graduation cap");
factory.createAdvancedTokenStealth{value: msg.value}(b, s, a, msg.sender, taxWallets, taxSplits);
}
function createSuperSimpleToken(KitchenStorage.TokenSuperSimple calldata meta, uint256 startTime, bool isStealth)
external
payable
{
require(meta.totalSupply > MIN_SUPPLY && meta.totalSupply <= MAX_SUPPLY, "Invalid supply");
require(meta.maxWallet >= meta.totalSupply / MW_DIVISOR, "maxWallet too small");
require(meta.maxTx >= meta.totalSupply / MT_DIVISOR, "maxTx too small");
_validateGradCapUSDRange(meta.totalSupply, meta.graduationCap);
_validateLpConfig(meta.lpConfig);
require(meta.graduationCap > 0 && meta.graduationCap <= meta.totalSupply, "Invalid graduation cap");
factory.createSuperSimpleToken{value: msg.value}(meta, startTime, isStealth, msg.sender);
}
function createZeroSimpleToken(KitchenStorage.TokenZeroSimple calldata meta, uint256 startTime, bool isStealth)
external
payable
{
require(meta.totalSupply > MIN_SUPPLY && meta.totalSupply <= MAX_SUPPLY, "Invalid supply");
_validateGradCapUSDRange(meta.totalSupply, meta.graduationCap);
_validateLpConfig(meta.lpConfig);
require(meta.graduationCap > 0 && meta.graduationCap <= meta.totalSupply, "Invalid graduation cap");
factory.createZeroSimpleToken{value: msg.value}(meta, startTime, isStealth, msg.sender);
}
/* ------------------------------------------------------------
* GRADUATION + TRADING
* ------------------------------------------------------------ */
function graduateToken(address token) external {
graduation.graduateToken(token, msg.sender);
}
function buyToken(address token) external payable {
require(!storageContract.getTokenState(token).graduated, "Token has graduated");
kitchenBondingCurve.buyTokenForWithMinOut{value: msg.value}(token, msg.sender, 0);
}
function sellToken(address token, uint256 amount) external {
require(!storageContract.getTokenState(token).graduated, "Token has graduated");
require(amount > 0, "amount=0");
uint256 bal = storageContract.getUserBalance(msg.sender, token);
require(bal >= amount, "insufficient");
kitchenBondingCurve.sellTokenForWithMinOut(token, msg.sender, amount, 0);
}
// --- Slippage-protected paths ---
function buyTokenWithMinOut(address token, uint256 minTokensOut) external payable {
require(!storageContract.getTokenState(token).graduated, "Token has graduated");
require(msg.value > 0, "ETH=0");
kitchenBondingCurve.buyTokenForWithMinOut{value: msg.value}(token, msg.sender, minTokensOut);
}
function sellTokenWithMinOut(address token, uint256 amount, uint256 minEthOut) external {
require(!storageContract.getTokenState(token).graduated, "Token has graduated");
require(amount > 0, "amount=0");
uint256 bal = storageContract.getUserBalance(msg.sender, token);
require(bal >= amount, "insufficient");
kitchenBondingCurve.sellTokenForWithMinOut(token, msg.sender, amount, minEthOut);
}
/* ------------------------------------------------------------
* VIEW HELPERS + EMERGENCY
* ------------------------------------------------------------ */
function getConfig()
external
view
returns (
address _factory,
address _bondingCurve,
address _graduation,
address _storage,
address _deployer,
address _owner
)
{
return (
address(factory),
address(kitchenBondingCurve),
address(graduation),
address(storageContract),
address(deployer),
owner
);
}
function emergencyWithdraw(address payable to) external onlyOwner {
require(to != address(0), "Zero address");
uint256 amt = address(this).balance;
require(amt > 0, "No balance");
(bool ok,) = to.call{value: amt}("");
require(ok, "Withdraw failed");
emit EmergencyWithdraw(to, amt);
}
function validateGraduationEthRange(uint256 totalSupply, uint256 ethPool, uint256 circ, uint256 gradCapTokens)
external
view
returns (bool withinRange, uint256 ethAtCap, uint256 minEth, uint256 maxEth)
{
(uint256 ethUsdPrice, uint256 updatedAt) = oracle.ethUsd();
if (ethUsdPrice == 0 || block.timestamp - updatedAt > 90_000) return (false, 0, 0, 0); // RH ETH/USD heartbeat 24h + grace
(,, uint256 capMinUsd, uint256 capMaxUsd,) = storageContract.getConfig();
minEth = (capMinUsd * 1e18) / ethUsdPrice;
maxEth = (capMaxUsd * 1e18) / ethUsdPrice;
ethAtCap = KitchenCurveMaths.getEthForTokens(totalSupply, ethPool, circ, gradCapTokens);
withinRange = (ethAtCap >= minEth && ethAtCap <= maxEth);
}
/* ------------------------------------------------------------
* CLAIM MODE ( >300 holders )
* ------------------------------------------------------------ */
function claim(address realToken) external {
// resolve virtual token
address virtualToken = storageContract.virtualOfReal(realToken);
require(storageContract.isClaimMode(virtualToken), "Claim mode off");
// forward to lockers
address lockerAddr = IKitchenGraduation(address(graduation)).locker();
ISteakLockersFull(lockerAddr).claimFor(realToken, msg.sender);
}
/* ------------------------------------------------------------
* FALLBACK
* ------------------------------------------------------------ */
receive() external payable {}
}
Chain explorer3656msChain node96ms