Options
All
  • Public
  • Public/Protected
  • All
Menu

Class that represents a contract.

new Contract()
.setStorage(Nat(1))
.addEntrypoint(
new EntryPoint('ep1')
.setInputType(TNat())
.code((arg) => [
SetValue(ContractStorage(), arg);
]),
)
.setConfig({ flags: [new Flag('erase-comments')] });

Hierarchy

  • Contract

Index

Constructors

Properties

#entries: Record<string, EntryPoint> = {}
#line: LineInfo
#onChainViews: Record<string, View> = {}
#options: { flags: Flag[]; initialBalance: IExpression<MichelsonType> } = ...

Type declaration

  • flags: Flag[]
  • initialBalance: IExpression<MichelsonType>
#storage?: IExpression<MichelsonType>
#storage_type: IType<TypeAtom> = ...

Accessors

  • get config(): Readonly<{ flags: Flag[]; initialBalance: IExpression<MichelsonType> }>
  • get onChainViews(): readonly View[]
  • get storage(): null | Readonly<IExpression<MichelsonType>>

Methods

  • [toPrimitive](): string
  • removeEntrypoint(entrypointName: string): Contract
  • setConfig(options?: { flags?: Flag[]; initialBalance?: ILiteral<mutez> }): Contract
  • Parameters

    • Optional options: { flags?: Flag[]; initialBalance?: ILiteral<mutez> }
      • Optional flags?: Flag[]
      • Optional initialBalance?: ILiteral<mutez>

    Returns Contract

  • setStorage(storage: ILiteral<MichelsonType>): Contract
  • setStorageType(type: IType<TypeAtom>): Contract

Generated using TypeDoc