I'm trying to work with the example code from the liquidity documentation for Contract.create()
. The code compiles and tests on the online-editor properly. It also deploys using the editor. But when I call it after deployment, it throws an error: Unhandled error: Failure backtracked
The code is given below:
contract S = struct
type storage = tez * string
let%entry main () s = [], s
end
type storage = address
let%init storage (add : address) = add
let%entry main ((delegate : key_hash), (manager : key_hash)) _ =
let delegatable = true in
let spendable = false in
let initial_storage = (10tz,"Hello") in
let (op, addr) =
Contract.create ~storage:initial_storage ~manager ~spendable
~delegatable ~delegate:(Some delegate) ~amount:10tz (contract S) in
[op], addr