Skip to content

Commit 67dccdf

Browse files
authored
Merge pull request #2631 from friedger/fix/docs_map
Update documentation of define-map
2 parents bf4a577 + a29b385 commit 67dccdf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/vm/docs/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,15 +1235,13 @@ be invoked by other contracts via `contract-call?`.",
12351235
};
12361236

12371237
const DEFINE_MAP_API: DefineAPI = DefineAPI {
1238-
input_type: "MapName, KeyTupleDefinition, MapTupleDefinition",
1238+
input_type: "MapName, TypeDefinition, TypeDefinition",
12391239
output_type: "Not Applicable",
1240-
signature: "(define-map map-name ((key-name-0 key-type-0) ...) ((val-name-0 val-type-0) ...))",
1240+
signature: "(define-map map-name key-type value-type)",
12411241
description: "`define-map` is used to define a new datamap for use in a smart contract. Such
12421242
maps are only modifiable by the current smart contract.
12431243
1244-
Maps are defined with a key tuple type and value tuple type. These are defined using a list
1245-
of name and type pairs, e.g., a key type might be `((id int))`, which is a tuple with a single \"id\"
1246-
field of type `int`.
1244+
Maps are defined with a key type and value type, often these types are tuple types.
12471245
12481246
Like other kinds of definition statements, `define-map` may only be used at the top level of a smart contract
12491247
definition (i.e., you cannot put a define statement in the middle of a function body).",

0 commit comments

Comments
 (0)