1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! Various constants.
use Energy;
// Energy constants from Cost.hs in concordium-base.
/// Cost of querying the account balance from within a smart contract instance.
pub const CONTRACT_INSTANCE_QUERY_ACCOUNT_BALANCE_COST: Energy = Energy ;
/// Cost of querying the contract balance from within a smart contract instance.
pub const CONTRACT_INSTANCE_QUERY_CONTRACT_BALANCE_COST: Energy = Energy ;
/// Cost of querying the current exchange rates from within a smart contract
/// instance.
pub const CONTRACT_INSTANCE_QUERY_EXCHANGE_RATE_COST: Energy = Energy ;
/// Base cost querying account keys. In addition to this cost there is a cost
/// based on the number of returned keys.
pub const CONTRACT_INSTANCE_QUERY_ACCOUNT_KEYS_BASE_COST: Energy = Energy ;
/// Cost of returning the account keys, based on the number of keys.
/// Each key is 32 bytes, and there is a bit of administrative overhead.
pub
/// The cost of querying the contract module reference from a smart contract
/// instance.
pub const CONTRACT_INSTANCE_QUERY_CONTRACT_MODULE_REFERENCE_COST: Energy = Energy ;
/// The cost of querying the contract module name from a smart contract
/// instance. While the length of a smart contract name is variable, it is at
/// most 100 characters, so there is no real benefit to varying the cost based
/// on the length.
pub const CONTRACT_INSTANCE_QUERY_CONTRACT_NAME_COST: Energy = Energy ;
/// Cost **in energy** of verification of an ed25519 signature.
/// This should match the cost of
/// [`verify_ed22519_cost`](concordium_smart_contract_engine::constants::verify_ed25519_cost)
/// except the latter is the cost in interpreter energy, and this on is in
/// [`Energy`].
pub
/// The base cost of initializing a contract instance to cover administrative
/// costs. Even if no code is run and no instance created.
pub const INITIALIZE_CONTRACT_INSTANCE_BASE_COST: Energy = Energy ;
/// Cost of creating an empty smart contract instance.
pub const INITIALIZE_CONTRACT_INSTANCE_CREATE_COST: Energy = Energy ;
/// The base cost of updating a contract instance to cover administrative
/// costs. Even if no code is run.
pub const UPDATE_CONTRACT_INSTANCE_BASE_COST: Energy = Energy ;
/// The name of the environment variable that holds the path to the contract
/// module file. To load the module, use the
/// [`module_load_output`](crate::module_load_output) function.
pub const CONTRACT_MODULE_OUTPUT_PATH_ENV_VAR: &str = "CARGO_CONCORDIUM_TEST_MODULE_OUTPUT_PATH";