import "solidity-scale-codec/src/Xcm/v5/BodyPart/BodyPart.sol";File-Level Functions
function members(struct MembersParams params) internal pure returns (struct BodyPart)function fraction(struct FractionParams params) internal pure returns (struct BodyPart)
voice()
function voice() internal pure returns (struct BodyPart)Creates a `BodyPart` struct representing a `Voice` body part.
members(struct MembersParams params)
function members(struct MembersParams params) internal pure returns (struct BodyPart)Creates a `BodyPart` struct representing a `Members` body part with the given count.
fraction(struct FractionParams params)
function fraction(struct FractionParams params) internal pure returns (struct BodyPart)Creates a `BodyPart` struct representing a `Fraction` body part with the given proportion.
atLeastProportion(struct AtLeastProportionParams params)
function atLeastProportion(struct AtLeastProportionParams params) internal pure returns (struct BodyPart)Creates a `BodyPart` struct representing an `AtLeastProportion` body part with the given proportion.
moreThanProportion(struct MoreThanProportionParams params)
function moreThanProportion(struct MoreThanProportionParams params) internal pure returns (struct BodyPart)Creates a `BodyPart` struct representing a `MoreThanProportion` body part with the given proportion.
File-Level Structs
BodyPart
struct BodyPartA part of a pluralistic body.
| Field | Type | Description |
|---|---|---|
variant | BodyPartVariant | The type of BodyPart, which determines how to interpret the payload. See `BodyPartVariant` enum for possible values. |
payload | bytes | For Members, this will hold the count. For Fraction, AtLeastProportion, and MoreThanProportion, this will hold the encoded Proportion struct. For Voice, this will be empty. |
MembersParams
struct MembersParamsParameters for the `Members` variant.
| Field | Type | Description |
|---|---|---|
count | uint32 | The number of members in the body part. |
FractionParams
struct FractionParamsParameters for the `Fraction` variant.
| Field | Type | Description |
|---|---|---|
nominator | uint32 | The numerator of the fraction, representing the number of members in favor. |
denominator | uint32 | The denominator of the fraction, representing the total number of members considered. |
AtLeastProportionParams
struct AtLeastProportionParamsParameters for the `AtLeastProportion` variant.
| Field | Type | Description |
|---|---|---|
nominator | uint32 | The numerator of the proportion, representing the minimum number of members in favor. |
denominator | uint32 | The denominator of the proportion, representing the total number of members considered. |
MoreThanProportionParams
struct MoreThanProportionParamsParameters for the `MoreThanProportion` variant.
| Field | Type | Description |
|---|---|---|
nominator | uint32 | The numerator of the proportion, representing the minimum number of members in favor. |
denominator | uint32 | The denominator of the proportion, representing the total number of members considered. |
File-Level Enums
BodyPartVariant
enum BodyPartVariant| Variant | Description |
|---|---|
Voice | The body's declaration, under whatever means it decides. |
Members | A given number of members of the body. |
Fraction | A given number of members of the body, out of some larger caucus. |
AtLeastProportion | No less than the given proportion of members of the body. |
MoreThanProportion | More than the given proportion of members of the body. |
BodyPart
Kind: source