Fixed-price token sale with a hard cap. The creator deposits tokens, sets a price, and buyers contribute during the sale window. After the sale ends, buyers claim their allocated tokens.
Initial token offerings with fixed pricing
Fair launch events with per-wallet caps
Community token sales with automatic distribution
Parameter Type Description token_idTokenIdToken being sold priceu128NORN per token (scaled to 1e12) hard_capu128Maximum NORN to raise max_per_walletu128Maximum contribution per wallet start_timeu64Sale start (Unix timestamp) end_timeu64Sale end (Unix timestamp) total_tokensu128Tokens deposited by creator for sale
Method Parameters Description initializetoken_id, price, hard_cap, max_per_wallet, start_time, end_time, total_tokensSet up the sale. Creator must have tokens available. contributeamount: u128Buyer sends NORN during the sale window. claim_tokens-- Buyer claims allocated tokens after finalization. finalize-- Creator ends the sale. NORN sent to creator, unsold tokens returned. refund-- Contributor claims refund if sale had no contributions.
Method Parameters Returns Description get_config-- LaunchConfigFull sale configuration get_contributionaddress: Addressu128NORN contributed by a specific address get_total_raised-- u128Total NORN raised
pub struct LaunchConfig {
pub creator : Address ,
pub token_id : TokenId ,
pub price : u128 ,
pub hard_cap : u128 ,
pub max_per_wallet : u128 ,
pub start_time : u64 ,
pub end_time : u64 ,
pub total_tokens : u128 ,
pub finalized : bool ,
}
# Deploy
norn wallet deploy-loom --name my-launchpad
# Upload bytecode
norn wallet upload-bytecode --loom-id < LOOM_I D > \
--bytecode launchpad.wasm
# Execute (borsh-encoded input)
norn wallet execute-loom --loom-id < LOOM_I D > --input < HE X >
# Query config
norn wallet query-loom --loom-id < LOOM_I D >