candy-shop
candy-shop copied to clipboard
feat: EVM marketplace
-
services
folder: contain factory class for picking right NFT function for each chain For multichain feature, transaction functions about buy, sell, cancel NFT need to be applied follow ETH or SOL CandyShop, so we need to pass CandyShop instance prop to component using it and I use factory class to pick the right function for each blockchain network - Mustnt pass candyShop instance to Modal components and all nested inside them Modal component: SellModal, CancelModal, BuyModal, ... nested: Price, Card, NftStats
- CandyShop properties are using for render UI need to declare in BaseShop class to prenvent check condition in UI part
- EthCandyshop needs to fetch API shop owner to get candyShopAddress, so I expose API
getEthCandyShop
to handle it: fetch shop detail then create new EthCandyShop instance and return to user - Add some common interfaces: ConfigPrice, ShopProps,
The index.ts
should be the index for exporting of the folder, should not put logics in it.
Let's make following structure and rename under conveyor/eth/
.
- api/index.ts -> api.ts
- blockchain/index.ts -> blockchain.ts
- seaport/index.ts -> seaport.ts
- index.ts -> convey.ts
- types/asset/index.ts -> types/asset.type.ts
- types/blockchain/index.ts -> types/blockchain.type.ts
- types/network/index.ts -> types/network.type.ts
- types/order/index.ts -> types/order.type.ts
- types/shop/index.ts -> types/shop.type.ts