zapproject / jzap

Java
MIT License
1 stars 4 forks source link

Port oracle from typescript to java #13

Closed logohere closed 3 years ago

logohere commented 3 years ago

Summary

Port from typescript to java

Reference

/**
 * @param {String} oracleTitle The name of the oracle
 * @param {String} oracleAddress The address of the oracle contract
 * @param {String} oracleAddress The address of the provider
 * @param {Boolean} withBrooker Is the provider using a brooker?
 * @param {Array} coeffecientArr The coefficients of the curve formula as specified in the docs
 * @param {String} endpointName Name of this specific endpoint/oracle
 * @param {Number} dotsBounded The amount of DOTS bound to an endpoint
 * @param {Number} dotsIssued The amount of DOTS issued to an endpoint
 * @param {Number} dotLimit The max amount of DOTS that can be bound to an endpoint
 * @param {Number} pricePerDot The price of each DOT bound to an endpoint
 * @param {string} markdownLink
 * @param {string} jsonSchema
 */
export function Oracle(
   oracleTitle,
   oracleAddress,
   oracleParams,
   withBrooker,
   coeffecientArr,
   endpointName,
   dotsBounded,
   dotsIssued,
   dotLimit,
   pricePerDot,
   markdownLink,
   jsonSchema
) {
   this.oracleTitle = oracleTitle;
   this.oracleAddress = oracleAddress;
   this.oracleParams = oracleParams
   this.withBrooker = withBrooker;
   this.coeffecientArr = coeffecientArr;
   this.endpointName = endpointName;
   this.dotsBounded = dotsBounded;
   this.dotsIssued = dotsIssued;
   this.dotLimit = dotLimit;
   this.pricePerDot = pricePerDot
   this.markdownLink = markdownLink;
   this.jsonSchema = jsonSchema;
}

Definition of done

Make sure the junit test properly imports and instantiate the oracle from its file