ligo/src/bin_client/test/contracts/swap_storage_input.tz
2018-02-05 23:34:05 +01:00

10 lines
442 B
Plaintext

parameter string;
return string;
storage string; # Note that all three values are of the same type
code { DUP; # In order to access both the storage and parameter, I need to duplicate the (pair parameter storage)
CAR; # Access the parameter
SWAP; # Exchange top and second element on the stack
CDR; # Get the storage in the pair
PAIR}; # Generate pair of elements