(ctx *cli.Context)
| 56 | } |
| 57 | |
| 58 | func NewConfig(ctx *cli.Context) *Config { |
| 59 | cfg := Config{ |
| 60 | Enabled: ctx.GlobalBool(EnabledFlagName), |
| 61 | ListenAddr: ctx.GlobalString(ListenAddrFlagName), |
| 62 | ListenPort: ctx.GlobalInt(ListenPortFlagName), |
| 63 | MaxBlobsPerBlock: ctx.GlobalInt(MaxBlobsPerBlockName), |
| 64 | } |
| 65 | if cfg.Enabled { |
| 66 | return &cfg |
| 67 | } |
| 68 | return nil |
| 69 | } |