Application Binary Interface
Last updated
Last updated
This ABI for the IDRX staking contract provides a detailed overview of the contract's functionality. Here's a breakdown of what the key components do:
addNewStake
: Triggered when a new stake is added, providing details like stake ID, type, staker address, amount, rewards, and timestamps.
claimReward
: Emitted when a reward is claimed, showing the stake ID, staker, claimed amount, and timestamp.
newUnbondingPeriod
: Indicates a change in the unbonding period.
stakeTypeModified
: Occurs when a stake type is modified, providing details about the reward and duration modifiers.
stakeUnbonded
: Emitted when a stake enters the unbonding phase.
withdrawPrincipal
: Triggered when the principal amount of a stake is withdrawn.
withdrawPrincipalUnbonded
: Triggered when the unbounded principal amount of stake is withdrawn.
claimStakePrincipal
: Allows users to claim the principal of a specific stake.
claimStakePrincipalUnbonded
: For claiming the principal of an unbonded stake.
claimStakeReward
: Enables users to claim their staking rewards.
getStake
: Retrieves details of specified stakes.
implementation
: Returns the address of the current implementation
isStakingContract
: Confirms if the contract is a staking contract.
newStake
: Used to create a new stake with a specified amount and type.
owner
: Returns the address of the contract owner.
setStakeType
: Allows setting or modifying a stake type with parameters for reward and duration.
setUnbondingPeriod
: Adjusts the unbonding period for stakes.
stakeCount
: Provides the total number of stakes.
stakeToken
: Returns the address of the token used for staking.
stakeTypes
: Retrieves details of a particular stake type.
stakes
: Returns details of a specific stake.
unbondStake
: Initiates the unbonding process for a stake.
unbondingPeriod
: Returns the current unbonding period.
withdraw
: Withdraws funds to a specified address.
withdrawToken
: Withdraws a specified amount of a token to an address.
receive
: Allows the contract to receive Ether.
Staking and Unstaking: newStake
, unbondStake
, claimStakePrincipal
, and claimStakeReward
manage staking, unbonding, and claiming rewards or principal.
Stake Management: getStake
, stakeCount
, and stakeTypes
help users and contract owner query stake details.
Admin Functions: setStakeType
, setUnbondingPeriod
, and withdrawToken
are used by the contract owner to manage stake types, unbonding periods, and fund withdrawals.