Initialization
deploy runs once, as the contract is created, on the arguments passed with the deployment. It is Lithe's constructor.
initialization.lithe
(* `deploy` runs once, in the creation code, on the deployment's arguments. Nobody can
call it later, so there is no "already initialized" flag to keep. *)
error CapIsZero;
storage is record {
owner : address;
cap : uint;
}
deploy(const owner : address; const cap : uint)
raises CapIsZero
is {
assert(cap > 0, CapIsZero);
storage.owner := owner;
storage.cap := cap;
}
external view function owner() : address is
storage.owner
external view function cap() : uint is
storage.cap- Deploy it like a Solidity contract: the arguments are ABI-encoded after the creation code, and the ABI has a
constructorentry for them. deploycan write storage and emit events, but cannotqueryordefer. See Deployment.- In an upgradeable contract,
deployinitializes the proxy, as the proxy is created. Later versions set up new state withmigrate.

