Skip to content

Commit

Permalink
IPFS pinning instructions (#12)
Browse files Browse the repository at this point in the history
* IPFS pinning instructions

* add dnslink pinning option

* update CID / remove pinata instructions

* update CID
  • Loading branch information
mattetre authored Dec 18, 2024
1 parent e9dab46 commit 5abf2ca
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
53 changes: 50 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

This repository contains a viewer application for the Art Blocks On-Chain Generator.

## [https://artblocks.github.io/on-chain-generator-viewer](https://artblocks.github.io/on-chain-generator-viewer)
You can interact with the application here:

> You may also run the application locally by following the instructions below
- Hosted: [https://artblocks.io/onchain/generator](https://artblocks.io/onchain/generator)
- Decentralized: [https://ipfs.io/ipns/onchain-generator.artblocks.io](https://ipfs.io/ipns/onchain-generator.artblocks.io)

You may also run the application locally by following [the instructions below](#local-development)

## Overview

Expand All @@ -14,7 +17,7 @@ This viewer application retrieves the data URI of the NFT from a single contract

No dependencies on off-chain Art Blocks APIs are required to view the NFTs. The viewer application is designed to be self-contained and can be run locally.

## Usage
## Local Development

Before running the application, you may optionally create a `.env.local` file in the root directory of the project based on `.env.example`. This file allows you to specify the network and RPC endpoint to use when fetching NFT data. If you do not create a `.env.local` file, the application will default to using mainnet and a public viem RPC endpoint.

Expand All @@ -28,3 +31,47 @@ npm run dev
To fill out a form and view a supported Art Blocks artwork, navigate to `http://localhost:5173/on-chain-generator-viewer/`.

To view an Art Blocks artwork directly, navigate to `http://localhost:5173/on-chain-generator-viewer/<contract-address>/<token-id>`, replacing <contract-address> and <token-id> with the address of the NFT contract and the ID of the token you want to view. The application will fetch the html for the NFT and display it within an iframe on a new tab.

## Hosting

The application is hosted on centralized servers as well as on the decentralized IPFS network.

### Pin the On-Chain Generator

Help support decentralized access to the Art Blocks on-chain generator by pinning it to IPFS.

IPFS detail:

- CID: `bafybeicodqh762wabjalew7ysiprzsb5cpbqdxtkbtffpgj25ep2bkfluu`
- DNSLink: `onchain-generator.artblocks.io`

#### What is Pinning?

Pinning ensures the generator interface remains accessible through the IPFS network. The more people who pin the content, the more resilient and decentralized the network becomes.

#### Pin Using Local IPFS Node

If you're running your own IPFS node you can pin via CID or DNSLink

Pin via CID:

```
ipfs pin add bafybeicodqh762wabjalew7ysiprzsb5cpbqdxtkbtffpgj25ep2bkfluu
```

or

Pin via DNSLink:

```
ipfs pin add /ipns/onchain-generator.artblocks.io
```

#### Other Pinning Services

You can also use other IPFS pinning services like:

- Pinata
- Infura
- Web3.storage
- Filebase
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "my-vite-app",
"name": "on-chain-generator-viewer",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down

0 comments on commit 5abf2ca

Please sign in to comment.