Skip to main content

Buddy Pay

npm version NPM License

About

This program acts as a generic "events contract" that allows anyone to define an onchain purchase in terms of quantity, quantity-per-wallet, price, start-time and end-time. Anyone can then make purchases for a minimal fee and the definitions can be updated over time to close sales early, adjust prices for different phases, or various other scenarios. This is functionality needed to support large areas of online purchases, event ticketing, and more.

//TODO: Add NPM package link here

Example Configurations

ScenarioDetailsConfig
Event TicketsTotal Tickets Available: 1,000
Tickets Per Person: 4
Ticket Price: 39 USDC
(29 USDC earlybird price)
totalForSale: 100,
maxPerWallet: 4
mint: USDC
price: 29 * decimals
startTime: null
endTime: null
(after earlybird ends, price is updated to 39 USDC)
Raffle TicketsTotal Tickets Available: unlimited
Tickets Per Person: unlimited
Ticket Price: 0.01 SOL
totalForSale: null,
maxPerWallet: null
mint: null
price: 10_000_000 (0.01 * 9 decimals)
startTime: null
endTime: (unix timestamp for YYYY-MM-31 23:59:59)
Selling a custom serviceTotal Tickets Available: unlimited
Tickets Per Person: unlimited
Ticket Price: 1.5 SOL
totalForSale: null,
maxPerWallet: null
price: 1_500_000_000 (1.5 * 9 decimals)
mint: null
startTime: null
endTime: null
Selling 50 physical hoodiesTotal Tickets Available: 50
Tickets Per Person: 1
Ticket Price: 0.75 SOL
totalForSale: 50,
maxPerWallet: 1
price: 750_000_000 (0.75 * 9 decimals)
mint: null
startTime: null
endTime: null
Offering 10 commissioned paintings this monthTotal Tickets Available: 10
Tickets Per Person: 1
Ticket Price: 499 USDC
totalForSale: 10,
maxPerWallet: 1
price: 499 * decimals
mint: USDC
startTime: (unix timestamp for YYYY-MM-01 00:00:00)
endTime: (unix timestamp for YYYY-MM-31 23:59:59)