Skip to content

Commit

Permalink
Remove type from netuid declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
gztensor committed Jan 14, 2025
1 parent ec229d7 commit 75a281e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/src/precompiles/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl StakingPrecompile {
fn add_stake(handle: &mut impl PrecompileHandle, data: &[u8]) -> PrecompileResult {
let hotkey = Self::parse_hotkey(data)?.into();
let amount: U256 = handle.context().apparent_value;
let netuid: u16 = Self::parse_netuid(data, 0x3E)?;
let netuid = Self::parse_netuid(data, 0x3E)?;

let amount_sub =
<Runtime as pallet_evm::Config>::BalanceConverter::into_substrate_balance(amount)
Expand All @@ -86,7 +86,7 @@ impl StakingPrecompile {

fn remove_stake(handle: &mut impl PrecompileHandle, data: &[u8]) -> PrecompileResult {
let hotkey = Self::parse_hotkey(data)?.into();
let netuid: u16 = Self::parse_netuid(data, 0x5E)?;
let netuid = Self::parse_netuid(data, 0x5E)?;

// We have to treat this as uint256 (because of Solidity ABI encoding rules, it pads uint64),
// but this will never exceed 8 bytes, se we will ignore higher bytes and will only use lower
Expand Down

0 comments on commit 75a281e

Please sign in to comment.