Skip to content

Commit

Permalink
Implement packet forward removal
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzampolin committed Feb 19, 2024
1 parent 3e97cb1 commit ce65372
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/spawn/new-chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var (
{ID: "poa", IsSelected: true, Details: "Proof-of-Authority consensus algorithm (permissioned network)"},
{ID: "globalfee", IsSelected: true, Details: "Static minimum fee(s) for all transactions, controlled by governance"},
{ID: "cosmwasm", IsSelected: true, Details: "Cosmos smart contracts"},
{ID: "packetforward", IsSelected: true, Details: "Packet forwarding (for IBC)"},
}
)

Expand Down
11 changes: 11 additions & 0 deletions spawn/remove_modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ func (fc *FileContent) RemoveDisabledFeatures(cfg *NewChainConfig) {
fc.RemoveGlobalFee()
case "wasm", "cosmwasm", "cw":
fc.RemoveCosmWasm()
case "packetforward", "pfm":
fc.RemovePacketForward()
default:
// is this acceptable? or should we just print and continue?
panic("unknown feature to remove " + name)
Expand Down Expand Up @@ -103,3 +105,12 @@ func (fc *FileContent) RemoveCosmWasm() {
path.Join("cmd", "wasmd", "root.go"),
)
}

func (fc *FileContent) RemovePacketForward() {
text := "packetforward"
fc.RemoveGoModImport("github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward")

fc.RemoveModuleFromText(text,
path.Join("app", "app.go"),
)
}

0 comments on commit ce65372

Please sign in to comment.