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

feat: add custom reward token to permit #17

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

rndquu
Copy link
Member

@rndquu rndquu commented Jun 14, 2024

Related to #16

This PR adds support for custom ERC20 token address in permits. So instead of hardcoding ERC20 reward token address partners will have to set it manually.

How it is expected to work:

  1. Partner sets a config for the conversation-rewards plugin similar to:
- uses:
      - plugin: ubiquibot/conversation-rewards
        type: github
        with:
          evmNetworkId: 100
          evmPrivateEncrypted: "kmpTKq5Wh9r9x5j3U9GqZr3NYnjK2g0HtbzeUBOuLC2y3x8ja_SKBNlB2AZ6LigXHP_HeMitftVUtzmoj8CFfVP9SqjWoL6IPku1hVTWkdTn97g1IxzmjydFxjdcf0wuDW1hvVtoq3Uw5yALABqxcQ"
          erc20RewardToken: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d" # WXDAI
  1. On permit generation in the conversation-rewards plugin here ERC20 reward token address will be read from the config and passed in permit requests

Notice:

@rndquu rndquu marked this pull request as ready for review June 14, 2024 09:29
Copy link
Contributor

@Keyrxng Keyrxng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests passing and looks good

also afaik it doesn't break any other plugins

package.json Outdated Show resolved Hide resolved
@gentlementlegen
Copy link
Member

This should not break any plugin since plugins will use a specific version of the package, meaning they won't be using it with the changes here, unless we update the version within their package.json.

@rndquu rndquu requested a review from gentlementlegen June 16, 2024 08:26
@gentlementlegen
Copy link
Member

@rndquu fine with the content. I just think you might want to amend the commit to change feat to feat! as this contains breaking changes.

@Keyrxng Keyrxng mentioned this pull request Jun 16, 2024
@rndquu
Copy link
Member Author

rndquu commented Jun 17, 2024

@rndquu fine with the content. I just think you might want to amend the commit to change feat to feat! as this contains breaking changes.

As far I understand the changes introduced in this PR touch only the conversation-rewards plugin which I'll update to reflect the changes in this PR. Since all of the plugins are under active development I think it's ok to update the version to 1.3.0 instead of 2.0.0.

@0x4007 0x4007 merged commit f86cb3c into ubiquity-os:development Jun 17, 2024
2 checks passed
@rndquu rndquu deleted the feat/custom-reward-token branch June 18, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants