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

doc: Add cookbook for live smart contracts #109

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Conversation

matthiasmatt
Copy link
Contributor

@matthiasmatt matthiasmatt commented Dec 28, 2023

Closes - NibiruChain/nibiru#1294

Summary by CodeRabbit

  • Documentation
    • Introduced the Cookbook.md guide, detailing message formats and functionalities for core smart contracts.
    • Documented usage instructions for instantiation, execution, and querying processes across various smart contracts.

Copy link
Contributor

coderabbitai bot commented Dec 28, 2023

Walkthrough

The Cookbook.md file serves as a comprehensive guide to the message formats and functionalities for several smart contracts in the repository. It covers the core functionalities, instantiation, execution, and querying for contracts such as Core cw3 flex multisig, Core shifter, Core token vesting, Nibi Stargate, Nibi Stargate Perp, and Nusd Valuator.

Changes

File(s) Change Summary
Cookbook.md Added a comprehensive guide to smart contract messages
Core contracts (multiple) Added Instantiate, Execute, Query functionalities
Nibi Stargate-related Enhanced Execute functionality; added Instantiate and Query for Perp version
Nusd Valuator Introduced Instantiate, Execute, and Query methods

🐇✨
To code, to build, a guide so bright,
Contracts dance in the blockchain night.
A rabbit's charm, with wisdom sown,
In the ledger's depth, new seeds are grown. 🌱🌟

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 with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid.
    • @coderabbitai read the files in the src/scheduler package and generate README in the markdown format.

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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 7

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 0da684b and 49ee54b.
Files selected for processing (1)
  • Cookbook.md (1 hunks)

Cookbook.md Outdated Show resolved Hide resolved
Cookbook.md Outdated Show resolved Hide resolved
Cookbook.md Show resolved Hide resolved
Cookbook.md Outdated Show resolved Hide resolved
Cookbook.md Show resolved Hide resolved
Cookbook.md Show resolved Hide resolved
Cookbook.md Show resolved Hide resolved
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (444f243) 85.53% compared to head (f5e546f) 85.47%.
Report is 5 commits behind head on main.

Additional details and impacted files

see 8 files with indirect coverage changes

Copy link
Member

@Unique-Divine Unique-Divine left a comment

Choose a reason for hiding this comment

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

If you use JavaScript (js) as the language for the JSON blocks, you can add comments and it will still lint. This works well because json is JavaScript Object Notation

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 49ee54b and f5e546f.
Files selected for processing (1)
  • Cookbook.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • Cookbook.md

@Unique-Divine Unique-Divine merged commit 88ae9fd into main Jan 3, 2024
5 checks passed
@Unique-Divine Unique-Divine deleted the mat/add-cookbook branch January 3, 2024 14:32
Unique-Divine added a commit that referenced this pull request Jan 11, 2024
commit 2296e6f1e91db857318632089aa2cf888a4ce8ae
Merge: c14558d dd90c9a
Author: Unique-Divine <[email protected]>
Date:   Wed Jan 10 21:25:41 2024 -0600

    Merge branch 'main' into realu/std

commit c14558de1b80b739701ff3b146355ea815327192
Author: Unique-Divine <[email protected]>
Date:   Wed Jan 10 15:43:00 2024 -0600

    quick save wip!

commit dd90c9a
Merge: bd792e4 902b788
Author: Jonathan Gimeno <[email protected]>
Date:   Fri Jan 5 19:00:52 2024 +0100

    Merge pull request #111 from NibiruChain/feat/some-refactors-airdrop

    add some refactors to airdrop contract

commit 902b788
Author: Jonathan Gimeno <[email protected]>
Date:   Fri Jan 5 17:41:16 2024 +0100

    remove unused imports

commit 0f337d1
Author: Jonathan Gimeno <[email protected]>
Date:   Fri Jan 5 17:39:21 2024 +0100

    it fails when there are not enough funds

commit 1d42220
Author: Jonathan Gimeno <[email protected]>
Date:   Fri Jan 5 17:31:57 2024 +0100

    add some refactors, part 1

commit bd792e4
Author: Kevin Yang <[email protected]>
Date:   Wed Jan 3 14:22:23 2024 -0800

    feat: initial airdrop contract (#110)

    * feat: initial airdrop contract

    * create cargo config

    * test: instantiate message

    * remove owner from instantiate msg

    * test: query functions

    * test: execute functions

    * feat: add manager list

    * feat: implement manager list

    * Create README.md

    * Update contracts/airdrop/src/contract.rs

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * Update contracts/airdrop/src/contract.rs

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * Update contracts/airdrop/src/contract.rs

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * Update contracts/airdrop/src/contract.rs

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

    * fix error messages

    ---------

    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

commit 88ae9fd
Author: Matthias <[email protected]>
Date:   Wed Jan 3 15:32:33 2024 +0100

    doc: Add cookbook for live smart contracts (#109)
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