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

[Chains/BNBGreenfield]: Add BNB Greenfield #3394

Merged
merged 13 commits into from
Aug 28, 2023
Merged

[Chains/BNBGreenfield]: Add BNB Greenfield #3394

merged 13 commits into from
Aug 28, 2023

Conversation

satoshiotomakan
Copy link
Collaborator

@satoshiotomakan satoshiotomakan commented Aug 25, 2023

Description

Add support for BNB Greenfield: https://greenfield.bnbchain.org/
Greenfield is a Cosmos-like blockchain. At this moment, Greenfield supports only EIP712 signing mode, i.e. to sign a transaction, it's needed to convert the original TxRaw protobuf message to a Typed Structed data (EIP712), hash it and sign by using secp256k1 curve.

How to test

Run C++, iOS, Android, WASM tests

Types of changes

Add Greenfield Cosmos-like blockchain with only Send message.

Possible improvements

The process of converting TwRaw protobuf package into a Typed Structed data (EIP712) is tricky.
The code is available here: link.

It would be great to implement this algorithm in the future. But for now, we use pre-defined hardcoded Msg1, TypeMsg1Amount type names.

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

@satoshiotomakan satoshiotomakan marked this pull request as ready for review August 26, 2023 13:11
Milerius
Milerius previously approved these changes Aug 27, 2023
Copy link
Collaborator

@Milerius Milerius left a comment

Choose a reason for hiding this comment

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

Good job, just one minor comment

src/Greenfield/Entry.cpp Outdated Show resolved Hide resolved
@Milerius Milerius merged commit 2b425c5 into master Aug 28, 2023
12 checks passed
@Milerius Milerius deleted the s/feat-greenfield branch August 28, 2023 08:32
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