Hierarchy

  • Compiler

Constructors

Properties

Methods

Constructors

  • Parameters

    • content: string
    • className: string
    • Optional options: CompilerOptions

    Returns Compiler

Properties

OP_PARAMS: {
    [type: string]: {
        args: number;
        fn: ((node: ts.Node) => void);
        name: string;
        type?: string;
    }[];
} = ...

Type declaration

  • [type: string]: {
        args: number;
        fn: ((node: ts.Node) => void);
        name: string;
        type?: string;
    }[]
abi: {
    desc: string;
    methods: ABIMethod[];
    name: string;
} = ...

Type declaration

  • desc: string
  • methods: ABIMethod[]
  • name: string
algodPort: number
algodServer: string
algodToken: string
andCount: number = 0
bareCallConfig: {
    ClearState?: {
        action: "CALL" | "CREATE";
        method: string;
    };
    CloseOut?: {
        action: "CALL" | "CREATE";
        method: string;
    };
    DeleteApplication?: {
        action: "CALL" | "CREATE";
        method: string;
    };
    NoOp?: {
        action: "CALL" | "CREATE" | "NEVER";
        method: string;
    };
    OptIn?: {
        action: "CALL" | "CREATE";
        method: string;
    };
    UpdateApplication?: {
        action: "CALL" | "CREATE";
        method: string;
    };
} = {}

Type declaration

  • Optional ClearState?: {
        action: "CALL" | "CREATE";
        method: string;
    }
    • action: "CALL" | "CREATE"
    • method: string
  • Optional CloseOut?: {
        action: "CALL" | "CREATE";
        method: string;
    }
    • action: "CALL" | "CREATE"
    • method: string
  • Optional DeleteApplication?: {
        action: "CALL" | "CREATE";
        method: string;
    }
    • action: "CALL" | "CREATE"
    • method: string
  • Optional NoOp?: {
        action: "CALL" | "CREATE" | "NEVER";
        method: string;
    }
    • action: "CALL" | "CREATE" | "NEVER"
    • method: string
  • Optional OptIn?: {
        action: "CALL" | "CREATE";
        method: string;
    }
    • action: "CALL" | "CREATE"
    • method: string
  • Optional UpdateApplication?: {
        action: "CALL" | "CREATE";
        method: string;
    }
    • action: "CALL" | "CREATE"
    • method: string
classNode: ClassDeclaration
clearStateCompiled: boolean = false
clearTeal: string[] = ...
comments: number[] = []
compilerSubroutines: {
    [name: string]: (() => string[]);
} = ...

Type declaration

  • [name: string]: (() => string[])
      • (): string[]
      • Returns string[]

compilingApproval: boolean = true
constants: {
    [name: string]: ts.Node;
}

Type declaration

  • [name: string]: ts.Node
content: string
contractClasses: string[] = []
currentSubroutine: Subroutine
customMethods: {
    [methodName: string]: ((node: ts.CallExpression) => void);
} = ...

Type declaration

  • [methodName: string]: ((node: ts.CallExpression) => void)
      • (node: ts.CallExpression): void
      • Parameters

        • node: ts.CallExpression

        Returns void

customTypes: {
    [name: string]: string;
} = {}

Type declaration

  • [name: string]: string
disableWarnings: boolean
filename: string
forCount: number = 0
frame: {
    [name: string]: {
        accessors?: (ts.Expression | string)[];
        framePointer?: string;
        index?: number;
        storageAccountFrame?: string;
        storageExpression?: ts.PropertyAccessExpression;
        storageKeyFrame?: string;
        type: string;
    };
} = {}

Type declaration

  • [name: string]: {
        accessors?: (ts.Expression | string)[];
        framePointer?: string;
        index?: number;
        storageAccountFrame?: string;
        storageExpression?: ts.PropertyAccessExpression;
        storageKeyFrame?: string;
        type: string;
    }
    • Optional accessors?: (ts.Expression | string)[]
    • Optional framePointer?: string
    • Optional index?: number
    • Optional storageAccountFrame?: string
    • Optional storageExpression?: ts.PropertyAccessExpression
    • Optional storageKeyFrame?: string
    • type: string
frameIndex: number = 0
frameInfo: {
    [name: string]: {
        end: number;
        frame: {
            [index: number]: {
                name: string;
                type: string;
            };
        };
        start: number;
    };
} = {}

Type declaration

  • [name: string]: {
        end: number;
        frame: {
            [index: number]: {
                name: string;
                type: string;
            };
        };
        start: number;
    }
    • end: number
    • frame: {
          [index: number]: {
              name: string;
              type: string;
          };
      }
      • [index: number]: {
            name: string;
            type: string;
        }
        • name: string
        • type: string
    • start: number
frameSize: {
    [methodName: string]: number;
} = {}

Type declaration

  • [methodName: string]: number
generatedClearTeal: string = ''
generatedTeal: string = ''
ifCount: number = -1
lastNode: Node
lastSourceCommentRange: [number, number] = ...
lastType: string = 'void'
lineToPc: {
    [key: number]: number[];
} = {}

Type declaration

  • [key: number]: number[]
mapKeyTypes: {
    box: string[];
    global: string[];
    local: string[];
} = ...

Type declaration

  • box: string[]
  • global: string[]
  • local: string[]
name: string
nodeDepth: number = 0
orCount: number = 0
pcToLine: {
    [key: number]: number;
} = {}

Type declaration

  • [key: number]: number
processErrorNodes: Node[] = []
rawSrcMap: {
    pc: number;
    prettyTeal?: number;
    source: {
        end: {
            col: number;
            line: number;
        };
        start: {
            col: number;
            line: number;
        };
    };
    teal: number;
}[] = []
sourceFile: SourceFile
srcMap: {
    pc: number;
    source: {
        end: {
            col: number;
            line: number;
        };
        start: {
            col: number;
            line: number;
        };
    };
    teal: number;
}[] = []
storageProps: {
    [key: string]: StorageProp;
} = {}

Type declaration

  • [key: string]: StorageProp
subroutines: Subroutine[] = []
teal: string[] = []
ternaryCount: number = 0
topLevelNode: Node
typeHint?: string
whileCount: number = 0

Methods

  • Parameters

    • node: Node
    • force: boolean = false

    Returns void

  • Parameters

    • node: Node
    • type: string

    Returns void

  • Parameters

    • node: Node
    • type: string

    Returns void

  • Parameters

    • node: Node
    • desiredWidth: number

    Returns void

  • Parameters

    • node: ElementAccessExpression
    • chain: ElementAccessExpression[] = []

    Returns ElementAccessExpression[]

  • Parameters

    • node: PropertyAccessExpression
    • chain: (PropertyAccessExpression | CallExpression | ElementAccessExpression)[] = []

    Returns (PropertyAccessExpression | CallExpression | ElementAccessExpression)[]

  • Parameters

    • topLevelTuple: TupleElement
    • accessors: (string | Expression)[]
    • node: Node

    Returns TupleElement

  • Parameters

    • givenType: string

    Returns Record<string, string>

  • Parameters

    • op: string

    Returns {
        args: number;
        fn: ((node: Node) => void);
        name: string;
    }[]

  • Parameters

    • subroutine: ABIMethod

    Returns string

  • Parameters

    • node: ExpressionWithTypeArguments

    Returns number

  • Parameters

    • type: string

    Returns TupleElement

  • Parameters

    • inputType: string

    Returns number

  • Parameters

    • elements: number

    Returns string[]

  • Parameters

    • __namedParameters: {
          action: "extract" | "get" | "set" | "exists" | "delete" | "create" | "replace" | "size";
          name: string;
          newValue?: Node;
          node: PropertyAccessExpression | CallExpression;
          storageAccountFrame?: string;
          storageKeyFrame?: string;
      }
      • action: "extract" | "get" | "set" | "exists" | "delete" | "create" | "replace" | "size"
      • name: string
      • Optional newValue?: Node
      • node: PropertyAccessExpression | CallExpression
      • Optional storageAccountFrame?: string
      • Optional storageKeyFrame?: string

    Returns void

  • Parameters

    • node: Node
    • opcode: string

    Returns void

  • Parameters

    • node: Node
    • name: string
    • storageExpression: PropertyAccessExpression
    • type: string
    • Optional accessors: (string | Expression)[]

    Returns void

  • Parameters

    • type: string

    Returns boolean

  • Parameters

    • node: Node
    • opcode: string
    • type: string

    Returns void

  • Parameters

    • node: Node
    • factors: Expression[]

    Returns void

  • Parameters

    • input: string[]

    Returns Promise<string[]>

  • Parameters

    • node: ElementAccessExpression
    • Optional newValue: Node

    Returns void

  • Parameters

    • elements: Expression[] | NodeArray<Expression>
    • parentNode: Node

    Returns void

  • Parameters

    • node: ArrayLiteralExpression

    Returns void

  • Parameters

    • node: BinaryExpression

    Returns void

  • Parameters

    • nodes: Node[] | NodeArray<Expression>
    • isDynamicArray: boolean = false

    Returns void

  • Parameters

    • node: CallExpression

    Returns void

  • Parameters

    • node: ClassDeclaration

    Returns void

  • Parameters

    • fn: MethodDeclaration

    Returns void

  • Parameters

    • node: ConditionalExpression

    Returns void

  • Parameters

    • node: ElementAccessExpression

    Returns void

  • Parameters

    • node: ExpressionStatement

    Returns void

  • Parameters

    • node: ForStatement

    Returns void

  • Parameters

    • node: Node
    • inputName: string
    • load: boolean

    Returns {
        accessors: (string | Expression)[];
        name: string;
        storageAccountFrame?: string;
        storageExpression?: PropertyAccessExpression;
        storageKeyFrame?: string;
        type: "frame" | "storage";
    }

    • accessors: (string | Expression)[]
    • name: string
    • Optional storageAccountFrame?: string
    • Optional storageExpression?: PropertyAccessExpression
    • Optional storageKeyFrame?: string
    • type: "frame" | "storage"
  • Parameters

    • node: IfStatement
    • elseIfCount: number = 0

    Returns void

  • Parameters

    • node: NumericLiteral | StringLiteral

    Returns void

  • Parameters

    • node: Node
    • accessors: (string | Expression)[]
    • parentExpression: Node
    • Optional newValue: Node

    Returns void

  • Parameters

    • node: BinaryExpression

    Returns void

  • Parameters

    • node: PropertyAccessExpression

    Returns void

  • Parameters

    • node: MethodDeclaration

    Returns void

  • Parameters

    • node: NewExpression

    Returns void

  • Parameters

    • node: ObjectLiteralExpression

    Returns void

  • Parameters

    • node: CallExpression

    Returns void

  • Parameters

    • node: Node
    • accessors: (string | Expression)[]
    • parentExpression: Node
    • Optional newValue: Node

    Returns void

  • Parameters

    • node: PropertyDeclaration

    Returns void

  • Parameters

    • node: ReturnStatement

    Returns void

  • Parameters

    • fn: MethodDeclaration

    Returns void

  • Parameters

    • node: PropertyAccessExpression

    Returns void

  • Parameters

    • fn: MethodDeclaration

    Returns void

  • Parameters

    • node: ThrowStatement

    Returns void

  • Parameters

    • node: Node
    • name: string
    • fields: Node
    • Optional typeArgs: NodeArray<TypeNode>

    Returns void

  • Parameters

    • elements: Expression[] | NodeArray<Expression>
    • parentNode: Node

    Returns void

  • Parameters

    • node: AsExpression | TypeAssertion

    Returns void

  • Parameters

    • node: PrefixUnaryExpression

    Returns void

  • Parameters

    • node: VariableDeclarationList

    Returns void

  • Parameters

    • node: VariableDeclaration

    Returns void

  • Parameters

    • node: WhileStatement

    Returns void

  • Parameters

    • node: Node
    • teal: string
    • type: string

    Returns void

  • Parameters

    • node: Node
    • Rest ...lines: string[]

    Returns void

  • Parameters

    • subroutine: ABIMethod

    Returns void

  • Parameters

    • node: Node
    • teal: string

    Returns void

  • Parameters

    • node: Node
    • calleeType: string
    • name: string
    • checkArgs: boolean = false
    • thisTxn: boolean = false

    Returns void

  • Parameters

    • inputType: string
    • expectedType: string
    • numericBehavior: "math" | "fix" | "error" = 'error'

    Returns void

Generated using TypeDoc