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

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

When I try to deploy the contract i got the following error. How to solve this ?

    rinkeby: {
      provider: () => new HDWalletProvider(mnemonic, `https://rinkeby.infura.io/v3/${projectId}`),
      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 )
    },