{"id":22998483,"url":"https://github.com/tablelandnetwork/example-voter","last_synced_at":"2025-04-02T13:24:43.909Z","repository":{"id":61613727,"uuid":"543004972","full_name":"tablelandnetwork/example-voter","owner":"tablelandnetwork","description":"A simple voting mechanism built with Tableland","archived":false,"fork":false,"pushed_at":"2023-03-09T19:26:26.000Z","size":990,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-25T17:03:25.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tablelandnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-29T08:27:58.000Z","updated_at":"2022-10-10T00:48:23.000Z","dependencies_parsed_at":"2023-02-16T22:30:52.341Z","dependency_job_id":null,"html_url":"https://github.com/tablelandnetwork/example-voter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-voter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-voter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-voter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-voter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tablelandnetwork","download_url":"https://codeload.github.com/tablelandnetwork/example-voter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246821083,"owners_count":20839363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T06:13:39.623Z","updated_at":"2025-04-02T13:24:43.877Z","avatar_url":"https://github.com/tablelandnetwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# example-voter\n\n[![Review](https://github.com/tablelandnetwork/example-voter/actions/workflows/review.yml/badge.svg)](https://github.com/tablelandnetwork/example-voter/actions/workflows/review.yml)\n[![License](https://img.shields.io/github/license/tablelandnetwork/example-voter.svg)](./LICENSE)\n[![Version](https://img.shields.io/github/package-json/v/tablelandnetwork/example-voter.svg)](./package.json)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg)](https://github.com/RichardLitt/standard-readme)\n\n\u003e A simple voting mechanism built with Tableland\n\n# Table of Contents\n\n- [example-voter](#example-voter)\n- [Table of Contents](#table-of-contents)\n- [Background](#background)\n- [Usage](#usage)\n- [Install](#install)\n- [Config](#config)\n- [Development](#development)\n- [Contributing](#contributing)\n- [License](#license)\n\n# Background\n\n`example-voter` is an experimental voting system built on Tableland. You can use this tool to ask y/n questions of an entire ERC721 collection. Only holders of the token will be able to answer your questions. Use this as an example of how you might build an all-in-one [Snapshot](https://snapshot.org/) like system with Tableland. Anyone can create questions and query results from the Tableland network.\n\n# Usage\n\n`example-voter` is deployed to Optimism Goerli. Grab some [Goerli](https://goerlifaucet.com/), bridge to [Optimism](https://app.optimism.io/bridge/deposit), and start asking questions :)\n\n```bash\n\u003e voter --help\n\nvoter \u003ccommand\u003e\n\nCommands:\n  voter init [format, path, yes]  Create config file\n  voter ask \u003ctoken\u003e \u003cquestion\u003e    Ask holders of an ERC721 collection a\n                                  question.\n  voter answer                    Answer a question. Only shows questions you\n                                  can answer based on NFT holdings. You can only\n                                  answer a question once.\n  voter questions                 List questions you can answer based on NFT\n                                  holdings.\n  voter answers                   List answers you have given.\n\nOptions:\n      --help         Show help                                         [boolean]\n      --version      Show version number                               [boolean]\n  -k, --privateKey   Private key string                                 [string]\n  -c, --chain        The EVM chain to target[string] [default: \"polygon-mumbai\"]\n  -p, --providerUrl  JSON RPC API provider URL. (e.g.,\n                     https://eth-rinkeby.alchemyapi.io/v2/123abc123a...)[string]\n```\n\n# Install\n\nThe `example-voter` package isn't published to NPM, but you can build the CLI locally:\n\n```\ngit clone https://github.com/tablelandnetwork/example-voter.git\ncd example-voter\nnpm install\nnpm run build\nnpm install -g .\nvoter --help\n```\n\n# Config\n\n`voter` uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. This means you can configure `voter` via (in order of precedence):\n\n- A `.voterrc.json`, `.voterrc.yml`, or `.voterrc.yaml` file.\n- A `.voterrc` file written in JSON or YAML.\n- A `\"voter\"` key in a local `package.json` file.\n\nThe configuration file will be resolved starting from the current working directory, and searching up the file tree until a config file is (or isn’t) found.\n\n`voter` intentionally doesn’t support any kind of global configuration. This is to make sure that when a project is copied to another computer, `voter`'s behavior stays the same. Otherwise, `voter` wouldn’t be able to guarantee that everybody in a team uses the same consistent settings.\n\nThe options you can use in the configuration file are the same as the global cli flag options. Additionally, all of these configuration values can be overriden via environement variables (prefixed with `VOTER_`), or via a local `.env` file. See `.env.example` for an example.\n\nA configuration file can also be bootstrapped using the `voter init` command. This will provide an interactive prompt to setup a config file (you can skip the interactive prompts by using the `--yes` flag). Global cli flags can be used in combination with the `init` command to skip specific questions. For example `voter init --chain \"optimism-goerli\"` will skip the question about default chain, and use `optimism-goerli` in the output config file.\n\n# Development\n\nGet started with installing and building the project:\n\n```shell\nnpm install\nnpm run build\n```\n\n# Contributing\n\nPRs accepted.\n\nSmall note: If editing the README, please conform to the\n[standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n# License\n\n[The Unlicense](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftablelandnetwork%2Fexample-voter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftablelandnetwork%2Fexample-voter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftablelandnetwork%2Fexample-voter/lists"}