Skip to content

robertdigital/ethgc

Repository files navigation

ethgc: ethereum gift card

ethgc.com

To learn more about redeeming or creating cards, see ethgc.com/docs.

Development environment

If you'd like to contribute to the project, awesome - thanks!

git clone --recurse-submodules https://github.com/hardlydifficult/ethgc.git
cd ethgc

npm i

this uses postinstall to install all packages in the monorepo

Now you can jump into the specific project of interest as described below. We use Zenhub to manage the backlog, but you are welcome to make any change and open a PR for discussion.

Website

cd website
npm run dev

This will open a tab with the ethgc website running locally. Any changes you make should auto-refresh the page.

Note that this will not include the website /docs

Documentation

cd docs
npm run dev

This will open a tab with the docs website running locally. Any changes you make should auto-refresh the page.

Contract

cd contract
npm run dev

This will compile contracts and run the test suite. Run this anytime you change a contract, the library, or one of the tests.

Library

At the moment, the library does not have any tests of its own. If you change the library, you can test using the contract tests or by interacting with the website.

Build Process

When changes are submitted, the following steps are performed:

  • auto-lint

    CI will lint the files. If --fix was able to make corrections, it will commit the changes and restart the build. If there's a lint error which can't be auto-fixed then the build fails.

  • Test

    All contract tests, which implicitly test the library as well, must pass or the build fails.

    At the moment the only tests we have are the contract tests.

  • Delpoy contracts

    CI will deploy the contract to all testnets if anything changed.

  • Build website

    CI will build the website for production - both the main ethgc site as well as the docs site.

  • Push changes

    CI will push the latest website and artifacts if all the other steps complete successfully on the master branch.

The website and docs are static files after they are built. Hosted by Github Pages with Cloudflare CDN fronting requests. All the data / network requests use the Infura APIs.

Additionally we are using the following Github bots:

  • Mergify: a configurable bot to automatically merge PRs
  • Renovate and Dependabot: creates a PR anytime a dependency updates
  • imgBot: creates a PR anytime an image can be losslessly compressed
  • WIP: add "WIP" to the title of a PR to block it from being merged

About

ethereum gift card

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published