Coder Social home page Coder Social logo

sygmaprotocol / sygma-sdk Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 17.0 13.82 MB

A Typescript SDK to add cross-chain capabilities such as bridging tokens and sending messages across dApp projects.

Home Page: https://docs.buildwithsygma.com/

License: GNU Lesser General Public License v3.0

Dockerfile 0.32% TypeScript 99.18% JavaScript 0.50% SCSS 0.01%
cross-chain-communication ethereum evm polkadot substrate

sygma-sdk's People

Contributors

alysiahuggins avatar beroburny avatar dependabot[bot] avatar enemycnt avatar fsm1 avatar github-actions[bot] avatar haochizzle avatar makmuftic avatar mpetrun5 avatar mpetrunic avatar nmlinaric avatar omahs avatar p1sar avatar saadjhk avatar tcar121293 avatar wainola avatar waymobetta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sygma-sdk's Issues

Add support of rollup

Add support of rollup to build esModules and commonjs from the SDK codebase

Implementation details

Update the build script and use rollup to build correct modules

Testing details

Acceptance Criteria

Create suppport for shared configuration of local setup

The main idea is to get rid of hardcoded address in examples and if possible in the docs.
Instead replace it with always working configuration from local setup.

Implementation details

Create support for share configuration for examples.

Testing details

Create E2E test for that, including CI

Acceptance Criteria

All examples should run with the latest configurations of the local setup config.
Update the docs accordingly

Create substrate react example

Implementation details

Create a frontend app with basic support of substrate

Testing details

Acceptance Criteria

The user should be able to deposit using polkadot.js extension and our local setup

Colors example fails to start

Colors example fails to start and returns errors (probably related to new version of sdk?).
Also, would be nice to be able to set environment variables for it in some .env file to be able to
deploy for devnet.

Add support for substrate network as destination

Our sdk should start accepting substrate addresses as destination address as well as appropriate calldata encoding.

Implementation details

Since Substrate address has different format and validation that might require to make some changes in SDK.
https://docs.substrate.io/fundamentals/accounts-addresses-keys/
Also we calldata encoding for Substrate network as destination should be little bit different since length of address is different from ETH one and we are encoding deposit calldata as amount + addresslen + address and must be sure that everything on SDK side will work fine with Substrate address type.

Testing details

Acceptance Criteria

Generate docs based on jsdoc annotations

Implementation details

Add script in package.json to generate docs using typedoc

Testing details

Could be good idea to research the CI part as well

Acceptance Criteria

The user can generate docs extracting jdocs from codebase

Add send extrinsic to substrate

SDK will need to send extrinsic to substrate
For Phala sygma pallet, extrinsic includes bridge request, retry

Implementation details

details could be found in the SoW research doc

Testing details

Unit test

Acceptance Criteria

SDK should have ability to send extrinsic to any substrate
SDK should be able to send bridge request extrinsic and retry extrinsic to Phala sygma pallet

Add substrate deposit data construction logic

Substrate chain might have different deposit data, so SDK needs to construct it accordingly

Implementation details

Phala Sygma pallet requires MultiLocation data, and this data should be embedded into the depositData

some useful link:
https://wiki.phala.network/en-us/general/subbridge/technical-details/#multiasset-and-multilocation
The first time it was introduced from XCM protocol: https://github.com/paritytech/xcm-format#7-universal-consensus-location-identifiers
Gavin Wood's explanation: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#1330
The source code declaration: https://github.com/paritytech/polkadot/blob/master/xcm/src/v1/multilocation.rs#L51

Testing details

Unit test

Acceptance Criteria

SDK consumes necessary params and construct a depositData in bytes that embedded MultiLocation data

Extract EVM-related functions, unit tests

Following the functional style from the Substrate section, it's required to add the rest of EVM-related functions from Sygma class to the src/chains/EVM folder.
Preparing to the deprecation of Sygma class.

Implementation details

Create basic jsdoc annotations for every function

Testing details

Cover 100% of lines by jest unit tests

Acceptance Criteria

The developer can use EVM-related functions using EVM namespace import { EVM } from "@buildwithsygma/sygma-sdk-core";

Add make runtime call to substrate

SDK will need to make runtime call to substrate in order to query useful info.
For Phala sygma pallet, account balance, estimate fee are the implementation

Implementation details

details could be found in the SoW research doc

Testing details

Unit test

Acceptance Criteria

SDK should have ability to make runtime call to any substrate
SDK should be able to call Phala sygma pallet to query balance of an account, estimate the fee for a bridging request

Add examples to jsdocs

Improve the docs by adding the examples

Implementation details

Add examples of usage for functions in Substate and EVM

Testing details

Acceptance Criteria

The user should understand the function better reading our docs

Fix fee oracle behavior

Implementation details

Testing details

Add unit tests for all involving functions

Acceptance Criteria

update examples to work with new package and new structure of bridge data

Since we are using github packages, we should upate examples to work with this new package and also update with new changes regarding BridgeData structure (tokens array and fee settings)

Update README to target github registry and not npm

Provide scoping options to do this

Implementation details

Testing details

Acceptance Criteria

Update root README with latest changes

With latest aditions to the SDK, we need to update the README with instructions on how to use our SDK alongside with the examples and dependencies

Implementation details

  • Update root README with latest instructions on how to install and run SDK + examples

Testing details

Acceptance Criteria

add ERC721 support to SDK

Add config and methods to support bridging ERC721 tokens

Implementation details

Testing details

Acceptance Criteria

Could bridge ERC721 tokens with SDK

Check/update dependencies for packages

Implementation details

  • Check dependencies in the SDK package to make sure it can be used as standalone lib.
  • Remove unused dependencies

Testing details

Acceptance Criteria

The SDK should work fine as standalone lib

Document SDK with annotations over the methods

Implement annotations over methods of the SDK

Implementation details

  • Decide between TSDocs or JSDocs to use
  • Provide descriptions for all the methods.
  • Update README with most important methods to use for the SDK in common scenarios, frontend or backend

Testing details

Acceptance Criteria

Add dynamic fee support for substrate-based chains

SDK needs to support creating deposit requests toward domains (networks) that are substrate-based for resources that are using dynamic fee handling.

Implementation details

For token bridging requests, the flow remains the same as before. SDK invokes fee oracle for a fee estimate message on endpoint /v1}/rate/from/{fromDomainID}/to/{toDomainID}/resourceid/{resourceID}. The fee oracle will return the appropriate fee estimate message based on the destination domain.

The flow of generic messages is similar to before, but with one difference. Here SDK needs to understand the context of requesting a fee estimate for a request with the substrate-based destination chain, as it will need to calculate the length_fee property of extrinsic before calling fee oracle. Here you can read more on how fees are calculated on substrate-based chains, but effectively length_fee is the bytes length of the concrete extrinsic.

For more context on the fee estimate message format, you can check the technical documentation of the fee oracle (once this PR is merged technical documentation will be inside repo inside /docs)

Testing details

[] Add unit test with mocked fee oracle API

Acceptance Criteria

[] SDK support creating deposit requests for token bridging requests toward substrate-based networks for resources using dynamic fee strategy
[] SDK support creating deposit requests for generic requests toward substrate-based networks for resources using dynamic fee strategy

Remove linked dependency from examples

All of our current examples use sdk as linked dependency and not from npm registry. This add complexity when trying to run examples and its less straightfoward since it need to run TS compiler in the sdk folder.

Implementation details

Remove examples folder from workspaces to use dependency from npm.

Testing details

Acceptance Criteria

Dynamic fee strategies with Fee Router

Implementation details

Use fee settings for every specific token. So the config should be change accordingly

Testing details

Acceptance Criteria

Every token in every bridge has his own fee logic

Split tests into unit, functional and e2e

Currently we have a folder called integration with e2e test against json rpc and some functional test against some basic methods that our SDK provides. To impove our codebase, we should have those tests separated.

Implementation details

  • create folder for e2e and functional or unit tests
  • acomodate current test in those folder.
  • fix the tests that are not passing due to recent updates in the codebase

Testing details

  • all test must pass
  • PR pipeline should have test running

Acceptance Criteria

Fix invalid imports

Fix invalid imports at basicFee.ts . Check other files for invalid imports.

Implementation details

