Skip to content

Instantly share code, notes, and snippets.

View ryanio's full-sized avatar
👨‍🏭

Ryan Ghods ryanio

👨‍🏭
  • Los Angeles
View GitHub Profile

How to Create an ERC-721 Public Mint Order

Overview

To mint ERC-721 tokens from a public drop, you need to create a transaction that calls the SeaDrop contract's mintPublic function.

Required Information

  • dropContractAddress: The ERC-721 drop contract
  • quantity: Number of tokens to mint (for ERC-721)
  • minterAddress: Wallet address performing the mint
  • Drop Stage Info: Current price, feeBps, startTime/endTime

How to Create an ERC-1155 Public Mint Order

Overview

To mint ERC-1155 tokens from a public drop, you need to create a Seaport advanced order that represents the mint transaction.

Required Information

  • Contract Address: The ERC-1155 drop contract
  • Token IDs: List of token IDs to mint
  • Quantities: Corresponding quantities for each token ID
  • Minter Address: Wallet address performing the mint
@ryanio
ryanio / truffle_mint_dai.js
Last active December 30, 2020 22:39
Minting Dai in a Truffle Test Suite with Forked Mainnet
const { BN, ether, balance } = require("openzeppelin-test-helpers");
const { expect } = require("chai");
const { asyncForEach } = require("./utils");
// Artifacts
const ForceSend = artifacts.require("ForceSend");
// ABI
const erc20ABI = require("./abi/erc20");
query {
syncing {
currentBlock
highestBlock
knownStates
pulledStates
startingBlock
}
}
import { gql } from 'apollo-boost';
import { useQuery } from '@apollo/react-hooks';
import web3 from '../lib/web3';
export const GET_TOKEN_BALANCE = gql`
query TokenBalance($tokenAddress: Address!, $callData: Bytes!) {
block {
call(data: { to: $tokenAddress, data: $callData }) {
data
}