diff --git a/ARCs/arc-0032.md b/ARCs/arc-0032.md index c260b97e1..ef0ec2ce8 100644 --- a/ARCs/arc-0032.md +++ b/ARCs/arc-0032.md @@ -4,7 +4,8 @@ title: Application Specification description: A specification for fully describing an Application, useful for Application clients. author: Benjamin Guidarelli (@barnjamin) discussions-to: https://github.com/algorandfoundation/ARCs/issues/150 -status: Draft +status: Last Call +last-call-deadline: 2024-11-30 type: Standards Track category: ARC created: 2022-12-01 @@ -17,7 +18,7 @@ An Application is partially defined by it's [methods](./arc-0004.md) but further ## Motivation -As more complex Applications are created and deployed, some consistent way to specify the details of the application and how to interact with it becomes more important. A specification to allow a consistent and complete definition of an application will help developers attempting to integrate an application they've never worked with before. +As more complex Applications are created and deployed, some consistent way to specify the details of the application and how to interact with it becomes more important. A specification to allow a consistent and complete definition of an application will help developers attempting to integrate an application they've never worked with before. ## Specification The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 822.. @@ -33,24 +34,24 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL ### Application Specification -The Application Specification is composed of a number of elements that serve to fully describe the Application. +The Application Specification is composed of a number of elements that serve to fully describe the Application. ```ts type AppSpec = { // embedded contract fields, see ARC-0004 for more contract: ARC4Contract; - + // the original teal source, containing annotations, base64 encoded source?: SourceSpec; // the schema this application requires/provides - schema?: SchemaSpec; + schema?: SchemaSpec; // supplemental information for calling bare methods bare_call_config?: CallConfigSpec; // supplemental information for calling ARC-0004 ABI methods hints: HintsSpec; // storage requirements - state?: StateSpec; + state?: StateSpec; } ``` @@ -72,7 +73,7 @@ type SourceSpec = { The schema of an application is critical to know prior to creation since it is immutable after create. It also helps clients of the application understand the data that is available to be queried from off chain. Individual fields can be referenced from the [default argument](#default-argument) to provide input data to a given ABI method. -While some fields are possible to know ahead of time, others may be keyed dynamically. In both cases the data type being stored MUST be known and declared ahead of time. +While some fields are possible to know ahead of time, others may be keyed dynamically. In both cases the data type being stored MUST be known and declared ahead of time. ```ts // The complete schema for this application @@ -126,7 +127,7 @@ type CallConfigSpec = { opt_in?: CallConfig close_out?: CallConfig update_application?: CallConfig - delete_application?: CallConfig + delete_application?: CallConfig } ``` @@ -137,7 +138,7 @@ Contains supplemental information about [ARC-0004](./arc-0004.md) ABI methods, e NOTE: Ideally this information would be part of the [ARC-0004](./arc-0004.md) ABI specification. ```ts -type HintSpec = { +type HintSpec = { // indicates the method has no side-effects and can be call via dry-run/simulate read_only?: bool; // describes the structure of arguments, key represents the argument name @@ -161,9 +162,9 @@ used by existing reference implementations such as Beaker #### Struct Specification -Each defined type is specified as an array of `StructElement`s. +Each defined type is specified as an array of `StructElement`s. -The ABI encoding is exactly as if an ABI Tuple type defined the same element types in the same order. +The ABI encoding is exactly as if an ABI Tuple type defined the same element types in the same order. It is important to encode the struct elements as an array since it preserves the order of fields which is critical to encoding/decoding the data properly. ```ts @@ -228,7 +229,7 @@ Two scenarios where providing default arguments can be useful: type ABIMethod = {}; type DefaultArgumentSpec = { - // Where to look for the default arg value + // Where to look for the default arg value source: "constant" | "global-state" | "local-state" | "abi-method" // extra data to include when looking up the value data: string | bigint | number | ABIMethod diff --git a/ARCs/arc-0056.md b/ARCs/arc-0056.md index 05ae9edfb..a58e8d8ae 100644 --- a/ARCs/arc-0056.md +++ b/ARCs/arc-0056.md @@ -4,7 +4,8 @@ title: Extended App Description description: Adds information to the ABI JSON description author: Joe Polny (@joe-p), Rob Moore (@robdmoore) discussions-to: https://github.com/algorandfoundation/ARCs/issues/258 -status: Draft +status: Last Call +last-call-deadline: 2024-11-30 type: Standards Track category: ARC created: 2023-11-14