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

Add stake vault whitelist capabilities #15

Closed
0x-r4bbit opened this issue Oct 8, 2024 · 0 comments · Fixed by #63
Closed

Add stake vault whitelist capabilities #15

0x-r4bbit opened this issue Oct 8, 2024 · 0 comments · Fixed by #63

Comments

@0x-r4bbit
Copy link
Collaborator

In our original staking solution, the StakeVault is only able to interact with the StakeManager because it has whitelisted access from contracts that have a specific codehash.

This whitelisting capability we want to add to this repository here as well.

@0x-r4bbit 0x-r4bbit added this to the staking-protocol-v1 milestone Oct 8, 2024
3esmit added a commit that referenced this issue Oct 8, 2024
…dsStreamerMP

This commit adds the following changes:
- Add the contract `StakeVault` so funds can be stored safely by the user. #14
- Added the interface `ITrustedCodehashAccess`  and contract `TrustedCodehashAccess` in the `src/access` directory, which implements the `ITrustedCodehashAccess` interface and provides functionality to set or update the trust status for a contract's codehash and implemented it on `RewardStreamerMP`. #15
- added the interface `IStakeManager` and implemented it on `RewardStreamerMP`  #13
These changes are necessary to enforce security measures and restrict access based on the codehash of the caller, and allow for better reuse of code between StakeManager and RewardStreamerMP.
0x-r4bbit added a commit that referenced this issue Oct 17, 2024
This enables whitelisting in the staking manager contract using the
`TrustedCodehashAccess` interface.

These changes were largely taken from #39 with few changes:

- Due to different OZ versions, `Ownable()` constructor needs to be
  called with owner

Closes #15
0x-r4bbit added a commit that referenced this issue Oct 17, 2024
This enables whitelisting in the staking manager contract using the
`TrustedCodehashAccess` interface.

These changes were largely taken from #39 with few changes:

- Due to different OZ versions, `Ownable()` constructor needs to be
  called with owner

Closes #15
0x-r4bbit added a commit that referenced this issue Oct 21, 2024
This enables whitelisting in the staking manager contract using the
`TrustedCodehashAccess` interface.

These changes were largely taken from #39 with few changes:

- Due to different OZ versions, `Ownable()` constructor needs to be
  called with owner

Closes #15
0x-r4bbit added a commit that referenced this issue Oct 22, 2024
This enables whitelisting in the staking manager contract using the
`TrustedCodehashAccess` interface.

These changes were largely taken from #39 with few changes:

- Due to different OZ versions, `Ownable()` constructor needs to be
  called with owner

Closes #15
0x-r4bbit added a commit that referenced this issue Oct 22, 2024
This enables whitelisting in the staking manager contract using the
`TrustedCodehashAccess` interface.

These changes were largely taken from #39 with few changes:

- Due to different OZ versions, `Ownable()` constructor needs to be
  called with owner

Closes #15
@github-project-automation github-project-automation bot moved this from Todo to Done in Tasks - Smart Contracts Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment