SMART CONTRACTS
← Contract catalogStaking
Manage token staking, withdrawals and reward claims.
Role and use
Track participants’ staked positions and reward claims under configured rules.
Integration considerationsDefine eligible tokens, reward funding, periods and withdrawal conditions. Distinguish staked assets from reward assets.
Key SDK operations
These operations are exposed by StakingHelper in @hazbase/kit@0.9.0. The signatures below are type definitions; see the SDK reference for parameter structures and the complete interface.
typescript
import { StakingHelper } from '@hazbase/kit';stakeERC20
typescript
async stakeERC20(token: Address, amount: bigint): Promise<TransactionReceipt>unstakeERC20
typescript
async unstakeERC20(token: Address, amount: bigint): Promise<TransactionReceipt>pendingReward
typescript
pendingReward(token: Address, id: bigint, user: Address): Promise<bigint>claim
typescript
async claim(token: Address, id: bigint): Promise<TransactionReceipt>Related contracts
Put it into practice
Community & governance
See the data model, processing sequence and SDK code for an application-level implementation.
Read the implementation patternSpecification and source
The Solidity source is pinned to the revision below. Match it with the SDK version and your network’s implementation address and ABI.
staking/contracts/Staking.solSource revision: b53a5b5