Skip to content

feat(MockRandomnessSender)#26

Open
L0GYKAL wants to merge 2 commits into
randa-mu:mainfrom
L0GYKAL:main
Open

feat(MockRandomnessSender)#26
L0GYKAL wants to merge 2 commits into
randa-mu:mainfrom
L0GYKAL:main

Conversation

@L0GYKAL
Copy link
Copy Markdown

@L0GYKAL L0GYKAL commented Aug 11, 2025

Add MockRandomnessSender and its readme

Comment thread src/mocks/mock_randomness_readme.md Outdated
@L0GYKAL
Copy link
Copy Markdown
Author

L0GYKAL commented Aug 19, 2025

it's called rm receive but I meant to name the commit: rm fallback

@L0GYKAL L0GYKAL requested a review from bbjubjub2494 August 26, 2025 20:44
Copy link
Copy Markdown
Member

@bbjubjub2494 bbjubjub2494 left a comment

Choose a reason for hiding this comment

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

Sorry for not getting distracted.

The CI failure is not your fault, see #28

The code by itself LGTM. Normally though, if I see a mock in a repo I would assume that it's being used by the tests, but that's not the case here. As a result it feels like we would be maintaining it mostly based on vibes, which is not so easy. That said I don't have a lot of context for the blackjack(?) project so I don't know what's planned.

Also paging Tari since he's more likely to be the one maintaining this stuff long term.

/// @author Randamu
/// @notice Mock implementation of RandomnessSender for testing purposes
/// @dev This contract provides controllable randomness for testing smart contracts
contract MockRandomnessSender {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
contract MockRandomnessSender {
contract MockRandomnessSender is IRandomnessSender {

Is my understanding correct here? If so we seem to be missing 4 functions as well

@bbjubjub2494 bbjubjub2494 requested a review from najienka August 26, 2025 21:19
@L0GYKAL
Copy link
Copy Markdown
Author

L0GYKAL commented Aug 28, 2025

Sorry for not getting distracted.

The CI failure is not your fault, see #28

The code by itself LGTM. Normally though, if I see a mock in a repo I would assume that it's being used by the tests, but that's not the case here. As a result it feels like we would be maintaining it mostly based on vibes, which is not so easy. That said I don't have a lot of context for the blackjack(?) project so I don't know what's planned.

Also paging Tari since he's more likely to be the one maintaining this stuff long term.

The Mock is used for the tests, as you expected: no Mock should be deployed in production
It is solely used for the tests

@bbjubjub2494
Copy link
Copy Markdown
Member

which tests?

@L0GYKAL
Copy link
Copy Markdown
Author

L0GYKAL commented Aug 28, 2025

It is used in tests for everything integrating RandomnessSender :
ie. Roulette & Blackjack

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