OpenMinter is in-development open-source tool to allow anyone to create, manage, and use assets on the Tezos blockchain via the FA2 standard. The tool enables the user to easily create any type of asset (fungible, semi-fungible, non-fungible), deploy their own associated contracts for those assets, manage them with an administration interface, and eventually use them via third-party services (exchanges, auctions, voting - DAOs, and games).
| Name | Version | Download |
|---|---|---|
| Docker | 19.03.x |
Link |
Note: on Ubuntu add your user to
dockergroup so that scripts using docker can be executed without sudo:
sudo usermod -a -G docker <username>
- Tezos sandbox: Flextesa
- Blockhain indexer: TZ Index
- Database: PostgreSQL
- InterPlanetary File System: IPFS
First install all the packages and build docker images for the development:
$ yarnor
$ yarn installNext, import a Tezos private key. For local development, we can use the default
Alice secret key that's included in the Tezos sandbox node:
$ printf "edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq" | docker secret create tz_private_key -This step is not required for the development environment since the secret key is stored and picked up from the config file.
We can start development environment either using sandbox or connecting to Tezos test net.
To start our docker swarm services using sandbox run:
$ yarn startor
$ yarn start:sandboxTo stop and teardown the services, using sandbox run:
$ yarn stopor
$ yarn stop:sandbox
To start our docker swarm services using testnet run:
$ yarn start:testnetTo stop and teardown the services, using testnet run:
$ yarn stop:testnetOnce you've started the docker swarm services with yarn start-xxx, it will
automatically bootstrap a set of initial contracts to interact with.
You can now open:
- http://localhost:9000 to view the application.
- http://localhost:9000/graphql to open the GraphQL playground.
Once your have started the docker swarm services with yarn start-xxx, a local
instance of IPFS server will be automatically configured and started.
No actions needed to use it for file upload.
However, if you wish to monitor the IPFS server or reconfigure it using its Web UI, you can use: http://localhost:5001/webui
To see a list of services running after you've started the system, run:
$ docker service lsTo view each service's logs, the bin/log command is available. It can be run
using yarn scripts yarn log or directly. It's a small wrapper around
docker service logs that matches the first service you provide
it:
$ yarn log:apior
$ bin/log api...which is a shorter way of doing the following:
$ docker service logs minter-dev-sandbox_api-server --follow --rawTo view the UI output, for example, run:
$ yarn log:uior
$ bin/log uiYou may also override the script's default docker service logs arguments
(--follow and --raw) by passing them at the end of the command. For example:
$ bin/log api --since 5mDocker development images are set up to reload server and web ui on source code changes.
To setup this project for an IDE, you will want to install NPM dependencies
outside of Docker. Make sure you have Yarn
(version 1.22.x or above) installed:
$ pushd client; yarn; popd
$ pushd server; yarn; popdBy default bin/start starts sandbox environment. To run against public tezos
nodes with public instance of tzstats start with
$ bin/start dev-testnetTo explore the database with with psql:
$ bin/psqlor, if using dev-testnet environment:
$ bin/psql dev-testnetTo modify database add migration SQL file(s) to db/ and perform migrations:
$ bin/migrate-dbor simply stop and start.
Individual services in docker stack can be restarted like so:
$ docker service scale minter-dev-sandbox_api-server=0
$ docker service scale minter-dev-sandbox_api-server=1Or with a helper shell function
$ svc-restart api-serverwhere svc-restart is defined as
$ svc-restart(){docker service scale minter-dev-sandbox_$1=0 && docker service scale minter-dev-sandbox_$1=1}Development ui and api server builds can be swapped out for release builds:
$ bin/build-release-imagesand then
STACK_API_SERVER_DEF=api-server STACK_UI_DEF=ui bin/start