Experiment
This section presents types and functions exported by the @completium/experiment-ts
package and used by contracts' bindings interface (storage, entry points, views).
A B
Account
Object returned by the get_account
function. An account is created with Completium CLI with the following command:
completium-cli generate account as <ACCOUNT_ALIAS> [--force]
See here for more creation options.
Methods
blake2b(b)
C D
call(c, e, a, p)
Parameters
c
:
string
e
:
string
Returns
CallResult
Object returned by calls to entry points via the contract binding object. These calls use the low-level call
function. It is also returned by the exec_batch
function.
It contains various information about entry point transaction, including the events
field that is the array of events emitted during transaction execution.
delay_mockup_now_by_day(v)
delay_mockup_now_by_minute(v)
delay_mockup_now_by_hour(v)
delay_mockup_now_by_second(v)
delay_mockup_now_by_week(v)
deploy(path, params, p)
deploy
method of the contract's binding.Parameters
path
:
string
Returns
DeployResult
deploy_from_json(name, code, storage, p)
Micheline
code. It is used by deploy_callback
function.Parameters
name
:
string
Returns
DeployResult
deploy_callback(name, code, mt, p)
getter
entry point of another contract. It is used by the contract binding when calling a getter entry point to deploy a caller contract.Parameters
name
:
string
Returns
DeployResult
E F
exec_batch(cps, p)
Parameters
Returns
exec_view(c, e, a, p)
view
. It is used by the contract binding to call a view.Parameters
n
:
string
Returns
ViewResult
expect_to_fail(f, e)
Parameters
expr_micheline_to_json(i)
i
to a Micheline value.Parameter
i
:
string
Returns
G H
get_account(a)
Parameter
n
:
string
Returns
get_balance()
get_big_map_value(id, key, kv, kt)
Parameters
id
:
number
Returns
Promise<any>
key
, null
if not found.get_call_param(c, e, a, p)
Parameters
c
:
string
e
:
string
Returns
CallParameter
get_chain_id()
get_endpoint()
get_mockup_now()
get_raw_storage(a)
Micheline
format. It is used by the contract binding.Parameter
a
:
string
Returns
get_storage(a)
Parameter
a
:
string
Returns
any
I J
is_mockup()
Returns
boolean
true
if and only if current endpoint is mockupjson_micheline_to_expr(i)
O P
originate(path, storage, p)
deploy
method of the contract's binding.Parameters
path
:
string
Returns
DeployResult
pack(o, t)
Parameters
Returns
Q R
register_global_constant(input, p)
input
micheline value. Parameters
Returns
RegisterGlobalConstantResult
S T
set_endpoint(e)
set_mockup()
set_mockup_chain_id(c)
set_mockup_now(d)
now
value.Parameter
d
:
Date
set_quiet(b)
Parameter
b
:
boolean
sign(a, b)
b
with account a
Parameters
a
:
Account
Returns
Promise<Signature>
transfer(f, a, t)
Parameters
to
:
Account | string
a
:
bigint
Returns
Transfer Result