Create an NFT and deploy to a public testnet, using Truffle

Good article! Thanks.

1 Like

A post was split to a new topic: ERC721 Transfer fails on MetaMask

A post was split to a new topic: Deploy failed

A post was split to a new topic: Hosting ERC721 metadata

A post was split to a new topic: Where to store NFT metadata and where to set the price?

A post was split to a new topic: “Migrations” – transaction could not be decoded: could not recover secp256k1 key

A post was split to a new topic: Cost to deploy ERC721 token to mainnet

A post was split to a new topic: Batch mint with ERC721PresetMinterPauserAutoId?

3 posts were split to a new topic: nft.baseURI is not a function

I completed this and it was a really good tutorial!

There is one question that I dont know how to figure it out. Can somebody drop any reference for me about how to make my own image on twemoji. I tried to search for some, but just didnt find anything thats helpful. I want to upload my own img to twemoji, to get my own twemoji link (ex: https://twemoji.maxcdn.com/svg/1f40e.svg). Can I upload my own img or I have to “draw my own” from twemoji?

Thanks for your support!

You can’t upload images to twemoji, you will need to host your own images somewhere else, such as GitHub Pages, or IPFS via Pinata.

1 Like

my nft is deployed at 0x0843e3bdEc2c8F640FCead18BBD7929593B58cA6 and token 0 was minted, I’ve followed the tutorial and it also validated successfully, but my image doesn’t show up, why could that be? thanks in advance

When you say “my image doesn’t show up”, where are you trying to see it? I can see the contract on Rinkeby and it seems to have correct metadata.

yessir it showed up after some time👍 nice tutorial

1 Like

5 posts were split to a new topic: Unexpected token u in JSON at position 0 when verify contracts

Thanks for the tut abcoathup
Are these tokens not burnable?
I can't remove them from the OpenSea testnets
Any help would be appreciated!

The token in this tutorial is not burnable.

Hey thanks for the great tutorial.

Im facing a problem when i try to migrate in truffel develop with my own contract (created with the OpenZeppelin wizard) im getting the error throw new Error("Could not find artifacts for " + import_path + " from any sources");

The contract is in the same folder as the one in the tutorial. Only difference is that my contract is in the .sol format.

Any help would be appreciated :slight_smile:

Have a great day whoever reads this :slight_smile:

If you still have this issue please create a new post and include more details that could help reproduce or identify the problem.

hi I got the error below:

gilsun91@superman518:~/girl3$ npx truffle console --network rinkeby
Error: Cannot find module '@truffle/hdwallet-provider'
Require stack:
- /home/gilsun91/girl3/truffle-config.js
- /home/gilsun91/girl3/node_modules/original-require/index.js
- /home/gilsun91/girl3/node_modules/truffle/build/cli.bundled.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/gilsun91/girl3/truffle-config.js:21:26)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at Object.require (node:internal/modules/cjs/helpers:102:18)
    at Function.load (/home/gilsun91/girl3/node_modules/truffle/build/webpack:/packages/config/dist/index.js:152:1)
    at Function.detect (/home/gilsun91/girl3/node_modules/truffle/build/webpack:/packages/config/dist/index.js:141:1)
    at Object.module.exports [as run] (/home/gilsun91/girl3/node_modules/truffle/build/webpack:/packages/core/lib/commands/console/run.js:6:1)
    at Command.run (/home/gilsun91/girl3/node_modules/truffle/build/webpack:/packages/core/lib/command.js:189:1)
Truffle v5.5.6 (core: 5.5.6)
Node v16.14.0

truffle-config.js is

const { projectId, mnemonic } = require('./secrets.json');
const HDWalletProvider = require('@truffle/hdwallet-provider');
//
// const fs = require('fs');
// const mnemonic = fs.readFileSync(".secret").toString().trim();

module.exports = {
  /**
   * Networks define how you connect to your ethereum client and let you set the
   * defaults web3 uses to send transactions. If you don't specify one truffle
   * will spin up a development blockchain for you on port 9545 when you
   * run `develop` or `test`. You can ask a truffle command to use a specific
   * network from the command line, e.g
   *
   * $ truffle test --network <network-name>
   */

  networks: {
    development: {
      host: "127.0.0.1",     // Localhost (default: none)
      port: 8545,            // Standard Ethereum port (default: none)
      network_id: "*",       // Any network (default: none)
    },
    rinkeby: {
      provider: () => new HDWalletProvider(mnemonic, `https://rinkeby.infura.io/v3/${projectId}`),
      //url: `https://rinkeby.infura.io/v3/ddffba02473048c8add92478f28a2963`,
      network_id: 4,       // Rinkeby's id
      gas: 8500000,
      gasPrice: 1000000000,  // 1 gwei (in wei) (default: 100 gwei)
      confirmations: 2,    // # of confs to wait between deployments. (default: 0)
      timeoutBlocks: 200,  // # of blocks before a deployment times out  (minimum/default: 50)
      skipDryRun: true     // Skip dry run before migrations? (default: false for public nets )
    },

how to solve it? thank you