Skip to content

File: src/Xcm/v5/BodyPart/BodyPart.sol

BodyPart

Kind: source

Structs

struct BodyPart

A part of a pluralistic body.

FieldTypeDescription
variantenum BodyPartVariantThe type of BodyPart, which determines how to interpret the payload. See `BodyPartVariant` enum for possible values.
payloadbytesFor 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.

FieldTypeDescription
countuint32The number of members in the body part.

struct FractionParams

Parameters for the Fraction variant.

FieldTypeDescription
nominatoruint32The numerator of the fraction, representing the number of members in favor.
denominatoruint32The denominator of the fraction, representing the total number of members considered.

struct AtLeastProportionParams

Parameters for the AtLeastProportion variant.

FieldTypeDescription
nominatoruint32The numerator of the proportion, representing the minimum number of members in favor.
denominatoruint32The denominator of the proportion, representing the total number of members considered.

struct MoreThanProportionParams

Parameters for the MoreThanProportion variant.

FieldTypeDescription
nominatoruint32The numerator of the proportion, representing the minimum number of members in favor.
denominatoruint32The 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.

VariantDescription
VoiceThe body's declaration, under whatever means it decides.
MembersA given number of members of the body.
FractionA given number of members of the body, out of some larger caucus.
AtLeastProportionNo less than the given proportion of members of the body.
MoreThanProportionMore than the given proportion of members of the body.

Top-Level Functions

  • function voice() internal pure returns (struct BodyPart)
    • Creates a BodyPart struct representing a Voice body part.
  • function members(struct MembersParams params) internal pure returns (struct BodyPart)
    • Creates a BodyPart struct representing a Members body part with the given count.
  • function fraction(struct FractionParams params) internal pure returns (struct BodyPart)
    • Creates a BodyPart struct representing a Fraction body part with the given proportion.
  • function atLeastProportion(struct AtLeastProportionParams params) internal pure returns (struct BodyPart)
    • Creates a BodyPart struct representing an AtLeastProportion body part with the given proportion.
  • function moreThanProportion(struct MoreThanProportionParams params) internal pure returns (struct BodyPart)
    • Creates a BodyPart struct representing a MoreThanProportion body part with the given proportion.

Created with solidity-doc-generator