public static void Register()
        {
            (from command in CommonParsers.Token("new-account")
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new NewAccountCommand
            {
                Name = name.GetOrDefault()
            }).Register();

            (from command in CommonParsers.Token("import-account")
             from privateKey in CommonParsers.StringValue
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new ImportAccountCommand
            {
                Name = name.GetOrDefault(),
                PrivateKey = privateKey
            }).Register();

            (from command in CommonParsers.Token("list-accounts")
             select new ListAccountsCommand()
            ).Register();

            (from command in CommonParsers.Token("set-account")
             from name in CommonParsers.Identifier
             select new SetAccountCommand
            {
                Name = name
            }).Register();
        }
        public static void Register()
        {
            (from command in CommonParsers.Token("deploy-algopool")
             from poolType in CommonParsers.ByteValue
             from tokenAddress in CommonParsers.StringValue
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new AlgoPoolDeployCommand
            {
                Name = name.GetOrDefault(),
                PoolType = poolType,
                TokenAddress = tokenAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algopool-transfertominer")
             from minerAddress in CommonParsers.StringValue
             select new AlgoPoolTransferToMinerCommand
            {
                ContractReference = contractReference,
                MinerAddress = minerAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algopool-terminate")
             select new AlgoPoolTerminateCommand
            {
                ContractReference = contractReference
            }).Register();
        }
        public static void Register()
        {
            (from command in CommonParsers.Token("reset")
             select new ResetCommand()
            ).Register();

            (from command in CommonParsers.Token("list-env")
             select new ListEnvironmentCommand()
            ).Register();
        }
Exemple #4
0
        public static void Register()
        {
            (from command in CommonParsers.Token("register-contract")
             from address in CommonParsers.StringValue
             from name in CommonParsers.StringValue
             select new RegisterContractCommand
            {
                Name = name,
                Address = address
            }).Register();

            (from command in CommonParsers.Token("list-contracts")
             select new ListContractsCommand()
            ).Register();
        }
        public static void Register()
        {
            (from command in CommonParsers.Token("set-network")
             from networkUrl in CommonParsers.StringValue
             select new SetNetworkCommand
            {
                NetworkUrl = networkUrl
            }).Register();

            (from command in CommonParsers.Token("set-gasprice")
             from gasPrice in CommonParsers.BigIntegerValue
             select new SetGasPriceCommand
            {
                GasPrice = gasPrice
            }).Register();
        }
Exemple #6
0
        public static void Register()
        {
            (from command in CommonParsers.Token("eth-transfer")
             from to in CommonParsers.StringValue
             from value in EthUnitParsers.EthValue
             select new EthTransferCommand
            {
                To = to,
                Value = value
            }).Register();

            (from command in CommonParsers.Token("eth-getbalance")
             from account in CommonParsers.StringValue
             select new EthGetBalanceCommand
            {
                Account = account
            }).Register();
        }
        public static void Register()
        {
            (from command in CommonParsers.Token("deploy-algotoken")
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new AlgoTokenDeployCommand
            {
                Name = name.GetOrDefault()
            }).Register();

            (from contractReference in CommonParsers.Invoke("algotoken-transfer")
             from to in CommonParsers.StringValue
             from value in EthUnitParsers.EthValue
             select new AlgoTokenTransferCommand
            {
                ContractReference = contractReference,
                To = to,
                Value = value
            }).Register();

            (from contractReference in CommonParsers.Invoke("algotoken-balanceof")
             from owner in CommonParsers.StringValue
             select new AlgoTokenBalanceOfCommand
            {
                ContractReference = contractReference,
                OwnerAddress = owner
            }).Register();

            (from contractReference in CommonParsers.Invoke("algotoken-pause")
             select new AlgoTokenPauseCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algotoken-unpause")
             select new AlgoTokenUnpauseCommand
            {
                ContractReference = contractReference,
            }).Register();
        }
Exemple #8
0
        public static void Register()
        {
            (from command in CommonParsers.Token("deploy-algofees")
             from tokenAddress in CommonParsers.StringValue
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new AlgoFeesDeployCommand
            {
                Name = name.GetOrDefault(),
                TokenAddress = tokenAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algofees-registerminer")
             from minerAddress in CommonParsers.StringValue
             select new AlgoFeesRegisterMinerCommand
            {
                ContractReference = contractReference,
                MinerAddress = minerAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algofees-unregisterminer")
             from minerAddress in CommonParsers.StringValue
             select new AlgoFeesUnregisterMinerCommand
            {
                ContractReference = contractReference,
                MinerAddress = minerAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algofees-mine")
             select new AlgoFeesMineCommand
            {
                ContractReference = contractReference
            }).Register();

            (from contractReference in CommonParsers.Invoke("algofees-terminate")
             select new AlgoFeesTerminateCommand
            {
                ContractReference = contractReference
            }).Register();
        }
        public static void Register()
        {
            (from command in CommonParsers.Token("deploy-algominer")
             from minerType in CommonParsers.ByteValue
             from category in CommonParsers.ByteValue
             from minerAccountAddress in CommonParsers.StringValue
             from referralAccountAddress in CommonParsers.StringValue
             from tokenAddress in CommonParsers.StringValue
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new AlgoMinerDeployCommand
            {
                Name = name.GetOrDefault(),
                MinerType = minerType,
                Category = category,
                MinerAccountAddress = minerAccountAddress,
                ReferralAccountAddress = referralAccountAddress,
                TokenAddress = tokenAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-activateminer")
             select new AlgoMinerActivateMinerCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-deactivateminer")
             select new AlgoMinerDeactivateMinerCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-migrateminer")
             from newMinerAddress in CommonParsers.StringValue
             select new AlgoMinerMigrateMinerCommand
            {
                ContractReference = contractReference,
                NewMinerAddress = newMinerAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-pausemining")
             select new AlgoMinerPauseMiningCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-resumemining")
             select new AlgoMinerResumeMiningCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-stopandremoveownership")
             select new AlgoMinerStopAndRemoveOwnershipCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-resetminer")
             from newOwnerAddress in CommonParsers.StringValue
             from newReferralAddress in CommonParsers.StringValue
             select new AlgoMinerResetMinerCommand
            {
                ContractReference = contractReference,
                NewOwnerAddress = newOwnerAddress,
                NewReferralAddress = newReferralAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-startmining")
             select new AlgoMinerStartMiningCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-stopmining")
             select new AlgoMinerStopMiningCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-mine")
             select new AlgoMinerMineCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-terminate")
             select new AlgoMinerTerminateCommand
            {
                ContractReference = contractReference
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-addsystem")
             from account in CommonParsers.StringValue
             select new AlgoMinerAddSystemCommand
            {
                ContractReference = contractReference,
                Account = account
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-addcoreteam")
             from account in CommonParsers.StringValue
             select new AlgoMinerAddCoreTeamCommand
            {
                ContractReference = contractReference,
                Account = account
            }).Register();

            (from contractReference in CommonParsers.Invoke("algominer-addsupervisor")
             from account in CommonParsers.StringValue
             select new AlgoMinerAddSupervisorCommand
            {
                ContractReference = contractReference,
                Account = account
            }).Register();
        }
Exemple #10
0
        public static void Register()
        {
            (from command in CommonParsers.Token("deploy-algostream")
             from minerType in CommonParsers.ByteValue
             from category in CommonParsers.ByteValue
             from minerAccountAddress in CommonParsers.StringValue
             from referralAccountAddress in CommonParsers.StringValue
             from tokenAddress in CommonParsers.StringValue
             from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional()
             select new AlgoStreamDeployCommand
            {
                Name = name.GetOrDefault(),
                Size = minerType,
                GracePeriodDays = category,
                StreamHolderAddress = minerAccountAddress,
                ReferralAddress = referralAccountAddress,
                TokenAddress = tokenAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-activatestream")
             select new AlgoStreamActivateStreamCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-pausestreaming")
             select new AlgoStreamPauseStreamingCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-resumestreaming")
             select new AlgoStreamResumeStreamingCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-disablestream")
             select new AlgoStreamDisableStreamCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-resetstream")
             from newStreamHolderAddress in CommonParsers.StringValue
             from newReferralAddress in CommonParsers.StringValue
             select new AlgoStreamResetStreamCommand
            {
                ContractReference = contractReference,
                NewStreamHolderAddress = newStreamHolderAddress,
                NewReferralAddress = newReferralAddress
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-changestreamsize")
             from size in CommonParsers.ByteValue
             select new AlgoStreamChangeStreamSizeCommand
            {
                ContractReference = contractReference,
                Size = size
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-collect")
             select new AlgoStreamCollectCommand
            {
                ContractReference = contractReference,
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-terminate")
             select new AlgoStreamTerminateCommand
            {
                ContractReference = contractReference
            }).Register();

            (from contractReference in CommonParsers.Invoke("algostream-setcurrentdatetime")
             from value in CommonParsers.DateValue
             select new AlgoStreamSetCurrentDateTimeCommand
            {
                ContractReference = contractReference,
                Value = value.ToEpoch()
            }).Register();
        }