This guide covers the creation of a Primary Sales of Sequence. It includes steps for create sales contract, create nft contract, create collection, wallet authentication, purchase and mint.
Accelerate your game growth by selling items directly to your players. In this guide, we will go over the steps how to deploy a Primary Sale contract using any custom or existing currency for a webshop that utilizes game items from a ERC1155 contract. We will use the following technologies from the Sequence platform:
Then install and run:
After you install the dependencies, .env.example
will be automatically copied to .env
, so you can test things out with pre-provided keys.
When you’re ready, replace the contents of .env
with your project’s information.
Go to https://github.com/0xsequence-demos/primary-sale-1155-boilerplate and click “Use this Template” in the top right corner.
Clone your newly made repo.
Then install and run:
After you install the dependencies, .env.example
will be automatically copied to .env
, so you can test things out with pre-provided keys.
When you’re ready, replace the contents of .env
with your project’s information.
We provide a few example contracts and variables in order to get you started. However, you will likely want to use your own contracts. In order to configure this simply following the steps below:
Deploy a Primary Sales Contract in Sequence Builder.
We first need a Primary Sales Contract along with an ERC1155 contract that will contain our game items we want to sell. To do that, please follow the guide here.
Set the Sales Configurations for the project.
Once we have our sales contract deployed, we’ll simply update the sales configuration on the boilerplate. Go to src/salesConfigs.ts
and modify the salesConfigs variable by adding each contract sale in an array for your project with the networks you want to support. Example:
You can see all the available chains currently supported by sequence here.
Set a default chainId for the project.
To set the default chainId, go to src/salesConfigs.ts
and modify the defaultChainId variable with the chainId you want to display by default in the project. It must match a chainId present in your salesConfigs variable. For example:
Your primary sales should now appear and function correctly from this point onward. In order to make a purchase, ensure you have the corresponding token that you set as a currency for the sale in your wallet, increment the amount, and click purchase!
This guide covers the creation of a Primary Sales of Sequence. It includes steps for create sales contract, create nft contract, create collection, wallet authentication, purchase and mint.
Accelerate your game growth by selling items directly to your players. In this guide, we will go over the steps how to deploy a Primary Sale contract using any custom or existing currency for a webshop that utilizes game items from a ERC1155 contract. We will use the following technologies from the Sequence platform:
Then install and run:
After you install the dependencies, .env.example
will be automatically copied to .env
, so you can test things out with pre-provided keys.
When you’re ready, replace the contents of .env
with your project’s information.
Go to https://github.com/0xsequence-demos/primary-sale-1155-boilerplate and click “Use this Template” in the top right corner.
Clone your newly made repo.
Then install and run:
After you install the dependencies, .env.example
will be automatically copied to .env
, so you can test things out with pre-provided keys.
When you’re ready, replace the contents of .env
with your project’s information.
We provide a few example contracts and variables in order to get you started. However, you will likely want to use your own contracts. In order to configure this simply following the steps below:
Deploy a Primary Sales Contract in Sequence Builder.
We first need a Primary Sales Contract along with an ERC1155 contract that will contain our game items we want to sell. To do that, please follow the guide here.
Set the Sales Configurations for the project.
Once we have our sales contract deployed, we’ll simply update the sales configuration on the boilerplate. Go to src/salesConfigs.ts
and modify the salesConfigs variable by adding each contract sale in an array for your project with the networks you want to support. Example:
You can see all the available chains currently supported by sequence here.
Set a default chainId for the project.
To set the default chainId, go to src/salesConfigs.ts
and modify the defaultChainId variable with the chainId you want to display by default in the project. It must match a chainId present in your salesConfigs variable. For example:
Your primary sales should now appear and function correctly from this point onward. In order to make a purchase, ensure you have the corresponding token that you set as a currency for the sale in your wallet, increment the amount, and click purchase!