- Notifications
You must be signed in to change notification settings - Fork15
cazala/eth-pictures
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This tool is an experiment I did to play with decentralized infrastructure.
The images are uploaded toIPFS, and an NFT (non-fungible token) is minted in the Ethereum blockchain to represent each picture.
Each token is ownable, transferrable, tradable and unique.
The gallery data is pulled fromOpenSea's API.
- Environment variables
$ mv .env.example .env
Add yourREACT_APP_INFURA_TOKEN
- Install dependencies
$ npm install
- Start dev-server
$ npm start
- Production build
$ npm run build
You need to fill theMNEMONIC
andREACT_APP_INFURA_TOKEN
environment variables in your.env
file:
MNEMONIC="bunker satoshi food..."REACT_APP_INFURA_TOKEN=b013...
Then useopenzeppelin create
command and follow the interactive steps to deploy your contract.
To use this new contract just update theREACT_APP_CONTRACT_ADDRESS
environment variable.
If you make changes tocontracts/EthPictures.sol
you will need to do the following afterwards:
- Compile contracts
$ npm install -g @openzeppelin/cli$ openzeppelin compile
- Generate TypeScript interfaces
$ npm run contracts
If you have problems compiling your app after this, check out theTroubleshooting section.
To use the Rinkeby testnet you need to point to a Rinkeby contract (you can deploy your own or use the one shown below), and also point to OpenSea's rinkeby API, like this:
REACT_APP_CONTRACT_ADDRESS=0xd9284B013f9237BAA3d884dca36FA1658430b178REACT_APP_OPENSEA_API=https://rinkeby-api.opensea.ioREACT_APP_OPENSEA_URL=https://rinkeby.opensea.io
That address is an actual instance of the contract deployed to Rinkeby:link to Etherscan.
If your build is failing due to a problem withsrc/contracts/EthPicturesAbi.ts
try typing the ABI asany
, by changing the last line in that file to the following:
]as any)
About
🎨 Draw your own NFTs
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.