DeDust Hub
Technical Reference

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

#NameTypeDescription
0initializedboolWhether the meme contract has been initialized.
1migratedboolWhether liquidity has already been migrated to the CPMM pool.
2controllerAddressaddressAddress of the meme controller contract.
3creatorAddressaddressAddress of the meme creator.
4creatorFeecoinsTotal creator fees accumulated by the contract.
5seedint (uint128)Internal deterministic seed.
6isGraduatedboolWhether the meme token has reached graduation conditions.
7alphacoinsBonding curve alpha parameter.
8betacoinsBonding curve beta parameter.
9onSellSupplycoinsAmount of token supply allocated for bonding curve sales.
10tradeFeeBpsint (uint16)Trading fee in basis points applied on bonding curve trades.
11raisedFundscoinsTotal amount of funds raised so far.
12currentSupplycoinsCurrent 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

#NameTypeDescription
0isGraduatedboolWhether the meme token has reached graduation conditions.
1maxSupplycoinsMaximum token supply.
2currentSupplycoinsCurrent circulating token supply.
3bondingCurveSupplycoinsPortion of the token supply allocated for bonding curve trading.
4liquiditySupplycoinsPortion of the token supply reserved for liquidity migration.
5raisingFundscoinsTarget amount of funds required for graduation.
6migrationFeecoinsFee reserved for liquidity migration to the CPMM pool.
7raisedFundscoinsTotal amount of funds raised so far.
8alphacoinsBonding curve alpha parameter.
9betacoinsBonding curve beta parameter.

Method get_partner_data

Arguments

This getter does not accept any arguments.

Returns

#NameTypeDescription
0partnerFeecoins
1partnerFeeBpsint (uint16)
2partnerAddressaddress
3poolPartnerFeeBpsint (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
}
ParameterTypeDescription
traderAddressaddressAddress of the trader who executed the purchase.
amountIncoinsAmount of TON spent in the trade.
amountOutcoinsAmount of tokens received from the bonding curve.
feesTradeFeesBreakdown of fees applied to the trade. See TradeFees.
currentSupplycoinsUpdated circulating token supply after the purchase.
raisedFundscoinsTotal amount of funds raised after the purchase.
isGraduatedboolWhether 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
}
ParameterTypeDescription
traderAddressaddressAddress of the trader who executed the sale.
amountIncoinsAmount of tokens sold to the bonding curve.
amountOutcoinsAmount of TON received from the trade.
feesTradeFeesBreakdown of fees applied to the trade. See TradeFees.
currentSupplycoinsUpdated circulating token supply after the sale.
raisedFundscoinsTotal 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>?
}
ParameterTypeDescription
queryIduint64
amountcoins
minimalAmountOutcoins
fromaddress
excessesToaddress?
partnerConfigCell<PartnerConfig>?
referrerConfigCell<ReferrerConfig>?

Message ClaimCreatorFeeMessage

struct (0xad7269a8) ClaimCreatorFeeMessage {
    queryId: uint64
    to: address?
    excessesTo: address?
}
ParameterTypeDescription
queryIduint64
toaddress?
excessesToaddress?

Message ClaimPartnerFeeMessage

struct (0x7f4bcbf4) ClaimPartnerFeeMessage {
    queryId: uint64
    to: address?
    excessesTo: address?
}
ParameterTypeDescription
queryIduint64
toaddress?
excessesToaddress?

Storage

struct MemeStorage {
    initialized: bool
    migrated: bool
    config: Cell<MemeConfig>
    baseFeeBps: uint16
    curve: BondingCurve
    totalSupply: coins
    creatorFee: coins
}
ParameterTypeDescription
initializedbool
migratedbool
configCell<MemeConfig>
baseFeeBpsuint16
curveBondingCurve
totalSupplycoins
creatorFeecoins
protocolFeecoins

Types

Type MemeConfig

struct MemeConfig {
    creatorAddress: address
    controllerAddress: address
    metadata: MemeMetadata
    raisingFunds: coins
    liquidityTokens: coins
    seed: uint128
}
ParameterTypeDescription
creatorAddressaddress
controllerAddressaddress
metadataMemeMetadata
raisingFundscoins
liquidityTokenscoins
seeduint128

Type BondingCurve

struct BondingCurve {
    graduated: bool
    alpha: coins
    beta: coins
    onSellSupply: coins
    raisedFunds: coins
    currentSupply: coins
}
ParameterTypeDescription
graduatedbool
alphacoins
betacoins
onSellSupplycoins
raisedFundscoins
currentSupplycoins

Type TradeFees

struct TradeFees {
    creatorFee: coins
    protocolFee: coins
    partnerFee: coins
    referrerFee: coins
}
ParameterTypeDescription
creatorFeecoins
protocolFeecoins
partnerFeecoins
referrerFeecoins

On this page