Meme
Getters
Method get_meme_data
Returns the current state and bonding curve configuration of the meme token contract.
This getter provides deployment status, bonding curve parameters, trading fees, fundraising progress, and current token supply.
Arguments
This getter does not accept any arguments.
Returns
| # | Name | Type | Description |
|---|---|---|---|
| 0 | initialized | bool | Whether the meme contract has been initialized. |
| 1 | migrated | bool | Whether liquidity has already been migrated to the CPMM pool. |
| 2 | controllerAddress | address | Address of the meme controller contract. |
| 3 | creatorAddress | address | Address of the meme creator. |
| 4 | creatorFee | coins | Total creator fees accumulated by the contract. |
| 5 | seed | int (uint128) | Internal deterministic seed. |
| 6 | isGraduated | bool | Whether the meme token has reached graduation conditions. |
| 7 | alpha | coins | Bonding curve alpha parameter. |
| 8 | beta | coins | Bonding curve beta parameter. |
| 9 | onSellSupply | coins | Amount of token supply allocated for bonding curve sales. |
| 10 | tradeFeeBps | int (uint16) | Trading fee in basis points applied on bonding curve trades. |
| 11 | raisedFunds | coins | Total amount of funds raised so far. |
| 12 | currentSupply | coins | Current circulating token supply. |
Method get_bonding_curve_data
Returns the current bonding curve configuration, token supply distribution, and fundraising progress for the meme token.
This getter can be used to track graduation status, raised funds, liquidity allocation, and the underlying bonding curve parameters.
Arguments
This getter does not accept any arguments.
Returns
| # | Name | Type | Description |
|---|---|---|---|
| 0 | isGraduated | bool | Whether the meme token has reached graduation conditions. |
| 1 | maxSupply | coins | Maximum token supply. |
| 2 | currentSupply | coins | Current circulating token supply. |
| 3 | bondingCurveSupply | coins | Portion of the token supply allocated for bonding curve trading. |
| 4 | liquiditySupply | coins | Portion of the token supply reserved for liquidity migration. |
| 5 | raisingFunds | coins | Target amount of funds required for graduation. |
| 6 | migrationFee | coins | Fee reserved for liquidity migration to the CPMM pool. |
| 7 | raisedFunds | coins | Total amount of funds raised so far. |
| 8 | alpha | coins | Bonding curve alpha parameter. |
| 9 | beta | coins | Bonding curve beta parameter. |
Method get_partner_data
Arguments
This getter does not accept any arguments.
Returns
| # | Name | Type | Description |
|---|---|---|---|
| 0 | partnerFee | coins | |
| 1 | partnerFeeBps | int (uint16) | |
| 2 | partnerAddress | address | |
| 3 | poolPartnerFeeBps | int (uint16) |
Events
Event BuyEvent
Emitted when tokens are purchased from the bonding curve.
The event contains trade details, applied fees, updated token supply, fundraising progress, and the current graduation status after the purchase.
struct (0xa0aa6bc2) BuyEvent {
traderAddress: address
amountIn: coins
amountOut: coins
fees: TradeFees
currentSupply: coins
raisedFunds: coins
isGraduated: bool
}| Parameter | Type | Description |
|---|---|---|
traderAddress | address | Address of the trader who executed the purchase. |
amountIn | coins | Amount of TON spent in the trade. |
amountOut | coins | Amount of tokens received from the bonding curve. |
fees | TradeFees | Breakdown of fees applied to the trade. See TradeFees. |
currentSupply | coins | Updated circulating token supply after the purchase. |
raisedFunds | coins | Total amount of funds raised after the purchase. |
isGraduated | bool | Whether the token has reached graduation conditions after the trade. |
Event SellEvent
Emitted when tokens are sold back to the bonding curve.
The event contains trade details, applied fees, updated token supply, and fundraising progress after the sale.
struct (0x3ab0fccc) SellEvent {
traderAddress: address
amountIn: coins
amountOut: coins
fees: TradeFees
currentSupply: coins
raisedFunds: coins
}| Parameter | Type | Description |
|---|---|---|
traderAddress | address | Address of the trader who executed the sale. |
amountIn | coins | Amount of tokens sold to the bonding curve. |
amountOut | coins | Amount of TON received from the trade. |
fees | TradeFees | Breakdown of fees applied to the trade. See TradeFees. |
currentSupply | coins | Updated circulating token supply after the sale. |
raisedFunds | coins | Total amount of funds raised after the sale. |
Messages
Message InitMemeMessage
struct (0x796f5a0c) InitMemeMessage {
queryId: uint64
initialBuy: coins
partnerConfig: PartnerConfig?
referrerConfig: ReferrerConfig?
}Message BuyMessage
struct (0x94826557) BuyMessage {
queryId: uint64
amount: coins
minimalAmountOut: coins
excessesTo: address
partnerConfig: Cell<PartnerConfig>?
referrerConfig: Cell<ReferrerConfig>?
}Message SellMessage
This is internal protocol message.
This message is sent by Meme Wallet contract. In order to initiate selling tokens, see SellTokensMessage.
struct (0x646ad424) SellMessage {
queryId: uint64
amount: coins
minimalAmountOut: coins
from: address
excessesTo: address?
partnerConfig: Cell<PartnerConfig>?
referrerConfig: Cell<ReferrerConfig>?
}| Parameter | Type | Description |
|---|---|---|
queryId | uint64 | |
amount | coins | |
minimalAmountOut | coins | |
from | address | |
excessesTo | address? | |
partnerConfig | Cell<PartnerConfig>? | |
referrerConfig | Cell<ReferrerConfig>? |
Message ClaimCreatorFeeMessage
struct (0xad7269a8) ClaimCreatorFeeMessage {
queryId: uint64
to: address?
excessesTo: address?
}| Parameter | Type | Description |
|---|---|---|
queryId | uint64 | |
to | address? | |
excessesTo | address? |
Message ClaimPartnerFeeMessage
struct (0x7f4bcbf4) ClaimPartnerFeeMessage {
queryId: uint64
to: address?
excessesTo: address?
}| Parameter | Type | Description |
|---|---|---|
queryId | uint64 | |
to | address? | |
excessesTo | address? |
Storage
struct MemeStorage {
initialized: bool
migrated: bool
config: Cell<MemeConfig>
baseFeeBps: uint16
curve: BondingCurve
totalSupply: coins
creatorFee: coins
}| Parameter | Type | Description |
|---|---|---|
initialized | bool | |
migrated | bool | |
config | Cell<MemeConfig> | |
baseFeeBps | uint16 | |
curve | BondingCurve | |
totalSupply | coins | |
creatorFee | coins | |
protocolFee | coins |
Types
Type MemeConfig
struct MemeConfig {
creatorAddress: address
controllerAddress: address
metadata: MemeMetadata
raisingFunds: coins
liquidityTokens: coins
seed: uint128
}| Parameter | Type | Description |
|---|---|---|
creatorAddress | address | |
controllerAddress | address | |
metadata | MemeMetadata | |
raisingFunds | coins | |
liquidityTokens | coins | |
seed | uint128 |
Type BondingCurve
struct BondingCurve {
graduated: bool
alpha: coins
beta: coins
onSellSupply: coins
raisedFunds: coins
currentSupply: coins
}| Parameter | Type | Description |
|---|---|---|
graduated | bool | |
alpha | coins | |
beta | coins | |
onSellSupply | coins | |
raisedFunds | coins | |
currentSupply | coins |
Type TradeFees
struct TradeFees {
creatorFee: coins
protocolFee: coins
partnerFee: coins
referrerFee: coins
}| Parameter | Type | Description |
|---|---|---|
creatorFee | coins | |
protocolFee | coins | |
partnerFee | coins | |
referrerFee | coins |