From 5b398b47c293d17998c70c9a46d18e12ba771710 Mon Sep 17 00:00:00 2001 From: technomad21c Date: Thu, 21 May 2020 19:04:17 -0700 Subject: [PATCH] add an ID Contract example --- src/test/examples/pascaligo/id.ligo | 34 ++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/test/examples/pascaligo/id.ligo b/src/test/examples/pascaligo/id.ligo index 468449535..887d64d6d 100644 --- a/src/test/examples/pascaligo/id.ligo +++ b/src/test/examples/pascaligo/id.ligo @@ -4,12 +4,44 @@ compile: entrypoint: main dryRun: + entrypoint: main + parameters: | + Buy ( + record [ + profile=0x0501000000026869; + initial_controller=Some(("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address)) + ] + ) + storage: | + record [ + identities=big_map[1->record [owner=("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address); + controller=("tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" : address); profile=0x0501000000026869]]; + next_id=2; + name_price=0tez; + skip_price=50mutez; + ] deploy: entrypoint: main - storage: 0 + storage: evaluateValue: entrypoint: "" evaluateFunction: + entrypoint: buy + parameters: | + ( + record [ + profile=0x0501000000026869; + initial_controller=Some(("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx": address)) + ], + + record [ identities=big_map[1->record [owner=("tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" : address); + controller=("tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" : address); + profile=0x0501000000026869]]; + next_id=2; + name_price=0tez; + skip_price=333mutez; + ] + ) *_*) type id is int