From 08e856b67afc90081330cde25cb760cdd34803a3 Mon Sep 17 00:00:00 2001 From: Nikhil <29760727+nikbhintade@users.noreply.github.com> Date: Sat, 13 Jul 2024 11:44:43 +0530 Subject: [PATCH 1/2] Update staking.mdx --- pages/dev-interoperability/precompiles/staking.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pages/dev-interoperability/precompiles/staking.mdx b/pages/dev-interoperability/precompiles/staking.mdx index 138a4d2a..3e5578b2 100644 --- a/pages/dev-interoperability/precompiles/staking.mdx +++ b/pages/dev-interoperability/precompiles/staking.mdx @@ -9,10 +9,11 @@ This precompile allows EVM contracts to interact with Sei's staking module, enab ## Functions ### Transactions -- `delegate`: Allows a user to delegate a specified amount of tokens to a validator +- `delegate`: Allows a user to delegate a specified amount of tokens to a validator. This function will truncate the `msg.value` to 6 decimals to ```solidity /// Delegates Sei to the specified validator. + /// @dev This function truncates msg.value to 6 decimal places for interaction with the staking module /// @param valAddress The Sei address of the validator. /// @return Whether the delegation was successful. function delegate( @@ -24,6 +25,7 @@ This precompile allows EVM contracts to interact with Sei's staking module, enab ```solidity /// Redelegates Sei from one validator to another. + /// @dev The amount should be in 6 decimal precision, not 18 /// @param srcAddress The Sei address of the validator to move delegations from. /// @param dstAddress The Sei address of the validator to move delegations to. /// @param amount The amount of Sei to move from srcAddress to dstAddress. @@ -38,6 +40,7 @@ This precompile allows EVM contracts to interact with Sei's staking module, enab - `undelegate`: Provides the functionality for a user to withdraw a specified amount of tokens from a validator ```solidity /// Undelegates Sei from the specified validator. + /// @dev The amount should be in 6 decimal precision, not 18 /// @param valAddress The Sei address of the validator to undelegate from. /// @param amount The amount of Sei to undelegate. /// @return Whether the undelegation was successful. From a536d4daae76235b8d6fff8379a4e6d8449b01ef Mon Sep 17 00:00:00 2001 From: Nikhil <29760727+nikbhintade@users.noreply.github.com> Date: Sat, 13 Jul 2024 11:51:41 +0530 Subject: [PATCH 2/2] Update staking.mdx --- pages/dev-interoperability/precompiles/staking.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/dev-interoperability/precompiles/staking.mdx b/pages/dev-interoperability/precompiles/staking.mdx index 3e5578b2..e0a88e06 100644 --- a/pages/dev-interoperability/precompiles/staking.mdx +++ b/pages/dev-interoperability/precompiles/staking.mdx @@ -25,7 +25,7 @@ This precompile allows EVM contracts to interact with Sei's staking module, enab ```solidity /// Redelegates Sei from one validator to another. - /// @dev The amount should be in 6 decimal precision, not 18 + /// @dev The amount should be in 6 decimal precision, not 18. 1 SEI = 1_000_000 uSEI /// @param srcAddress The Sei address of the validator to move delegations from. /// @param dstAddress The Sei address of the validator to move delegations to. /// @param amount The amount of Sei to move from srcAddress to dstAddress. @@ -40,7 +40,7 @@ This precompile allows EVM contracts to interact with Sei's staking module, enab - `undelegate`: Provides the functionality for a user to withdraw a specified amount of tokens from a validator ```solidity /// Undelegates Sei from the specified validator. - /// @dev The amount should be in 6 decimal precision, not 18 + /// @dev The amount should be in 6 decimal precision, not 18. 1 SEI = 1_000_000 uSEI /// @param valAddress The Sei address of the validator to undelegate from. /// @param amount The amount of Sei to undelegate. /// @return Whether the undelegation was successful.