Power

Minting Tokens

Batch, parallelize, and mint at scale your own ERC20, ERC721 or ERC1155 tokens with our Transactions API.

Minting at Scale

Create an admin wallet on your backend with access control to precisely manage your mints securely.

Connect to mint!

10 lines collapsed
11 export const action = serverOnly$(async (req, formData) => {
3 lines collapsed
15 const env = req.context.cloudflare.env;
16 const walletAddress = formData.get("walletAddress");
17 const tokenId = parseInt(formData.get("tokenId"));
18 const network = findSupportedNetwork(env.CHAIN_HANDLE)!;
19 const relayerUrl = `https://${env.CHAIN_HANDLE}-relayer.sequence.app`;
20 const settings: Partial<SessionSettings> = {
12 lines collapsed
33 };
34 const session = await Session.singleSigner({
35 settings: settings,
36 signer: env.PKEY,
37 projectAccessKey: env.BUILDER_PROJECT_ACCESS_KEY,
38 });
39 const signer = session.account.getSigner(network.chainId);
40 const collectibleInterface = new ethers.Interface([
41 "function mint(address to, uint256 tokenId, uint256 amount, bytes data)",
42 ]);
43 const dataArgs = [walletAddress, tokenId, 1, "0x00"];
44 const data = collectibleInterface.encodeFunctionData("mint", dataArgs);
45 return await signer.sendTransaction({
46 to: env.DEMO_ITEMS_CONTRACT_ADDRESS,
47 data,
48 });
49 });
19 lines collapsed
69 <Form
70 replace
71 method="post"
72 onSubmit={() => {
73 setMintStatus("pending");
74 }}
75 >
76 <input type="hidden" name="walletAddress" value={address} />
77 <input type="hidden" name="tokenId" value={7} />
78 <input type="hidden" name="name" value={"MintTokenWidget"} />
79 <button type="submit">Mint</button>
80 </Form>

Clone a boilerplate starter kit or explore our guides to learn more

  • boilerplateNFT MinterSource