Skip to content

Commit

Permalink
feat: add utility commands to eibc
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs committed Nov 18, 2024
1 parent 4501ac7 commit 4ddf59c
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 390 deletions.
2 changes: 0 additions & 2 deletions cmd/eibc/eibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/eibc/fulfill"
"github.com/dymensionxyz/roller/cmd/eibc/funds"
eibcinit "github.com/dymensionxyz/roller/cmd/eibc/init"
"github.com/dymensionxyz/roller/cmd/eibc/scale"
"github.com/dymensionxyz/roller/cmd/eibc/start"
Expand All @@ -24,7 +23,6 @@ func Cmd() *cobra.Command {
cmd.AddCommand(eibcinit.Cmd())
cmd.AddCommand(start.Cmd())
cmd.AddCommand(scale.Cmd())
cmd.AddCommand(funds.Cmd())
cmd.AddCommand(fulfill.Cmd())

sl := []string{"eibc"}
Expand Down
23 changes: 0 additions & 23 deletions cmd/eibc/fulfill/denoms/denoms.go

This file was deleted.

62 changes: 0 additions & 62 deletions cmd/eibc/fulfill/denoms/list/list.go

This file was deleted.

76 changes: 0 additions & 76 deletions cmd/eibc/fulfill/denoms/remove/remove.go

This file was deleted.

88 changes: 0 additions & 88 deletions cmd/eibc/fulfill/denoms/set/set.go

This file was deleted.

2 changes: 0 additions & 2 deletions cmd/eibc/fulfill/fulfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package fulfill
import (
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/eibc/fulfill/denoms"
"github.com/dymensionxyz/roller/cmd/eibc/fulfill/order"
"github.com/dymensionxyz/roller/cmd/eibc/fulfill/rollapps"
)
Expand All @@ -16,7 +15,6 @@ func Cmd() *cobra.Command {

cmd.AddCommand(order.Cmd())
cmd.AddCommand(rollapps.Cmd())
cmd.AddCommand(denoms.Cmd())

return cmd
}
7 changes: 5 additions & 2 deletions cmd/eibc/fulfill/rollapps/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ func Cmd() *cobra.Command {
return
}

for chain, percentage := range config.FulfillCriteria.MinFeePercentage.Chain {
fmt.Printf("%s: %.6f\n", chain, percentage)
for k, v := range config.Rollapps {
fmt.Printf("%s requires %s validation(s):\n", k, v.MinConfirmations)
for _, v := range v.FullNodes {
fmt.Printf("\t%s\n", v)
}
}
},
}
Expand Down
12 changes: 10 additions & 2 deletions cmd/eibc/fulfill/rollapps/set/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package set
import (
"os"
"path/filepath"
"strings"

"github.com/pterm/pterm"
"github.com/spf13/cobra"
Expand All @@ -14,7 +15,7 @@ import (

func Cmd() *cobra.Command {
cmd := &cobra.Command{
Use: "set <rollapp-id> <fee-percentage>",
Use: "set <rollapp-id> <comma-separated-full-nodes>",
Short: "Commands to manage the whitelist of RollApps to fulfill eibc orders for",
Long: `Commands to manage the whitelist of RollApps to fulfill eibc orders for
Expand Down Expand Up @@ -45,8 +46,15 @@ instance.
}

rollAppID := args[0]
fullNodes := args[1]
if len(fullNodes) == 0 {
pterm.Error.Println("please provide at least one full node")
return
}

fNodes := strings.Split(fullNodes, ",")

err = eibc.AddRollappToEibc(rollAppID, eibcHome, []string{"mock"})
err = eibc.AddRollappToEibc(rollAppID, eibcHome, fNodes)
if err != nil {
return
}
Expand Down
33 changes: 0 additions & 33 deletions cmd/eibc/funds/funds.go

This file was deleted.

Loading

0 comments on commit 4ddf59c

Please sign in to comment.