PageSourceSearch

https://archetype-lang.org/assets/js/935f2afb.f96d2fd4.js

js archetype-lang.org collected 2026-10-02 06:56:59 UTC 22,500 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkarchetype_docs=self.webpackChunkarchetype_docs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"1.3.2","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"link","label":"Introduction","href":"/docs/introduction","docId":"introduction"},{"type":"link","label":"Installation","href":"/docs/installation","docId":"installation"},{"type":"category","label":"Language Basics","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Comments","href":"/docs/language-basics/comments","docId":"language-basics/comments"},{"type":"link","label":"Types","href":"/docs/language-basics/types","docId":"language-basics/types"},{"type":"link","label":"Composite types","href":"/docs/language-basics/composite","docId":"language-basics/composite"},{"type":"link","label":"Basic containers","href":"/docs/language-basics/container","docId":"language-basics/container"},{"type":"link","label":"Cryptography","href":"/docs/language-basics/crypto","docId":"language-basics/crypto"}]},{"type":"link","label":"Asset","href":"/docs/asset","docId":"asset"},{"type":"link","label":"State Machine","href":"/docs/statemachine","docId":"statemachine"},{"type":"category","label":"Reference","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Declarations","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Identifier","href":"/docs/reference/declarations/identifier","docId":"reference/declarations/identifier"},{"type":"link","label":"Archetype contract","href":"/docs/reference/declarations/contract","docId":"reference/declarations/contract"},{"type":"link","label":"Storage","href":"/docs/reference/declarations/storage","docId":"reference/declarations/storage"},{"type":"link","label":"Composite types","href":"/docs/reference/declarations/compositetypes","docId":"reference/declarations/compositetypes"},{"type":"link","label":"Inlined","href":"/docs/reference/declarations/inlined","docId":"reference/declarations/inlined"},{"type":"link","label":"Entrypoint","href":"/docs/reference/declarations/entrypoint","docId":"reference/declarations/entrypoint"},{"type":"link","label":"Function","href":"/docs/reference/declarations/function","docId":"reference/declarations/function"},{"type":"link","label":"View","href":"/docs/reference/declarations/view","docId":"reference/declarations/view"},{"type":"link","label":"External contract","href":"/docs/reference/declarations/external-contract","docId":"reference/declarations/external-contract"}]},{"type":"link","label":"Types","href":"/docs/reference/types","docId":"reference/types"},{"type":"category","label":"Instructions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Sequence","href":"/docs/reference/instructions/sequence","docId":"reference/instructions/sequence"},{"type":"link","label":"Local variable","href":"/docs/reference/instructions/localvariable","docId":"reference/instructions/localvariable"},{"type":"link","label":"Assignment","href":"/docs/reference/instructions/assignment","docId":"reference/instructions/assignment"},{"type":"link","label":"Control","href":"/docs/reference/instructions/control","docId":"reference/instructions/control"},{"type":"link","label":"Divergent","href":"/docs/reference/instructions/divergent","docId":"reference/instructions/divergent"},{"type":"link","label":"Basic containers","href":"/docs/reference/instructions/containers","docId":"reference/instructions/containers"},{"type":"link","label":"Asset","href":"/docs/reference/instructions/asset","docId":"reference/instructions/asset"},{"type":"link","label":"Operation","href":"/docs/reference/instructions/operation","docId":"reference/instructions/operation"}]},{"type":"category","label":"Expressions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Constants","href":"/docs/reference/expressions/constants","docId":"reference/expressions/constants"},{"type":"link","label":"Variables","href":"/docs/reference/expressions/variables","docId":"reference/expressions/variables"},{"type":"category","label":"Operators","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Access","href":"/docs/reference/expressions/operators/access","docId":"reference/expressions/operators/access"},{"type":"link","label":"Copy","href":"/docs/reference/expressions/operators/copy","docId":"reference/expressions/operators/copy"},{"type":"link","label":"Arithmetic","href":"/docs/reference/expressions/operators/arithmetic","docId":"reference/expressions/operators/arithmetic"}]},{"type":"link","label":"Builtins","href":"/docs/reference/expressions/builtins","docId":"reference/expressions/builtins"},{"type":"link","label":"Control","href":"/docs/reference/expressions/control
1s","docId":"reference/expressions/controls"},{"type":"link","label":"Declaration","href":"/docs/reference/expressions/declaration","docId":"reference/expressions/declaration"},{"type":"link","label":"Asset","href":"/docs/reference/expressions/asset","docId":"reference/expressions/asset"}]}],"href":"/docs/reference/"}],"templates":[{"type":"link","label":"Overview","href":"/docs/templates/overview","docId":"templates/overview"},{"type":"link","label":"FA 1.2","href":"/docs/templates/fa12","docId":"templates/fa12"},{"type":"link","label":"FA 2","href":"/docs/templates/fa2","docId":"templates/fa2"},{"type":"link","label":"A 2","href":"/docs/templates/a2","docId":"templates/a2"},{"type":"link","label":"Metadata","href":"/docs/templates/metadata","docId":"templates/metadata"},{"type":"link","label":"Permits","href":"/docs/templates/permits","docId":"templates/permits"},{"type":"link","label":"Token medatada","href":"/docs/templates/tokenmetadata","docId":"templates/tokenmetadata"},{"type":"link","label":"MultiSig","href":"/docs/templates/multisig","docId":"templates/multisig"},{"type":"link","label":"Pausable","href":"/docs/templates/pausable","docId":"templates/pausable"},{"type":"link","label":"Ownership","href":"/docs/templates/ownership","docId":"templates/ownership"}],"tests":[{"type":"link","label":"Introduction","href":"/docs/tests/introduction","docId":"tests/introduction"},{"type":"link","label":"Framework","href":"/docs/tests/framework","docId":"tests/framework"},{"type":"link","label":"Writing Tests","href":"/docs/tests/writingtests","docId":"tests/writingtests"},{"type":"link","label":"Binding","href":"/docs/tests/binding","docId":"tests/binding"},{"type":"category","label":"APIs","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"TS Types","href":"/docs/tests/apis/types","docId":"tests/apis/types"},{"type":"link","label":"Experiment","href":"/docs/tests/apis/experiment","docId":"tests/apis/experiment"}],"href":"/docs/tests/apis/"},{"type":"link","label":"Debugging","href":"/docs/tests/debug","docId":"tests/debug"}],"dapps":[{"type":"link","label":"Introduction","href":"/docs/dapps/introduction","docId":"dapps/introduction"},{"type":"category","label":"User Interface","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Settings.tsx","href":"/docs/dapps/project/settings","docId":"dapps/project/settings"},{"type":"link","label":"Taquito.tsx","href":"/docs/dapps/project/taquito","docId":"dapps/project/taquito"},{"type":"link","label":"Beacon.tsx","href":"/docs/dapps/project/beacon","docId":"dapps/project/beacon"},{"type":"link","label":"Contract.tsx","href":"/docs/dapps/project/contract","docId":"dapps/project/contract"},{"type":"link","label":"App.tsx","href":"/docs/dapps/project/app","docId":"dapps/project/app"},{"type":"link","label":"Packages API","href":"/docs/dapps/project/packagesapi/","docId":"dapps/project/packagesapi/index"}],"href":"/docs/dapps/project/"},{"type":"category","label":"DApp Example","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Smart Contract","href":"/docs/dapps/example/contract","docId":"dapps/example/contract"},{"type":"link","label":"Contract Integration","href":"/docs/dapps/example/interaction","docId":"dapps/example/interaction"},{"type":"link","label":"APIs","href":"/docs/dapps/example/apis","docId":"dapps/example/apis"}],"href":"/docs/dapps/example/"}],"cli":[{"type":"link","label":"Introduction","href":"/docs/cli/introduction","docId":"cli/introduction"},{"type":"link","label":"Account","href":"/docs/cli/account","docId":"cli/account"},{"type":"link","label":"Network","href":"/docs/cli/network","docId":"cli/network"},{"type":"link","label":"Contract","href":"/docs/cli/contract","docId":"cli/contract"}],"empty":[]},"docs":{"asset":{"id":"asset","title":"Asset","description":"Archetype assets provide a high-level abstraction to handle collection of structured data.","sidebar":"docs"},"cli/account":{"id":"cli/account","title":"Account","description":"Interacting with a contract requires a Tezos account to sign the transactions. An account is identified by an account address, usually starting with tz1, like for example tz1h4CiqWxNe4UxSpkwXy617RM6DaK6NU76P.","sidebar":"cli"}
1,"cli/contract":{"id":"cli/contract","title":"Contract","description":"Global Constants","sidebar":"cli"},"cli/introduction":{"id":"cli/introduction","title":"Introduction","description":"completium-cli is a command line interface that provides an account and endpoint management system, to interact (orginate, call, ...) with Archetype and Michelson smart contracts on the Tezos blockchain.","sidebar":"cli"},"cli/network":{"id":"cli/network","title":"Network","description":"The Tezos blockchain provides serveral networks:","sidebar":"cli"},"dapps/example/apis":{"id":"dapps/example/apis","title":"APIs","description":"Store","sidebar":"dapps"},"dapps/example/contract":{"id":"dapps/example/contract","title":"Poll Contract","description":"The poll contract stores polls\' IPFS hash and users\' answers. It guarantees that an account can only answer once to a poll. It also computes the number of times an answer has been selected.","sidebar":"dapps"},"dapps/example/index":{"id":"dapps/example/index","title":"Poll DApp","description":"This section presents the Poll DApp example: users can create and answer polls. An account can only answer a poll once.","sidebar":"dapps"},"dapps/example/interaction":{"id":"dapps/example/interaction","title":"Contract Integration","description":"This section presents in detail the interaction between the DApp\'s UI and the poll contract:","sidebar":"dapps"},"dapps/introduction":{"id":"dapps/introduction","title":"Introduction","description":"This section presents how to build a DApp (Decentralized Application) with Archetype and Completium CLI.","sidebar":"dapps"},"dapps/project/app":{"id":"dapps/project/app","title":"App.tsx","description":"The App.tsx file contains the root component of the application App (it comes with the default react template project).","sidebar":"dapps"},"dapps/project/beacon":{"id":"dapps/project/beacon","title":"Beacon.tsx","description":"The Beacon context provides the following services:","sidebar":"dapps"},"dapps/project/contract":{"id":"dapps/project/contract","title":"Contract.tsx","description":"This Contract context template provides the contract binding to components.","sidebar":"dapps"},"dapps/project/index":{"id":"dapps/project/index","title":"DApp UI","description":"This section presents how to create and setup a DApp\'s User Interface (UI) project using React and Beacon\'s DApp/wallet interaction.","sidebar":"dapps"},"dapps/project/packagesapi/index":{"id":"dapps/project/packagesapi/index","title":"Packages API","description":"The Dapp relies on 3 packages:","sidebar":"dapps"},"dapps/project/settings":{"id":"dapps/project/settings","title":"Settings.tsx","description":"The Settings context provides components (and other contexts) with access to the main blockchain settings required by Taquito and Beacon:","sidebar":"dapps"},"dapps/project/taquito":{"id":"dapps/project/taquito","title":"Taquito.tsx","description":"The Taquito context provides Taquito\'s Tezos Toolkit to all components. It is created once at context creation.","sidebar":"dapps"},"installation":{"id":"installation","title":"Installation","description":"Completium CLI","sidebar":"docs"},"introduction":{"id":"introduction","title":"Introduction","description":"Archetype is an elegant generic-purpose language to develop Smart Contracts on the Tezos blockchain.","sidebar":"docs"},"language-basics/comments":{"id":"language-basics/comments","title":"Comments","description":"Archetype single-line comments start with two forward slashes:","sidebar":"docs"},"language-basics/composite":{"id":"language-basics/composite","title":"Composite types","description":"Tuple","sidebar":"docs"},"language-basics/container":{"id":"language-basics/container","title":"Basic containers","description":"Set","sidebar":"docs"},"language-basics/crypto":{"id":"language-basics/crypto","title":"Cryptography","description":"Hash","sidebar":"docs"},"language-basics/types":{"id":"language-basics/types","title":"Types","description":"Basic types","sidebar":"docs"},"reference/declarations/compositetypes":{"id":"reference/declarations/compositetypes","title":"Composite types","description":"Archetype provides user-defined composite types on top of basic types.","sidebar":"docs"},"reference/declarations/contract":{"id":"reference/declarations/contract","t
1itle":"Archetype contract","description":"An archetype contract starts with the archetype keyword followed by a contract identifier.","sidebar":"docs"},"reference/declarations/entrypoint":{"id":"reference/declarations/entrypoint","title":"Entrypoint","description":"The contract code is structured as a set of entrypoints. The execution of an entrypoint may change the contract storage and/or generate blockchain operations (a transfer of tez to a contract or account, or a call to another contract\'s entrypoint).","sidebar":"docs"},"reference/declarations/external-contract":{"id":"reference/declarations/external-contract","title":"External contract","description":"It is possible to import external Archetype contracts (.arl extension), or contracts compiled in Michelson (.tz extension).","sidebar":"docs"},"reference/declarations/function":{"id":"reference/declarations/function","title":"Function","description":"Entrypoints\' effect may call functions. A function returns a value, may fail, and can change the contract storage.","sidebar":"docs"},"reference/declarations/identifier":{"id":"reference/declarations/identifier","title":"Identifier","description":"The identifier of a contract element (parameter, variable, entrypoint, ...) is a string that starts with an alphabetic character (lower or upper case) followed by a string of alphanumeric characters (lower or upper case) or underscores. The maximum size of an identifier is 254. That is to say that an identifier verifies the following regular expression:","sidebar":"docs"},"reference/declarations/inlined":{"id":"reference/declarations/inlined","title":"Inlined","description":"Constant","sidebar":"docs"},"reference/declarations/storage":{"id":"reference/declarations/storage","title":"Storage","description":"Contract parameter","sidebar":"docs"},"reference/declarations/view":{"id":"reference/declarations/view","title":"View","description":"A view is a function that can be called by other contracts.","sidebar":"docs"},"reference/expressions/asset":{"id":"reference/expressions/asset","title":"Asset","description":"A[k : asset_key]","sidebar":"docs"},"reference/expressions/builtins":{"id":"reference/expressions/builtins","title":"Builtins","description":"A B","sidebar":"docs"},"reference/expressions/constants":{"id":"reference/expressions/constants","title":"Constants","description":"balance","sidebar":"docs"},"reference/expressions/controls":{"id":"reference/expressions/controls","title":"Control","description":"In addition of being instructions, if and match with also come as conditional expressions.","sidebar":"docs"},"reference/expressions/declaration":{"id":"reference/expressions/declaration","title":"Declaration","description":"It is possible to declare a constant in an expression with the let c = v in e declaration expression: constant c is replaced by the evaluation of expression v in expression e.","sidebar":"docs"},"reference/expressions/operators/access":{"id":"reference/expressions/operators/access","title":"Access","description":"a[b]","sidebar":"docs"},"reference/expressions/operators/arithmetic":{"id":"reference/expressions/operators/arithmetic","title":"Arithmetic","description":"a + b","sidebar":"docs"},"reference/expressions/operators/copy":{"id":"reference/expressions/operators/copy","title":"Copy","description":"{ with }","sidebar":"docs"},"reference/expressions/variables":{"id":"reference/expressions/variables","title":"Variables","description":"metadata","sidebar":"docs"},"reference/index":{"id":"reference/index","title":"Reference","description":"This is the Archetype language reference.","sidebar":"docs"},"reference/instructions/asset":{"id":"reference/instructions/asset","title":"Asset","description":"A.add(a)","sidebar":"docs"},"reference/instructions/assignment":{"id":"reference/instructions/assignment","title":"Assignment","description":"a := b","sidebar":"docs"},"reference/instructions/containers":{"id":"reference/instructions/containers","title":"Basic containers","description":"Set","sidebar":"docs"},"reference/instructions/control":{"id":"reference/instructions/control","title":"Control","description":"if","sidebar":"docs"},"reference/instructions/divergent":{"id":"reference/instructions/divergent","title":"Divergent","description":"A divergent instruction is an instruction that fails. The effect of a failing instruction is to cancel all modifications (storage, operations) executed by the entrypoint so far. Hence a failing operation does not change anything on the contract state.","sidebar":"docs"},"reference/instructions/localvariable":{"id":"reference/instructions/localvariable","title":"Local variable","description":"Instructions presented below declare a local variable in entrypoints\' effect section.","sidebar":"docs"},"reference/instructions/operation":{"id":"reference/instructions/operation","title":"Operation","description":"transfer","sidebar":"docs"},"reference/instructions/sequence":{"id":"reference/instructions/sequence","title":"Sequence","description":"The effect of an entrypoint is composed of zero, one or several instructions presented below.","sidebar":"docs"},"reference/types":{"id":"reference/types","title":"Types","description":"A B","
1sidebar":"docs"},"statemachine":{"id":"statemachine","title":"State Machine","description":"A state machine defines a global state and transitions from one state to another.","sidebar":"docs"},"templates/a2":{"id":"templates/a2","title":"A 2","description":"Implements TZIP-15 norm for whitelisting mechanism.","sidebar":"templates"},"templates/fa12":{"id":"templates/fa12","title":"FA 1.2","description":"Implements TZIP-7 norm for fungible token.","sidebar":"templates"},"templates/fa2":{"id":"templates/fa2","title":"FA 2","description":"Implements TZIP-12 norm for token, including non fungible.","sidebar":"templates"},"templates/metadata":{"id":"templates/metadata","title":"Metadata","description":"Implements TZIP-16 norm for contract\'s metadata.","sidebar":"templates"},"templates/multisig":{"id":"templates/multisig","title":"MultiSig","description":"This generic-purpose multi-signature contract is used to execute operations (transfer, contract entrypoints) that have been approved by a required number of managers.","sidebar":"templates"},"templates/overview":{"id":"templates/overview","title":"Templates","description":"TZIPs","sidebar":"templates"},"templates/ownership":{"id":"templates/ownership","title":"Ownership","description":"This template is used in many contracts whenever there needs a special address to administrate the contract. The ownership of the contract may be transferred.","sidebar":"templates"},"templates/pausable":{"id":"templates/pausable","title":"Pausable","description":"This template is used in many contracts whenever there needs to be able to pause entrypoints. It requires the Ownership template.","sidebar":"templates"},"templates/permits":{"id":"templates/permits","title":"Permits","description":"Implements TZIP-17 norm for fee-less operations.","sidebar":"templates"},"templates/tokenmetadata":{"id":"templates/tokenmetadata","title":"Token medatada","description":"Implements TZIP-21 norm for token metadata.","sidebar":"templates"},"tests/apis/experiment":{"id":"tests/apis/experiment","title":"Experiment","description":"This section presents types and functions exported by the @completium/experiment-ts package and used by contracts\' bindings interface (storage, entry points, views).","sidebar":"tests"},"tests/apis/index":{"id":"tests/apis/index","title":"APIs","description":"@completium/archetype-ts-types","sidebar":"tests"},"tests/apis/types":{"id":"tests/apis/types","title":"TS Types","description":"This section presents types and functions exported by the @completium/archetype-ts-types package and used by contracts\' bindings interface (storage, entry points, views).","sidebar":"tests"},"tests/binding":{"id":"tests/binding","title":"Binding","description":"This section presents the API of the automatically generated contract binding.","sidebar":"tests"},"tests/debug":{"id":"tests/debug","title":"Debugging","description":"The Archetype extension for VSCode provides  debugging capabilities for developers working with Archetype. This tool streamlines the debugging process, making it easier to identify and resolve issues in an Archetype contract. It often becomes indispensable for swift issue identification and resolution.","sidebar":"tests"},"tests/framework":{"id":"tests/framework","title":"Framework","description":"This presents the technical framework for testing a smart contract (written in Archetype or Michelson): tests are written in Typescript and executed with Node.js.","sidebar":"tests"},"tests/introduction":{"id":"tests/introduction","title":"Introduction","description":"This section presents the test framework for Archetype contracts.","sidebar":"tests"},"tests/writingtests":{"id":"tests/writingtests","title":"Writing Tests","description":"This section presents the main technical elements to setup, write and run tests.","sidebar":"tests"}}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.