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 Sense pallet. #77

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

FiberMan
Copy link
Collaborator

@FiberMan FiberMan commented Aug 4, 2022

A bit of refactoring of Sense pallet:

  • one storage for all entity properties
  • one extrinsic to update properties
  • types extracted to separate file
  • tests/benchmarks updated
  • renaming, enhancements, etc.

To be discussed:
Currently only increments available for properties (XP, Rep, Trust).
I think it would be useful to have decrement functionality.

@vovacha vovacha requested review from vovacha and vayesy August 5, 2022 07:15
Copy link
Member

@2075 2075 left a comment

Choose a reason for hiding this comment

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

lgtm

@2075
Copy link
Member

2075 commented Aug 5, 2022

Thank you for the optimisations and contributing! Almost forgot to submit the comment :)

  • I am not sure if u8 is big enough for e.g. xp and rep, eventually a u16 would be more sufficient
  • Agree with decrements requirement

Copy link
Contributor

@vovacha vovacha 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, good job.
Build and tests are ok. The only thing is a minor fix for the benchmarking required.

sense/src/benchmarking.rs Show resolved Hide resolved
Copy link
Collaborator

@vayesy vayesy left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Looks nice, just few small remarks/questions.

sense/src/types.rs Outdated Show resolved Hide resolved
sense/src/types.rs Show resolved Hide resolved
sense/src/types.rs Outdated Show resolved Hide resolved
@FiberMan FiberMan requested review from vovacha and vayesy August 9, 2022 20:54
Copy link
Contributor

@vovacha vovacha left a comment

Choose a reason for hiding this comment

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

LGTM

@vovacha vovacha merged commit 74fd64a into gamedaoco:release-1.1.2 Aug 9, 2022
vovacha pushed a commit that referenced this pull request Sep 13, 2022
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.

4 participants