From cf17a9ed53bce63576f4a61a926161ffd63aaf36 Mon Sep 17 00:00:00 2001 From: ilgyu Date: Mon, 18 Nov 2024 16:37:28 +0900 Subject: [PATCH 1/6] bump: Lib9c 1.19.2 --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index cd378f26a..7b3f640e8 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit cd378f26a8d187c08ea928a15ec988d394fc14a3 +Subproject commit 7b3f640e8eb1b42c9c8be1d2c1363e387b4797a8 From 95e207c5d8a06874600bd70b310486217cd5f39b Mon Sep 17 00:00:00 2001 From: ilgyu Date: Mon, 18 Nov 2024 16:40:49 +0900 Subject: [PATCH 2/6] fix: Fix share query to handle non agent --- NineChronicles.Headless/GraphTypes/StateQuery.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/NineChronicles.Headless/GraphTypes/StateQuery.cs b/NineChronicles.Headless/GraphTypes/StateQuery.cs index e35cf04dd..7f07af304 100644 --- a/NineChronicles.Headless/GraphTypes/StateQuery.cs +++ b/NineChronicles.Headless/GraphTypes/StateQuery.cs @@ -765,11 +765,6 @@ public StateQuery() { var agentAddress = new AgentAddress(context.GetArgument
("agentAddress")); var validatorAddress = context.GetArgument
("validatorAddress"); - if (!(context.Source.WorldState.GetAgentState(agentAddress) is { } agentState)) - { - return null; - } - var repository = new ValidatorRepository(new World(context.Source.WorldState), new HallowActionContext { }); var delegatee = repository.GetValidatorDelegatee(validatorAddress); var share = repository.GetBond(delegatee, agentAddress).Share; From 7f01ac699568abc00ae76fe49f0fa67ddb01a6fb Mon Sep 17 00:00:00 2001 From: ilgyu Date: Wed, 20 Nov 2024 10:18:13 +0900 Subject: [PATCH 3/6] chore: Add admin action query --- .../GraphTypes/ActionQuery.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/NineChronicles.Headless/GraphTypes/ActionQuery.cs b/NineChronicles.Headless/GraphTypes/ActionQuery.cs index f220ea3fa..510826b3f 100644 --- a/NineChronicles.Headless/GraphTypes/ActionQuery.cs +++ b/NineChronicles.Headless/GraphTypes/ActionQuery.cs @@ -574,6 +574,28 @@ public ActionQuery(StandaloneContext standaloneContext) context, new MigratePlanetariumGuild())); + Field( + name: "fixToRefundFromNonValidator", + arguments: new QueryArguments( + new QueryArgument>>> + { + Description = "List of addresses to refund", + Name = "addresses", + }, + new QueryArgument>>> + { + Description = "List of amounts to refund", + Name = "amounts", + }), + resolve: context => + { + var addresses = context.GetArgument>("addresses"); + var amounts = context.GetArgument>("amounts"); + return Encode( + context, + new FixToRefundFromNonValidator(addresses, amounts)); + }); + RegisterHackAndSlash(); RegisterHackAndSlashSweep(); RegisterDailyReward(); From a3db0de48ccb616f6256060b3a4db3698ef89fde Mon Sep 17 00:00:00 2001 From: ilgyu Date: Wed, 20 Nov 2024 12:54:49 +0900 Subject: [PATCH 4/6] bump: Lib9c --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index 7b3f640e8..51c8b73fb 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit 7b3f640e8eb1b42c9c8be1d2c1363e387b4797a8 +Subproject commit 51c8b73fb5df5cb1e3e3db2d5a8b094dbe5e7ae1 From 94175a3de259d44f732cf6f89add2e2393d5e91b Mon Sep 17 00:00:00 2001 From: ilgyu Date: Wed, 20 Nov 2024 13:35:57 +0900 Subject: [PATCH 5/6] chore: Fix action query for temporal refund action --- NineChronicles.Headless/GraphTypes/ActionQuery.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NineChronicles.Headless/GraphTypes/ActionQuery.cs b/NineChronicles.Headless/GraphTypes/ActionQuery.cs index 510826b3f..9e2803422 100644 --- a/NineChronicles.Headless/GraphTypes/ActionQuery.cs +++ b/NineChronicles.Headless/GraphTypes/ActionQuery.cs @@ -591,9 +591,10 @@ public ActionQuery(StandaloneContext standaloneContext) { var addresses = context.GetArgument>("addresses"); var amounts = context.GetArgument>("amounts"); + var targets = addresses.Zip(amounts, (address, amount) => (address, amount)); return Encode( context, - new FixToRefundFromNonValidator(addresses, amounts)); + new FixToRefundFromNonValidator(targets)); }); RegisterHackAndSlash(); From 9674b7e28162d9a84d4a7bead85c872af8a92fa4 Mon Sep 17 00:00:00 2001 From: ilgyu Date: Wed, 27 Nov 2024 15:31:34 +0900 Subject: [PATCH 6/6] bump: Lib9c 1.19.4 --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index 51c8b73fb..cb3d87872 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit 51c8b73fb5df5cb1e3e3db2d5a8b094dbe5e7ae1 +Subproject commit cb3d87872d9c2eb45ed6f6d6396ee751896a18de