https://github.com/maksandre/monster-drop
https://github.com/maksandre/monster-drop
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/maksandre/monster-drop
- Owner: Maksandre
- Created: 2025-01-21T10:57:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T04:56:49.000Z (over 1 year ago)
- Last Synced: 2025-01-29T02:53:37.264Z (over 1 year ago)
- Language: Solidity
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Monsters Drop 👾 👻 👹
## TLDR
#### Step-1. Set the deployer's private key
Set the `PRIVATE_KEY` variable to the `.env` file. See [`.env.example`](./.env-example). Top up its balance.
#### Step-2. Install packages and compile contracts
```sh
npm i
npm run compile
```
#### Step-3. Deploy to the Opal network
```sh
npx hardhat deploy --network opal
```
Save the collection address printed to the console. You'll need it to mint NFTs. You may also want to set `COLLECTION_ADDRESS` in the `.env` file.
#### Step-4. Mint an NFT to the Opal network
Provide the following params:
- `--addr` (optional): Collection's contract address. You've got it on step 3. This param is optional if you set the `COLLECTION_ADDRESS` environment variable to the `.env` file.
- `--to`: NFT owner. It can be an ethereum (0x...) address or a substrate (5Grwva...) address.
```sh
npx hardhat mint --addr 0x407fd72e995c2268bDedd2D1f03989Fec7307C0c --to 0x4B36849eB51288dB186fe83c3b00aBF8A008bD26 --network opal
```
## Check the code
- Contract: [`MonsterDrop.sol`](./contracts/MonsterDrop.sol).
- Ethers.js: [`tasks`](./tasks/index.ts).