diff --git a/.env.example b/.env.example index 97ae08b..6f0b11c 100644 --- a/.env.example +++ b/.env.example @@ -35,6 +35,10 @@ NEXT_PUBLIC_VENDING_NATIVE_STARDUST_FACTORY_ADDRESS="stars1mxwf2hjcjvqnlw0v3j7m0 NEXT_PUBLIC_VENDING_NATIVE_STARDUST_UPDATABLE_FACTORY_ADDRESS="stars18gjczf88jd4z3a3megwj9g5c9famu654csxfnnq59mkqeszuzy4ssdgr46" NEXT_PUBLIC_VENDING_NATIVE_STRDST_FLEX_FACTORY_ADDRESS="stars1eluqmr6x78ehl4plrln6khxc0qrspfhc7rt3whmr59escpve0r4swcacjh" +# NEXT_PUBLIC_VENDING_NATIVE_BRNCH_FACTORY_ADDRESS="" +# NEXT_PUBLIC_VENDING_NATIVE_BRNCH_UPDATABLE_FACTORY_ADDRESS="" +# NEXT_PUBLIC_VENDING_NATIVE_BRNCH_FLEX_FACTORY_ADDRESS="" + NEXT_PUBLIC_BASE_FACTORY_ADDRESS="stars1a45hcxty3spnmm2f0papl8v4dk5ew29s4syhn4efte8u5haex99qlkrtnx" NEXT_PUBLIC_BASE_FACTORY_UPDATABLE_ADDRESS="stars100xegx2syry4tclkmejjwxk4nfqahvcqhm9qxut5wxuzhj5d9qfsh5nmym" @@ -55,6 +59,7 @@ NEXT_PUBLIC_OPEN_EDITION_IBC_FRNZ_FACTORY_ADDRESS="stars1vzffawsjhvspstu5lvtzz2x NEXT_PUBLIC_OPEN_EDITION_UPDATABLE_IBC_FRNZ_FACTORY_ADDRESS="stars1tc09vlgdg8rqyapcxwm9qdq8naj4gym9px4ntue9cs0kse5rvess0nee3a" NEXT_PUBLIC_OPEN_EDITION_NATIVE_STRDST_FACTORY_ADDRESS="stars10sw8fvwtetndy3ctpcvee8yq7t6qp49m5yahm5gf8qz3qt3hzvcq5c2m0s" +NEXT_PUBLIC_OPEN_EDITION_NATIVE_BRNCH_FACTORY_ADDRESS="stars1uxdqnu9ysd9q8kd43c52ufy9azfxyuvyt5nnyk4p2gtag30zre3q0cg30z" NEXT_PUBLIC_OPEN_EDITION_IBC_USK_FACTORY_ADDRESS="stars1vxf9u6a4d5ty00k59zthv7mnpzlrfhqnf4ds0y0eake7lepuamnqymyf3t" NEXT_PUBLIC_OPEN_EDITION_UPDATABLE_IBC_USK_FACTORY_ADDRESS="stars1njhkyyv0l8dmq528w67t8dxyg5a3h0hvusk6pfvpm52pspd9gq9s3zmdez" diff --git a/components/openEdition/OpenEditionMinterCreator.tsx b/components/openEdition/OpenEditionMinterCreator.tsx index 90f3ec6..f9c3139 100644 --- a/components/openEdition/OpenEditionMinterCreator.tsx +++ b/components/openEdition/OpenEditionMinterCreator.tsx @@ -618,7 +618,8 @@ export const OpenEditionMinterCreator = ({ mintingDetails?.selectedMintToken?.displayName === 'USDC' || mintingDetails?.selectedMintToken?.displayName === 'STRDST' || mintingDetails?.selectedMintToken?.displayName === 'KUJI' || - mintingDetails?.selectedMintToken?.displayName === 'HUAHUA' + mintingDetails?.selectedMintToken?.displayName === 'HUAHUA' || + mintingDetails?.selectedMintToken?.displayName === 'BRNCH' ? STRDST_SG721_CODE_ID : SG721_OPEN_EDITION_CODE_ID, name: collectionDetails?.name, diff --git a/config/minter.ts b/config/minter.ts index eb7448d..c174ba6 100644 --- a/config/minter.ts +++ b/config/minter.ts @@ -7,6 +7,7 @@ import { OPEN_EDITION_IBC_NBTC_FACTORY_ADDRESS, OPEN_EDITION_IBC_USDC_FACTORY_ADDRESS, OPEN_EDITION_IBC_USK_FACTORY_ADDRESS, + OPEN_EDITION_NATIVE_BRNCH_FACTORY_ADDRESS, OPEN_EDITION_NATIVE_STRDST_FACTORY_ADDRESS, OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS, OPEN_EDITION_UPDATABLE_IBC_ATOM_FACTORY_ADDRESS, @@ -38,13 +39,27 @@ import { VENDING_IBC_USK_FACTORY_FLEX_ADDRESS, VENDING_IBC_USK_UPDATABLE_FACTORY_ADDRESS, VENDING_IBC_USK_UPDATABLE_FACTORY_FLEX_ADDRESS, + VENDING_NATIVE_BRNCH_FACTORY_ADDRESS, + VENDING_NATIVE_BRNCH_FLEX_FACTORY_ADDRESS, + VENDING_NATIVE_BRNCH_UPDATABLE_FACTORY_ADDRESS, VENDING_NATIVE_STARDUST_FACTORY_ADDRESS, VENDING_NATIVE_STARDUST_UPDATABLE_FACTORY_ADDRESS, VENDING_NATIVE_STRDST_FLEX_FACTORY_ADDRESS, } from 'utils/constants' import type { TokenInfo } from './token' -import { ibcAtom, ibcFrnz, ibcHuahua, ibcKuji, ibcNbtc, ibcUsdc, ibcUsk, nativeStardust, stars } from './token' +import { + ibcAtom, + ibcFrnz, + ibcHuahua, + ibcKuji, + ibcNbtc, + ibcUsdc, + ibcUsk, + nativeBrnch, + nativeStardust, + stars, +} from './token' export interface MinterInfo { id: string @@ -159,6 +174,13 @@ export const openEditionNativeStrdstMinter: MinterInfo = { updatable: false, } +export const openEditionNativeBrnchMinter: MinterInfo = { + id: 'open-edition-native-brnch-minter', + factoryAddress: OPEN_EDITION_NATIVE_BRNCH_FACTORY_ADDRESS, + supportedToken: nativeBrnch, + updatable: false, +} + export const openEditionMinterList = [ openEditionStarsMinter, openEditionUpdatableStarsMinter, @@ -175,6 +197,7 @@ export const openEditionMinterList = [ openEditionIbcKujiMinter, openEditionIbcHuahuaMinter, openEditionNativeStrdstMinter, + openEditionNativeBrnchMinter, ] export const vendingStarsMinter: MinterInfo = { @@ -289,6 +312,22 @@ export const vendingUpdatableNativeStardustMinter: MinterInfo = { flexible: false, } +export const vendingNativeBrnchMinter: MinterInfo = { + id: 'vending-native-brnch-minter', + factoryAddress: VENDING_NATIVE_BRNCH_FACTORY_ADDRESS, + supportedToken: nativeBrnch, + updatable: false, + flexible: false, +} + +export const vendingUpdatableNativeBrnchMinter: MinterInfo = { + id: 'vending-native-brnch-minter', + factoryAddress: VENDING_NATIVE_BRNCH_UPDATABLE_FACTORY_ADDRESS, + supportedToken: nativeBrnch, + updatable: true, + flexible: false, +} + export const vendingMinterList = [ vendingStarsMinter, vendingUpdatableStarsMinter, @@ -304,6 +343,8 @@ export const vendingMinterList = [ vendingIbcHuahuaMinter, vendingNativeStardustMinter, vendingUpdatableNativeStardustMinter, + vendingNativeBrnchMinter, + vendingUpdatableNativeBrnchMinter, ] export const flexibleVendingStarsMinter: MinterInfo = { @@ -410,6 +451,14 @@ export const flexibleVendingStrdstMinter: MinterInfo = { flexible: true, } +export const flexibleVendingBrnchMinter: MinterInfo = { + id: 'flexible-vending-native-brnch-minter', + factoryAddress: VENDING_NATIVE_BRNCH_FLEX_FACTORY_ADDRESS, + supportedToken: nativeBrnch, + updatable: false, + flexible: true, +} + export const flexibleVendingMinterList = [ flexibleVendingStarsMinter, flexibleVendingUpdatableStarsMinter, @@ -424,4 +473,5 @@ export const flexibleVendingMinterList = [ flexibleVendingIbcKujiMinter, flexibleVendingIbcHuahuaMinter, flexibleVendingStrdstMinter, + flexibleVendingBrnchMinter, ] diff --git a/config/token.ts b/config/token.ts index 547bba6..fc2dac4 100644 --- a/config/token.ts +++ b/config/token.ts @@ -89,4 +89,25 @@ export const nativeStardust: TokenInfo = { decimalPlaces: 6, } -export const tokensList = [stars, ibcAtom, ibcUsdc, ibcUsk, ibcFrnz, ibcNbtc, ibcKuji, ibcHuahua, nativeStardust] +export const nativeBrnch: TokenInfo = { + id: 'native-brnch', + denom: + NETWORK === 'mainnet' + ? 'factory/stars16da2uus9zrsy83h23ur42v3lglg5rmyrpqnju4/uBRNCH' + : 'factory/stars153w5xhuqu3et29lgqk4dsynj6gjn96lr33wx4e/uBRNCH', + displayName: 'BRNCH', + decimalPlaces: 6, +} + +export const tokensList = [ + stars, + ibcAtom, + ibcUsdc, + ibcUsk, + ibcFrnz, + ibcNbtc, + ibcKuji, + ibcHuahua, + nativeStardust, + nativeBrnch, +] diff --git a/env.d.ts b/env.d.ts index 60a9436..d336873 100644 --- a/env.d.ts +++ b/env.d.ts @@ -54,6 +54,9 @@ declare namespace NodeJS { readonly NEXT_PUBLIC_VENDING_NATIVE_STARDUST_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_VENDING_NATIVE_STARDUST_UPDATABLE_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_VENDING_NATIVE_STRDST_FLEX_FACTORY_ADDRESS: string + readonly NEXT_PUBLIC_VENDING_NATIVE_BRNCH_FACTORY_ADDRESS: string + readonly NEXT_PUBLIC_VENDING_NATIVE_BRNCH_UPDATABLE_FACTORY_ADDRESS: string + readonly NEXT_PUBLIC_VENDING_NATIVE_BRNCH_FLEX_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_OPEN_EDITION_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_OPEN_EDITION_UPDATABLE_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_OPEN_EDITION_IBC_ATOM_FACTORY_ADDRESS: string @@ -71,6 +74,7 @@ declare namespace NodeJS { readonly NEXT_PUBLIC_OPEN_EDITION_IBC_HUAHUA_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_OPEN_EDITION_UPDATABLE_IBC_HUAHUA_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_OPEN_EDITION_NATIVE_STRDST_FACTORY_ADDRESS: string + readonly NEXT_PUBLIC_OPEN_EDITION_NATIVE_BRNCH_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_OPEN_EDITION_MINTER_CODE_ID: string readonly NEXT_PUBLIC_BASE_FACTORY_ADDRESS: string readonly NEXT_PUBLIC_BASE_FACTORY_UPDATABLE_ADDRESS: string diff --git a/pages/collections/create.tsx b/pages/collections/create.tsx index 02767bb..4e6ddcb 100644 --- a/pages/collections/create.tsx +++ b/pages/collections/create.tsx @@ -581,7 +581,8 @@ const CollectionCreationPage: NextPage = () => { mintingDetails?.selectedMintToken?.displayName === 'USDC' || mintingDetails?.selectedMintToken?.displayName === 'nBTC' || mintingDetails?.selectedMintToken?.displayName === 'KUJI' || - mintingDetails?.selectedMintToken?.displayName === 'HUAHUA' + mintingDetails?.selectedMintToken?.displayName === 'HUAHUA' || + mintingDetails?.selectedMintToken?.displayName === 'BRNCH' ? STRDST_SG721_CODE_ID : SG721_CODE_ID, name: collectionDetails?.name, diff --git a/utils/constants.ts b/utils/constants.ts index 180dd3e..16f5000 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -47,6 +47,11 @@ export const VENDING_NATIVE_STARDUST_UPDATABLE_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_VENDING_NATIVE_STARDUST_UPDATABLE_FACTORY_ADDRESS export const VENDING_NATIVE_STRDST_FLEX_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_VENDING_NATIVE_STRDST_FLEX_FACTORY_ADDRESS +export const VENDING_NATIVE_BRNCH_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_VENDING_NATIVE_BRNCH_FACTORY_ADDRESS +export const VENDING_NATIVE_BRNCH_UPDATABLE_FACTORY_ADDRESS = + process.env.NEXT_PUBLIC_VENDING_NATIVE_BRNCH_UPDATABLE_FACTORY_ADDRESS +export const VENDING_NATIVE_BRNCH_FLEX_FACTORY_ADDRESS = + process.env.NEXT_PUBLIC_VENDING_NATIVE_BRNCH_FLEX_FACTORY_ADDRESS export const BASE_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_BASE_FACTORY_ADDRESS export const BASE_FACTORY_UPDATABLE_ADDRESS = process.env.NEXT_PUBLIC_BASE_FACTORY_UPDATABLE_ADDRESS export const OPEN_EDITION_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_OPEN_EDITION_FACTORY_ADDRESS @@ -70,6 +75,8 @@ export const OPEN_EDITION_UPDATABLE_IBC_USK_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_OPEN_EDITION_UPDATABLE_IBC_USK_FACTORY_ADDRESS export const OPEN_EDITION_NATIVE_STRDST_FACTORY_ADDRESS = process.env.NEXT_PUBLIC_OPEN_EDITION_NATIVE_STRDST_FACTORY_ADDRESS +export const OPEN_EDITION_NATIVE_BRNCH_FACTORY_ADDRESS = + process.env.NEXT_PUBLIC_OPEN_EDITION_NATIVE_BRNCH_FACTORY_ADDRESS export const OPEN_EDITION_MINTER_CODE_ID = parseInt(process.env.NEXT_PUBLIC_OPEN_EDITION_MINTER_CODE_ID, 10) export const SG721_NAME_ADDRESS = process.env.NEXT_PUBLIC_SG721_NAME_ADDRESS export const ROYALTY_REGISTRY_ADDRESS = process.env.NEXT_PUBLIC_ROYALTY_REGISTRY_ADDRESS