IDRX Documentation
  • Introduction
    • IDRX Whitepaper
    • Supported Chain and Contract Address
  • IDRX Account
    • Create Account
    • Sign In
    • Forgot Password
    • Account Verification (KYC)
    • Business Account
  • Services
    • Mint IDRX
    • Redeem IDRX
    • Bridge IDRX
    • Get Other Tokens
    • Redeem Other Stablecoin
    • Fees
  • API
    • Getting Started
    • Generating a Signature
    • Onboarding API
      • POST /api/auth/onboarding
      • GET /api/auth/members
      • POST /api/auth/add-bank-account
      • GET /api/auth/get-bank-accounts
      • DELETE /api/auth/delete-bank-account/:bankId
    • Transaction API
      • POST /api/transaction/mint-request
      • POST /api/transaction/redeem-request
      • POST /api/transaction/bridge-request
      • GET /api/transaction/method
      • GET /api/transaction/user-transaction-history
      • GET /api/transaction/rates
      • GET /api/transaction/get-additional-fees
  • Smart Contract
    • Staking
      • Staking Type
      • Staking IDRX
      • Claim Staking Reward
      • Unbond Staked IDRX
      • Claim Unbonded IDRX
      • Claim Principal and Staking Rewards
      • Application Binary Interface
  • Integration
    • Overview
    • Onboarding a new user
    • Managing bank accounts
    • Processing mint requests
      • Getting other tokens
    • Processing redeem requests
      • Redeeming from other tokens
Powered by GitBook
On this page
  1. Smart Contract
  2. Staking

Application Binary Interface

PreviousClaim Principal and Staking RewardsNextOverview

Last updated 13 days ago

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:

Events

  1. addNewStake : Triggered when a new stake is added, providing details like stake ID, type, staker address, amount, rewards, and timestamps.

  2. claimReward : Emitted when a reward is claimed, showing the stake ID, staker, claimed amount, and timestamp.

  3. newUnbondingPeriod : Indicates a change in the unbonding period.

  4. stakeTypeModified : Occurs when a stake type is modified, providing details about the reward and duration modifiers.

  5. stakeUnbonded : Emitted when a stake enters the unbonding phase.

  6. withdrawPrincipal : Triggered when the principal amount of a stake is withdrawn.

  7. withdrawPrincipalUnbonded : Triggered when the unbounded principal amount of stake is withdrawn.

Functions

  1. claimStakePrincipal : Allows users to claim the principal of a specific stake.

  2. claimStakePrincipalUnbonded : For claiming the principal of an unbonded stake.

  3. claimStakeReward : Enables users to claim their staking rewards.

  4. getStake : Retrieves details of specified stakes.

  5. implementation : Returns the address of the current implementation

  6. isStakingContract : Confirms if the contract is a staking contract.

  7. newStake : Used to create a new stake with a specified amount and type.

  8. owner : Returns the address of the contract owner.

  9. setStakeType : Allows setting or modifying a stake type with parameters for reward and duration.

  10. setUnbondingPeriod : Adjusts the unbonding period for stakes.

  11. stakeCount : Provides the total number of stakes.

  12. stakeToken : Returns the address of the token used for staking.

  13. stakeTypes : Retrieves details of a particular stake type.

  14. stakes : Returns details of a specific stake.

  15. unbondStake : Initiates the unbonding process for a stake.

  16. unbondingPeriod : Returns the current unbonding period.

  17. withdraw : Withdraws funds to a specified address.

  18. withdrawToken : Withdraws a specified amount of a token to an address.

  19. receive : Allows the contract to receive Ether.

Usage

  • 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.

12KB
idrxStaking.json
Staking IDRX ABI