Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awarding Reputation Motions not working in teams #4070

Open
arrenv opened this issue Nov 17, 2022 · 1 comment
Open

Awarding Reputation Motions not working in teams #4070

arrenv opened this issue Nov 17, 2022 · 1 comment
Assignees
Labels

Comments

@arrenv
Copy link
Member

arrenv commented Nov 17, 2022

Steps to reproduce

  1. Ensure you have the Governance extension installed, a team and some reputation in the team.
  2. Try to Award reputation with a Motion in a team.
    • The transaction will fail with the error voting-rep-invalid-domain-id.
  3. Try to manually override the Create a motion in Root option.
    • The transaction will fail with the error voting-rep-invalid-domain-id.

The problem here from the contract side is that it is not possible to award reputation in teams. This is by design to prevent subdomains from awarding reputation that flows upwards and could take over a Colony. (Thanks @area)

Expected behaviour

  • The user should be able to Award reputation in a team.
  • The Motion should only create the Motion in the Root domain.

Actual behaviour

  • You are unable to create a Motion to Award reputation in a team.
  • The transaction will be reverted with the error voting-rep-invalid-domain-id.
  • The same error happens if you manually select the Create a motion in Root option.

create-in-root

@arrenv arrenv added the bug label Nov 17, 2022
@arrenv arrenv changed the title Awarding Reputation Motions not working Awarding Reputation Motions not working in teams Nov 17, 2022
@area
Copy link
Member

area commented Nov 17, 2022

The problem here from the contract side is that it is not possible to award reputation in teams

To be clear, it's not possible to create a motion in a subdomain to award reputation. A root-level motion can be created to award reputation in a subdomain (and as a consequence, also all parent domains).

I've tested this locally on the contracts with this test in voting-rep.js, in case this helps me/anyone else down the line.

    it.only("can create a motion in root for emitDomainReputationReward in a subdomain", async () => {
      const action = await encodeTxData(colony, "emitDomainReputationReward", [3, USER2, 100]);
      await voting.createMotion(1, UINT256_MAX, ADDRESS_ZERO, action, domain1Key, domain1Value, domain1Mask, domain1Siblings);
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants