Skip to content

Commit 35a19b3

Browse files
committed
ProgramSourceInfo
1 parent aa79e86 commit 35a19b3

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

ARCs/arc-0056.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ interface Contract {
9595
/** Information about the TEAL programs */
9696
sourceInfo?: {
9797
/** Approval program information */
98-
approval: SourceInfo[];
98+
approval: ProgramSourceInfo;
9999
/** Clear program information */
100-
clear: SourceInfo[];
100+
clear: ProgramSourceInfo;
101101
};
102102
/** The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23 */
103103
source?: {
@@ -178,8 +178,8 @@ interface Method {
178178
* - global: The data key signifies the global state key to read the value from
179179
* - local: The data key signifies the local state key to read the value from (for the sender)
180180
* - literal: the value is a literal and should be passed directly as the argument
181-
*/
182-
source: 'box' | 'global' | 'local' | 'literal';
181+
*/
182+
source: "box" | "global" | "local" | "literal";
183183
};
184184
}>;
185185
/** Information about the method's return value */
@@ -322,9 +322,19 @@ interface StorageMap {
322322

323323
### SourceInfo Interface
324324

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

327327
```ts
328+
interface ProgramSourceInfo {
329+
/** The source information for the program */
330+
sourceInfo: SourceInfo[];
331+
/** How the program counter offset is calculated
332+
* - none: The pc values in sourceInfo are not offset
333+
* - cblocks: The pc values in sourceInfo are offset by PC of the last cblock at the top of the program
334+
*/
335+
pcOffsetMethod: "none" | "cblocks";
336+
}
337+
328338
interface SourceInfo {
329339
/** The line of pre-compiled TEAL */
330340
teal?: number;

0 commit comments

Comments
 (0)