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

stake / unstake as account, remove all ctx.sender() #50

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

0xaslan
Copy link
Collaborator

@0xaslan 0xaslan commented Apr 28, 2024

I will follow up this PR with:

  • rework get_user_mut()
  • historic data in Table and auto drop data (the other pr I have open)

@0xaslan 0xaslan requested a review from tonylee08 April 28, 2024 21:24
proposal_id: u64,
ctx: &mut TxContext,
) {
state.vote(pool, proposal_id, ctx);
account.validate_proof(proof);
state.vote(pool, account, proof, proposal_id, ctx);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is proof needed if only owner can vote, or do we plan on allowing delegation of voting power as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since account is a shared object, anyone can pass any other user's account. I am just validating that the sender is the account owner via a proof. I did notice I am doing the same validation in State level as well, which I will remove

Copy link
Collaborator

@tonylee08 tonylee08 left a comment

Choose a reason for hiding this comment

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

Just small Q rest of changes lgtm

@0xaslan 0xaslan merged commit 41eb7b8 into main Apr 29, 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