Hangzhou support
dependency to Hangzhou
No opam packages has been realeased so we are using a trick:
- in
.gitmodules
, we declare the upstream repo - in Dockerfile there are some sed shenanigans to add missing
- in
ligo.opam
we pin all the lib we depend on
grep TEMPORARY
to find related hacks
Checklist
Types:
-
chest
(native to timelock) -
chest_key
(native to timelock) -
chest_opening_result = Ok_opening of bytes | Failed of bool
(not native but necessary forchest_open
) orchest_opening_result = Ok_opening of bytes | Fail_decrypt | Fail_timelock
Primitives:
-
Tezos.open_chest : chest_key -> chest -> nat -> chest_opening_result
-
`Tezos.call_view : 'a -> address -> 'ret -
Test.cast_address : address -> ('p,'s) typed_address
: a way to cast adress to typed address to makeTest.originate_from_file
usable again (meaning it is possible to get the storage of a contract from an address)
Testing framework:
-
we need a way to create values of type chest
/chest_key
as they are passed to contracts through client (tezos/../timelock.ml
has everything) -
Test.originate_from_file
take a views name list -
Test.create_chest
andTest.create_chest_key
On-chain view:
-
add CLI option --views
which takes a list of function names.ligo compile contract --views v1,v2
, dry-run will be more tricky ? not sure we should do it -
the logic of type-checking views against a contract should be abstract enough to allow a (future?) off-chain view mecanism (which is similar) -
[@ view] annotation to declare view (--views override it with a warning). attributes were added to the declaration in the typed env. Don't know if we should really do that ?
tests:
-
chest -
chest (testing framework) -
views -
views (testing framework) -
has a changelog entry
examples
src/test/contracts/interpreter_tests/contract_under_test/views_contract.mligo & src/test/contracts/interpreter_tests/views_test.mligo
src/test/contracts/interpreter_tests/test_timelock.mligo
src/test/contracts/open_chest_result.mligo
src/test/contracts/timelock.mligo
src/test/contracts/view.mligo
Edited by Rémi