GithubHelp home page GithubHelp logo

isabella232 / cordapp-example-deterministic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r3-archive/cordapp-example-deterministic

0.0 0.0 0.0 81 KB

An example CorDapp with deterministic states

Kotlin 71.06% Java 28.94%

cordapp-example-deterministic's Introduction

Deterministic CorDapp Example

This CorDapp requires Corda v4.x or above. It contains 3 modules:

  • contract: The Contract and State classes that Corda will use inside the enclave. These are compiled against the deterministic subset of the Corda and Java APIs.
  • flow: The FlowLogic classes that Corda will execute outside of the enclave.
  • web: An optional module that provides a RESTful API. This is solely for demonstrating the flows.

Configuring IntelliJ

Check out the project, and then execute this command:

$ gradlew installJdk

This will download and install the deterministic JDK artifacts into the ./jdk directory.

Run IntelliJ, and open the File/Project Structure/SDKs dialogue. Click + to add a new JDK SDK, selecting the project's new ./jdk directory as this JDK's home directory. Assign this new SDK a unique name, e.g. 1.8 (CorDapp).

Edit the project's top-level build.gradle file and assign this new SDK's name to the deterministic_idea_sdk property, e.g.

buildscript {
    ext {
        ...
        deterministic_idea_sdk = '1.8 (CorDapp)'
        ...
    }
}

Now open the CorDapp project within IntelliJ. Ensure that IntelliJ delegates all of this project's build actions to Gradle, that the Project JDK is a full JDK installation (not the deterministic one!) and that Gradle uses the Project JDK.

When IntelliJ imports this Gradle project, it should now be using 1.8 (Cordapp) as the Module SDK for both the contract_main and contract_test modules. This will allow IntelliJ to build the project correctly while using the deterministic Java subset for the IDE's presentation compiler.

cordapp-example-deterministic's People

Contributors

chrisr3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.