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

Implementation of StatBlock #328

Merged
merged 17 commits into from
Aug 21, 2023
Merged

Implementation of StatBlock #328

merged 17 commits into from
Aug 21, 2023

Conversation

zomglings
Copy link
Collaborator

Implements the StatBlock contract and IStatBlock interface. Includes several tests for StatBlock.

StatBlock is implemented here as a standalone contract, not as an EIP2535 facet. In the future, we may add an EIP2535 facet implementation which would support the use of StatBlock with proxies.

Resolves #317

@zomglings zomglings marked this pull request as ready for review August 11, 2023 17:22
contracts/stats/StatBlock.sol Show resolved Hide resolved
contracts/stats/StatBlock.sol Show resolved Hide resolved
contracts/stats/StatBlock.sol Show resolved Hide resolved
@zomglings
Copy link
Collaborator Author

zomglings commented Aug 14, 2023

TODO(zomglings):

  • 1-indexed statIDs
  • Add setStatDescriptor method

`StatCreated` event now only reports `statID`, no longer contains
`descriptor` argument.

Added `StatDescriptorUpdated` argument which reports `statID` and new
`descriptor`.

Added tests for access control.
Copy link
Contributor

@kellan-simiotics kellan-simiotics left a comment

Choose a reason for hiding this comment

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

lg

contracts/stats/StatBlock.sol Show resolved Hide resolved
... and implemented it as a public string on `StatBlock`.

Also added `setStatDescriptor` to `IStatBlock`. This was already
implemented previously on `StatBlock`.
@zomglings zomglings merged commit 4c82726 into main Aug 21, 2023
6 checks passed
@zomglings zomglings deleted the statblock branch August 21, 2023 15:40
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.

StatBlock: An on-chain registry for token stats and ability scores
2 participants