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

At/account #47

Merged
merged 6 commits into from
Apr 26, 2024
Merged

At/account #47

merged 6 commits into from
Apr 26, 2024

Conversation

0xaslan
Copy link
Collaborator

@0xaslan 0xaslan commented Apr 24, 2024

No description provided.

// TODO: use Bag instead of direct dynamic fields
/// Owned by user, this is what's passed into pools
public struct Account has key, store {
const MAX_TRADE_CAPS: u64 = 10;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need this limit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we can't make it unlimited since vector can become too large. this constraint reduces the possible attack vectors

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed on the limit, to rephrase better, the "10" is just a placeholder right?
It could be 1K for instance (or the max size of the vector) [we'll decide that later?]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmmm let's make it 1k

@0xaslan 0xaslan merged commit 213cbcb into main Apr 26, 2024
3 checks passed
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