Skip to content

Commit

Permalink
Merge pull request #72 from onomyprotocol/dzmitryhil/onomy-sdk-mint
Browse files Browse the repository at this point in the history
integrate bell inflation curve
  • Loading branch information
cgdusek authored Dec 28, 2021
2 parents 60543ed + afc00c2 commit 7d4b03c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
20 changes: 14 additions & 6 deletions cmd/onomyd/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd

import (
gravitycmd "github.com/althea-net/cosmos-gravity-bridge/module/cmd/gravity/cmd"
cosmossimappcmd "github.com/cosmos/cosmos-sdk/simapp/simd/cmd"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/spf13/cobra"
"github.com/tendermint/spm/cosmoscmd"
Expand All @@ -22,16 +23,23 @@ func NewRootCmd() (*cobra.Command, cosmoscmd.EncodingConfig) {
)

// customize gentx and collect-gentxs commands
cmdsToReplace := map[string]*cobra.Command{
"gentx [key_name] [amount]": gravitycmd.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome),
"collect-gentxs": gravitycmd.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome),
"add-genesis-account [address_or_key_name] [coin][,[coin]]": cosmossimappcmd.AddGenesisAccountCmd(app.DefaultNodeHome),
}

for _, v := range rootCmd.Commands() {
if v.Use == "gentx [key_name] [amount]" {
cmd, ok := cmdsToReplace[v.Use]
if ok {
rootCmd.RemoveCommand(v)
rootCmd.AddCommand(gravitycmd.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome))
}
if v.Use == "collect-gentxs" {
rootCmd.RemoveCommand(v)
rootCmd.AddCommand(gravitycmd.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome))
rootCmd.AddCommand(cmd)
delete(cmdsToReplace, v.Use)
}
}
if len(cmdsToReplace) != 0 {
panic("on onomy cmd replacements, not all of the commands were replaced")
}
// eth_keys cmd
rootCmd.AddCommand(gravitycmd.Commands(app.DefaultNodeHome))

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alp

replace github.com/althea-net/cosmos-gravity-bridge/module => github.com/onomyprotocol/cosmos-gravity-bridge/module v0.0.0-20211125165615-060eb3403d3c

replace github.com/cosmos/cosmos-sdk => github.com/onomyprotocol/onomy-sdk v0.42.10-0.20211223174849-c96bdff3bf1e
replace github.com/cosmos/cosmos-sdk => github.com/onomyprotocol/onomy-sdk v0.42.10-0.20211228140704-1a3046991600
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onomyprotocol/cosmos-gravity-bridge/module v0.0.0-20211125165615-060eb3403d3c h1:B9FWZAYfuIImYx/sQN/LbZmTKrdyNFVjJP02fVPKGGI=
github.com/onomyprotocol/cosmos-gravity-bridge/module v0.0.0-20211125165615-060eb3403d3c/go.mod h1:kf96o2kMPivom+2SGkkExANrG7uA8cOFxb1+Ns4/hc0=
github.com/onomyprotocol/onomy-sdk v0.42.10-0.20211223174849-c96bdff3bf1e h1:tQIVEuNkQaIub4ws78x6FVoi1wBncXsXmskkz4QaifU=
github.com/onomyprotocol/onomy-sdk v0.42.10-0.20211223174849-c96bdff3bf1e/go.mod h1:SrclJP9lMXxz2fCbngxb0brsPNuZXqoQQ9VHuQ3Tpf4=
github.com/onomyprotocol/onomy-sdk v0.42.10-0.20211228140704-1a3046991600 h1:jPOKcqqPXGgl5T+B8+yl1WWOapDkHjycxEy/Oi2QAPs=
github.com/onomyprotocol/onomy-sdk v0.42.10-0.20211228140704-1a3046991600/go.mod h1:SrclJP9lMXxz2fCbngxb0brsPNuZXqoQQ9VHuQ3Tpf4=
github.com/onomyprotocol/tm-load-test v0.9.1-0.20211101093435-b38e68e11c01 h1:+B99URBdjbxtLuKUCSdOpyZ+Q6OpXNvQPsjXGgSBPRo=
github.com/onomyprotocol/tm-load-test v0.9.1-0.20211101093435-b38e68e11c01/go.mod h1:KRiRasq+MPZHPAFx5VPkdkvXZTNW62ePuMn0+B5mrig=
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down

0 comments on commit 7d4b03c

Please sign in to comment.