Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ContractAbstraction<T, TMethods, TMethodsObject, TViews, TContractViews, TStorage>

description

Smart contract abstraction

Type parameters

  • T: ContractProvider | Wallet

  • TMethods: DefaultMethods<T> = DefaultMethods<T>

  • TMethodsObject: DefaultMethodsObject<T> = DefaultMethodsObject<T>

  • TViews: DefaultViews = DefaultViews

  • TContractViews: DefaultContractViews = DefaultContractViews

  • TStorage: DefaultStorage = DefaultStorage

Hierarchy

  • ContractAbstraction

Index

Constructors

constructor

  • new ContractAbstraction<T, TMethods, TMethodsObject, TViews, TContractViews, TStorage>(address: string, script: ScriptedContracts, provider: T, storageProvider: StorageProvider, entrypoints: EntrypointsResponse, rpc: RpcClientInterface, readProvider: TzReadProvider): ContractAbstraction<T, TMethods, TMethodsObject, TViews, TContractViews, TStorage>

Properties

Readonly address

address: string

contractViews

contractViews: TContractViews = ...
description

Contains on-chain views that are defined by the target Tezos Smart Contract, and offers the user to simulate the views execution as if they were native TS/JS methods. NB: the expected format for the parameter when calling a smart contract view is the object format (same format as for the storage) and not the flattened representation.

Readonly entrypoints

entrypoints: EntrypointsResponse

methods

methods: TMethods = ...
description

Contains methods that are implemented by the target Tezos Smart Contract, and offers the user to call the Smart Contract methods as if they were native TS/JS methods. NB: if the contract contains annotation it will include named properties; if not it will be indexed by a number.

methodsObject

methodsObject: TMethodsObject = ...
description

Contains methods that are implemented by the target Tezos Smart Contract, and offers the user to call the Smart Contract methods as if they were native TS/JS methods. methodsObject serves the exact same purpose as the methods member. The difference is that it allows passing the parameter in an object format when calling the smart contract method (instead of the flattened representation) NB: if the contract contains annotation it will include named properties; if not it will be indexed by a number.

Readonly parameterSchema

parameterSchema: ParameterSchema

Readonly schema

schema: Schema

Readonly script

script: ScriptedContracts

Readonly viewSchema

viewSchema: ViewSchema[]

views

views: TViews = ...
description

Contains lamda views (tzip4) that are implemented by the target Tezos Smart Contract, and offers the user to call the lambda views as if they were native TS/JS methods. NB: These are the view defined in the tzip4 standard, not the views introduced by the Hangzhou protocol.

Methods

bigMap

  • bigMap(key: string): Promise<unknown>

storage

  • storage<T>(): Promise<T>

Generated using TypeDoc