Skip to content

Latest commit

 

History

History
101 lines (70 loc) · 1.61 KB

README.md

File metadata and controls

101 lines (70 loc) · 1.61 KB

Gomora dApp

A Gomora template for building EVM-compatible API and smart contract indexers and listeners

Local Development

Setup the .env file first

cp .env.example .env

To bootstrap everything, run:

make

The command above will install, build, and run the binary

For manual install:

make install

For lint:

make install

Just ensure you installed golangci-lint.

To test:

make test

For manual build:

make build

# The output for this is in bin/

For contract build:

make contract-build

# the output for this is in infrastructures/smartcontracts

You can easily listen to the example Greeter contract (https://mumbai.polygonscan.com/address/0x927ec7f1f1CA6b09d0c448868aAB2C56d465a6e8#code) deployed in Polygon Testnet (Mumbai)

Docker Build

To build, run:

make run

To run the container:

make up

Database Migration

Gomora uses go-migrate (https://github.com/golang-migrate/migrate) to handle migration. Download and change your migrate database command accordingly.

To create a schema, run:

make schema NAME=<init_schema>

To migrate up, run:

STEPS=<remove STEPS to apply all or specify step number> make migrate-up

To migrate down, run:

STEPS=<remove STEPS to apply all or specify step number> make migrate-down

To check migrate version, run:

make migrate-version

To force migrate, run:

STEPS=<specify step number> make migrate-force

License

MIT

Made with ❤️ at Nuxify