-
Notifications
You must be signed in to change notification settings - Fork 8
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: staking extension and git submodules #360
Conversation
WalkthroughThe recent changes primarily introduce submodules in the git repository, update ESLint, Prettier and Git ignore settings, modify CI/CD workflows, and implement new functionalities for staking extensions. The changes also focus on cancelling unstaking delegations, updating script files for generating TypeScript proto code, and modifying testing files. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Wallet
participant Blockchain
User->>Wallet: Initiate cancel unstaking
Wallet->>Blockchain: Send CancelUnbondingDelegation tx msg
Blockchain-->>Wallet: Confirm tx completion
Wallet-->>User: Display confirmation message
Assessment Against Linked Issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range and nitpick comments (3)
README.md (3)
Line range hint
64-64
: The fenced code block for initializing the environment is missing a language identifier, which helps in syntax highlighting and readability in markdown renderers.- ``` + ```bash
Line range hint
2-2
: Images used in the README lack alternative text descriptions. Adding alt text improves accessibility and SEO.- <img src="https://raw.githubusercontent.com/NibiruChain/ts-sdk/develop/img/nibijs.png" width="100%"> + <img src="https://raw.githubusercontent.com/NibiruChain/ts-sdk/develop/img/nibijs.png" alt="NibiJS Logo" width="100%">Also applies to: 14-14, 19-19, 24-24, 29-29, 34-34, 276-276
Line range hint
52-52
: The link to the documentation is broken or points to an invalid fragment. Ensure the link is correct to provide users with valid navigation.- To learn more about Nibiru, see [nibiru.fi/docs](https://nibiru.fi/docs) + To learn more about Nibiru, ensure the link [nibiru.fi/docs](https://nibiru.fi/docs) is correct or update it.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (11)
- .github/workflows/test-ts-sdk.yaml (1 hunks)
- .gitignore (1 hunks)
- .gitmodules (1 hunks)
- README.md (1 hunks)
- package.json (1 hunks)
- scripts/build.sh (1 hunks)
- scripts/protocgen.sh (3 hunks)
- src/sdk/query/index.ts (1 hunks)
- src/sdk/query/query.ts (4 hunks)
- src/sdk/query/staking.test.ts (1 hunks)
- src/sdk/query/staking.ts (1 hunks)
Files skipped from review due to trivial changes (5)
- .github/workflows/test-ts-sdk.yaml
- .gitmodules
- package.json
- scripts/build.sh
- src/sdk/query/index.ts
Additional context used
Shellcheck
scripts/protocgen.sh
[warning] 21-21: Use "${var:?}" to ensure this never expands to / . (SC2115)
[warning] 25-25: For loops over find output are fragile. Use find -exec or a while read loop. (SC2044)
[warning] 32-32: For loops over find output are fragile. Use find -exec or a while read loop. (SC2044)
Markdownlint
README.md
64-64: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
2-2: null (MD045, no-alt-text)
Images should have alternate text (alt text)
14-14: null (MD045, no-alt-text)
Images should have alternate text (alt text)
19-19: null (MD045, no-alt-text)
Images should have alternate text (alt text)
24-24: null (MD045, no-alt-text)
Images should have alternate text (alt text)
29-29: null (MD045, no-alt-text)
Images should have alternate text (alt text)
34-34: null (MD045, no-alt-text)
Images should have alternate text (alt text)
276-276: null (MD045, no-alt-text)
Images should have alternate text (alt text)
52-52: null (MD051, link-fragments)
Link fragments should be valid
Additional comments not posted (11)
src/sdk/query/staking.ts (3)
1-6
: The import statements are correctly organized and relevant to the functionalities being implemented.
8-14
: TheStakeExtension
interface is well-defined, promoting immutability and type safety with its readonly properties.
16-29
: ThesetupStakingExtension
function is correctly implemented, ensuring proper initialization of RPC clients and adherence to the defined interface.src/sdk/query/staking.test.ts (3)
1-4
: The import statements are correctly organized and appropriate for the testing functionalities implemented.
6-18
: The main describe block forsetupStakingExtension
is well-structured with appropriate mocking and assertions.
20-39
: The nested describe block thoroughly tests thecancelUnbondingDelegation
function with appropriate setup and assertions.scripts/protocgen.sh (1)
50-60
: The cleanup commands are correctly implemented to ensure unnecessary files and directories are removed after the generation process..gitignore (1)
11-12
: The updates to the.gitignore
patterns are correctly set to ignore the appropriate directories for the project's needs.src/sdk/query/query.ts (2)
30-36
: The imports from the local directory are correctly added, ensuring that theStakeExtension
and related functions are available within the file.
47-47
: TheNibiruExtensions
type has been updated to includeStakeExtension
, aligning with the changes in the module's functionality.README.md (1)
248-255
: Instructions for initializing git submodules have been added, which is crucial for setting up the environment given the project's dependencies on submodules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (13)
- .eslintrc.json (1 hunks)
- .github/workflows/release.yaml (1 hunks)
- .github/workflows/test-ts-sdk.yaml (1 hunks)
- .gitignore (2 hunks)
- .prettierignore (1 hunks)
- cosmos-sdk (1 hunks)
- nibiru (1 hunks)
- package.json (2 hunks)
- src/sdk/query/query.test.ts (2 hunks)
- src/sdk/query/query.ts (4 hunks)
- src/sdk/query/staking.test.ts (1 hunks)
- src/sdk/query/staking.ts (1 hunks)
- src/sdk/tx/txClient.ts (2 hunks)
Files skipped from review due to trivial changes (6)
- .eslintrc.json
- .github/workflows/release.yaml
- .prettierignore
- cosmos-sdk
- nibiru
- src/sdk/query/query.test.ts
Files skipped from review as they are similar to previous changes (6)
- .github/workflows/test-ts-sdk.yaml
- .gitignore
- package.json
- src/sdk/query/query.ts
- src/sdk/query/staking.test.ts
- src/sdk/query/staking.ts
Additional comments not posted (2)
src/sdk/tx/txClient.ts (2)
27-27
: Import ofsetupStakeExtension
looks good and is correctly placed among other imports.
56-56
: Integration ofsetupStakeExtension
intoNibiruTxClient
is correctly implemented. Ensure it's thoroughly tested and does not interfere with other extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- scripts/protocgen.sh (3 hunks)
Additional context used
Shellcheck
scripts/protocgen.sh
[warning] 21-21: Use "${var:?}" to ensure this never expands to / . (SC2115)
[warning] 25-25: For loops over find output are fragile. Use find -exec or a while read loop. (SC2044)
[warning] 32-32: For loops over find output are fragile. Use find -exec or a while read loop. (SC2044)
Additional comments not posted (1)
scripts/protocgen.sh (1)
31-34
: Apply the same robust handling of filenames as suggested for the Nibiru repository.Tools
Shellcheck
[warning] 32-32: For loops over find output are fragile. Use find -exec or a while read loop. (SC2044)
## [4.5.0](v4.4.0...v4.5.0) (2024-06-28) ### Features * add gql user query ([#356](#356)) ([f3dfa3a](f3dfa3a)) * staking extension and git submodules ([#360](#360)) ([4251709](4251709)) ### Reverts * cosmos submodule only ([#362](#362)) ([#363](#363)) ([c012a83](c012a83)) ### Miscellaneous Chores * develop -> main ([#365](#365)) ([7e513c6](7e513c6)), closes [#362](#362) [skip ci]
🎉 This PR is included in version 4.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Related to but does not close: https://github.com/NibiruChain/web-app/issues/935
Build failure is due to: https://nibiruchain.slack.com/archives/C03GC05E37S/p1718804143575709
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Documentation
Chores
cosmos-sdk
andnibiru
repositories.