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

refactor(faucet)!: set default tokens #369

Merged
merged 5 commits into from
Aug 15, 2024

Conversation

k-yang
Copy link
Member

@k-yang k-yang commented Aug 15, 2024

uusdt and unusd don't exist on Nibiru Chain. Also default the token amount to 10 NIBI instead of letting the caller pass in an amt object.

BREAKING CHANGE: breaks the useFaucet() interface.

Summary by CodeRabbit

  • New Features

    • Updated the faucet functionality to simplify the token distribution process, now sending a fixed amount of 10 NIBI.
  • Chores

    • Updated the version number of @nibiruchain/nibijs to 4.5.1.
    • Changed the default branch name from "develop" to "main" in project documentation.

cgilbe27 and others added 4 commits August 9, 2024 16:28
* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build
### [4.5.1](v4.5.0...v4.5.1) (2024-08-09)

### Miscellaneous Chores

* develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367)

 [skip ci]
@k-yang k-yang enabled auto-merge (squash) August 15, 2024 01:41
@k-yang k-yang self-assigned this Aug 15, 2024
Copy link
Contributor

coderabbitai bot commented Aug 15, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The recent updates primarily introduce version 4.5.1, reflecting minor improvements and documentation adjustments. Notably, the default branch name has shifted from "develop" to "main" to enhance clarity. Additionally, the useFaucet function has been streamlined to send a fixed amount of 10 NIBI tokens, simplifying its implementation and removing user-defined parameters. These changes collectively aim to improve usability and consistency within the project.

Changes

Files Change Summary
CHANGELOG.md Added entry for version 4.5.1; documented change of default branch from "develop" to "main" related to issue #368.
package.json Updated version from 4.5.0 to 4.5.1, indicating a minor update without functional changes.
src/sdk/utils/faucet.ts Modified useFaucet function to send a fixed amount of 10 NIBI, removing the amts parameter for simplicity.
src/sdk/utils/faucet.test.ts Updated test cases for useFaucet to expect a single coin type "10000000unibi" instead of multiple types.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FaucetService
    participant Blockchain

    User->>FaucetService: Request tokens
    FaucetService->>Blockchain: Send 10 NIBI to User's address
    Blockchain-->>FaucetService: Transaction processed
    FaucetService-->>User: Tokens sent successfully
Loading

Poem

🐇 In the garden where changes bloom,
A new branch shines, dispelling gloom.
Ten NIBI flow from faucet's grace,
Simplified joy in every space!
Hopping along, we celebrate,
With each small change, we elevate! 🌼


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@k-yang k-yang added type: refactor A code change that neither fixes a bug nor adds a feature type: enhance New feature, feature request, or enhancement labels Aug 15, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Outside diff range, codebase verification and nitpick comments (1)
CHANGELOG.md (1)

1-1: Add a top-level heading at the start of the file.

The file should begin with a top-level heading to provide context and improve readability. Consider adding a heading like # Changelog at the beginning.

+# Changelog
Tools
Markdownlint

1-1: null
First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b9b3d74 and 76a9458.

Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • package.json (1 hunks)
  • src/sdk/utils/faucet.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • package.json
Additional context used
Markdownlint
CHANGELOG.md

1-1: null
First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

Additional comments not posted (3)
src/sdk/utils/faucet.ts (3)

5-5: Documentation accurately reflects changes.

The updated comment correctly describes the function's new behavior of sending 10 NIBI.


16-16: Fixed amount of 10 NIBI is hardcoded.

The coins array is correctly constructed with a fixed value of 10 NIBI, converted to micro-units. This simplifies the function but removes the flexibility to specify different amounts.


Line range hint 26-33:
Simplified request structure.

The fetch request body is correctly constructed with address, coins, and grecaptcha. The removal of the amts parameter simplifies the request.

@cgilbe27 cgilbe27 disabled auto-merge August 15, 2024 01:50
@cgilbe27 cgilbe27 enabled auto-merge (squash) August 15, 2024 01:50
@cgilbe27 cgilbe27 merged commit 859882a into develop Aug 15, 2024
2 checks passed
@cgilbe27 cgilbe27 deleted the refactor/faucet/default-tokens branch August 15, 2024 01:51
Copy link

Lines Statements Branches Functions
Coverage: 95%
95.51% (895/937) 83.33% (205/246) 93.98% (297/316)

