Pundi
Pundi AIPundi X
  • 🤖Pundi AI overview
  • 🈁Pundi AI Data Platform
    • Data stakeholders
    • Data Labelling
    • Pundi AI Data Platform (Alpha Testnet) - User Guide
    • FAQ
  • 🦾Pundi AIFX Omnilayer
    • Pundi AIFX
    • Installation Pundi AIFX
    • Setup Node
      • Full node with Binaries
      • Full node with Docker
      • Snapshot Guide
      • Node Monitoring Device
    • Validators
      • Validator Overview
      • Setting Up a Validator for Pundi AIFX
      • Validator Recovery
      • Validator FAQ
      • Validator Security Notice
      • Migration Best Practices
      • Transfer Validator Permissions
    • Delegators
      • Delegators FAQ
      • Delegator CLI Guide
      • Delegator Security Notice
    • Pundi AIFX Tutorials
      • Pundi AIFX CLI Commands
      • Cloud Setup
      • Testnet faucet
      • Ledger Integration for fxcored
      • Sentry Nodes
      • Account Migration Guide (CLI)
    • Upgrade Instructions
      • Cosmovisor Upgrade Guide v8.5.x
        • Cosmovisor Integration - Binaries
        • Cosmovisor Integration - Docker
      • Manual Upgrade Guide v8.5.x
        • Binaries - Upgrading Your Node
        • Docker - Upgrading Your Node
      • Upgrade Versions
        • v2.2.0 Upgrade Instructions
        • v3.1.0 Upgrade Instructions
        • v4.2.1 Upgrade Instructions
        • v5.0.0 Upgrade Instructions
      • Upgrade FAQ
    • Deploying on Pundi AIFX EVM
      • Products
      • MetaMask
        • Download and Install MetaMask
        • Add Network
        • Configure Custom Tokens
        • Create and Import Accounts
      • Connect Wallet to Dapps
        • Connect using MetaMask
        • Connect using Pundi Wallet (Wallet Connect)
      • With Remix
      • With Truffle
      • With Hardhat
      • Cross-Chain Bridges
        • Bridging Tokens from other networks
        • Pundi Gravity Bridge
    • DApps and Infra
      • Margin X Swap
      • Pundi Wallet
      • PundiScan
      • Baklava Space
      • Safe Multisig
      • PortfolioX
      • Token Factory
    • Developers
      • Pundi AIFX Network
      • Pundi AIFX Modules
      • Pundi AIFX JSON RPC
      • Pundi AIFX REST API
      • Web3 JSON RPC
        • JSON RPC Server
        • Namespaces
        • JSON RPC Methods
        • Events
      • Support Leap
      • Third Party Price Oracles
      • Contract Deployments
      • Pundi AIFX Cross Chain
        • sendToFx
        • f(x)Core
        • ibc
        • Target
      • Precompiled Contracts
        • CrossChain Precompiled
        • Staking-V2 Precompiled
      • Pundi AIFX SDKs
        • Python SDK
        • JavaScript SDK
      • Contract Monitoring
    • Pundi X Chain (under Pundi X)
      • Getting Started
        • Install Pundi X (PundiXChain)
        • Setup Node
          • Full node with Binaries
          • Full node with Docker
          • Snapshot Guide
          • Node Monitoring Device
          • Node Peers
      • Validators
        • Validator Overview
        • Setting Up a Validator for PundiXChain
        • Validator Recovery
        • Validator FAQ
        • Validator Security
        • Sentry Nodes
      • Delegators
        • Delegator FAQ
        • Delegator Overview
        • Delegator CLI Guide
      • Pundi X Tutorials
        • Pundi X CLI Guide
        • Ledger Integration for pundixd
        • Testnet Faucet
        • Cloud Setup
      • Upgrade Instructions
        • Cosmovisor Integration - Binaries
        • Cosmovisor Integration - Docker
        • Support keplr
      • Developers
        • Pundi X Network
        • Pundi X Protobuf
        • Pundi X gRPC & REST
        • Pundi X JSON RPC
        • Pundi X Cross Chain
          • ibc
  • 👛PURSE+
    • Purse Box
      • How many NFTs can I mint?
      • Minting (Etherscan)
      • Minting (Pursetoken.com)
    • PURSE+
      • Links
    • Bridging
      • BSC -> Ethereum
    • Protocols
      • LP Restaking Farms
        • How to Use Farms
        • Contract on BscScan
      • PURSE Staking
      • PURSE Staking Rewards
        • Campaigns
      • PURSE Retroactive Rewards
        • Campaigns
    • Contracts
      • Ethereum
      • Binance
      • Function X
    • IBC
      • PUNDIX Chain
    • PURSE Token
      • Background
      • ERC404 intro
      • Accounting of Balances
      • Minting PURSE NFT(s)
      • Transferring PURSE
      • Maintaining PURSE NFT(s)
      • NFTs in Queue
      • Token IDs
  • 🎡Pundi AI MM Agent
    • Why Market Making
    • Traditional MM vs. AMM
    • AI MM Agent: Bridging the Gap
    • Use Cases
    • Train & Launch (Step 1 & 2)
    • Flywheel (Step 3)
    • How the AI MM Agent Works in Detail
    • Why This is Powerful
  • 🛍️Pundi AI Data Marketplace (soon)
  • 🥇PUNDIAI Token Overview
    • Revenue generation flywheel
    • vePUNDIAI
      • how to bribe with vePUNDIAI
    • Protocol pool
  • Governance
    • Governance Proposal Information
      • EGF Info
      • EGF Grants Program
      • Application Template
      • Successful Grant Applicants
      • Launching an EGF Proposal
  • Links
Powered by GitBook
On this page
  • Introduction
  • Method
  • delegateV2
  • undelegateV2
  • redelegateV2
  • withdraw
  • delegation
  • delegationRewards
  1. Pundi AIFX Omnilayer
  2. Developers
  3. Precompiled Contracts

Staking-V2 Precompiled

PreviousCrossChain PrecompiledNextPundi AIFX SDKs

Last updated 2 months ago

Address: 0x0000000000000000000000000000000000001003

Interface:

ABI:

Introduction

use staking v2 precompiled contract to call some functions of the staking module, such as: delegate, undelegate, redelegate, etc.

Method

delegateV2

delegate token to validator, get result

function delegateV2(
    string memory _val,
    uint256 _amount
) external returns (bool _result);
  • _val: the validator address

  • _amount: the amount of the token to be delegate

  • _result_: the delegate result

only can delegate origin token

only delegate validator who has participated in block generation, delegate again, will get reward

delegate event

event DelegateV2(
    address indexed delegator,
    string validator,
    uint256 amount
);
  • delegator: the delegator address

  • validator: the validator address to be delegated

  • amount: the amount of the token to be delegated

undelegateV2

undelegate token from validator, get result

function undelegateV2(
    string memory _val,
    uint256 _amount
) external returns (bool _result);
  • _val: the validator address to be undelegate

  • _amount: the amount to undelegate

  • _result_: the undelegate result

undelegate event

event UndelegateV2(
    address indexed sender,
    string validator,
    uint256 amount,
    uint256 completionTime
);
  • sender: the sender address

  • validator: the validator address to be undelegate

  • amount: the amount to undelegate

  • completionTime: the completion time of undelegate

redelegateV2

redelegate token from validator to other validator, get result

function redelegateV2(
    string memory _valSrc,
    string memory _valDst,
    uint256 _amount
) external returns (bool _result);
  • _valSrc: the validator address to be redelegate

  • _valDst: the validator address to be redelegate to

  • _amount: the amount to redelegate

  • _result_: the undelegate result

redelegate event

event RedelegateV2(
    address indexed sender,
    string valSrc,
    string valDst,
    uint256 amount,
    uint256 completionTime
);
  • sender: the sender address

  • valSrc: the validator address to be redelegated

  • valDst: the validator address to be redelegated to

  • amount: the amount to redelegate

  • completionTime: the completion time of redelegate

withdraw

withdraw delegate reward

function withdraw(string memory _val) external returns (uint256 _reward);
  • _val: the validator address to be withdraw

  • _reward: reward amount

withdraw event

event Withdraw(address indexed sender, string validator, uint256 reward);
  • withdrawer: the withdraw address

  • validator: the validator address to be withdraw

  • reward: reward amount

delegation

query delegation

function delegation(
    string memory _val,
    address _del
) external view returns (uint256 _shares, uint256 _delegateAmount);
  • _val: the validator address to be query

  • _del: the delegator address to be query

  • _shares: the shares of the delegator in the validator

  • _delegateAmount: the amount of the delegator in the validator

delegationRewards

query delegation rewards

function delegationRewards(
    string memory _val,
    address _del
) external view returns (uint256 _reward);
  • _val: the validator address to be query

  • _del: the delegator address to be query

  • _reward: the reward of the delegator in the validator

🦾
IStaking
IStaking