Ejemplo n.º 1
0
        public static void InitCliCommand(string rpcUrl)
        {
            ScreenManager screenManager = new ScreenManager();
            CommandParser parser        = new CommandParser();

            AElfKeyStore   kstore  = new AElfKeyStore(ApplicationHelpers.GetDefaultDataDir());
            AccountManager manager = new AccountManager(kstore, screenManager);

            CliInstance = new AElfCliProgram(screenManager, parser, manager, rpcUrl);
            // Register local commands
            RegisterAccountCommands(CliInstance);
            RegisterNetworkCommands(CliInstance);

            CliInstance.RegisterCommand(new GetIncrementCmd());
            CliInstance.RegisterCommand(new SendTransactionCmd());
            CliInstance.RegisterCommand(new LoadContractAbiCmd());
            CliInstance.RegisterCommand(new DeployContractCommand());
            CliInstance.RegisterCommand(new GetTxResultCmd());
            CliInstance.RegisterCommand(new GetGenesisContractAddressCmd());
            CliInstance.RegisterCommand(new GetDeserializedResultCmd());
            CliInstance.RegisterCommand(new GetBlockHeightCmd());
        }
Ejemplo n.º 2
0
 private static void RegisterAccountCommands(AElfCliProgram program)
 {
     program.RegisterCommand(new AccountCmd());
 }
Ejemplo n.º 3
0
 private static void RegisterNetworkCommands(AElfCliProgram program)
 {
     program.RegisterCommand(new GetPeersCmd());
     program.RegisterCommand(new GetCommandsCmd());
 }