Doing a basic cons operation on a list that contains negative integer results in an error
on the Javascript side. Please take a look.
I use the latest aeproject 2.2.0
[shishkin@oberon sophia_test]$ cat contracts/DPLL.aes
include "List.aes"
contract DPLL =
entrypoint ins(cl: list(int)): list(int) =
6 :: cl
[shishkin@oberon sophia_test]$ cat test/dpllTest.js
const Deployer = require('aeproject-lib').Deployer;
const CONTRACT_PATH = "./contracts/DPLL.aes";
describe('DPLL Contract', () => {
// <skipped, general stuff>
it('ins test', async() => {
let res = (await instance.ins([-1, -2])).decodedResult;
console.log(res);
assert.isTrue(res == [6, -1, -2], 'invalid result');
})
}
running “aeproject test” results in:
1) DPLL Contract
ins test:
Error: Http request for http://localhost:3080/decode-call-result failed with status code 500. Status: Internal Server Error.
Error data: ""
at /home/shishkin/src/sophia_test/node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:157427
at s (node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:17600)
at Generator._invoke (node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:17353)
at Generator.forEach.t.(anonymous function) [as throw] (node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:17957)
at n (node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:2377)
at s (node_modules/@aeternity/aepp-sdk/dist/aepp-sdk.js:1:2624)
at process._tickCallback (internal/process/next_tick.js:68:7)
If I give a list of positive integers, everything works great.
[ 6, 1, 2, 3 ]
1) ins test