yes, works all as expected. 2 of the main changes were:
- use of
contract interface
identifier andmain contract
when using remote calls - change for
String
library to need a specificinclude
yes, works all as expected. 2 of the main changes were:
contract interface
identifier and main contract
when using remote callsString
library to need a specific include
Thanks. Would it be possible to give examples of these two cases?
Second question is, are already deployed contracts possible to interact with as before, or also new contracts will need to be deployed?
the examples in the aepp-sophia-examples repository have been updated. for usage of interfaces you can take a look at this example where the Buyer contract is using interfaces to interact with remote contracts:
already deployed contracts can still be called. there shouldn’t be any problems with that
if you define a contract interface
within the same file of the contract it might be required to define the actual contract with main contract
as @philipp.chain mentioned above. not 100% sure about that right now.
the reason why main contract
is required now is because contract factories have now been introduced which allows to create and clone contracts using a contract, see aesophia/sophia.md at v6.0.0 · aeternity/aesophia · GitHub.
so in case there is no other contract defined in the same file I don’t think main contract
is required (because it’s implicitely known)
Thanks. declaring main contract fixed the first error, now getting lots of unbound String errors, as @philipp.chain mentioned. There is no string lib import in the example even though strings are used what is the statement to import String lib?
seems include “String.aes” works
yes, string is now part of the stdlib that needs an explicit include. examples where String methods are used without the explicit include are outdated or better said only compatible with compiler < 5
see aesophia/sophia_stdlib.md at v6.0.0 · aeternity/aesophia · GitHub