diff --git a/modules/cli/cmd/constants.go b/modules/cli/cmd/constants.go new file mode 100644 index 0000000..e34deae --- /dev/null +++ b/modules/cli/cmd/constants.go @@ -0,0 +1,6 @@ +package cmd + +const ( + DefaultDuskNum = "10" + DefaultDawnNum = "0" +) diff --git a/modules/cli/cmd/devrunner/config/base.go b/modules/cli/cmd/devrunner/config/base.go index 0fa7657..bfb498a 100644 --- a/modules/cli/cmd/devrunner/config/base.go +++ b/modules/cli/cmd/devrunner/config/base.go @@ -25,6 +25,7 @@ func DefaultBaseConfig(instanceName string) BaseConfig { return map[string]string{ // conductor "astria_conductor_celestia_block_time_ms": "1200", + "astria_conductor_no_celestia_auth": "true", "astria_conductor_celestia_bearer_token": "", "astria_conductor_celestia_node_http_url": "http://127.0.0.1:26658", "astria_conductor_execution_rpc_url": "http://127.0.0.1:50051", @@ -59,7 +60,7 @@ func DefaultBaseConfig(instanceName string) BaseConfig { "astria_composer_pretty_print": "true", "astria_composer_api_listen_addr": "0.0.0.0:0", "astria_composer_sequencer_url": "http://127.0.0.1:26657", - "astria_composer_sequencer_chain_id": "astria-dusk-" + duskNum, + "astria_composer_sequencer_chain_id": "astria-dusk-" + cmd.DefaultDuskNum, "astria_composer_rollups": "astriachain::ws://127.0.0.1:8546", "astria_composer_private_key_file": filepath.Join(homeDir, ".astria", instanceName, DefaultConfigDirName, "composer_dev_priv_key"), "astria_composer_sequencer_address_prefix": "astria", diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index a708e42..24cb3a5 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -1,8 +1,6 @@ package config const ( - duskNum = "9" - dawnNum = "0" BinariesDirName = "bin" LogsDirName = "logs" DataDirName = "data" @@ -15,14 +13,14 @@ const ( DefaultNetworksConfigName = "networks-config.toml" DefaultServiceLogLevel = "info" DefaultTargetNetwork = "local" - LocalNativeDenom = "nria" + DefaultLocalNativeDenom = "ntia" DefaultTUIConfigName = "tui-config.toml" DefaultHighlightColor = "blue" DefaultBorderColor = "gray" // NOTE - do not include the 'v' at the beginning of the version number CometbftVersion = "0.38.8" - AstriaSequencerVersion = "0.15.0" - AstriaComposerVersion = "0.8.1" - AstriaConductorVersion = "0.19.0" + AstriaSequencerVersion = "0.16.0" + AstriaComposerVersion = "0.8.2" + AstriaConductorVersion = "0.20.0" ) diff --git a/modules/cli/cmd/devrunner/config/genesis.json b/modules/cli/cmd/devrunner/config/genesis.json index 262a29b..47a1ff6 100644 --- a/modules/cli/cmd/devrunner/config/genesis.json +++ b/modules/cli/cmd/devrunner/config/genesis.json @@ -42,19 +42,25 @@ "address": { "bech32m": "astria1rsxyjrcm255ds9euthjx6yc3vrjt9sxrm9cfgm" }, - "balance": 58446744073709551616 + "balance": { + "lo": "5844674407370955161" + } }, { "address": { "bech32m": "astria1xnlvg0rle2u6auane79t4p27g8hxnj36ja960z" }, - "balance": 1000000000000000000 + "balance": { + "lo": "1000000000000000000" + } }, { "address": { "bech32m": "astria1vpcfutferpjtwv457r63uwr6hdm8gwr3pxt5ny" }, - "balance": 1000000000000000000 + "balance": { + "lo": "1000000000000000000" + } } ], "authority_sudo_address": { @@ -71,19 +77,33 @@ "bech32m": "astria1xnlvg0rle2u6auane79t4p27g8hxnj36ja960z" } ], - "ibc_params": { + "ibc_parameters": { "ibc_enabled": true, "inbound_ics20_transfers_enabled": true, "outbound_ics20_transfers_enabled": true }, "fees": { - "transfer_base_fee": 12, - "sequence_base_fee": 32, - "sequence_byte_cost_multiplier": 1, - "init_bridge_account_base_fee": 48, - "bridge_lock_byte_cost_multiplier": 1, - "bridge_sudo_change_fee": 24, - "ics20_withdrawal_base_fee": 24 + "transferBaseFee": { + "lo": "12" + }, + "sequenceBaseFee": { + "lo": "32" + }, + "sequenceByteCostMultiplier": { + "lo": "1" + }, + "initBridgeAccountBaseFee": { + "lo": "48" + }, + "bridgeLockByteCostMultiplier": { + "lo": "1" + }, + "bridgeSudoChangeFee": { + "lo": "24" + }, + "ics20WithdrawalBaseFee": { + "lo": "24" + } }, "native_asset_base_denomination": "nria", "allowed_fee_assets": [ diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index 9aaabd3..6b82e79 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -6,6 +6,7 @@ import ( "path/filepath" "regexp" + "github.com/astriaorg/astria-cli-go/modules/cli/cmd" log "github.com/sirupsen/logrus" "github.com/pelletier/go-toml/v2" @@ -45,7 +46,7 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { SequencerGRPC: "http://127.0.0.1:8080", SequencerRPC: "http://127.0.0.1:26657", RollupName: "astria-test-chain-1", - NativeDenom: "nria", + NativeDenom: DefaultLocalNativeDenom, Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", @@ -78,11 +79,11 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { }, }, "dusk": { - SequencerChainId: "astria-dusk-" + duskNum, - SequencerGRPC: "https://grpc.sequencer.dusk-" + duskNum + ".devnet.astria.org/", - SequencerRPC: "https://rpc.sequencer.dusk-" + duskNum + ".devnet.astria.org/", + SequencerChainId: "astria-dusk-" + cmd.DefaultDuskNum, + SequencerGRPC: "https://grpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org/", + SequencerRPC: "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org/", RollupName: "", - NativeDenom: "nria", + NativeDenom: DefaultLocalNativeDenom, Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", @@ -101,9 +102,9 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { }, }, "dawn": { - SequencerChainId: "astria-dawn-" + dawnNum, - SequencerGRPC: "https://grpc.sequencer.dawn-" + dawnNum + ".devnet.astria.org/", - SequencerRPC: "https://rpc.sequencer.dawn-" + dawnNum + ".devnet.astria.org/", + SequencerChainId: "astria-dawn-" + cmd.DefaultDawnNum, + SequencerGRPC: "https://grpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".devnet.astria.org/", + SequencerRPC: "https://rpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".devnet.astria.org/", RollupName: "", NativeDenom: "ibc/channel0/utia", Services: map[string]ServiceConfig{ diff --git a/modules/cli/cmd/devrunner/init.go b/modules/cli/cmd/devrunner/init.go index 656179e..81ee378 100644 --- a/modules/cli/cmd/devrunner/init.go +++ b/modules/cli/cmd/devrunner/init.go @@ -30,7 +30,7 @@ func init() { flagHandler := cmd.CreateCliFlagHandler(initCmd, cmd.EnvPrefix) flagHandler.BindStringFlag("local-network-name", config.DefaultLocalNetworkName, "Set the local network name for the instance. This is used to set the chain ID in the CometBFT genesis.json file.") - flagHandler.BindStringFlag("local-native-denom", config.LocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.") + flagHandler.BindStringFlag("local-native-denom", config.DefaultLocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.") } func runInitialization(c *cobra.Command, _ []string) { diff --git a/modules/cli/cmd/devrunner/reset.go b/modules/cli/cmd/devrunner/reset.go index 57eb8d3..6c13bed 100644 --- a/modules/cli/cmd/devrunner/reset.go +++ b/modules/cli/cmd/devrunner/reset.go @@ -138,12 +138,12 @@ func init() { resetCmd.AddCommand(resetConfigCmd) rcfh := cmd.CreateCliFlagHandler(resetConfigCmd, cmd.EnvPrefix) rcfh.BindStringFlag("local-network-name", config.DefaultLocalNetworkName, "Set the local network name for the instance. This is used to set the chain ID in the CometBFT genesis.json file.") - rcfh.BindStringFlag("local-native-denom", config.LocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.") + rcfh.BindStringFlag("local-native-denom", config.DefaultLocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.") resetCmd.AddCommand(resetNetworksCmd) rnfh := cmd.CreateCliFlagHandler(resetNetworksCmd, cmd.EnvPrefix) rnfh.BindStringFlag("local-network-name", config.DefaultLocalNetworkName, "Set the local network name for the instance. This is used to set the chain ID in the CometBFT genesis.json file.") - rnfh.BindStringFlag("local-native-denom", config.LocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.") + rnfh.BindStringFlag("local-native-denom", config.DefaultLocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.") resetCmd.AddCommand(resetStateCmd) } diff --git a/modules/cli/cmd/sequencer/constants.go b/modules/cli/cmd/sequencer/constants.go index 3834c5e..28cddc7 100644 --- a/modules/cli/cmd/sequencer/constants.go +++ b/modules/cli/cmd/sequencer/constants.go @@ -1,12 +1,16 @@ package sequencer +import ( + "github.com/astriaorg/astria-cli-go/modules/cli/cmd" +) + const ( DefaultConfigDirName = ".astria" DefaultAddressPrefix = "astria" - DefaultSequencerURL = "https://rpc.sequencer.dusk-8.devnet.astria.org" - DefaultSequencerChainID = "astria-dusk-8" - DefaultAsset = "nria" - DefaultFeeAsset = "nria" + DefaultSequencerURL = "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org" + DefaultSequencerChainID = "astria-dusk-" + cmd.DefaultDuskNum + DefaultAsset = "ntia" + DefaultFeeAsset = "ntia" DefaultSequencerNetworksConfigFilename = "sequencer-networks-config.toml" DefaultTargetNetwork = "dusk" )