Fanout.fromBuffer constructor
Fanout.fromBuffer(
- List<int> data
)
Implementation
factory Fanout.fromBuffer(List<int> data) {
final decode = LayoutSerializable.decode(
bytes: data,
layout: _Utils.layout,
validator: {"discriminator": _Utils.discriminator});
return Fanout(
authority: decode["authority"],
name: decode["name"],
accountKey: decode["accountKey"],
totalShares: decode["totalShares"],
totalMembers: decode["totalMembers"],
totalInflow: decode["totalInflow"],
lastSnapshotAmount: decode["lastSnapshotAmount"],
bumpSeed: decode["bumpSeed"],
accountOwnerBumpSeed: decode["accountOwnerBumpSeed"],
totalAvailableShares: decode["totalAvailableShares"],
membershipModel: MembershipModel.fromValue(decode["membershipModel"]),
membershipMint: decode["membershipMint"],
totalStakedShares: decode["totalStakedShares"]);
}