Skip to content

Commit

Permalink
updated and feedback on Marketplace guide
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLawton committed Apr 5, 2024
1 parent 6533790 commit 7d67d39
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ In this guide we will go through the process of creating a custom marketplace fr

The tools will enable you to perform:

- [1. Minting](/guides/templates/template-marketplace-api#minting): Minting of tokens to your wallet from the Sequence Builder
- [2. Wallet authentication](/guides/templates/template-marketplace-api#blockchain-queries): Use of Sequence Kit to authenticate a user
- [3. Blockchain queries](/guides/templates/template-marketplace-api#blockchain-queries): Querying of token balances using the Indexer
- [4. Multi-Wallet Types](/guides/templates/template-marketplace-api#4-multi-wallet-types): Allow users to either use a Sequence Wallet or an EOA
- [5. Request creation](/guides/templates/template-marketplace-api#5-request-creation): Creation of sell listing requests on the Sequence Market Protocol
- [6. Order accepting](/guides/templates/template-marketplace-api#6-order-accepting): Accepting of top orders from the Marketplace
- [7. (Optional) Enable Embedded Wallet](/guides/templates/template-marketplace-api#7-optional-enable-embedded-wallet): Add a more seamless UX experience with no-confirmation transactions
- [1. Minting](/guides/template-marketplace-api#minting): Minting of tokens to your wallet from the Sequence Builder
- [2. Wallet authentication](/guides/template-marketplace-api#blockchain-queries): Use of Sequence Kit to authenticate a user
- [3. Blockchain queries](/guides/template-marketplace-api#blockchain-queries): Querying of token balances using the Indexer
- [4. Multi-Wallet Types](/guides/template-marketplace-api#4-multi-wallet-types): Allow users to either use a Sequence Wallet or an EOA
- [5. Request creation](/guides/template-marketplace-api#5-request-creation): Creation of sell listing requests on the Sequence Market Protocol
- [6. Order accepting](/guides/template-marketplace-api#6-order-accepting): Accepting of top orders from the Marketplace
- [7. (Optional) Enable Embedded Wallet](/guides/template-marketplace-api#7-optional-enable-embedded-wallet): Add a more seamless UX experience with no-confirmation transactions

## 1. Minting

The first step is to create a collectible from the sequence Builder with a few mints, which can be accomplished with this [guide](/solutions/collectibles/contracts/01-deploy-an-item-collection) and to use the `tokenId` you minted in the following steps to query and fulfill orders.
The first step is to create a collectible from the sequence Builder and mint a few tokens, which can be accomplished with this [guide](/solutions/collectibles/contracts/01-deploy-an-item-collection) and to use the `tokenId` you minted in the following steps to query and fulfill orders.

## 2. Wallet Authentication

For your project, you'll need a way to authenticate your user with a wallet.

Your choice from the Sequence stack is to use either an [Embedded Wallet](/solutions/wallets/embedded-wallet/01-overview) for seamless UX, or, a [Universal Wallet](/solutions/wallets/universal-wallet/01-overview) with something like [Sequence Kit](/sdk/sequence-kit/01-overview) to reach more types of wallets.
Your choice from the Sequence stack is to use either an [Embedded Wallet](/solutions/wallets/embedded-wallet/01-overview) for headless and web2-like UX, or a [Universal Wallet](/solutions/wallets/universal-wallet/01-overview) with [Sequence Kit](/sdk/sequence-kit/01-overview) to reach more types of wallets.

For this guide we'll use an `Universal Sequence Wallet` with `Sequence Kit` connector (with an option for an `Embedded-Wallet`) which can authenticate users using Google or Apple auth, in addition to user brought wallets like Coinbase or Metamask
For this guide we'll use an `Universal Sequence Wallet` with `Sequence Kit` connector (with an option for an `Embedded-Wallet`) which can authenticate users using Google or Apple auth, in addition to user brought wallets like Coinbase or Metamask.

### Install packages

Either you can create a vanilla js/html/css project from a [template like this](https://github.com/moskalyk/vanilla-js-sequence-kit-starter), or we will walk you through how to use react here.
Either you can create a vanilla js/html/css project from a [template like this](https://github.com/moskalyk/vanilla-js-sequence-kit-starter) for a templated setup, or we will walk you through how to use react from scratch here.

Start by creating a project in a folder of your name choosing:

Expand Down Expand Up @@ -189,8 +189,8 @@ console.log("collection of items:", nftBalances);

Where the response of the indexer call, yields the follow data:

Response

:::details[Example Response]
- `contractType` (string) - the type of contract type (i.e. ERC20, ERC721, or ERC1155)
- `contractAddress` (string) - the contract address of the token
- `accountAddress` (string) - the deploying account address
Expand Down Expand Up @@ -229,9 +229,11 @@ Response
- `external_url` (string) - an external url for where to find the token or more details
- `updatedAt` (date) - the last time the token metadata was updated

:::

## 4. Multi-wallet types

Due to the fact that we're using `Sequence Kit` for this example that allows you to use a Sequence wallet, in addition to your own brought `EOA wallet`, sending transactions to the blockchain will differ due to the fact that with a `Sequence wallet`, you can send batch transactions, whereas with `wagmi` using an EOA you can only send 1 transaction at a time.
Due to the fact that we're using `Sequence Kit` for this example that allows you to use a Sequence wallet, in addition to your own brought `EOA wallet`, sending transactions to the blockchain will differ due to the fact that with a `Sequence wallet`, you can send batch transactions to optimize gas costs, whereas with `wagmi` using an EOA you can only send 1 transaction at a time.

To accomplish this, we take a few steps to create a local state variable that checks for the authorized wallet

Expand All @@ -257,9 +259,9 @@ function App() {
# Orderbook Transactions

<Callout type="info">
Glossary: In the Sequence Market protocol, when you create a listing, it's
In the Sequence Market protocol, when you create a listing, it's
referred to as a `request`, and when you accept a request it's called an
`order`
`order`.
</Callout>

## 5. Request creation
Expand Down
14 changes: 9 additions & 5 deletions nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const topNav = [
{ text: 'Web3 Game with WebGL', link: '/guides/webgl-guide', match: '/guides/webgl-guide' },
{ text: 'Web3 Game with Unity', link: '/guides/unity-guide', match: '/guides/unity-guide' },
{ text: 'Lootboxes', link: '/guides/lootbox', match: '/guides/lootbox' },
{ text: 'Custom Marketplace', link: '/guides/templates/template-marketplace-api', match: '/guides/templates/template-marketplace-api' }
{ text: 'Custom Marketplace', link: '/guides/template-marketplace-api', match: '/guides/template-marketplace-api' }
]
},
{
Expand Down Expand Up @@ -213,16 +213,20 @@ export const sidebar = {
link: '/guides/lootbox'
},
{
text: 'Integrate token rewards into your Discord server',
link: '/guides/discord'
text: 'Building a Custom Marketplace',
link: '/guides/template-marketplace-api'
},
// {
// text: 'Integrate token rewards into your Discord server',
// link: '/guides/discord'
// },
{
text: 'Templates',
items: [
{ text: 'In-Game Wallet Demo', link: '/guides/templates/template-embedded-wallet' },
{ text: 'Building Backend Relaying Server', link: '/guides/templates/02-building-relaying-server' },
{ text: 'Serverless Minting of Collectibles', link: '/guides/templates/03-mint-collectibles-serverless' },
{ text: 'Marketplace API Demo', link: '/guides/templates/template-marketplace-api' }
{ text: 'Serverless Minting of Collectibles', link: '/guides/templates/03-mint-collectibles-serverless' }
// { text: 'Marketplace API Demo', link: '/guides/templates/template-marketplace-api' }
]
}
],
Expand Down

0 comments on commit 7d67d39

Please sign in to comment.