diff --git a/NineChronicles.Headless/GraphTypes/ActionQuery.cs b/NineChronicles.Headless/GraphTypes/ActionQuery.cs index 9e2803422..d3b3558b7 100644 --- a/NineChronicles.Headless/GraphTypes/ActionQuery.cs +++ b/NineChronicles.Headless/GraphTypes/ActionQuery.cs @@ -13,6 +13,8 @@ using Nekoyume.Action.ValidatorDelegation; using Nekoyume.Action.Guild.Migration; using Lib9c; +using Libplanet.Blockchain; +using Nekoyume.ValidatorDelegation; namespace NineChronicles.Headless.GraphTypes { @@ -596,6 +598,23 @@ public ActionQuery(StandaloneContext standaloneContext) context, new FixToRefundFromNonValidator(targets)); }); + Field( + name: "delegateValidator", + arguments: new QueryArguments( + new QueryArgument> + { + Name = "amount", + Description = "Amount of guild gold to delegate." + } + ), + resolve: context => + { + BigInteger amount = context.GetArgument("amount"); + var fav = new FungibleAssetValue(ValidatorDelegatee.ValidatorDelegationCurrency, amount, 0); + var action = new DelegateValidator(fav); + return Encode(context, action); + } + ); RegisterHackAndSlash(); RegisterHackAndSlashSweep();