Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AlgobDeployer

Hierarchy

  • AlgobDeployer

Index

Properties

accounts

accounts: Account[]

accountsByName

accountsByName: AccountMap

addCheckpointKV

addCheckpointKV: (key: string, value: string) => void

Sets metadata key value for a current network in the chckpoint file based on the current deployment script. If run in a non deployment mode (eg algob run script_name.js) it will throw an exception.

Type declaration

    • (key: string, value: string): void
    • Parameters

      • key: string
      • value: string

      Returns void

algodClient

algodClient: Algodv2

asa

asa: Map<string, ASAInfo>

Mapping of ASA name to deployment log

deployASA

deployASA: (name: string, flags: ASADeploymentFlags) => Promise<ASAInfo>

Creates and deploys ASA.

name

ASA name - deployer will search for the ASA in the /assets/asa.yaml file

flags

deployment flags

Type declaration

deploySSC

deploySSC: (approvalProgram: string, clearProgram: string, flags: SSCDeploymentFlags, payFlags: TxParams, scTmplParams?: StrMap) => Promise<SSCInfo>

Deploys stateful smart contract.

approvalprogram

approval program filename (must be present in assets folder)

clearprogram

clear program filename (must be present in assets folder)

flags

SSCDeploymentFlags

payflags

Transaction Parameters

sctmplparams

Smart contract template parameters (used only when compiling PyTEAL to TEAL)

Type declaration

ensureCompiled

ensureCompiled: (name: string, force?: undefined | false | true, scTmplParams?: StrMap) => Promise<ASCCache>

Returns ASCCache (with compiled code)

name

Smart Contract filename (must be present in assets folder)

force

if force is true file will be compiled for sure, even if it's checkpoint exist

sctmplparams

scTmplParams: Smart contract template parameters (used only when compiling PyTEAL to TEAL)

Type declaration

    • (name: string, force?: undefined | false | true, scTmplParams?: StrMap): Promise<ASCCache>
    • Parameters

      • name: string
      • Optional force: undefined | false | true
      • Optional scTmplParams: StrMap

      Returns Promise<ASCCache>

fundLsig

fundLsig: (name: string, flags: FundASCFlags, payFlags: TxParams, scParams: LogicSigArgs, scTmplParams?: StrMap) => void

Funds logic signature account (Contract Account).

name

Stateless Smart Contract filename (must be present in assets folder)

payflags

Transaction Parameters

scparams

Smart contract parameters (used while calling smart contract)

sctmplparams

Smart contract template parameters (used only when compiling PyTEAL to TEAL)

Type declaration

getCheckpointKV

getCheckpointKV: (key: string) => string | undefined

Queries metadata key in all checkpoint files of current network. If the key is not defined in any checkpoint then undefined is returned. Can be run in both run and deploy mode.

Type declaration

    • (key: string): string | undefined
    • Parameters

      • key: string

      Returns string | undefined

getDelegatedLsig

getDelegatedLsig: (lsigName: string) => Object | undefined

Queries a delegated logic signature from checkpoint.

Type declaration

    • (lsigName: string): Object | undefined
    • Parameters

      • lsigName: string

      Returns Object | undefined

getSSC

getSSC: (nameApproval: string, nameClear: string) => SSCInfo | undefined

Queries a stateful smart contract info from checkpoint.

Type declaration

    • (nameApproval: string, nameClear: string): SSCInfo | undefined
    • Parameters

      • nameApproval: string
      • nameClear: string

      Returns SSCInfo | undefined

isDefined

isDefined: (name: string) => boolean

Returns true if ASA or DelegatedLsig or SSC were deployed in any script. Checks even for checkpoints which are out of scope from the execution session and are not obtainable using get methods.

Type declaration

    • (name: string): boolean
    • Parameters

      • name: string

      Returns boolean

isDeployMode

isDeployMode: boolean

Allows user to know whether a script is running in a deploy or run mode.

loadLogic

loadLogic: (name: string, scParams: LogicSigArgs, scTmplParams?: StrMap) => Promise<LogicSig>

Loads contract mode logic signature (TEAL or PyTEAL)

name

Smart Contract filename (must be present in assets folder)

scparams

Smart contract parameters (Used while calling smart contract)

sctmplparams

Smart contract template parameters (used only when compiling PyTEAL to TEAL)

Type declaration

    • (name: string, scParams: LogicSigArgs, scTmplParams?: StrMap): Promise<LogicSig>
    • Parameters

      • name: string
      • scParams: LogicSigArgs
      • Optional scTmplParams: StrMap

      Returns Promise<LogicSig>

loadMultiSig

loadMultiSig: (name: string, scParams: LogicSigArgs) => Promise<LogicSig>

Extracts multi signed logic signature file from assets/.

Type declaration

    • (name: string, scParams: LogicSigArgs): Promise<LogicSig>
    • Parameters

      • name: string
      • scParams: LogicSigArgs

      Returns Promise<LogicSig>

log

log: (msg: string, obj: any) => void

Create an entry in a script log (stored in artifacts/scripts/.log) file.

Type declaration

    • (msg: string, obj: any): void
    • Parameters

      • msg: string
      • obj: any

      Returns void

mkDelegatedLsig

mkDelegatedLsig: (name: string, signer: Account, scParams: LogicSigArgs, scTmplParams?: StrMap) => Promise<LsigInfo>

Makes delegated logic signature signed by the signer.

name

Stateless Smart Contract filename (must be present in assets folder)

signer

Signer Account which will sign the smart contract

scparams

Smart contract parameters (used while calling smart contract)

sctmplparams

Smart contract template parameters (used only when compiling PyTEAL to TEAL)

Type declaration

    • Parameters

      • name: string
      • signer: Account
      • scParams: LogicSigArgs
      • Optional scTmplParams: StrMap

      Returns Promise<LsigInfo>

optInToASA

optInToASA: (name: string, accountName: string, flags: ASADeploymentFlags) => Promise<void>

Creates an opt-in transaction for given ASA name, which must be defined in /assets/asa.yaml file.

Type declaration

optInToSSC

optInToSSC: (sender: Account, index: number, payFlags: TxParams) => Promise<void>

Creates an opt-in transaction for given Stateful Smart Contract (SSC). The SSC must be already deployed.

sender

Account for which opt-in is required

appid

Application Index (ID of the application)

Type declaration

    • Parameters

      Returns Promise<void>

waitForConfirmation

waitForConfirmation: (txId: string) => Promise<ConfirmedTxInfo>

Queries blockchain for a given transaction and waits until it will be processed.

Type declaration

    • (txId: string): Promise<ConfirmedTxInfo>
    • Parameters

      • txId: string

      Returns Promise<ConfirmedTxInfo>

Generated using TypeDoc