This app was initialized with [create-near-app] and modified to source images from Dall-e 2 searches and mint them as NFTs on the NEAR blockchain.
npm install
cp frontend/env.example frontend/.env
- update the
.env
by changingCONTRACT_NAME=txtimgnft.<YOUR-ACCOUNT>.testnet
- update the
- A Bearer Token is needed from the Dall-e website app to use for the API.
- Open https://labs.openai.com/ and Right Click to inspect. Go to network. You may need to refresh the page first.
- Input something and click generate.
- Find the Tasks, and scroll down to see your token.
- Copy everything after
authorization: Bearer
(usually starts withsess-
) and add it to yourfrontend/.env
likeBEARER_TOKEN=<YOUR-BEARER-TOKEN>
npm run build
npm run deploy
brew install direnv
cp envrc.example .envrc
- update the
.envrc
by changingBEARER_TOKEN=<YOUR-BEARER-TOKEN>
- update the
.envrc
by changingCONTRACT_NAME=txtimgnft.<YOUR-ACCOUNT>.testnet
direnv allow
- update the
- initialize the contract
near call $CONTRACT_NAME init '{"owner_id": "'$CONTRACT_NAME'"}' --accountId $CONTRACT_NAME
npm start