Skip to content

dkneisly-figure/loan-package-contracts

 
 

Repository files navigation

loan-package-contracts

Defines a loan package scope specification and p8e smart contracts that can be executed against it.

Status

stability-beta Code Coverage Latest Release LOC

Artifacts

Contracts JAR

Contracts Artifact

Protobuf JAR

Proto Artifact

Development

Commands

Cloning the Repository

git clone https://github.com/provenance-io/loan-package-contracts.git
cd loan-package-contracts/

Building the project

./gradlew clean build --refresh-dependencies

Bootstrapping the contracts

See here for more details on the p8e tasks.

The following command will put the contracts into an object store:

./gradlew p8eClean p8eCheck p8eBootstrap

In order for the bootstrapping to succeed, the following environment variables will need to be defined:

OS_GRPC_URL             # The URL to your object store that will store the contracts
PROVENANCE_GRPC_URL     # The URL to the Provenance instance the contracts will run against
ENCRYPTION_PRIVATE_KEY
SIGNING_PRIVATE_KEY

For local development, you can quickly get necessary Docker containers running and said environment values populated by using p8e-scope-sdk/dev-tools:

git clone https://github.com/provenance-io/p8e-scope-sdk.git
cd p8e-scope-sdk/dev-tools/compose/
docker compose up -d
source ./host.env
cd /PathToYour/loan-package-contracts
./gradlew p8eBootstrap

Publishing local artifacts

To publish to your machine's local Maven repository, use

./gradlew publishToMavenLocal -xsignMavenPublication

Linting

This project uses Ktlint.

To immediately view linting errors, use

./gradlew clean ktlintCheck

To generate linting reports, use

./gradlew ktlintCheck

To have the linter update your code to fit the linting rules, use

./gradlew ktlintFormat

About

P8e Smart Contracts for use against loan package

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%