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

wallet-core: expose staking capabilities via FFI #2956

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

ZER0
Copy link
Contributor

@ZER0 ZER0 commented Nov 12, 2024

  • Add moonlight_stake in FFI module
  • Add moonlight_unstake in FFI module
  • Add moonlight_stake_reward in FFI module
  • Add ErrorCode::ContractCallError
  • Change the visibility of stake_reward_to_moonlight to pub(crate)
  • Change the visibility of unstake_to_moonlight to pub(crate)

Resolves #2955

- Add `moonlight_stake` in FFI module
- Add `moonlight_unstake` in FFI module
- Add `moonlight_stake_reward` in FFI module
- Add `ErrorCode::ContractCallError`
- Change the visibility of `stake_reward_to_moonlight` to `pub(crate)`
- Change the visibility of `unstake_to_moonlight` to `pub(crate)`

Resolves #2955
@ZER0 ZER0 requested review from Daksh14 and moCello November 12, 2024 21:06
@ZER0
Copy link
Contributor Author

ZER0 commented Nov 12, 2024

While stake and unstake are currently tested and working as expected, the stake reward function is not yet covered. Please pay extra attention when reviewing that part to spot any potential issues. In the worst-case scenario, we can address any problems in a follow-up PR. Merging this one will unblock the web apps team and allow them to implement at least the other two methods.

Copy link
Member

@moCello moCello left a comment

Choose a reason for hiding this comment

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

two comments but nothing blocking

wallet-core/src/ffi.rs Show resolved Hide resolved
wallet-core/src/ffi.rs Show resolved Hide resolved
@ZER0 ZER0 merged commit 26eb7fc into master Nov 13, 2024
12 checks passed
@ZER0 ZER0 deleted the wallet-core-staking-2955 branch November 13, 2024 21:11
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.

wallet-core: expose staking capabilities via FFI
2 participants