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

[Bitcoin] Implement brc20 progress #1197

Merged
merged 6 commits into from
Dec 2, 2023
Merged

[Bitcoin] Implement brc20 progress #1197

merged 6 commits into from
Dec 2, 2023

Conversation

jolestar
Copy link
Contributor

@jolestar jolestar commented Dec 1, 2023

Summary

  1. [moveos_std] Implement string_utils for parse number from string.
  2. [moveos_std] Support json::from_json_option and json::to_map do not abort when invalid json.

part of #993 #997

TODO:

  1. get sender and receiver and record brc20 balance

Copy link

vercel bot commented Dec 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Dec 2, 2023 2:18am


friend rooch_framework::genesis;

//TODO should we register the BRC20 as a CoinInfo?
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the Indexer extension, specific types of Objects can be parsed, including CoinInfo and CoinStore. At the same time, by linking the Account, we can get the Coin-dimensional Indexer.

If Bitcoin and Ethereum can reuse CoinInfo, a full-chain Coin Indexer can be generated.

The generation of NFT Indexers may be more complicated.


fun progress_op(brc20_store: &mut BRC20Store, op: Op) {
if(!is_brc20(&op)){
std::debug::print(&string::utf8(b"not brc20 op"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

debug info can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part still needs to be finished; Print debug just to watch the log. Maybe I should use Event in the future.

@jolestar jolestar merged commit 890bc93 into main Dec 2, 2023
6 checks passed
@jolestar jolestar deleted the bitcoin_brc20 branch December 2, 2023 14:41
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