Giter VIP home page Giter VIP logo

bodhi.js's Introduction

@acala-network/bodhi.js

Some tools and SDKs related to Acala EVM.

Packages:

Getting Started

  • initialize submodules (only need to do once after git clone)
git submodule update --init --recursive
  • install all dependencies
rush update
  • build
rush build // build all
rush build -t @acala-network/eth-rpc-adapter //  build all the things that @acala-network/eth-rpc-adapter depends on, and also @acala-network/eth-rpc-adapter itself
  • run build when the file changes
rush build:watch // watch all packages
rush build:watch -t @acala-network/eth-rpc-adapter //  watch all the things that @acala-network/eth-rpc-adapter depends on, and also @acala-network/eth-rpc-adapter itself
  • run a script defined in project's package.json
cd <project>
rushx <script-name>
  • add pacakge
rush add -p <package> --all             # for all projects
cd <project> && rush add -p <package>   # for this project only

run tests with docker

  • clean up
# super-quickly clean up docker containers and volumes (make sure you know what you are doing)
docker compose down ; docker rm -f $(docker ps -a -q) ; docker volume rm $(docker volume ls -q)

# or more safe way to clean up only related services
docker rm -vf $(docker ps -a | grep bodhijs_subquery-node | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_graphql-engine | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_postgres | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_mandala-node | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_eth-rpc-adapter-server | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_loop | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_feed-tx | awk '{print $1}')
  • run tests
### run any test
docker-compose up --abort-on-container-exit --exit-code-from=xxx --build -- xxx

where xxx โˆˆ {
  eth-providers-test,
  eth-rpc-adapter-test,
  waffle-examples-test,
  waffle-tutorials-test,
  hardhat-tutorials-test,
  truffle-tutorials-test,
}

### run all tests (not recommended since log will be too messy)
docker-compose up

we can grep container logs by

docker-compose logs --tail=0 --follow   # all logs
docker logs -f <container_id>           # logs for specific container

Documentation

  • This project is managed by Rushstack.
  • Most of the api of bodhi.js is compatible with ethers.js.

Release Workflow

manual

rush publish -p --set-access-level public -n <paste_npm_token_here>

CI

Each commit to master will trigger a CI publish. However, if the version in package.json didn't change, publish won't actually go to npm ,which is fine, so we don't want a new version for each commit. So if we want an actual publish, simply change to version in package.json, then push to master.

## first bump versions and commit
node scripts/bump-version.ts
git commit -m "bump version v2.x.x"

## tag the commit and push
git tag v2.x.x
git push origin v2.x.x

bodhi.js's People

Contributors

ntduan avatar shunjizhan avatar actions-user avatar zjb0807 avatar xlc avatar hussainmehdi avatar ermalkaleci avatar dependabot[bot] avatar thunderdeliverer avatar gluneau avatar brettkolodny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.