Tabnine Logo
Client.queryContract
Code IndexAdd Tabnine to your IDE (free)

How to use
queryContract
method
in
com.icodici.universa.node2.network.Client

Best Java code snippets using com.icodici.universa.node2.network.Client.queryContract (Showing top 4 results out of 315)

origin: UniversaBlockchain/universa

private static void doStartHttpServer(String routeFilePath) throws IOException {
  try {
    cliServices.startJsApiHttpServer(
        routeFilePath,
        hashId -> {
          try {
            return getClientNetwork().check(hashId).state == ItemState.APPROVED;
          } catch (IOException e) {
            report("error while checking contract for approve: " + e);
            return false;
          }
        },
        (slotId, originId) -> {
          try {
            if (slotId == null)
              return null;
            return getClientNetwork().client.queryContract(slotId, originId, null);
          } catch (IOException e) {
            report("error while querying contract from slot1: " + e);
            return null;
          }
        });
  } catch (Exception e) {
    report("http server error: " + e);
  }
  finish();
}
origin: UniversaBlockchain/universa

assertNull(slotInfo);
byte[] simpleContractBytes = client.queryContract(slotContract.getId(), null, simpleContract.getId());
System.out.println("simpleContractBytes (by contractId): " + simpleContractBytes);
assertEquals(false, Arrays.equals(simpleContract.getPackedTransaction(), simpleContractBytes));
simpleContractBytes = client.queryContract(slotContract.getId(), simpleContract.getOrigin(), null);
System.out.println("simpleContractBytes (by originId): " + simpleContractBytes);
assertEquals(false, Arrays.equals(simpleContract.getPackedTransaction(), simpleContractBytes));
assertNotNull(slotInfo);
simpleContractBytes = client.queryContract(slotContract.getId(), null, simpleContract.getId());
System.out.println("simpleContractBytes (by contractId) length: " + simpleContractBytes.length);
assertEquals(true, Arrays.equals(simpleContract.getPackedTransaction(), simpleContractBytes));
simpleContractBytes = client.queryContract(slotContract.getId(), simpleContract.getOrigin(), null);
System.out.println("simpleContractBytes (by originId) length: " + simpleContractBytes.length);
assertEquals(true, Arrays.equals(simpleContract.getPackedTransaction(), simpleContractBytes));
origin: UniversaBlockchain/universa

try {
  Binder slotInfo = testSpace.client.querySlotInfo(slotId);
  return testSpace.client.queryContract(slotId, originId, null);
} catch (ClientError e) {
  e.printStackTrace();
origin: UniversaBlockchain/universa

try {
  Binder slotInfo = testSpace.client.querySlotInfo(slotId);
  return testSpace.client.queryContract(slotId, originId, null);
} catch (ClientError e) {
  e.printStackTrace();
com.icodici.universa.node2.networkClientqueryContract

Javadoc

Look for contract stored by given slot contract id. Contract is specified by either id or origin

Popular methods of Client

  • getState
  • <init>
    Create new client protocol session. It loads network configuration and creates client protocol sessi
  • getClient
  • getNodes
    Get list of nodes in
  • ping
  • register
    Register contract on the network without payment. May require special client key / network configura
  • command
    Execude custom command on the node
  • getNodeNumber
    Get number of node cliet connection is established with
  • getVersion
    Get network version
  • registerParcelWithState
    Register contract on the network with parcel (includes payment) and wait for some of the final ItemS
  • getParcelProcessingState
    Get processing state of given parcel
  • getSession
    Get session of http client connected to node with given number
  • getParcelProcessingState,
  • getSession,
  • getStats,
  • resyncItem,
  • setVerboseLevel,
  • size,
  • followerGetRate,
  • getBody,
  • getContract

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JFrame (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now