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

Entity types refactor & remove store/storage modules #137

Merged
merged 11 commits into from
Feb 28, 2024

Conversation

wcalderipe
Copy link
Collaborator

@wcalderipe wcalderipe commented Feb 28, 2024

Changelog

  • Added entity validation function to ensure data integrity
  • Changed entity to use id instead of uid for consistency
  • Changed Asset ID and Account ID schemas from the armory to the caip.util.ts at policy-engine-shared
  • Changed Address and Hex schemas from the armory to the evm.util.ts at policy-engine-shared
  • Removed store module (🪓'ing dead code)
  • Removed storage module (🪓'ing dead code)

@wcalderipe wcalderipe self-assigned this Feb 28, 2024
address: Address
chainId: number
classification: AccountClassification
}

export type Token = {
uid: string
id: string
address: Address
symbol: string
chainId: number
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@samteb I feel these types are either redundant with (entity.type.ts) or in the wrong place.

These feel strictly related to how OPA operates, not the engine entities.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I think you are right. those types seem to be duplicated.
what do you suggest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@samteb not sure. I feel these types are crafted for optimizing Rego queries, and we should keep them like that.

Maybe we move these to a specific module called open-policy-agent?

Copy link
Contributor

@samteb samteb left a comment

Choose a reason for hiding this comment

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

Good job Doc'

@wcalderipe wcalderipe merged commit 91dadf5 into main Feb 28, 2024
1 check passed
@wcalderipe wcalderipe changed the title Entity types refactor Entity types refactor & remove store/storage modules Feb 28, 2024
@wcalderipe wcalderipe deleted the feature/entity-type-refactor branch March 5, 2024 14:17
mattschoch pushed a commit that referenced this pull request Jun 19, 2024
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