Skip to content

chore: mocks for bonding curve pallet#780

Merged
Ad96el merged 15 commits intopallet_bonded_coinsfrom
ag_mock
Nov 5, 2024
Merged

chore: mocks for bonding curve pallet#780
Ad96el merged 15 commits intopallet_bonded_coinsfrom
ag_mock

Conversation

@Ad96el
Copy link
Contributor

@Ad96el Ad96el commented Nov 4, 2024

Adding some mocks for testing + benchmarking

@Ad96el Ad96el marked this pull request as draft November 4, 2024 13:01
@Ad96el Ad96el marked this pull request as ready for review November 4, 2024 13:04
@Ad96el Ad96el requested review from ntn-x2 and rflechtner November 4, 2024 13:04
@Ad96el Ad96el changed the title add mocking for tests + benchmarks chore: mocks for bonding curve pallet Nov 4, 2024
Copy link
Contributor

@rflechtner rflechtner left a comment

Choose a reason for hiding this comment

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

For the most part I have no idea what's going on here, but good job I guess? :neckbeard:

pub(crate) fn calculate_pool_id(currencies: Vec<AssetId>) -> AccountId {
AccountId::from(currencies.blake2_256())
pub(crate) fn calculate_pool_id(currencies: &[AssetId]) -> AccountId {
AccountId::from(currencies.to_vec().blake2_256())
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, does the blake2_256() function require ownership? I've used it via the Hash trait it only took a reference to a byte array. Anyway, this is minor stuff.

@rflechtner rflechtner mentioned this pull request Nov 5, 2024
8 tasks
This reverts commit cb1bdd5.
@rflechtner rflechtner mentioned this pull request Nov 5, 2024
7 tasks
@Ad96el Ad96el merged commit aa6555d into pallet_bonded_coins Nov 5, 2024
@Ad96el Ad96el deleted the ag_mock branch November 5, 2024 16:10
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