ubiquibot / conversation-rewards

0 stars 10 forks source link

feat: add erc20RewardToken config param #40

Closed rndquu closed 1 week ago

rndquu commented 4 weeks ago

Related https://github.com/ubiquibot/permit-generation/issues/16

This PR adds a new config parameter erc20RewardToken. So now partners will have to specify which ERC20 token they will use for permit rewards.

Example config:

plugins:
  issues.closed:
    - uses:
        - plugin: rndquu/conversation-rewards:compute.yml@feat/custom-erc20-reward
          with:
              evmNetworkId: 100
              evmPrivateEncrypted: "encrypted-key"
              erc20RewardToken: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d" # new parameter
              incentives:
                  ...other props

QA:

Notes:

gentlementlegen commented 1 week ago

@rndquu Thanks for the thorough testing. I noticed in your linked tests that the relevance is 0 but you still get the rewards, is that something you hardcoded for the tests or should I have a look into it? Otherwise good with the PR.

rndquu commented 1 week ago

@rndquu Thanks for the thorough testing. I noticed in your linked tests that the relevance is 0 but you still get the rewards, is that something you hardcoded for the tests or should I have a look into it? Otherwise good with the PR.

The OPENAI_API_KEY env variable is not set in my fork of the conversation rewards plugin. I guess that's the main reason why relevance is not calculated. Not sure if that's an issue though.

gentlementlegen commented 1 week ago

I was more worried of some crash or something going wrong, because earlier today we had a case where a comment was not counted at all in the same way, and recently the logic for comments was updated to fit with Gpt4. Anyway it's unrelated to this PR, will have a look at it.