witnet / aragon-govern-discord-integration Goto Github PK
View Code? Open in Web Editor NEWEnables voting on Aragon Govern using Discord reactions. Powered by Witnet.
License: MIT License
Enables voting on Aragon Govern using Discord reactions. Powered by Witnet.
License: MIT License
Document how to create DAOs using the aragon-govern project.
EDIT: they recently changed buidler
for hardhat
๐
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)
Test all the possible flows of the integration.
Some ideas:
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.
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.
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'
}
After a demo of the full flow we have gather the following feedback:
Last touches for the Aragon<>Witnet Bot:
gasPrice
in web3 calls
gasPrice
to web3 call (in web3Client
) as .send({ from: GETH_ADDRESS, gas: GAS_LIMIT, gasPrice })
Set the minimum proposal duration to 4 hours
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
.
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)
Currently, participants can remove their reactions. We should avoid this behavior when the deadline is reached.
Things to add:
executionDelay
for the timeout value for calling execute
(add a small delay for guaranteeing that execute is called after schedule)to
unit in !proposal
message (e.g. use eth insted of wei)Things to discuss:
I think this was implemented, but today we tried to setup a DAO that was mispelled and the bot did not complain. :)
Improve the existing documentation with additional information that may be required.
Some examples:
GovernQueue
is executing an actionDiscuss how to proceed with the integration in terms of:
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 })
.
Update the aragon bot in order to work with the new changes in the aragon govern contracts which led to other changes in the subgraph schema.
3 monitors in portainer, make sure invite links do work, test on witnet mainnet but ethereum testnet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.