🤵
JoinPart Agents
Each data union has at least one joinPart agent. The agent has the power to add and remove members from the data union.
Removing will label the member as inactive. Inactive members are still able to access their earnings but won't be able to earn unless they join or get added to the data union again. Adding/joining the data union will label the member as active.
A joinPart agent is not member of the data union.
Add a list of addresses to your data union:
const tx = await dataUnion.addMembers([ADDRESS_1, ADDRESS_2, ADDRESS_3]);
Remove a list of addresses from your data union:
// only a joinPart Agent can call this function successfully
const tx = await dataUnion.removeMembers([ADDRESS_1, ADDRESS_2, ADDRESS_3]);
At deployment of the data union the creator (admin) and the public address of the join server (0xf3e5a65851c3779f468c9ecb32e6f25d9d68601a) will be made joinPart agents by default.
You can change the default in the deployment options when deploying the data union:
const dataUnion = await DU.deployDataUnion(
{joinPartAgents: [ADMIN_ADDRESS, CUSTOM_JOIN_SERVER_ADDRESS]}
)
To add one or multiple joinPart agents, call the following function and add their address.
addJoinPartAgent(0x12345)
or addJoinPartAgents([0x12345,0xabcdef])
To remove an agent, call the following function and add their address.
removeJoinPartAgent(0x12345)
Last modified 1yr ago