colonyDapp icon indicating copy to clipboard operation
colonyDapp copied to clipboard

Awarding Reputation Motions not working in teams

Open arrenv opened this issue 2 years ago • 1 comments

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 avatar Nov 17 '22 16:11 arrenv

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

area avatar Nov 17 '22 16:11 area