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(cketh/ckerc20): use consistently LedgerSubaccount #2487

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

gregorydemay
Copy link
Member

@gregorydemay gregorydemay commented Nov 7, 2024

(XC-221): LedgerSubaccount was introduced with #2151 to be used for events stored in stable memory and was used in particular for events related to deposits. Unfortunately, withdrawal events were already prepared to received subaccounts, but they used a different type with a different, less efficient, encoding. This PR removes the old type to only keep LedgerSubaccount, which is in preparation of supporting subaccounts for withdrawals.

Remarks:

  1. There are already instances of ReceivedEthEvent and ReceivedErc20Event with some LedgerSubaccount value on the ckSepoliaETH minter.
  2. All other events EthWithdrawalRequest, Erc20WithdrawalRequest, and ReimbursementRequest that used the old type for subaccount only had instances on the ckETH and ckSepoliaETH minter that had None for value. This allows to use LedgerSubaccount for those events in a backwards-compatible manner.

@gregorydemay gregorydemay marked this pull request as ready for review November 7, 2024 14:57
@gregorydemay gregorydemay requested a review from a team as a code owner November 7, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant