Nested types cause "Unknown module or contract"
Closed this issue ยท 3 comments
Hi there!
I'm setting out to build a tezos smart contract backed app. I'm using liquidity and techelson via my own testrunner sliq (just a cli passing contracts and tests to a docker image for exec).
I have an issues where when I try to use nested types I get <unspecified>: Error: Unknown module or contract Appstore
from liquidity ๐ค
Here is my Appstore.reliq
:
type app = {
name: string,
owner: address,
};
type storage = map(string, app);
let%entry main = (name: string, store) => {
let amount = Current.amount();
if (amount < 5.00tz) {
Current.failwith("Not enough money, at least 5tz to vote");
};
([], store);
};
If I modify type storage = map(string, app);
with type storage = map(string, string);
it works as expected and tests are run.
Any help would be greatly appreciated ๐๐
Let me know if this is a more approproate issue on the liquidity
repo.
Thanks!
Command & outout:
liquidity --no-annot --no-simplify --no-peephole /techel.liq Appstore.reliq -o /tmp/sliq.techel tests/Tests.reliq
Module Techel
Contract Appstore
<unspecified>: Error: Unknown module or contract Appstore
In the tests I'm using Appstore.storage
etc.
Hi there! Yes, this is more of a Liquidity issue. My guess is that Liquidity does not import types with liquidity ... Appstore.reliq ... tests/Tests.reliq
so map(string, app)
ends up referring to an unknown type.
But you need to let the Liquidity folks know, this is not related to Techelson :(
Done here ๐