@@ -8,9 +8,17 @@ import { defineChain } from "thirdweb";
88import { isRouterEnabled } from "thirdweb/assets" ;
99import { DistributionBarChart } from "@/components/blocks/distribution-chart" ;
1010import { FormFieldSetup } from "@/components/blocks/FormFieldSetup" ;
11+ import { Badge } from "@/components/ui/badge" ;
1112import { DynamicHeight } from "@/components/ui/DynamicHeight" ;
1213import { DecimalInput } from "@/components/ui/decimal-input" ;
1314import { Spinner } from "@/components/ui/Spinner/Spinner" ;
15+ import {
16+ Select ,
17+ SelectContent ,
18+ SelectItem ,
19+ SelectTrigger ,
20+ SelectValue ,
21+ } from "@/components/ui/select" ;
1422import { Switch } from "@/components/ui/switch" ;
1523import { useAllChainsData } from "@/hooks/chains/allChains" ;
1624import type { TokenDistributionForm } from "../_common/form" ;
@@ -198,55 +206,85 @@ function PoolConfig(props: {
198206 ) ;
199207
200208 return (
201- < div className = "grid grid-cols-1 gap-4 lg:grid-cols-2 " >
202- { /* supply % */ }
209+ < div className = "grid grid-cols-1 gap-5 " >
210+ { /* Pricing Strategy */ }
203211 < FormFieldSetup
204- errorMessage = {
205- props . form . formState . errors . saleAllocationPercentage ?. message
206- }
207- helperText = { `${ compactNumberFormatter . format ( sellSupply ) } tokens` }
208212 isRequired
209- label = "Sell % of Total Supply"
213+ label = "Pricing Strategy"
214+ errorMessage = { undefined }
215+ helperText = "Bonding Curve pricing is a static formula for pricing tokens based on supply and demand"
210216 >
211- < div className = "relative" >
212- < DecimalInput
213- maxValue = { 100 }
214- onChange = { ( value ) => {
215- props . form . setValue ( "saleAllocationPercentage" , value , {
216- shouldValidate : true ,
217- } ) ;
218- } }
219- value = { props . form . watch ( "saleAllocationPercentage" ) }
220- />
221- < span className = "-translate-y-1/2 absolute top-1/2 right-3 text-sm text-muted-foreground" >
222- %
223- </ span >
224- </ div >
217+ < Select value = "bonding-curve" >
218+ < SelectTrigger >
219+ < SelectValue />
220+ </ SelectTrigger >
221+ < SelectContent >
222+ < SelectItem value = "bonding-curve" > Bonding Curve</ SelectItem >
223+ < SelectItem value = "fixed-price" disabled >
224+ < span className = "flex items-center gap-2" >
225+ Dynamic Bonding Curve{ " " }
226+ < Badge variant = "secondary" > Coming Soon</ Badge >
227+ </ span >
228+ </ SelectItem >
229+ < SelectItem value = "dutch-auction" disabled >
230+ < span className = "flex items-center gap-2" >
231+ Fixed Price < Badge variant = "secondary" > Coming Soon</ Badge >
232+ </ span >
233+ </ SelectItem >
234+ </ SelectContent >
235+ </ Select >
225236 </ FormFieldSetup >
226237
227- { /* starting price */ }
228- < FormFieldSetup
229- errorMessage = {
230- props . form . formState . errors . pool ?. startingPricePerToken ?. message
231- }
232- isRequired
233- label = "Starting price per token"
234- >
235- < div className = "relative" >
236- < DecimalInput
237- className = "pr-10"
238- onChange = { ( value ) => {
239- props . form . setValue ( "pool.startingPricePerToken" , value , {
240- shouldValidate : true ,
241- } ) ;
242- } }
243- value = { props . form . watch ( "pool.startingPricePerToken" ) }
244- />
245- < span className = "-translate-y-1/2 absolute top-1/2 right-3 text-sm text-muted-foreground" >
246- { chainMeta ?. nativeCurrency . symbol || "ETH" }
247- </ span >
248- </ div >
249- </ FormFieldSetup >
238+ < div className = "grid grid-cols-1 lg:grid-cols-2 gap-5" >
239+ { /* supply % */ }
240+ < FormFieldSetup
241+ errorMessage = {
242+ props . form . formState . errors . saleAllocationPercentage ?. message
243+ }
244+ helperText = { `${ compactNumberFormatter . format ( sellSupply ) } tokens` }
245+ isRequired
246+ label = "Sell % of Total Supply"
247+ >
248+ < div className = "relative" >
249+ < DecimalInput
250+ maxValue = { 100 }
251+ onChange = { ( value ) => {
252+ props . form . setValue ( "saleAllocationPercentage" , value , {
253+ shouldValidate : true ,
254+ } ) ;
255+ } }
256+ value = { props . form . watch ( "saleAllocationPercentage" ) }
257+ />
258+ < span className = "-translate-y-1/2 absolute top-1/2 right-3 text-sm text-muted-foreground" >
259+ %
260+ </ span >
261+ </ div >
262+ </ FormFieldSetup >
263+
264+ { /* starting price */ }
265+ < FormFieldSetup
266+ errorMessage = {
267+ props . form . formState . errors . pool ?. startingPricePerToken ?. message
268+ }
269+ isRequired
270+ label = "Starting price per token"
271+ >
272+ < div className = "relative" >
273+ < DecimalInput
274+ className = "pr-10"
275+ onChange = { ( value ) => {
276+ props . form . setValue ( "pool.startingPricePerToken" , value , {
277+ shouldValidate : true ,
278+ } ) ;
279+ } }
280+ value = { props . form . watch ( "pool.startingPricePerToken" ) }
281+ />
282+ < span className = "-translate-y-1/2 absolute top-1/2 right-3 text-sm text-muted-foreground" >
283+ { chainMeta ?. nativeCurrency . symbol || "ETH" }
284+ </ span >
285+ </ div >
286+ </ FormFieldSetup >
287+ </ div >
250288 </ div >
251289 ) ;
252290}
0 commit comments