forked from Cailloucano/nym
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validator-api: add operating cost and profit margin to compute reward…
… est (nymtech#1672) * validator-api: add oper cost and profit margin to compute reward est * changelog: add note * rustfmt * rustfmt
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// Copyright 2022 - Nym Technologies SA <[email protected]> | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use cosmwasm_std::Decimal; | ||
use cosmwasm_std::{Coin, Decimal}; | ||
use mixnet_contract_common::mixnode::MixNodeDetails; | ||
use mixnet_contract_common::reward_params::{Performance, RewardingParams}; | ||
use mixnet_contract_common::rewarding::RewardEstimate; | ||
use mixnet_contract_common::{Interval, MixNode, NodeId, RewardedSetNodeStatus}; | ||
use mixnet_contract_common::{Interval, MixNode, NodeId, Percent, RewardedSetNodeStatus}; | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
use std::{fmt, time::Duration}; | ||
|
@@ -99,6 +99,8 @@ pub struct ComputeRewardEstParam { | |
pub active_in_rewarded_set: Option<bool>, | ||
pub pledge_amount: Option<u64>, | ||
pub total_delegation: Option<u64>, | ||
pub interval_operating_cost: Option<Coin>, | ||
pub profit_margin_percent: Option<Percent>, | ||
} | ||
|
||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))] | ||
|