-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gdemay/XC-83-ckerc20-tokens-data-struct' into 'master'
refactor(ckerc20): More efficient data structure to store ckERC20 tokens (XC-83): For ckERC20 the minter needs to retrieve efficiently: 1. Given an ERC-20 smart contract address, the corresponding ckERC20 ledger canister ID and the ckERC20 token symbol (deposits) 2. Given a ckERC20 ledger ID, the corresponding ERC-20 smart contract address and ckERC20 token symbol (withdrawals). The approach before this MR only allows for efficient retrieval (O(1)) for one of the 2 use-cases. This MR improves this by providing a thin wrapper around `MultiKeyMap` to deduplicate both the primary key (ckERC20 ledger canister ID) and the alternative key (ERC-20 smart contract address) without impacting other usages of `MultiKeyMap`. See merge request dfinity-lab/public/ic!19533
- Loading branch information
Showing
7 changed files
with
166 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.