Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ckEth orchestrator #632

Merged
merged 14 commits into from
May 21, 2024
Merged

feat: ckEth orchestrator #632

merged 14 commits into from
May 21, 2024

Conversation

peterpeterparker
Copy link
Member

Motivation

Add the ckEth orchestrator (source) to @dfinity/ledger-cketh and expose function get_orchestrator_info.

This additional canister is responsible for spinning up Ledger and Index canisters for ckERC20 tokens when (and if) the respective proposals are approved and executed (for example, proposal 129750).

One might want to use this canister to fetch at runtime the list of ledgers and indexes or the list of supported ckERC20 tokens, but most probably, as in Oisy, one might use this feature to set up a job that periodically checks automatically if new tokens were approved and deployed.

Changes

  • set-up did and idl generation for orchestrator.did
  • init and expose CkETHOrchestratorCanister (no particular options)
  • implement get_orchestrator_info (nothing particular, readonly function)
  • add canister to docs.js to generate its documentation

Copy link
Contributor

github-actions bot commented May 21, 2024

size-limit report 📦

Path Size
@dfinity/ckbtc 7.24 KB (0%)
@dfinity/cketh 3.44 KB (+17.06% 🔺)
@dfinity/cmc 1.29 KB (0%)
@dfinity/ledger-icrc 3.6 KB (0%)
@dfinity/ledger-icp 14.73 KB (0%)
@dfinity/nns 34.58 KB (0%)
@dfinity/nns-proto 140.98 KB (0%)
@dfinity/sns 15.72 KB (0%)
@dfinity/utils 4.47 KB (0%)
@dfinity/ic-management 2.66 KB (0%)

Copy link
Contributor

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I'm curious, why do you fetch the cERC20 tokens with a periodic job in Oisy? Are the tokens coming from the backend then?

@peterpeterparker
Copy link
Member Author

peterpeterparker commented May 21, 2024

ckErc20 will require some additional information, such as their logo for Ethereum, which, unlike on the IC, is not provided by their respective smart contracts, so, it probably will still requires a bit of manual review/work.

We also periodically fetch and embed information statically, such as for Snses, rather than dynamically at runtime. This approach ensures that the UX/UI does not feel glitchy, as it does in the NNS dapp. While this may result in a delay of a few days before new tokens are available, it has no functional downsides since users can add custom tokens.

Thanks for the review!

@peterpeterparker
Copy link
Member Author

Closed and reopened the PR to restart the checks that were stuck.

@peterpeterparker peterpeterparker merged commit cec0dc3 into main May 21, 2024
11 checks passed
@peterpeterparker peterpeterparker deleted the feat/cketh-orchestrator branch May 21, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants