This repository has been archived by the owner on Aug 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
feat(meta): Add meta-consensus-rpc module. #64
Draft
surangap
wants to merge
34
commits into
main
Choose a base branch
from
surangap/meta-consensus-rpc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for defimetachain ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Docker image for defich/metachain is ready! Built with commit 44cd72c
|
Codecov ReportBase: 3.79% // Head: 23.17% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
==========================================
+ Coverage 3.79% 23.17% +19.37%
==========================================
Files 10 16 +6
Lines 1711 2235 +524
Branches 0 4 +4
==========================================
+ Hits 65 518 +453
- Misses 1646 1717 +71
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Added some TODOs for asset briding. |
✅ Deploy Preview for metachain ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
canonbrother
changed the title
Add meta-consensus-rpc module.
feat(meta): Add meta-consensus-rpc module.
Sep 28, 2022
#### What this PR does / why we need it: Develop and test on a simple smart contract functionality on substrate-based blockchain. #### Which issue(s) does this PR fixes?: <!-- (Optional) Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes # #### Additional comments?: Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @​birthdayresearch/contented | [`1.6.0` -> `1.6.1`](https://renovatebot.com/diffs/npm/@birthdayresearch%2fcontented/1.6.0/1.6.1) | [![age](https://badges.renovateapi.com/packages/npm/@birthdayresearch%2fcontented/1.6.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@birthdayresearch%2fcontented/1.6.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@birthdayresearch%2fcontented/1.6.1/compatibility-slim/1.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@birthdayresearch%2fcontented/1.6.1/confidence-slim/1.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/DeFiCh/metachain). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTQuMyIsInVwZGF0ZWRJblZlciI6IjMyLjE5NC4zIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…workflows (#71) #### What this PR does / why we need it: As per the title. - Add a general `release.yml` pipeline for releasing NPM packages. - Add `environment: Release Docker` for `release-docker.yml` for deployment gates - Add new workflow for pnpm: - `Build (pnpm)` - `Lint (pnpm prettier)` - `Lint (pnpm eslint)` - `Test (pnpm)` is temporary failing since there isn't any test coverage to upload. - `Test (pnpm e2e)` deprecated and removeing soon. - Migrate old workflow for cargo to new name: - `Build (cargo)` - `Test (cargo)` - `Lint (cargo fmt)` - `Lint (cargo clippy)`
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [turbo](https://turborepo.org) ([source](https://togithub.com/vercel/turborepo)) | [`^1.4.5` -> `^1.4.6`](https://renovatebot.com/diffs/npm/turbo/1.4.5/1.4.6) | [![age](https://badges.renovateapi.com/packages/npm/turbo/1.4.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/turbo/1.4.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/turbo/1.4.6/compatibility-slim/1.4.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/turbo/1.4.6/confidence-slim/1.4.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vercel/turborepo</summary> ### [`v1.4.6`](https://togithub.com/vercel/turborepo/releases/tag/v1.4.6) [Compare Source](https://togithub.com/vercel/turborepo/compare/v1.4.5...v1.4.6) #### What's Changed ##### Internal - fix(deps): update dependency ora to v4.1.1 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1854](https://togithub.com/vercel/turborepo/pull/1854) - Don't special case version command by [@​gsoltis](https://togithub.com/gsoltis) in [https://github.com/vercel/turborepo/pull/1870](https://togithub.com/vercel/turborepo/pull/1870) - fix(deps): update dependency react-hot-toast to v2.3.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1875](https://togithub.com/vercel/turborepo/pull/1875) - chore(deps): update jamesives/github-pages-deploy-action action to v4.4.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1851](https://togithub.com/vercel/turborepo/pull/1851) - chore(deps): update dependency typescript to v4.8.2 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1849](https://togithub.com/vercel/turborepo/pull/1849) - chore(deps): update dependency esbuild to ^0.15.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1848](https://togithub.com/vercel/turborepo/pull/1848) - Enable pnpm@6 testing. by [@​7flash](https://togithub.com/7flash) in [https://github.com/vercel/turborepo/pull/1837](https://togithub.com/vercel/turborepo/pull/1837) - fix(deps): update dependency eslint-plugin-react to v7.31.7 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1834](https://togithub.com/vercel/turborepo/pull/1834) - chore(deps): update dependency [@​types/react](https://togithub.com/types/react) to v17.0.49 by [@​renovate](https://togithub.com/renovate) in [https://github.com/vercel/turborepo/pull/1833](https://togithub.com/vercel/turborepo/pull/1833) - Replace some 2 letter variables for readability by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1845](https://togithub.com/vercel/turborepo/pull/1845) ##### Documentation - Remove unused packages from docs site by [@​mehulkar](https://togithub.com/mehulkar) in [https://github.com/vercel/turborepo/pull/1828](https://togithub.com/vercel/turborepo/pull/1828) - Consolidated 'workspace' and 'package' terminology by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1817](https://togithub.com/vercel/turborepo/pull/1817) - Rewrote docs homepage by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1756](https://togithub.com/vercel/turborepo/pull/1756) - Update existing-monorepo.mdx by [@​shemayas](https://togithub.com/shemayas) in [https://github.com/vercel/turborepo/pull/1858](https://togithub.com/vercel/turborepo/pull/1858) - Update Docs by [@​PhentomPT](https://togithub.com/PhentomPT) in [https://github.com/vercel/turborepo/pull/1794](https://togithub.com/vercel/turborepo/pull/1794) - Fix broken links on "Add to existing Monorepo" by [@​pakaponk](https://togithub.com/pakaponk) in [https://github.com/vercel/turborepo/pull/1836](https://togithub.com/vercel/turborepo/pull/1836) ##### Examples - Removed parallel flag from basic example by [@​mattpocock](https://togithub.com/mattpocock) in [https://github.com/vercel/turborepo/pull/1787](https://togithub.com/vercel/turborepo/pull/1787) - Renamed storybook components by [@​samuelhorn](https://togithub.com/samuelhorn) in [https://github.com/vercel/turborepo/pull/1841](https://togithub.com/vercel/turborepo/pull/1841) ##### Packages - fix(eslint): exclude variables in rule by [@​tknickman](https://togithub.com/tknickman) in [https://github.com/vercel/turborepo/pull/1865](https://togithub.com/vercel/turborepo/pull/1865) #### New Contributors - [@​shemayas](https://togithub.com/shemayas) made their first contribution in [https://github.com/vercel/turborepo/pull/1858](https://togithub.com/vercel/turborepo/pull/1858) - [@​7flash](https://togithub.com/7flash) made their first contribution in [https://github.com/vercel/turborepo/pull/1837](https://togithub.com/vercel/turborepo/pull/1837) - [@​PhentomPT](https://togithub.com/PhentomPT) made their first contribution in [https://github.com/vercel/turborepo/pull/1794](https://togithub.com/vercel/turborepo/pull/1794) **Full Changelog**: vercel/turborepo@v1.4.5...v1.4.6 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/DeFiCh/metachain). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTQuMyIsInVwZGF0ZWRJblZlciI6IjMyLjE5NC4zIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…pace design (#86) #### What this PR does / why we need it: Move `ts-tests/*` to utilize pnpm and turbo mono-repo workspace design. With this, we managed to keep configs (eslint, prettier, babel jest) DRY. The PR "workspace-ize" `ts-tests` but ultimately many more PR is required to break this package into multiple smaller mono repo packages. Follow-up PRs required to address these: - [ ] ESLINT will be added back once we move to "testsuite", also part of #79 - [ ] #78 --- **What's new?** As suggested in #66 (comment) I've added hardhat compile turbo workflow. `@birthdayresearch/sticky-turbo-jest` is a turbo-aware `jest-preset`; it automatically run `dependsOn` script before running jest. By taking advantage of content-aware hashing from turborepo. `dependsOn` only runs if the pipeline `inputs` has changed. When you run your test with `@birthdayresearch/sticky-turbo-jest` preset, it uses `displayName` from your jest config to figure out which `pipeline` to use. It will automatically pinpoint the corresponding `dependsOn` and run all the scripts specified within. > TLDR, when you run a dependent test, it automatically recompiles your contract with hardhat when it detects changes in your `contracts/*.sol` file. If it has the cached version, it will simply "output" the result instead of rebuilding it. https://sticky.birthday.dev/packages/sticky-turbo-jest `package.json`: ```json "scripts": { "compile": "hardhat compile", "test": "jest" }, "jest": { "displayName": "test", "preset": "@birthdayresearch/sticky-turbo-jest" }, ``` `turbo.json`: ```json "compile": { "inputs": ["contracts/**"], "outputs": ["artifacts", "cache"] }, "test": { "inputs": ["src/**", "**/*.unit.ts", "tests-e2e/**"], "dependsOn": ["^build", "compile"] }, ``` #### Which issue(s) does this PR fixes?: <!-- (Optional) Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes part of #79
#### What this PR does / why we need it: Refactor and move `ts-tests` into mono-repo style packages to allow separation of context and downstream usability. This is the continuation of #42 `@defimetachain/testcontainers` Provides easy to use and test lightweight, throwaway instances of MetaChain provisioned automatically in a Docker container. `MetaChainContainer` and `StartedMetaChainContainer` follows the convention defined in [testcontainers/testcontainers-node](https://github.com/testcontainers/testcontainers-node) ```ts let container: StartedMetaChainContainer; let rpc: ethers.providers.JsonRpcProvider; beforeEach(async () => { container = await new MetaChainContainer().start(); }); afterEach(async () => { await container.stop(); }); it('should createBlock', async function () { await container.createBlock(); expect(await rpc.getBlockNumber()).toStrictEqual(1); }); ``` #### Which issue(s) does this PR fixes?: <!-- (Optional) Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes #78 #### Additional comments?: The current implementation in `ts-tests` isn't yet migrated to use the new standard and convention defined here. That should be done as part of #79.
#### What this PR does / why we need it: As per the title. Merely cosmetic change to move documentation structure into place. #### Which issue(s) does this PR fixes?: <!-- (Optional) Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes part of #8
…anges on the DeFiCh/ain codebase (#92) #### What this PR does / why we need it: As per the title.
#### What this PR does / why we need it: As per the title, this PR is a working draft version of MetaChain Consensus. Signed-off-by: Fuxing Loh <[email protected]> Co-authored-by: Eli <[email protected]>
<!-- Thanks for sending a pull request! --> #### What this PR does / why we need it: As per the title, this PR is a working draft version of MetaChain Token & Bridge. Signed-off-by: Fuxing Loh <[email protected]> Co-authored-by: Eli <[email protected]>
<!-- Thanks for sending a pull request! --> #### What this PR does / why we need it: #### Which issue(s) does this PR fixes?: <!-- (Optional) Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes # #### Additional comments?:
canonbrother
force-pushed
the
surangap/meta-consensus-rpc
branch
from
September 28, 2022 05:32
920424b
to
5352280
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Adds the following DMC side RPCs
Which issue(s) does this PR fixes?:
Fixes #89
Additional comments?: