eco-stake / restake

Auto-compounder script for Cosmos Validators using REStake
https://restake.app
MIT License
357 stars 307 forks source link

Terra autostake broken on newer versions #468

Closed AutoStake-com closed 2 years ago

AutoStake-com commented 2 years ago

On the newer versions of the autostake script it says: No Authz support

Even though it has been working and still works on older versions, I think because these lines from cosmos-directory chains/chainMonitor.js

      try { await got.get(restUrl + 'cosmos/authz/v1beta1/grants') } catch (error) {
        if (error.response.statusCode === 400) {
          data.authz = true
        } else if(error.response.statusCode === 501) {
          data.authz = false
        }
      }

Don't account for when public endpoints are unavailable? Maybe we could add an authSupport override here in restake in the src/networks.local.json?

tombeynon commented 2 years ago

Sorry about that - will have been broken since last night. cosmos.directory now provides the Authz status as you saw, and because Terra RPC have been down it hasn't had a chance to set it to true. I've just manually updated so it'll solve your local restaking.

AutoStake-com commented 2 years ago

Thank you!