Testing details

Acceptance Criteria

All imports should be correct

Create basic adapter for substrate

Implementation details

Added special adapter for substrate
New configuration for main sygma class

Testing details

Acceptance Criteria

SDK should be able to deposit on substrate chain

Linter issues

Expected Behavior

To have 0 Error and Warning while running lint

Current Behavior

yarn run sdk:lint
yarn run v1.22.19
$ yarn workspace @buildwithsygma/sygma-sdk-core lint
$ eslint '{src,integration}/**/*.ts'

Oops! Something went wrong! :(

ESLint: 8.28.0

Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js » ../../.eslintrc.js » @chainsafe/eslint-config': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:
- /home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js
- /home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
- /home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
- /home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
- /home/bero/WebstormProjects/sygma-sdk/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at /home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js:34:5
    at Object.<anonymous> (/home/bero/WebstormProjects/sygma-sdk/node_modules/@chainsafe/eslint-config/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js:5:60)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 2
Command: /home/bero/.nvm/versions/node/v12.13.0/bin/node
Arguments: /home/bero/.nvm/versions/node/v12.13.0/lib/node_modules/yarn/lib/cli.js lint
Directory: /home/bero/WebstormProjects/sygma-sdk/packages/sdk
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Steps to Reproduce (for bugs)

run yarn run sdk:lint

Broken `sygma-sdk-erc721-react-example`

Expected Behavior

When running example following instructions to work

Current Behavior

You can run the example without a problem but is UI is broken
image

Steps to Reproduce (for bugs)

  1. Clone project
  2. build SDK
  3. run the relayer
  4. follow instructions to run an example
  5. press connect button on the UI

Versions

main

Broken `yarn mintERC20` inside `sygma-sdk-erc20-react-example`

/sygma-sdk/examples/erc20-react-example$ yarn mintERC20
yarn run v1.22.19
$ ts-node ./src/scripts/mint.ts
wallet address:  0x5C1F5961696BaD2e73f73417f07EF55C62a2dC5b
wallet private key:  0xcc2c32b154490f09f70c1c8d4b997238448d649e0777495863db231c4ced3616
/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/wallet/node_modules/@ethersproject/logger/src.ts/index.ts:269
        const error: any = new Error(message);
                           ^
<ref *1> Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"id\":52,\"jsonrpc\":\"2.0\",\"error\":{\"message\":\"VM Exception while processing transaction: revert\",\"code\":-32000,\"data\":{\"stack\":\"o: VM Exception while processing transaction: revert\\n    at Function.o.fromResults (/app/ganache-core.docker.cli.js:4:297036)\\n    at e.exports (/app/ganache-core.docker.cli.js:55:2302856)\",\"name\":\"o\"}}}","error":{"code":-32000,"data":{"stack":"o: VM Exception while processing transaction: revert\n    at Function.o.fromResults (/app/ganache-core.docker.cli.js:4:297036)\n    at e.exports (/app/ganache-core.docker.cli.js:55:2302856)","name":"o"}},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"gasPrice\":\"0x4a817c800\",\"from\":\"0x5c1f5961696bad2e73f73417f07ef55c62a2dc5b\",\"to\":\"0x1ccb4231f2ff299e1e049de76f0a1d2b415c563a\",\"data\":\"0x40c10f190000000000000000000000005c1f5961696bad2e73f73417f07ef55c62a2dc5b0000000000000000000000000000000000000000000000055de6a779bbac0000\"}],\"id\":52,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"http://localhost:8547"}, tx={"data":"0x40c10f190000000000000000000000005c1f5961696bad2e73f73417f07ef55c62a2dc5b0000000000000000000000000000000000000000000000055de6a779bbac0000","to":{},"from":"0x5C1F5961696BaD2e73f73417f07EF55C62a2dC5b","gasPrice":{"type":"BigNumber","hex":"0x04a817c800"},"type":0,"nonce":{},"gasLimit":{},"chainId":{}}, code=UNPREDICTABLE_GAS_LIMIT, version=abstract-signer/5.7.0)
    at Logger.makeError (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/wallet/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
    at Logger.throwError (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/wallet/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
    at /home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/wallet/node_modules/@ethersproject/abstract-signer/src.ts/index.ts:301:31
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 6) {
  reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
  code: 'UNPREDICTABLE_GAS_LIMIT',
  error: Error: processing response error (body="{\"id\":52,\"jsonrpc\":\"2.0\",\"error\":{\"message\":\"VM Exception while processing transaction: revert\",\"code\":-32000,\"data\":{\"stack\":\"o: VM Exception while processing transaction: revert\\n    at Function.o.fromResults (/app/ganache-core.docker.cli.js:4:297036)\\n    at e.exports (/app/ganache-core.docker.cli.js:55:2302856)\",\"name\":\"o\"}}}", error={"code":-32000,"data":{"stack":"o: VM Exception while processing transaction: revert\n    at Function.o.fromResults (/app/ganache-core.docker.cli.js:4:297036)\n    at e.exports (/app/ganache-core.docker.cli.js:55:2302856)","name":"o"}}, requestBody="{\"method\":\"eth_estimateGas\",\"params\":[{\"gasPrice\":\"0x4a817c800\",\"from\":\"0x5c1f5961696bad2e73f73417f07ef55c62a2dc5b\",\"to\":\"0x1ccb4231f2ff299e1e049de76f0a1d2b415c563a\",\"data\":\"0x40c10f190000000000000000000000005c1f5961696bad2e73f73417f07ef55c62a2dc5b0000000000000000000000000000000000000000000000055de6a779bbac0000\"}],\"id\":52,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="http://localhost:8547", code=SERVER_ERROR, version=web/5.7.0)
      at Logger.makeError (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.throwError (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at /home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/src.ts/index.ts:335:28
      at step (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib/index.js:33:23)
      at Object.next (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib/index.js:14:53)
      at fulfilled (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib/index.js:5:58)
      at processTicksAndRejections (node:internal/process/task_queues:95:5) {
    reason: 'processing response error',
    code: 'SERVER_ERROR',
    body: '{"id":52,"jsonrpc":"2.0","error":{"message":"VM Exception while processing transaction: revert","code":-32000,"data":{"stack":"o: VM Exception while processing transaction: revert\\n    at Function.o.fromResults (/app/ganache-core.docker.cli.js:4:297036)\\n    at e.exports (/app/ganache-core.docker.cli.js:55:2302856)","name":"o"}}}',
    error: Error: VM Exception while processing transaction: revert
        at getResult (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:125:28)
        at processJsonFunc (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/src.ts/index.ts:377:22)
        at /home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/src.ts/index.ts:314:42
        at step (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib/index.js:33:23)
        at Object.next (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib/index.js:14:53)
        at fulfilled (/home/bero/WebstormProjects/sygma-sdk/examples/erc20-react-example/node_modules/@ethersproject/providers/node_modules/@ethersproject/web/lib/index.js:5:58)
        at processTicksAndRejections (node:internal/process/task_queues:95:5) {
      code: -32000,
      data: [Object]
    },
    requestBody: '{"method":"eth_estimateGas","params":[{"gasPrice":"0x4a817c800","from":"0x5c1f5961696bad2e73f73417f07ef55c62a2dc5b","to":"0x1ccb4231f2ff299e1e049de76f0a1d2b415c563a","data":"0x40c10f190000000000000000000000005c1f5961696bad2e73f73417f07ef55c62a2dc5b0000000000000000000000000000000000000000000000055de6a779bbac0000"}],"id":52,"jsonrpc":"2.0"}',
    requestMethod: 'POST',
    url: 'http://localhost:8547'
  },
  tx: {
    data: '0x40c10f190000000000000000000000005c1f5961696bad2e73f73417f07ef55c62a2dc5b0000000000000000000000000000000000000000000000055de6a779bbac0000',
    to: Promise { '0x1CcB4231f2ff299E1E049De76F0a1D2B415C563A' },
    from: '0x5C1F5961696BaD2e73f73417f07EF55C62a2dC5b',
    gasPrice: BigNumber { _hex: '0x04a817c800', _isBigNumber: true },
    type: 0,
    nonce: Promise { 39 },
    gasLimit: Promise { <rejected> [Circular *1] },
    chainId: Promise { 1338 }
  }
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

CI for linting and testing

Implementation details

Configure GitHub actions for linting and running tests

Testing details

Acceptance Criteria

The CI should run after each commit

setup suite to have e2e test

In order for us to have e2e test we need to setup nodes and relayer to check for events

Implementation details

  • setup e2e suite to run test that would require this type of setup
  • explore feasibility of setup two hardhat nodes and relayers

Testing details

Acceptance Criteria

Node.js example for ERC721

We have a frontend example for ERC721, we should provide one for ERC721 on Node.js

Implementation details

  • Implement example to run on comand line
  • re-use nft mint script from frontend example

Testing details

Acceptance Criteria

Include gas limit in FeeOracle data

Implementation details

Following the expansion of the Fee oracle endpoint that will be implemented with this issue, we need for SDK to reflect this when fetching fee data from oracle here.

This means that we have an additional argument, msgGasLimit that needs to be provided when creating a generic message request using SDK. This should be an optional argument (defaults to 0).

Testing details

  • manually test with local setup (this is blocked by changes on fee oracle)

Acceptance Criteria

  • fee oracle changes reflected in SDK
  • successfully executed permissionless generic request created with SDK, executed on local setup

Broken `sygma-sdk-erc20-react-example`

Expected Behavior

When running example following instructions to work

Current Behavior

You can run the example without a problem but is UI is broken
image

Steps to Reproduce (for bugs)

  1. Clone project
  2. build SDK
  3. run the relayer
  4. follow instructions to run an example
  5. press connect button on the UI

Versions

main

Improve react example UX

In examples erc20-react-example and erc721-react-example there is the usage of window.confirm which fulfills the need of an example but for a better impression, it should be a modal

Fix url to query fee oracle service

  • param for getting msgGasLimit should be a query param

Expected Behavior

  • get the response with whathever the number is being passed or defaults to zero

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Versions

ChainBridge commit (or docker tag):
chainbridge-solidity version:
chainbridge-substrate version:
Go version:

Implements the logic to construct the feeData for Substrate chain

feeData will be different for substrate chain comparing to evm chain, so SDK will have to construct feeData differently and send to contract for fee calculation

Implementation details

details could be found in the SoW research doc

Testing details

Unit test

Acceptance Criteria

SDK should be able to construct all necessary params that fetched from fee oracle into feeData for substrate chain

Create ERC721 example application and documents

In order to provide guide for ERC721 usage we need to build small example application and Guide that describes how this works.

Implementation details

Build example with usage of basicFeeHandler but documentation should also mention both (with fees and without)
Example app should be able to run with local setup so there is should be guide to run it locally.
Example application should have drop down for owned NFT tokens from selected collection

Testing details

[] Recheck that everything works locally couple times, ask someone else to run it to make sure that it is working fine

Acceptance Criteria

[] Example application implemented
[] Readme guide for this application written

Node.js example for generic contract

Create Node.js example for generic contract

Implementation details

  • make use of Colors contract already present in local setup
  • create example to run over terminal

Testing details

Acceptance Criteria

Add general substrate chain support and add Phala sygma pallet support

SDK needs to provide Substrate as destination chain to allow other surroundings features such as Substrate fee calculation and resourceID binding, etc. when bridging from EVM to Substrate, SDK also needs to communicate with Substrate in order to send extrinsic and make a runtime call when bridging from Substrate to EVM, so general chain support is necessary.
Phala Sygma pallet will be the actual implementation after general support added

Implementation details

details could be found in the SoW research doc

Testing details

Unit test

Acceptance Criteria

SDK should have general substrate chain support including configuration structure define, communication setup

Add Generic hander methods to SDK

Implementation details

Generally it is still only one deposit method that needs to be called by SDK but there is also specific format of the calldata that is parsed by Generic.
@MakMuftic should have all the details and documentation

Testing details

Acceptance Criteria

  • SDK can be used to call Generic methods across chain and compose calldata

Migration to pnpm

Migrate from yarn v1 to the current version of pnpm as primary package manager.

Implementation details

Could be some breaking changes.

Testing details

CI scripts should also be migrated to pnpm

Acceptance Criteria

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.