bitcraft3r / web3-runner-game-vanilla-js

Web3 runner game built with Javascript, Solidity (ERC-1155 & ERC-20), IPFS, and Ethersjs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web3 Runner Game (Vanilla JS)

Someone's on the run. What happened?

Adding metadata

Use Pinata or other services to upload images and metadata to IPFS.

First, upload images. Then use the CID/link of images to input into json files.

Next, upload completed json files. Then use the CID/link of metadata to input into RunnerCollection.sol constructor argument.

Deploying the smart contracts

RunnerCollection.sol requires 3 arguments in constructor:

  1. "Name"
  2. "SYMBOL"
  3. "https://ipfs.io/ipfs/example-url-here/" // Link to the folder containing JSON metadata files
"Runner",
"RUN",
"https://gateway.pinata.cloud/ipfs/QmXGqNS7w9qcss9eRbViJe3FUJJy9vBgNWQ2b2mvuzHB7h/"

Deploying - the easiest way

Use Remix, copy your contracts in, compile, and deploy.

Deploying - the hardhat way

Setup Hardhat like recommended in the video (from about 30m 30s).

Deployed contracts and transactions

To view your NFTs, head to OpenSea Testnets, sign-in with metamask, and view your profile.

E.g. https://testnets.opensea.io/0xC1599513431405b231263516fe554fFd492A5bF2

References

Polygon Mumbai (Testnet) Facuets

About

Web3 runner game built with Javascript, Solidity (ERC-1155 & ERC-20), IPFS, and Ethersjs.


Languages

Language:JavaScript 72.8%Language:CSS 9.6%Language:HTML 9.0%Language:Solidity 8.6%