A Gomora template for building EVM-compatible API and smart contract indexers and listeners
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://sepolia.etherscan.io/address/0x0e10e90f67C67c2cB9DD5071674FDCfb7853a6F5#code) deployed in Ethereum Testnet (Sepolia)
To build, run:
make run
To run the container:
make up
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:
NAME=<create_users_schema> make migrate-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
Made with ❤️ at Nuxify