eoscanada / eosc

Cross-platform EOSIO command-line swiss-army-knife (EOS, BOS, Telos, Worbli, etc.)
https://eosc.app
MIT License
134 stars 59 forks source link

Add `get currency-stats` command #119

Closed Jeiwan closed 5 years ago

Jeiwan commented 5 years ago

Resolves #111

I also made a few fixes along the way:

  1. eos-go.PackedTransaction's ID method was changed to return two values, while eosc kept expecting one value. This caused such error:

    # github.com/eoscanada/eosc/analysis
    ../analysis/analyzer.go:42:37: multiple-value trx.ID() in single-value context
  2. eos-go.AccountResp's RAMQuota and RAMUsage were changed to eos-go.Int64, which caused this error:

    # github.com/eoscanada/eosc/cli
    ../cli/formatting.go:86:25: cannot use account.RAMQuota (type eos.Int64) as type int64 in argument to prettifyBytes
    ../cli/formatting.go:87:25: cannot use account.RAMUsage (type eos.Int64) as type int64 in argument to prettifyBytes
abourget commented 5 years ago

This is great. The only problem I see is that since you vendored those dependencies, we'll need to review all the diffs :) eosc being a sensitive project (with a wallet and all).

I want to merge it, but I might want to swap to go.mod .. so I don't need to review third-party deps' code.

What do you think?

abourget commented 5 years ago

Ok, migrated to go.mod, merged your stuff and removed all vendor stuff.

I also just pushed a release of v1.2.2 with this branch in.

thanks for your contribution!

Jeiwan commented 5 years ago

Thanks! Those new dependencies were brought by eos-go, I just ran govendor fetch github.com/eoscanada/eos-go to get latest changes. Luckily, Go modules make deps managing easier.