Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 945 Bytes

README.md

File metadata and controls

70 lines (45 loc) · 945 Bytes

WePlay NFT Contract

NFT Smart contract for WePlay

Prerequisites

  • nodejs 14.x
  • yarn

Make .env file with following content:

INFURA_KEY=<infura-key>
PRIVATEKEY=<private-key>

# for mint
CONTRACT_ADDRESS=<deployed-contract-address>
MINT_TO_ADDRESS=<mint-to-address>

Save your arweave key (json) as ./scripts/key.json

Install dependencies:

$ yarn install

Usage

Compile contract

$ yarn build

Test contract

$ yarn test

Deploy contract

This will deploy contract to default network:

$ yarn deploy

All networks are specified in hardhat.config.ts. You can deploy to any network with:

$ yarn deploy --network <network>

Mint

For each token, create a folder in ./tokens/ and put img.png and index.json there
For example ./tokens/example/img.png ./tokens/example/index.json

Then run

$ yarn mint --network <network>

to mint