Skip to content
solidity
import "solidity-scale-codec/src/Xcm/v5/BodyPart/BodyPart.sol";

File-Level Functions

voice()

solidity
function voice() internal pure returns (struct BodyPart)

Creates a `BodyPart` struct representing a `Voice` body part.

members(struct MembersParams params)

solidity
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)

solidity
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)

solidity
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)

solidity
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

solidity
struct BodyPart

A part of a pluralistic body.

FieldTypeDescription
variantBodyPartVariantThe 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.

MembersParams

solidity
struct MembersParams

Parameters for the `Members` variant.

FieldTypeDescription
countuint32The number of members in the body part.

FractionParams

solidity
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.

AtLeastProportionParams

solidity
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.

MoreThanProportionParams

solidity
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.

File-Level Enums

BodyPartVariant

solidity
enum BodyPartVariant
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.

BodyPart

Kind: source