diff --git a/NineChronicles.Headless/GraphTypes/ActionMutation.cs b/NineChronicles.Headless/GraphTypes/ActionMutation.cs index 6fb5820f6..73fa984d3 100644 --- a/NineChronicles.Headless/GraphTypes/ActionMutation.cs +++ b/NineChronicles.Headless/GraphTypes/ActionMutation.cs @@ -674,6 +674,34 @@ public ActionMutation(NineChroniclesNodeService service) } } ); + Field>("migratePlanetariumValidator", + description: "Migration Planetarium Validator", + resolve: context => + { + try + { + BlockChain? blockChain = service.BlockChain; + if (blockChain is null) + { + throw new InvalidOperationException($"{nameof(blockChain)} is null."); + } + + var actions = new[] { new MigratePlanetariumValidator() }; + Transaction tx = blockChain.MakeTransaction( + service.MinerPrivateKey, + actions, + Currencies.Mead * 1, + 1L); + return tx.Id; + } + catch (Exception e) + { + var msg = $"Unexpected exception occurred during {typeof(ActionMutation)}: {e}"; + context.Errors.Add(new ExecutionError(msg, e)); + throw; + } + } + ); Field>("unjailValidator", description: "Unjail validator", resolve: context =>