Skip to content

Commit 81ebba5

Browse files
Initial messing around with getting entitiesf
1 parent c24acd9 commit 81ebba5

File tree

3 files changed

+18
-2
lines changed
  • rpc/rpc-api/src
    • main/java/com/strategyobject/substrateclient/rpc/api/section
    • test/java/com/strategyobject/substrateclient/rpc/api/section
  • tests/src/main/java/com/strategyobject/substrateclient/tests/containers

3 files changed

+18
-2
lines changed

rpc/rpc-api/src/main/java/com/strategyobject/substrateclient/rpc/api/section/State.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,8 @@ CompletableFuture<Supplier<CompletableFuture<Boolean>>> subscribeStorage(List<St
228228
@RpcCall("call")
229229
@Scale
230230
CompletableFuture<IndexU32> retrieveAccountNonce(String method, @Scale AccountIdScaleWrapper addressId);
231+
232+
@RpcCall("call")
233+
@Scale
234+
CompletableFuture<Byte[]> getRegisteredEntitiesByName(String method, @Scale String name);
231235
}

rpc/rpc-api/src/test/java/com/strategyobject/substrateclient/rpc/api/section/StateTests.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,18 @@ public void retrieveAccountNonce() throws Exception {
204204
}
205205
}
206206

207+
@Test
208+
public void getRegisteredEntitiesByName() throws Exception {
209+
try (val wsProvider = connect()) {
210+
val state = TestsHelper.createSectionFactory(wsProvider).create(State.class);
211+
val method = "SchemasRuntimeApi_get_registered_entities_by_name";
212+
val intentName = "frequency.default-token-address";
213+
214+
CompletableFuture<Byte[]> deferredResult = state.getRegisteredEntitiesByName(method, intentName);
215+
deferredResult.get();
216+
}
217+
}
218+
207219
private WsProvider connect() throws Exception {
208220
val wsProvider = WsProvider.builder()
209221
.setEndpoint(substrate.getWsAddress())

tests/src/main/java/com/strategyobject/substrateclient/tests/containers/FrequencyVersion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.strategyobject.substrateclient.tests.containers;
22

33
public class FrequencyVersion {
4-
public static final String CURRENT_VERSION = "v1.17.8";
5-
public static final Long SPEC = 183L;
4+
public static final String CURRENT_VERSION = "v2.0.0-rc1";
5+
public static final Long SPEC = 184L;
66

77
private FrequencyVersion() {
88
}

0 commit comments

Comments
 (0)