This is the implementation for my Cosmos PoC.
This Turborepo includes the following packages/apps (some with their own READMEs):
web: a Next.js app where all the frontend code is located.@milkyway-engine/ui: a stub React component library shared by bothwebanddocsapplications. Read docs@milkyway-engine/wallet: a stub React hooks library utilized inwebfor blockchain interactivities. Read docs@milkyway-engine/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@milkyway-engine/tailwind-config:tailwindcssconfigurations used throughout the apps and ui package (includestailwindcss,postcssandautoprefixer)@milkyway-engine/typescript-config:tsconfig.jsons used throughout the monorepo
Each package/app is 100% TypeScript.
- Save time and effort on repetitive tasks
- Segregating ui package from web package allows for easier maintenance and scalability
- Enables a consistent coding style
- Provides a centralized location for configuration files
- Cosmos Docs on Keplr Wallet Integration w/ CosmJS.
- Keplr Wallet Example - industry standard example of how to integrate Keplr with CosmJS.
- Cosmjs Changelog - Used for IBC changes from
sendIbcTokensto usingMsgTransferandsignAndBroadcast.
| Implementation | Why |
|---|---|
| Display the states of the IBC transfer with a stepper | Couldn't find libraries to handle this, and constrained time to manually implement it |
| Implement IBC hook transfer using PFM | Ellapsed time |
| Difficulty | Description | Solution |
|---|---|---|
| Error handling | Some errors are not thrown, but are insinuated in the transaction/api responses! | Read through resolved json, and I had to manually handle them if the errors exist. |
| Documentation | Some features on Cosmos ecosystem are not well documented | I read codebases and GitHub issues to resolve them. |
| Tracking IBC transfers status in real time | I couldn't find libraries to handle this, so I tried to go through Finschia Client Codebase to get how to track the status of the IBC transfer. Unfortunately, there wasn't an implementation to handle real-time tracking, just on request time. |
- Simplicity of IBC implementation. PS: this is my first time implementing IBC.
- I learned a lot more low-level knowledge about IBC -- Particularly, I learned that unlike other interoperability protocols, IBC does not rely on trusted third parties. If you trust two particular chains to use the functions they provide (and by default their consensus mechanisms), then there are no additional trust assumptions needed while using IBC to interact between these chains.