EVM Precompiles
Distribution

Distribution Precompile

Address: 0x0000000000000000000000000000000000001007

This precompile enables EVM clients to withdraw distributions and staking rewards.

Functions

Transactions

  • setWithdrawAddress: Sets the EVM Address to withdraw funds to for the account.

      /// Sets the EVM address to withdraw funds to.
      /// @param address The EVM Address that withdrawals should go to.
      /// @return Whether the operation was a success.
      function setWithdrawAddress(
          address withdrawAddr
      ) external returns (bool success);
  • withdrawDelegationRewards: Withdraws delegation rewards from the given validator.

      /// Withdraws delegation rewards from the given validator.
      /// @param validator The Sei address of the validator to withdraw rewards from.
      /// @return Whether the operation was a success.
      function withdrawDelegationRewards(
          string memory validator
      ) external returns (bool success);
  • withdrawMultipleDelegationRewards: Withdraws delegation rewards from the given validators.

  /// Withdraws delegation rewards from the given validators.
  /// @param validators The Sei addresses of the validators to withdraw rewards from.
  /// @return Whether the operation was a success.
  function withdrawMultipleDelegationRewards(
        string[] memory validators
  ) external returns (bool success);

Queries

  • rewards: Queries rewards available for a given delegator address.
  struct Coin {
      uint256 amount;
      uint256 decimals;
      string denom;
  }
 
  struct Reward {
      Coin[] coins;
      string validator_address;
  }
 
  struct Rewards {
      Reward[] rewards;
      Coin[] total;
  }
  /// Queries rewards available for a given delegator address.
  /// @param delegatorAddress The x0 or Sei address of the delegator.
  /// @return the Rewards object. Rewards are usually returned as decimals.
  /// To calculate the actual amount, divide the amount by decimals.
  function rewards(
      address delegatorAddress
  ) external view returns (Rewards rewards);

View the distribution precompile source code and the contract ABI here (opens in a new tab).