LogoLogo
  • 🚀getting started
    • Intro to Data Unions
    • Build a Data Union
      • 1️Installation And Deployment
      • 2️Integration
    • Build a Data Union with Streamr
      • 1️Create A Data Stream
      • 2️Deploy A Data Union With Streamr Core
      • 3️Integrate Data Union & Stream
      • 4️Publish to Streamr Marketplace
    • Glossary of Terms
  • 📚Main Concepts
    • Roles and Responsibilities
      • 🧑‍💻Admin
      • 🤵JoinPart Agents
      • 🙋Member
      • 🧑‍🔧Protocol Beneficiary
    • Join Server
    • Contract Functions
    • Manage Wallets And Earnings
    • Data Union Observation
    • Add Your Own Token
    • Custom Modules
  • 🧐Resources
    • Existing Data Unions
    • Framework Governance
    • Data Unions UX Best Practices
  • ❓Questions?
    • Ask us on Discord
Powered by GitBook
On this page
  • Add And Remove Members
  • Add And Remove JoinPart Agents

Was this helpful?

  1. Main Concepts
  2. Roles and Responsibilities

JoinPart Agents

PreviousAdminNextMember

Last updated 2 years ago

Was this helpful?

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 And Remove Members

Add a list of addresses to your data union:

Only a joinPart agent can add members. See how you can enable members to join automatically .

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]);

Add And Remove JoinPart Agents

Only the can add and remove joinPart Agents

At deployment of the data union the creator () and the public address of the (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)

How to call contract functions:

How to better manage your member joins with a join server:

Add and remove joinPart agents with a direct as the admin.

📚
🤵
here
admin
admin
join server
contract transaction
Contract Functions
Join Server