Skip to content

corygabrielsen/openavatar

Repository files navigation

OpenAvatar

OpenAvatar is no longer under active development.

Website

https://www.openavatar.tech/

Contract addresses

Contract Mainnet
OpenAvatarGen0Token 0x0000000000000138Bd6bd34CF4A3905576f58e25
OpenAvatarGen0TextRecords 0x00000000000029F69177DcE0c57A81c9b73c02CE
OpenAvatarGen0RendererRegistry 0x0000000000002ebafE656fe156fCeBb9435f662A
OpenAvatarGen0Renderer 0x00000000000006FDeB6F46bb3fe4439eE5430351
OpenAvatarGen0ProfilePictureRenderer 0x00000000000008a2729597332F9a33757F6468A6
OpenAvatarGen0Assets 0x0000000000002e49c53D50F29503a882a74D25Ec

Overview

The goal of OpenAvatar is to provide an open source, onchain, interoperable protocol standard for Avatars. Each avatar has a unique set of attributes and no two avatars are completely identical. All avatars are stored directly on the Ethereum blockchain, including raw image data and image encoders.

This repository contains the Ethereum contracts used to manage the Avatars, a web app to mint and manage avatars, a types library, raw image data for avatar sprites, and image encoders.

What is an Avatar?

An avatar is a digital representation of a user or character in an online environment. It can take many forms, such as a profile picture, a virtual character in a game, or a personalized icon on a social media platform. OpenAvatar allows users to create and customize their own avatars, which are stored on the Ethereum blockchain as NFTs.

Features

OpenAvatar offers the following features:

  • Create and customize your own unique avatar, with a wide range of attributes and customization options
  • Store your avatar on the Ethereum blockchain as an NFT
  • Interoperability with other platforms and applications that support NFTs

Usage

To use the OpenAvatar app, you will need to install the necessary dependencies and set up your environment.

Installation

To install the OpenAvatar app, you will need to have the following prerequisites:

  • Node.js v18.x
  • Yarn package manager
  • Hardhat or another Ethereum development blockchain

Once you have the prerequisites installed, clone the repository, navigate to the root directory of the repository and install the dependencies:

git clone https://github.com/stoooops/openavatar.git
cd openavatar
yarn install

Running the App

  1. Build the app including the contract, web app, sprites, and type library:
yarn build

Docker Compose

To run everything in development mode, run:

$ docker-compose up

Local

  1. Start a local blockchain:
yarn start:ethereum
  1. Deploy the contracts and upload the assets to the local blockchain:
yarn launch
  1. Run the app:
yarn start

The app should now be running at http://localhost:3000.

Development

To run the app in development mode, run:

yarn dev

To format the code and lint it, run:

yarn format

To lint the code, run:

yarn lint

To run the unit tests, run:

yarn test

For a code coverage report, run:

yarn coverage

Repository Structure

The repository structure for the OpenAvatar app consists of the following files and directories:

  • assets: Assets and scripts for generating and exporting the avatar assets.
  • contracts: Ethereum smart contracts for managing the avatars and scripts for deploying and interacting on chain. It also includes libraries for image encoding.
  • types: Source code and configuration files for defining OpenAvatar type system.
  • web: Web app, including configuration files, source code, assets, and scripts.

Run

You can run the app via

docker compose up

and then visit http://localhost:3000

About

OpenAvatar is an onchain protocol for avatars

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors