Rebel's goal for our Tableland Pilot Project was to create a decentralized, on-chain NFT discussion system that allows NFT holders to discuss items in a collection in a nested commenting format. We also wanted to make it possible to token-gate the ability to comment on items such that only holders of a given NFT could contribute comments.

https://www.loom.com/embed/29df37ce66fa4d45933b87145e2e4840

I'm pleased to say we accomplished the bulk of what we set out to do. Our contract supports registering NFT collections and posting nest-able comments on a given token which can then later be retrieved as a JSON payload by anyone to display in any app or website. We weren't yet able to implement the full scope of "token gating" write-access due to the limitations of blockchain interoperability.

The way NFCs work today is we're going to maintain a list of "trusted" apps that can write to the contract and comments registry and, using Tableland's access policy capabilities, only allow insertions from allowed addresses. Websites and apps like Rebel, OpenSea, etc can demonstrate a trusted implementation of authenticating and verifying their own users to become allow-listed. These apps will provide an address to the NFC contract which allows them to call the addCollection and addComment functions on behalf of a given user which also allows users to skip having to sign every transaction, reducing UX friction on the frontend.

Contract and Table info:

Chain: Optimism Goerli

Registry table: nfcregistry_10_4

Comments table: nfccomments_10_5

Contract address: 0x35d75D6d2053c5B1F917ebd5a9930138c20968e3

Contract source: https://gist.github.com/mboyle/041856af0ac8b7cb4389adac325f18fe

Live Demo: [will add later]

Schema

# Registry Table
CREATE TABLE collections (
  id integer NOT NULL,
  created_at integer NOT NULL,
  address text NOT NULL,
  chain_id integer NOT NULL,
  name text,
  symbol text,
  token_gate integer
)

# Comments Table
CREATE TABLE comments (
  id integer NOT NULL,
  created_at integer NOT NULL,
  address string NOT NULL,
  body text,
  contract_id integer,
  token_id integer,
  parent_id integer
)

# Votes Table
CREATE TABLE votes (
  id integer NOT NULL,
  created_at integer NOT NULL,
  address string NOT NULL,
  vote integer,
  comment_id integer
)

Discoveries