cgilbe27 added a commit that referenced this pull request Aug 15, 2024
* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build

* refactor(faucet)!: set default tokens (#369)

* chore: develop -> main (#368)

* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build

* chore(release): 4.5.1

### [4.5.1](v4.5.0...v4.5.1) (2024-08-09)

### Miscellaneous Chores

* develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367)

 [skip ci]

* fix(faucet): remove unused tokens from default faucet request

* fix: bump test

---------

Co-authored-by: Cameron Gilbert <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>

---------

Co-authored-by: Kevin Yang <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
github-actions bot pushed a commit that referenced this pull request Sep 24, 2024
### [4.5.2](v4.5.1...v4.5.2) (2024-09-24)

### Miscellaneous Chores

* develop -> main ([#370](#370)) ([ec2a25b](ec2a25b)), closes [#362](#362) [#366](#366) [#367](#367) [#369](#369) [#368](#368) [#362](#362) [#366](#366) [#367](#367) [#362](#362) [#366](#366) [#367](#367)
* **github:** Add project automation for https://tinyurl.com/25uty9w5 ([c2c27e5](c2c27e5))

 [skip ci]
This was referenced Oct 4, 2024
cgilbe27 added a commit that referenced this pull request Oct 4, 2024
* chore: develop -> main (#370)

* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build

* refactor(faucet)!: set default tokens (#369)

* chore: develop -> main (#368)

* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build

* chore(release): 4.5.1

### [4.5.1](v4.5.0...v4.5.1) (2024-08-09)

### Miscellaneous Chores

* develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367)

 [skip ci]

* fix(faucet): remove unused tokens from default faucet request

* fix: bump test

---------

Co-authored-by: Cameron Gilbert <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>

---------

Co-authored-by: Kevin Yang <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>

* chore(github): Add project automation for https://tinyurl.com/25uty9w5

* chore(release): 4.5.2

### [4.5.2](v4.5.1...v4.5.2) (2024-09-24)

### Miscellaneous Chores

* develop -> main ([#370](#370)) ([ec2a25b](ec2a25b)), closes [#362](#362) [#366](#366) [#367](#367) [#369](#369) [#368](#368) [#362](#362) [#366](#366) [#367](#367) [#362](#362) [#366](#366) [#367](#367)
* **github:** Add project automation for https://tinyurl.com/25uty9w5 ([c2c27e5](c2c27e5))

 [skip ci]

---------

Co-authored-by: Cameron Gilbert <[email protected]>
Co-authored-by: Kevin Yang <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: Unique Divine <[email protected]>
CalicoNino added a commit that referenced this pull request Oct 9, 2024
* chore: develop -> main (#370)

* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build

* refactor(faucet)!: set default tokens (#369)

* chore: develop -> main (#368)

* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build

* chore(release): 4.5.1

### [4.5.1](v4.5.0...v4.5.1) (2024-08-09)

### Miscellaneous Chores

* develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367)

 [skip ci]

* fix(faucet): remove unused tokens from default faucet request

* fix: bump test

---------

Co-authored-by: Cameron Gilbert <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>

---------

Co-authored-by: Kevin Yang <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>

* chore(github): Add project automation for https://tinyurl.com/25uty9w5

* chore(release): 4.5.2

### [4.5.2](v4.5.1...v4.5.2) (2024-09-24)

### Miscellaneous Chores

* develop -> main ([#370](#370)) ([ec2a25b](ec2a25b)), closes [#362](#362) [#366](#366) [#367](#367) [#369](#369) [#368](#368) [#362](#362) [#366](#366) [#367](#367) [#362](#362) [#366](#366) [#367](#367)
* **github:** Add project automation for https://tinyurl.com/25uty9w5 ([c2c27e5](c2c27e5))

 [skip ci]

* feat: nibiru account parser

* refactor: throw if baseaccount is undefined

* test: fixing tests

* chore: removing unnecessary ?

* refactor: matching cosmjs implementation

* chore: removing t.json

* chore: pr comments

---------

Co-authored-by: Cameron Gilbert <[email protected]>
Co-authored-by: Kevin Yang <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: Unique Divine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhance New feature, feature request, or enhancement type: refactor A code change that neither fixes a bug nor adds a feature
Projects
Status: ✅ Completed
Development

Successfully merging this pull request may close these issues.

3 participants