Git Product home page Git Product logo

aragon-govern-discord-integration's People

Contributors

aesedepece avatar clbartoli avatar gabaldon avatar mariocao avatar tmpolaczyk avatar tommytrg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mariocao tommytrg

aragon-govern-discord-integration's Issues

Create test DAO

Document how to create DAOs using the aragon-govern project.

EDIT: they recently changed buidler for hardhat ๐Ÿ˜…

Crash when trying to setup bot

This happened when trying to setup the bot on a new server.

I get an exception and the process dies.

Is this a subgraph misconfiguration or something?

Received setup request for Discord guild 492453503390842880 trying to integrate with DAO named "GIORGI-DAO31"
/data/source/packages/bot/dist/services/subgraph/index.js:29
            throw new errors_1.ErrorUnexpectedResult(errorMessage);
                  ^

ErrorUnexpectedResult: Unexpected result when queryin DAO by name GIORGI-DAO31.
    at SubgraphClient.fetchResult (/data/source/packages/bot/dist/services/subgraph/index.js:29:19)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async SubgraphClient.queryDaoByName (/data/source/packages/bot/dist/services/subgraph/index.js:38:24)
    at async MessageHandler.setup (/data/source/packages/bot/dist/services/messageHandler.js:281:21)

End-to-end testing

Test all the possible flows of the integration.

Some ideas:

  • Start all integration components and double-check documentation
  • Setup DAO
  • Make proposals
  • Vote proposals
  • Schedule and execute actions automatically

Proposal texts are not parsed completely

How to reproduce the problem:

!proposal 2021/04/28 10:60:00 "lorem ipsum" to:0x199eA5114D1612e40E3457Eaf9DF2779340EAD12 value:0.1

And the bot replies with:

New proposal "lorem
The request for creating the proposal "lorem has been received. A positive result will schedule the action, thus eventually sending 0.1 ETH to the address 0x199eA5114D1612e40E3457Eaf9DF2779340EAD12. React to this proposal to vote!

The same happens if double quotes are not used.

Deploy own subgraph server

This issues is time boxed for a maximum of 1 day!

The idea is to avoid relying on an external subgraph server by deploying our own by using the package govern-subgraph in the aragon-govern repository.

Can't find aragon.png

Received setup request for Discord guild 492453503390842880 trying to integrate with DAO named "good-faith"
[MessageHandler]: Setup inserted {
  daoName: 'good-faith',
  role: '<@&514729402051985409>',
  guildId: '492453503390842880',
  channelId: '830084399257223208',
  channelName: 'demo'
}
node:internal/process/promises:227
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: ENOENT: no such file or directory, stat '/data/source/src/static/aragon.png'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '/data/source/src/static/aragon.png'
}

Improve bot messages

After a demo of the full flow we have gather the following feedback:

  • Show additional message after run the !setup command mentioning all the members with the role previously specified and explainning how to create a proposal.
  • Show the full amount to send instead of round it

Last touches :)

Last touches for the Aragon<>Witnet Bot:

  • Insert transaction link to Witnet explorer (when positive and when it fails)
  • The disputed proposal has not a majority of positive votes -> The disputed proposal did not receive a majority of positive votes
  • Add gasPrice in web3 calls
    • Call API to estimate gas price (e.g. etherscan, eth gas station)
    • Add calculated gasPrice to web3 call (in web3Client) as .send({ from: GETH_ADDRESS, gas: GAS_LIMIT, gasPrice })

Allow resend transactions by providing params

In some cases, transactions were reverted because some parameter was not properly configured or even the network congestion affected to some gas limits. This is a problem in case of a finished proposal in which the schedule or execute transaction fails. Currently, this situation cannot be fixed and the proposal needs to be re-launched.

For this reason, it would be desirable to have a way of resending schedule and execute transactions in case they fail. Additionally, only admin users should be able to perform this action. Optionally, they should include parameters such as the gas (gas limit) or gasPrice.

Middleware: Retrieve reactions

Create a method that receives identifier for a voting, and uses Discord API to retrieve positive and negative reactions (e.g. returns the result as an Array of integers)

Implement missing features

Things to add:

  • React differently regarding the voting result
    • Decode tally result, and only call schedule and execute if OK and positive
    • Send message to discord of negative result
  • Consider executionDelay for the timeout value for calling execute (add a small delay for guaranteeing that execute is called after schedule)
  • Change the to unit in !proposal message (e.g. use eth insted of wei)

Things to discuss:

  • Send a "reaction" message for each vote may be too verbose?

Integrate govern actions

  • Add action to !proposal message
  • Add action argument to web3 client
  • Check that GovernQueue is executing an action

Discuss BizDev strategy

Discuss how to proceed with the integration in terms of:

  • Showcase with funds
  • Communication strategy (e.g. medium posts)

Troubleshoot gas problem

Find out why the call of execute in the GovernQueue contract is failing because of an out of gas problem.
The failed transaction in Rinkeby.

It looks like that the passed argument for setting the gas in web3 is ignored: .send({ from: GETH_ADDRESS, gas: GAS_LIMIT }).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.