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

[Firo]: Support exchange address #3712

Merged
merged 8 commits into from
Mar 12, 2024
Merged

[Firo]: Support exchange address #3712

merged 8 commits into from
Mar 12, 2024

Conversation

w20089527
Copy link
Collaborator

Description

A new address for exchange requirement.

As exchange address has same unlocking script with regular address(p2pkh), our work will involve as following:

  1. Support derive of this address
  2. Support validation of this address
  3. Support this address as an output which added a new instruction OP_EXCHANGEADDR

FYI: as we do not have any config in registry.json for this kind of address, I defined a ExchangeAddress with constants that only works for mainnet, if want to support testnet or regtest, we need to define corresponding class for them.

Check here for exchange address description:
https://github.com/firoorg/firo/wiki/Exchange-Addresses

Here is the detail pr for exchange address:
firoorg/firo#1356

How to test

Testcases added for this feature

Types of changes

New feature (non-breaking change which adds functionality)

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.

Copy link
Collaborator

@satoshiotomakan satoshiotomakan left a comment

Choose a reason for hiding this comment

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

Hi @w20089527, thank you for opening the PR!

tests/chains/Firo/TWZCoinAddressTests.cpp Outdated Show resolved Hide resolved
registry.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@satoshiotomakan satoshiotomakan left a comment

Choose a reason for hiding this comment

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

Thank you for the fix! LGTM
I have one suggestion in case if you need to support testnet addresses

src/CoinEntry.h Show resolved Hide resolved
src/interface/TWAnyAddress.cpp Show resolved Hide resolved
@Milerius Milerius merged commit 9dfb27b into master Mar 12, 2024
11 of 12 checks passed
@Milerius Milerius deleted the w2/firo_exchange_address branch March 12, 2024 09:45
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.

3 participants