-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_msg.json
More file actions
277 lines (277 loc) · 12.1 KB
/
init_msg.json
File metadata and controls
277 lines (277 loc) · 12.1 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InitMsg",
"description": "The struct used to instantiate the contract. Utilized in the core [contract file](crate::contract::instantiate).",
"type": "object",
"required": [
"asset_definitions",
"base_contract_name",
"bind_base_name"
],
"properties": {
"asset_definitions": {
"description": "All the initial [AssetDefinitionV3s](super::types::asset_definition::AssetDefinitionV3) for the contract. This can be left empty and new definitions can be added later using the [Add Asset Definition](crate::execute::add_asset_definition) functionality.",
"type": "array",
"items": {
"$ref": "#/definitions/AssetDefinitionInputV3"
}
},
"base_contract_name": {
"description": "The root name from which all asset names branch. All sub-names specified in the [AssetDefinitionV3s](super::types::asset_definition::AssetDefinitionV3) will use this value as their parent name.",
"type": "string"
},
"bind_base_name": {
"description": "If `true`, the contract will automatically try to bind its [base_contract_name](self::InitMsg::base_contract_name) during the instantiation process to itself. No action will be taken if the value is `false`, but the base name will still be recorded in the contract's [state](super::state::StateV2) and be used for child names for [AssetDefinitions](super::types::asset_definition::AssetDefinitionV3).",
"type": "boolean"
},
"is_test": {
"description": "A boolean value allowing for less restrictions to be placed on certain functionalities across the contract's execution processes. Notably, this disables a check during the onboarding process to determine if onboarded scopes include underlying record values. This should never be set to true in a mainnet environment.",
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false,
"definitions": {
"AssetDefinitionInputV3": {
"description": "Allows the user to optionally specify the enabled flag on an asset definition, versus forcing it to be added manually on every request, when it will likely always be specified as `true`.",
"type": "object",
"required": [
"asset_type",
"verifiers"
],
"properties": {
"asset_type": {
"description": "The name of the asset associated with the definition. This value must be unique across all instances persisted in contract storage, or requests to add will be rejected.",
"type": "string"
},
"bind_name": {
"description": "Whether or not to bind a Provenance Blockchain Name Module name to this contract when this struct is used to add a new asset type to the contract. If this value is omitted OR set to true in a request that adds an asset definition, the name derived by combining the [base_contract_name](crate::core::state::StateV2::base_contract_name) and the `asset_type` will be bound to the contract. For example, if the base name is \"pb\" and the asset type is \"myasset,\" the resulting bound name would be \"myasset.pb\".",
"type": [
"boolean",
"null"
]
},
"display_name": {
"description": "A pretty human-readable name for this asset type (vs a typically snake_case asset_type name)",
"type": [
"string",
"null"
]
},
"enabled": {
"description": "Indicates whether or not the asset definition is enabled for use in the contract. If disabled, requests to onboard assets of this type will be rejected.",
"type": [
"boolean",
"null"
]
},
"verifiers": {
"description": "Individual verifier definitions. There can be many verifiers for a single asset type. Each value must have a unique `address` property or requests to add will be rejected.",
"type": "array",
"items": {
"$ref": "#/definitions/VerifierDetailV2"
}
}
},
"additionalProperties": false
},
"EntityDetail": {
"description": "Various fields describing an entity, which could be an organization, account, etc.",
"type": "object",
"properties": {
"description": {
"description": "A short description of the entity's purpose.",
"type": [
"string",
"null"
]
},
"home_url": {
"description": "A web link that can send observers to the organization that the entity belongs to.",
"type": [
"string",
"null"
]
},
"name": {
"description": "A short name describing the entity.",
"type": [
"string",
"null"
]
},
"source_url": {
"description": "A web link that can send observers to the source code of the entity for increased transparency.",
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"FeeDestinationV2": {
"description": "Defines an external account designated as a recipient of funds during the verification process.",
"type": "object",
"required": [
"address",
"fee_amount"
],
"properties": {
"address": {
"description": "The Provenance Blockchain bech32 address belonging to the account.",
"type": "string"
},
"entity_detail": {
"description": "An optional set of fields that define the fee destination, including its name and home URL location.",
"anyOf": [
{
"$ref": "#/definitions/EntityDetail"
},
{
"type": "null"
}
]
},
"fee_amount": {
"description": "The amount to be distributed to this account from the designated total [onboarding_cost](super::verifier_detail::VerifierDetailV2::onboarding_cost) of the containing [VerifierDetailV2](super::verifier_detail::VerifierDetailV2). This number should always sum with the other fee destinations to be less than or at most equal to the total onboarding cost.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
}
},
"additionalProperties": false
},
"OnboardingCost": {
"description": "Defines costs used to onboard an asset to the contract for classification.",
"type": "object",
"required": [
"cost",
"fee_destinations"
],
"properties": {
"cost": {
"description": "The amount of coin to be paid when an asset is sent to the [onboard_asset execute function](crate::execute::onboard_asset::onboard_asset).",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
},
"fee_destinations": {
"description": "Any specific fee destinations that should be sent to sources other than the selected [verifier](super::verifier_detail::VerifierDetailV2).",
"type": "array",
"items": {
"$ref": "#/definitions/FeeDestinationV2"
}
}
},
"additionalProperties": false
},
"SubsequentClassificationDetail": {
"description": "The root subsequent classifications node for a [VerifierDetailV2](super::verifier_detail::VerifierDetailV2). Contains the default subsequent costs for onboarding an asset with this verifier after already classifying it as a different type with the same verifier.",
"type": "object",
"properties": {
"applicable_asset_types": {
"description": "Specifies the asset types that an asset can be to have the subsequent classification cost apply to them. If an asset has been classified as any of the types in this list, the cost will be used. If the list is supplied as a None variant, any subsequent classifications will use the cost. This value will be rejected if it is supplied as an empty vector.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"cost": {
"description": "The onboarding cost to use when classifying an asset using the associated verifier after having already classified it as a different type with the same verifier. If not set, the default verifier costs are used.",
"anyOf": [
{
"$ref": "#/definitions/OnboardingCost"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
},
"VerifierDetailV2": {
"description": "Defines the fees and addresses for a single verifier account for an [AssetDefinitionV3](super::asset_definition::AssetDefinitionV3).",
"type": "object",
"required": [
"address",
"fee_destinations",
"onboarding_cost",
"onboarding_denom"
],
"properties": {
"address": {
"description": "The Provenance Blockchain bech32 address of the verifier account.",
"type": "string"
},
"entity_detail": {
"description": "An optional set of fields that define the verifier, including its name and home URL location.",
"anyOf": [
{
"$ref": "#/definitions/EntityDetail"
},
{
"type": "null"
}
]
},
"fee_destinations": {
"description": "Each account that should receive fees when onboarding a new scope to the contract. All of these destinations' individual [fee_amount](super::fee_destination::FeeDestinationV2::fee_amount) properties should sum to an amount less than or equal to the [onboarding_cost](super::verifier_detail::VerifierDetailV2::onboarding_cost). Amounts not precisely equal in sum will cause this verifier detail to be considered invalid and rejected in requests that include it.",
"type": "array",
"items": {
"$ref": "#/definitions/FeeDestinationV2"
}
},
"onboarding_cost": {
"description": "The total amount charged to use the onboarding process of this verifier.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
},
"onboarding_denom": {
"description": "The coin denomination used for this onboarding process.",
"type": "string"
},
"retry_cost": {
"description": "Defines the cost to use in place of the root [onboarding_cost](self::VerifierDetailV2::onboarding_cost) and [fee_destinations](self::VerifierDetailV2::fee_destinations) when retrying classification for a failed verification. If not present, the original values used for the first verification will be used.",
"anyOf": [
{
"$ref": "#/definitions/OnboardingCost"
},
{
"type": "null"
}
]
},
"subsequent_classification_detail": {
"description": "An optional set of fields that define behaviors when classification is being run for an asset that is already classified as a different type.",
"anyOf": [
{
"$ref": "#/definitions/SubsequentClassificationDetail"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
}