File: src/Xcm/v5/BodyPart/BodyPart.sol
BodyPart
Kind: source
Structs
struct BodyPart
A part of a pluralistic body.
| Field | Type | Description |
|---|---|---|
variant | enum 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. |
struct MembersParams
Parameters for the Members variant.
| Field | Type | Description |
|---|---|---|
count | uint32 | The number of members in the body part. |
struct FractionParams
Parameters 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. |
struct AtLeastProportionParams
Parameters 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. |
struct MoreThanProportionParams
Parameters 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. |
Enums
enum BodyPartVariant
Discriminant for the different types of BodyParts in XCM v5. Each variant corresponds to a specific structure of the payload.
| 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. |
Top-Level Functions
function voice() internal pure returns (struct BodyPart)- Creates a
BodyPartstruct representing aVoicebody part.
- Creates a
function members(struct MembersParams params) internal pure returns (struct BodyPart)- Creates a
BodyPartstruct representing aMembersbody part with the given count.
- Creates a
function fraction(struct FractionParams params) internal pure returns (struct BodyPart)- Creates a
BodyPartstruct representing aFractionbody part with the given proportion.
- Creates a
function atLeastProportion(struct AtLeastProportionParams params) internal pure returns (struct BodyPart)- Creates a
BodyPartstruct representing anAtLeastProportionbody part with the given proportion.
- Creates a
function moreThanProportion(struct MoreThanProportionParams params) internal pure returns (struct BodyPart)- Creates a
BodyPartstruct representing aMoreThanProportionbody part with the given proportion.
- Creates a