Packages

Cli app meant to ease interation with Elrond SCs

Current section

Files

Jump to
earendil lib common utils.ex
Raw

lib/common/utils.ex

defmodule EarendilCli.Common.Utils do
def read_file(path) do
case File.read(Path.expand(path)) do
{:ok, body} -> body
{:error, reason} -> IO.puts("Error: #{reason}")
end
end
def apply_delay(task) do
if not is_nil(task.delay), do: :timer.sleep(task.delay)
end
end