From 351a0b34377e236dcee2fef6620c020c69bc27d4 Mon Sep 17 00:00:00 2001 From: Bear Wang Date: Fri, 19 Apr 2024 11:25:38 +0800 Subject: [PATCH] Update solidity interface for the DIP-6 (#1482) --- precompile/metadata/abi/staking.json | 63 ---------------------------- precompile/metadata/sol/staking.sol | 13 ------ 2 files changed, 76 deletions(-) diff --git a/precompile/metadata/abi/staking.json b/precompile/metadata/abi/staking.json index b5e6bdc0b..47febcf44 100644 --- a/precompile/metadata/abi/staking.json +++ b/precompile/metadata/abi/staking.json @@ -19,20 +19,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "claim", - "outputs": - [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ @@ -96,32 +82,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": - [ - { - "internalType": "uint256", - "name": "ringAmount", - "type": "uint256" - }, - { - "internalType": "uint16[]", - "name": "depositIds", - "type": "uint16[]" - } - ], - "name": "restake", - "outputs": - [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ @@ -188,14 +148,6 @@ "_0": "returns true on success, false otherwise." } }, - "claim()": - { - "details": "Claim the stakes from the pallet/contract account.", - "returns": - { - "_0": "returns true on success, false otherwise." - } - }, "collect(uint32)": { "details": "Declare the desire to collect.", @@ -232,19 +184,6 @@ "_0": "returns true on success, false otherwise." } }, - "restake(uint256,uint16[])": - { - "details": "Re-stake the unstaking assets immediately.", - "params": - { - "depositIds": "The deposit ids list", - "ringAmount": "The amount of staking RING asset" - }, - "returns": - { - "_0": "true on success, false otherwise." - } - }, "stake(uint256,uint16[])": { "details": "Add stakes to the staking pool.", @@ -278,11 +217,9 @@ "hashes": { "chill()": "2b8a3ae6", - "claim()": "4e71d92d", "collect(uint32)": "10a66536", "nominate(address)": "b332180b", "payout(address)": "0b7e9c44", - "restake(uint256,uint16[])": "1ed0818e", "stake(uint256,uint16[])": "88fd3d50", "unstake(uint256,uint16[])": "0e198447" } diff --git a/precompile/metadata/sol/staking.sol b/precompile/metadata/sol/staking.sol index 25f6bb95c..0d0bce69f 100644 --- a/precompile/metadata/sol/staking.sol +++ b/precompile/metadata/sol/staking.sol @@ -45,19 +45,6 @@ interface Staking { uint16[] memory depositIds ) external returns (bool); - /// @dev Re-stake the unstaking assets immediately. - /// @param ringAmount The amount of staking RING asset - /// @param depositIds The deposit ids list - /// @return true on success, false otherwise. - function restake( - uint256 ringAmount, - uint16[] memory depositIds - ) external returns (bool); - - /// @dev Claim the stakes from the pallet/contract account. - /// @return returns true on success, false otherwise. - function claim() external returns (bool); - /// @dev Declare the desire to collect. /// @param commission collator commission, 0 ~ 100 /// @return returns true on success, false otherwise.