You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple nodejs backend that relays transactions via the Sequence Transactions API from a restricted origin frontend. Server can be generalized for any type of transaction beyond just collectible minting (e.g. distributing ERC20 tokens to wallets).
Prerequisites
git installed
node version v22.6.0 installed and in use
Project cloned with git clone https://github.com/0xsequence-demos/server-side-transactions-boilerplate/
Quickstart with Sequence CLI
To quickly start using the Sequence CLI you can use the following command locally on your machine or on a server using the default environment variables for EVM_PRIVATE_KEY & PROJECT_ACCESS_KEY:
Update Server Configuration: Copy .env.example to .env with cp .env.example .env and complete fields
EVM_PRIVATE_KEY: Generate Ethereum private key as an Externally Owned Account (EOA) passed into a Sequence Wallet as a signer. For demo purposes you can obtain a private key from here
PROJECT_ACCESS_KEY: Use this walkthrough to obtain an access key
Deploy Collectible: Deploy an ERC721 contract with this walkthrough, and the obtained contract collectible contract address to be used in step 4.
Get Sequence Wallet Address: This can be obtained by going the Transactions API page and pasting in your EOA Private Key generated in Step 1, elicited as the Wallet Address.
Set Minter Role: Go to the Contracts section in Sequence Builder and navigate to Settings > Permissions > Add Collaborator. Add the public address of your generated Sequence Wallet and give the Minter role permissions from step 4.
Install Packages: Run in the project's root directory: $ pnpm install
Run tx-manager: Also in the project's root directory run: $ pnpm start
Mint Token: Use a command line interface to call using cURL to mint to a wallet address (could change the walletAddress to your own):