Skip to content

Commit

Permalink
Update metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Mar 4, 2024
1 parent 1f6b2cd commit 55f5ceb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions precompile/metadata/abi/staking.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
"type": "uint256"
},
{
"internalType": "uint8[]",
"internalType": "uint16[]",
"name": "depositIds",
"type": "uint8[]"
"type": "uint16[]"
}
],
"name": "restake",
Expand Down Expand Up @@ -136,9 +136,9 @@
"type": "uint256"
},
{
"internalType": "uint8[]",
"internalType": "uint16[]",
"name": "depositIds",
"type": "uint8[]"
"type": "uint16[]"
}
],
"name": "stake",
Expand Down Expand Up @@ -167,9 +167,9 @@
"type": "uint256"
},
{
"internalType": "uint8[]",
"internalType": "uint16[]",
"name": "depositIds",
"type": "uint8[]"
"type": "uint16[]"
}
],
"name": "unstake",
Expand Down Expand Up @@ -242,7 +242,7 @@
"_0": "returns true on success, false otherwise."
}
},
"restake(uint256,uint8[])":
"restake(uint256,uint16[])":
{
"details": "Re-stake the unstaking assets immediately.",
"params":
Expand All @@ -255,7 +255,7 @@
"_0": "true on success, false otherwise."
}
},
"stake(uint256,uint256,uint8[])":
"stake(uint256,uint256,uint16[])":
{
"details": "Add stakes to the staking pool.",
"params":
Expand All @@ -269,7 +269,7 @@
"_0": "returns true on success, false otherwise."
}
},
"unstake(uint256,uint256,uint8[])":
"unstake(uint256,uint256,uint16[])":
{
"details": "Withdraw stakes to the staking pool.",
"params":
Expand All @@ -294,9 +294,9 @@
"collect(uint32)": "10a66536",
"nominate(address)": "b332180b",
"payout(address)": "0b7e9c44",
"restake(uint256,uint8[])": "6dbcd550",
"stake(uint256,uint256,uint8[])": "757f9b3b",
"unstake(uint256,uint256,uint8[])": "ef20fcb3"
"restake(uint256,uint16[])": "1ed0818e",
"stake(uint256,uint256,uint16[])": "98e9fb50",
"unstake(uint256,uint256,uint16[])": "632efe00"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions precompile/metadata/sol/staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface Staking {
function stake(
uint256 ringAmount,
uint256 ktonAmount,
uint8[] memory depositIds
uint16[] memory depositIds
) external returns (bool);

/// @dev Withdraw stakes to the staking pool.
Expand All @@ -46,7 +46,7 @@ interface Staking {
function unstake(
uint256 ringAmount,
uint256 ktonAmount,
uint8[] memory depositIds
uint16[] memory depositIds
) external returns (bool);

/// @dev Re-stake the unstaking assets immediately.
Expand All @@ -55,7 +55,7 @@ interface Staking {
/// @return true on success, false otherwise.
function restake(
uint256 ringAmount,
uint8[] memory depositIds
uint16[] memory depositIds
) external returns (bool);

/// @dev Claim the stakes from the pallet/contract account.
Expand Down
6 changes: 3 additions & 3 deletions precompile/staking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ fn precompiles() -> TestPrecompiles<Runtime> {

#[test]
fn selectors() {
// assert!(PCall::stake_selectors().contains(&0x757f9b3b));
// assert!(PCall::unstake_selectors().contains(&0xef20fcb3));
// assert!(PCall::restake_selectors().contains(&0x6dbcd550));
assert!(PCall::stake_selectors().contains(&0x98e9fb50));
assert!(PCall::unstake_selectors().contains(&0x632efe00));
assert!(PCall::restake_selectors().contains(&0x1ed0818e));
assert!(PCall::claim_selectors().contains(&0x4e71d92d));
assert!(PCall::nominate_selectors().contains(&0xb332180b));
assert!(PCall::collect_selectors().contains(&0x10a66536));
Expand Down

0 comments on commit 55f5ceb

Please sign in to comment.