Core
Contract Info
Contract Name:
move_fun::legacy_coin
Contract Address: [tba]
Resources
Info
Represents the global storage for managing the legacy coin supply and details.
total_bound_supply
u64
Total supply bound to the bonding curve.
liquidity_supply
Coin
Supply allocated for liquidity.
target_price_numerator
u64
Target price numerator for the buy coin.
target_price_denominator
u64
Target price denominator for the buy coin.
buy_coin_store
Coin
Coin supply available for selling.
sell_coin_store
Coin
Coin supply held for selling.
virtual_balance_store
smart_table::SmartTable<address, Coin>
Virtual balance for storing coins during buy/sell.
max_wallet_balance
Option
Maximum allowed balance per wallet (optional).
CoinMetadata
Stores metadata for the legacy coin.
name
String
Name of the coin.
symbol
String
Symbol of the coin.
decimals
u8
Number of decimal places for the coin.
max_supply
u64
Maximum supply of the coin.
logo
String
URL to the coin's logo.
banner
String
URL to the coin's banner.
description
String
Description of the coin.
links
vector
List of links related to the coin.
Events
CoinDeployed
Emitted when the coin is deployed.
CoinBought
Emitted when coins are bought.
CoinSold
Emitted when coins are sold.
Public Functions
Initialize Legacy Coin
Initializes the legacy coin with bonding curve parameters and metadata.
signer_ref
signer
The signer's reference.
max_supply
u64
Maximum supply of the coin.
initial_price_numerator
u64
Initial price numerator for the coin.
initial_price_denominator
u64
Initial price denominator for the coin.
target_price_numerator
u64
Target price numerator for the coin.
target_price_denominator
u64
Target price denominator for the coin.
bound_supply_percentage
u8
Percentage of the total supply bound to the bonding curve.
logo
String
URL to the coin's logo.
banner
String
URL to the coin's banner.
description
String
Description of the coin.
links
vector
List of links related to the coin.
max_wallet_balance
Option
Optional max wallet balance.
Buy Legacy Coin
Allows users to buy coins based on the bonding curve.
buyer
signer
The buyer's reference.
amount_base_value
u64
Base value of the amount to buy.
amount_exponent_value
u64
Exponent value of the amount to buy.
Sell Legacy Coin
Allows users to sell coins back into the bonding curve.
seller
signer
The seller's reference.
amount_base_value
u64
Base value of the amount to sell.
amount_exponent_value
u64
Exponent value of the amount to sell.
View Functions
Get Metadata
Retrieves the metadata for the legacy coin.
name
String
Name of the coin.
symbol
String
Symbol of the coin.
decimals
u8
Number of decimal places for the coin.
max_supply
u64
Maximum supply of the coin.
logo
String
URL to the coin's logo.
banner
String
URL to the coin's banner.
description
String
Description of the coin.
links
vector
List of links related to the coin.
Last updated