-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26668d7
commit 82ecd25
Showing
30 changed files
with
231 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
// Type your solution below | ||
type storage is unit | ||
|
||
type parameter is | ||
Fire of int | ||
| Stop | ||
|
||
type return is list (operation) * storage | ||
|
||
const right_laser_address : address = ("tz1fND4ejogxWN7HB5JKdz119A48Cp2eYKj9" : address) | ||
const left_laser_address : address = ("tz1PVWEWDcuow9R6y5EFwcHbFNoZBZ9RjxaB" : address) | ||
|
||
function orders (const action : parameter; const store : storage): return is | ||
block { | ||
const right_laser : contract (action) = | ||
case (Tezos.get_contract_opt(main_laser_address) : option (contract (parameter))) of | ||
Some (contract) -> contract | ||
| None -> (failwith ("Contract not found.") : contract (parameter)) | ||
end; | ||
const left_laser : contract (action) = | ||
case (Tezos.get_contract_opt(main_laser_address) : option (contract (parameter))) of | ||
Some (contract) -> contract | ||
| None -> (failwith ("Contract not found.") : contract (parameter)) | ||
end; | ||
|
||
// Type your solution below | ||
|
||
} with (operations, store) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
// Type your solution below | ||
type storage is unit | ||
|
||
type parameter is | ||
Fire of int | ||
| Stop | ||
|
||
type return is list (operation) * storage | ||
|
||
const right_laser_address : address = ("tz1fND4ejogxWN7HB5JKdz119A48Cp2eYKj9" : address) | ||
const left_laser_address : address = ("tz1PVWEWDcuow9R6y5EFwcHbFNoZBZ9RjxaB" : address) | ||
|
||
function orders (const action : parameter; const store : storage): return is | ||
block { | ||
const right_laser : contract (action) = | ||
case (Tezos.get_contract_opt(main_laser_address) : option (contract (parameter))) of | ||
Some (contract) -> contract | ||
| None -> (failwith ("Contract not found.") : contract (parameter)) | ||
end; | ||
const left_laser : contract (action) = | ||
case (Tezos.get_contract_opt(main_laser_address) : option (contract (parameter))) of | ||
Some (contract) -> contract | ||
| None -> (failwith ("Contract not found.") : contract (parameter)) | ||
end; | ||
|
||
// Type your solution below | ||
const operations : list (operation) = list [ | ||
Tezos.transaction (Fire(5), 0tez, right_laser); | ||
Tezos.transaction (Stop, 0tez, right_laser); | ||
Tezos.transaction (Fire(5), 0tez, left_laser); | ||
Tezos.transaction (Stop, 0tez, left_laser); | ||
] | ||
} with (operations, store) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.