🙋Member
Member Stats
Get useful information about a specific member address:
const memberStats = await dataUnion.getMemberStats('0x1234');
// returns:
{
earningsBeforeLastJoin: BigNumber {_hex: '0x00', _isBigNumber: true},
status: "ACTIVE",
totalEarnings: BigNumber {_hex: '0x00', _isBigNumber: true},
withdrawableEarnings: BigNumber {_hex: '0x00', _isBigNumber: true}
}
Check if member is part of the data union:
await dataUnion.isMember();
Inactive And Active Members
The data union smart contract does not delete members when they leave or get removed from the data union. Instead they are set as inactive
. This prevents them from earning more tokens. When they (re)join the data union they get set as active
. That way members that got removed or left are still able to withdraw their earnings from the contract.
Member Joins
Members cannot join your data union without the help of a joinPart agent - The smart contract prevents that.
To automate member joins, read more here:
Join ServerMember Parts/Leaves
Every member is able to leave the data union at any time:
const tx = await dataUnion.part();
Last updated
Was this helpful?