OpenAvatar is no longer under active development.
| Contract | Mainnet |
|---|---|
| OpenAvatarGen0Token | 0x0000000000000138Bd6bd34CF4A3905576f58e25 |
| OpenAvatarGen0TextRecords | 0x00000000000029F69177DcE0c57A81c9b73c02CE |
| OpenAvatarGen0RendererRegistry | 0x0000000000002ebafE656fe156fCeBb9435f662A |
| OpenAvatarGen0Renderer | 0x00000000000006FDeB6F46bb3fe4439eE5430351 |
| OpenAvatarGen0ProfilePictureRenderer | 0x00000000000008a2729597332F9a33757F6468A6 |
| OpenAvatarGen0Assets | 0x0000000000002e49c53D50F29503a882a74D25Ec |
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.
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.
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
To use the OpenAvatar app, you will need to install the necessary dependencies and set up your environment.
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- Build the app including the contract, web app, sprites, and type library:
yarn buildTo run everything in development mode, run:
$ docker-compose up- Start a local blockchain:
yarn start:ethereum- Deploy the contracts and upload the assets to the local blockchain:
yarn launch- Run the app:
yarn startThe app should now be running at http://localhost:3000.
To run the app in development mode, run:
yarn devTo format the code and lint it, run:
yarn formatTo lint the code, run:
yarn lintTo run the unit tests, run:
yarn testFor a code coverage report, run:
yarn coverageThe 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.
You can run the app via
docker compose upand then visit http://localhost:3000