Table of Contents

Class Delegatee<T, TSelf>

Namespace
Nekoyume.Delegation
Assembly
Lib9c.dll
public abstract class Delegatee<T, TSelf> : IDelegatee where T : Delegator<TSelf, T> where TSelf : Delegatee<T, TSelf>

Type Parameters

T
TSelf
Inheritance
Delegatee<T, TSelf>
Implements
Derived
Inherited Members

Constructors

Delegatee(Address, Address, Currency, IEnumerable<Currency>, Address, Address, Address, Address, long, int, int, IDelegationRepository)

public Delegatee(Address address, Address accountAddress, Currency delegationCurrency, IEnumerable<Currency> rewardCurrencies, Address delegationPoolAddress, Address rewardPoolAddress, Address rewardRemainderPoolAddress, Address slashedPoolAddress, long unbondingPeriod, int maxUnbondLockInEntries, int maxRebondGraceEntries, IDelegationRepository repository)

Parameters

address Address
accountAddress Address
delegationCurrency Currency
rewardCurrencies IEnumerable<Currency>
delegationPoolAddress Address
rewardPoolAddress Address
rewardRemainderPoolAddress Address
slashedPoolAddress Address
unbondingPeriod long
maxUnbondLockInEntries int
maxRebondGraceEntries int
repository IDelegationRepository

Delegatee(Address, IDelegationRepository)

public Delegatee(Address address, IDelegationRepository repository)

Parameters

address Address
repository IDelegationRepository

Properties

AccountAddress

public Address AccountAddress { get; }

Property Value

Address

Address

public Address Address { get; }

Property Value

Address

DelegationCurrency

public Currency DelegationCurrency { get; }

Property Value

Currency

DelegationPoolAddress

public Address DelegationPoolAddress { get; }

Property Value

Address

Delegators

public ImmutableSortedSet<Address> Delegators { get; }

Property Value

ImmutableSortedSet<Address>

Jailed

public bool Jailed { get; }

Property Value

bool

JailedUntil

public long JailedUntil { get; }

Property Value

long

MaxRebondGraceEntries

public int MaxRebondGraceEntries { get; }

Property Value

int

MaxUnbondLockInEntries

public int MaxUnbondLockInEntries { get; }

Property Value

int

Metadata

public DelegateeMetadata Metadata { get; }

Property Value

DelegateeMetadata

MetadataAddress

public Address MetadataAddress { get; }

Property Value

Address

MetadataBencoded

public List MetadataBencoded { get; }

Property Value

List

Repository

public IDelegationRepository Repository { get; }

Property Value

IDelegationRepository

RewardCurrencies

public ImmutableSortedSet<Currency> RewardCurrencies { get; }

Property Value

ImmutableSortedSet<Currency>

RewardPoolAddress

public Address RewardPoolAddress { get; }

Property Value

Address

RewardRemainderPoolAddress

public Address RewardRemainderPoolAddress { get; }

Property Value

Address

SlashedPoolAddress

public Address SlashedPoolAddress { get; }

Property Value

Address

Tombstoned

public bool Tombstoned { get; }

Property Value

bool

TotalDelegated

public FungibleAssetValue TotalDelegated { get; }

Property Value

FungibleAssetValue

TotalShares

public BigInteger TotalShares { get; }

Property Value

BigInteger

UnbondingPeriod

public long UnbondingPeriod { get; }

Property Value

long

Methods

AddUnbondingRef(UnbondingRef)

public void AddUnbondingRef(UnbondingRef reference)

Parameters

reference UnbondingRef

Bond(IDelegator, FungibleAssetValue, long)

public BigInteger Bond(IDelegator delegator, FungibleAssetValue fav, long height)

Parameters

delegator IDelegator
fav FungibleAssetValue
height long

Returns

BigInteger

Bond(T, FungibleAssetValue, long)

public virtual BigInteger Bond(T delegator, FungibleAssetValue fav, long height)

Parameters

delegator T
fav FungibleAssetValue
height long

Returns

BigInteger

BondAddress(Address)

public Address BondAddress(Address delegatorAddress)

Parameters

delegatorAddress Address

Returns

Address

CalculateReward(BigInteger, IEnumerable<LumpSumRewardsRecord>)

public ImmutableDictionary<Currency, FungibleAssetValue> CalculateReward(BigInteger share, IEnumerable<LumpSumRewardsRecord> lumpSumRewardsRecords)

Parameters

share BigInteger
lumpSumRewardsRecords IEnumerable<LumpSumRewardsRecord>

Returns

ImmutableDictionary<Currency, FungibleAssetValue>

CollectRewards(long)

public void CollectRewards(long height)

Parameters

height long

CurrentLumpSumRewardsRecordAddress()

public Address CurrentLumpSumRewardsRecordAddress()

Returns

Address

DistributeReward(IDelegator, long)

public void DistributeReward(IDelegator delegator, long height)

Parameters

delegator IDelegator
height long

DistributeReward(T, long)

public void DistributeReward(T delegator, long height)

Parameters

delegator T
height long

FAVFromShare(BigInteger)

public FungibleAssetValue FAVFromShare(BigInteger share)

Parameters

share BigInteger

Returns

FungibleAssetValue

Jail(long)

public void Jail(long releaseHeight)

Parameters

releaseHeight long

LumpSumRewardsRecordAddress(long)

public Address LumpSumRewardsRecordAddress(long height)

Parameters

height long

Returns

Address

RebondGraceAddress(Address)

public Address RebondGraceAddress(Address delegatorAddress)

Parameters

delegatorAddress Address

Returns

Address

RemoveUnbondingRef(UnbondingRef)

public void RemoveUnbondingRef(UnbondingRef reference)

Parameters

reference UnbondingRef

ShareFromFAV(FungibleAssetValue)

public BigInteger ShareFromFAV(FungibleAssetValue fav)

Parameters

fav FungibleAssetValue

Returns

BigInteger

Slash(BigInteger, long, long)

public void Slash(BigInteger slashFactor, long infractionHeight, long height)

Parameters

slashFactor BigInteger
infractionHeight long
height long

Tombstone()

public void Tombstone()

Unbond(IDelegator, BigInteger, long)

public FungibleAssetValue Unbond(IDelegator delegator, BigInteger share, long height)

Parameters

delegator IDelegator
share BigInteger
height long

Returns

FungibleAssetValue

Unbond(T, BigInteger, long)

public FungibleAssetValue Unbond(T delegator, BigInteger share, long height)

Parameters

delegator T
share BigInteger
height long

Returns

FungibleAssetValue

UnbondLockInAddress(Address)

public Address UnbondLockInAddress(Address delegatorAddress)

Parameters

delegatorAddress Address

Returns

Address

Unjail(long)

public void Unjail(long height)

Parameters

height long

Events

DelegationChanged

public event EventHandler<long>? DelegationChanged

Event Type

EventHandler<long>

Enjailed

public event EventHandler? Enjailed

Event Type

EventHandler

Unjailed

public event EventHandler? Unjailed

Event Type

EventHandler