Skip to Content

@cfxdevkit/protocol


@cfxdevkit/protocol / stakingAbi

Variable: stakingAbi

const stakingAbi: readonly [{ inputs: readonly [{ internalType: "address"; name: "user"; type: "address"; }]; name: "getStakingBalance"; outputs: readonly [{ internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: readonly [{ internalType: "address"; name: "user"; type: "address"; }, { internalType: "uint256"; name: "blockNumber"; type: "uint256"; }]; name: "getLockedStakingBalance"; outputs: readonly [{ internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: readonly [{ internalType: "address"; name: "user"; type: "address"; }, { internalType: "uint256"; name: "blockNumber"; type: "uint256"; }]; name: "getVotePower"; outputs: readonly [{ internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: readonly [{ internalType: "uint256"; name: "amount"; type: "uint256"; }]; name: "deposit"; outputs: readonly []; stateMutability: "nonpayable"; type: "function"; }, { inputs: readonly [{ internalType: "uint256"; name: "amount"; type: "uint256"; }]; name: "withdraw"; outputs: readonly []; stateMutability: "nonpayable"; type: "function"; }, { inputs: readonly [{ internalType: "uint256"; name: "amount"; type: "uint256"; }, { internalType: "uint256"; name: "unlockBlock"; type: "uint256"; }]; name: "voteLock"; outputs: readonly []; stateMutability: "nonpayable"; type: "function"; }, { anonymous: false; inputs: readonly [{ indexed: true; name: "user"; type: "address"; }, { indexed: false; name: "amount"; type: "uint256"; }]; name: "Deposit"; type: "event"; }, { anonymous: false; inputs: readonly [{ indexed: true; name: "user"; type: "address"; }, { indexed: false; name: "amount"; type: "uint256"; }]; name: "Withdraw"; type: "event"; }, { anonymous: false; inputs: readonly [{ indexed: true; name: "user"; type: "address"; }, { indexed: false; name: "amount"; type: "uint256"; }, { indexed: false; name: "unlockBlock"; type: "uint256"; }]; name: "VoteLock"; type: "event"; }]

Defined in: precompiles.ts:242

Staking — Core Space internal contract. Manages PoS staking: deposit CFX, withdraw, and vote-lock for governance.

Address: 0x0888000000000000000000000000000000000002 Access: Core Space only (use cive client).