Skip to main content

FeesDistribution

Implements

  • Serializable

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new FeesDistribution(total?, protocol?): FeesDistribution

Parameters

NameTypeDefault valueDescription
totalu256u256.ZeroThe total amount of fees
protocolu256u256.ZeroThe amount of fees reserved for protocol

Returns

FeesDistribution

Defined in

assembly/structs/FeesDistribution.ts:11

Properties

protocol

protocol: u256 = u256.Zero

The amount of fees reserved for protocol

Defined in

assembly/structs/FeesDistribution.ts:13


total

total: u256 = u256.Zero

The total amount of fees

Defined in

assembly/structs/FeesDistribution.ts:12

Methods

deserialize

deserialize(data, offset): Result<i32>

Parameters

NameType
dataStaticArray<u8>
offseti32

Returns

Result<i32>

Implementation of

Serializable.deserialize

Defined in

assembly/structs/FeesDistribution.ts:37


getTokenPerShare

getTokenPerShare(totalSupply): u256

Calculate the tokenPerShare when fees are added

Parameters

NameTypeDescription
totalSupplyu256the total supply of a specific bin

Returns

u256

Defined in

assembly/structs/FeesDistribution.ts:21


serialize

serialize(): StaticArray<u8>

Returns

StaticArray<u8>

Implementation of

Serializable.serialize

Defined in

assembly/structs/FeesDistribution.ts:33