Hi. There are so many Ethereum Oracles out there. But I needed a more simple and straight forward one for my projects. Thus, I created my own one. With it we can invoke JavaScript directly from Ethereum's Solidity. It's available on Ropsten and Mainnet.
https://github.com/CaptainJavaScriptI've implemented several use cases such as mathjs, JSON and jQuery so that you can invoke JavaScript quite easily:
Run(
1, /* give the job a unique ID */
"math:log2(16)", /* just call the mathjs-function after math: */
"",
"",
1, /* it's fast: 1 slice is enough */
DEFAULT_GAS_UNITS, /* use default gas units */
DEFAULT_GAS_PRICE /* we will transfer the default gas price for return */
);
or
Run(
CENTIMETER_JOB, /* give the job a unique ID */
/* JavaScript code I want to execute: */
"module.exports = function(CaptainJSIn) { var math = require('mathjs'); return math.eval(CaptainJSIn + ' cm to inch'); }",
Centimeter, /* Input parameter which will result in CaptainJSIn (see above) */
"mathjs", /* Nodejs libraries we need */
3, /* we need a maximum of 3 runtime slices */
DEFAULT_GAS_UNITS, /* use default gas units */
DEFAULT_GAS_PRICE /* we will transfer the default gas price for return */
);
I'm now looking for more feature requests (
did I miss something?) and people who are willing to test it on Ropsten