Compiling failed with aesophia 6.0

(Sorry that it is this contract)

This contract could be compiled with aesophia 4.2, but with the latest 6.0, it reports:

Parse error in ‘contracts\deploy\remotecall.aes’ at line 2, col 14:
Unexpected token ‘main’.

Did I miss something?

2 Likes

Hi Liu, how are you doing the contract call?

Thanks~I was just upgrading the Sophia compiler(aesophia_cli) of aeknow.chain(GitHub - jdgcs/aeknow.chain: AEKnow.chain is designed to be a totally decentralized SNS aepp, based on Aeternity, AENS, Hugo and IPFS) to the latest version 6.0.0 and met the issue.

Everything seems fine with the old version 4.2 compiler aesophia_cli, including the calling of AEX9 contracts.

  • Contract interfaces must be now invocated by contract interface keywords
  • main keyword to indicate the main contract in case there are child contracts around

From Release v6.0.0 · aeternity/aesophia · GitHub

May be @hanssv.chain or @radrow.chain can bring us more info.

1 Like

The AEX9 contract seems to fail after the compiler is upgraded
@hanssv.chain My teacher, you can also have a look

Thanks very much!

It’s fine now.

I added

main contract …

to the contract, and changed the func’s name, it was compiled successfully.

1 Like

Yeah, with the 6.0.0 version the syntax has changed a little bit. Now the interfaces must be annotated with interface keyword in order to distinguish them from child contracts. Moreover if there are any child contracts present, the main contract must be invocated with main contract instead of just contract.

4 Likes