67P / hubot-kredits

Kosmos Kredits chat/service integrations
https://wiki.kosmos.org/Kredits
MIT License
2 stars 1 forks source link

Use new ethers.js NonceManager to handle transaction nonces #59

Closed bumi closed 4 years ago

bumi commented 4 years ago

So far we have failed to globally handle the transaction nonces. The new ethers.js v5 comes with a NonceManager that helps us handling transaction nonces and automatically increases the nonce for each transaction.

We should first release: https://github.com/67P/kredits-contracts/pull/200

TODO:

raucao commented 4 years ago

I just tried out this branch with the Gitea test repo/issues, but I'm getting a revert exception on the tx. Looks the same as when we get the chat notification, except it didn't create the contribution on my devchain (which it does on master even when it complains).

bumi commented 4 years ago

thanks for testing. does it work for you with the master branch? wondering what causes the revert (error in the contract)... might be because no gas limit is set - we had seen this error various times on the devchain before.

raucao commented 4 years ago

Same on master when running locally, indeed.

But we really need to be able to run and develop with the devchain.

raucao commented 4 years ago

By the way, this his how you can easily run hal7000/hubot-kredits locally yourself:

  1. In hubot-kredits, with correct branch checked out: npm link
  2. In hal8000: npm link hubot-kredits
  3. In hal8000's run.sh: add local DAO address to env var near bottom of script
  4. ./run.sh and npm run ngrok (the former gives you an interactive console/chat room, the latter catches hooks to hubot-dev.kosmos.org on your machine)
  5. Activate dev webhook in https://gitea.kosmos.org/org/kosmos/settings/hooks/4
  6. Re-open and close e.g. https://gitea.kosmos.org/kosmos/test-one-two/issues/5 (which is blacklisted in prod) in order to create contributions
galfert commented 4 years ago

By the way, this his how you can easily run hal7000/hubot-kredits locally yourself:

That's pretty helpful. Shouldn't that go into the readme?

raucao commented 4 years ago

Good point. I added a new page to the wiki: https://wiki.kosmos.org/Kredits:Development

Please liberally add more information there!

bumi commented 4 years ago

zoom is a bit more annoying to test. so I'd suggest to take the risk and push this to production and handle any potential issues in new PRs.

raucao commented 4 years ago

Missing a kredits label for the PR to be ready to merge...