Skip to content

Commit

Permalink
ProgramSourceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Oct 10, 2024
1 parent aa79e86 commit 35a19b3
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ARCs/arc-0056.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ interface Contract {
/** Information about the TEAL programs */
sourceInfo?: {
/** Approval program information */
approval: SourceInfo[];
approval: ProgramSourceInfo;
/** Clear program information */
clear: SourceInfo[];
clear: ProgramSourceInfo;
};
/** The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23 */
source?: {
Expand Down Expand Up @@ -178,8 +178,8 @@ interface Method {
* - global: The data key signifies the global state key to read the value from
* - local: The data key signifies the local state key to read the value from (for the sender)
* - literal: the value is a literal and should be passed directly as the argument
*/
source: 'box' | 'global' | 'local' | 'literal';
*/
source: "box" | "global" | "local" | "literal";
};
}>;
/** Information about the method's return value */
Expand Down Expand Up @@ -322,9 +322,19 @@ interface StorageMap {

### SourceInfo Interface

This interface gives clients more information about the contract's source code.
These interfaces give clients more information about the contract's source code.

```ts
interface ProgramSourceInfo {
/** The source information for the program */
sourceInfo: SourceInfo[];
/** How the program counter offset is calculated
* - none: The pc values in sourceInfo are not offset
* - cblocks: The pc values in sourceInfo are offset by PC of the last cblock at the top of the program
*/
pcOffsetMethod: "none" | "cblocks";
}

interface SourceInfo {
/** The line of pre-compiled TEAL */
teal?: number;
Expand Down

0 comments on commit 35a19b3

Please sign in to comment.