An abstraction for deploying and interacting with Smart Contracts.

Implements

Constructors

Properties

abi?: IAbi
address: IAddress = ...
methods: {
    [key: string]: ((args?) => Interaction);
} = {}

This object contains a function for each endpoint defined by the contract. (a bit similar to web3js's "contract.methods").

This is an alternative to methodsExplicit. Unlike methodsExplicit, automatic type inference (wrt. ABI) is applied when using methods.

Type declaration

methodsExplicit: {
    [key: string]: ((args?) => Interaction);
} = {}

This object contains a function for each endpoint defined by the contract. (a bit similar to web3js's "contract.methods").

Type declaration

Methods

  • Parameters

    Returns {
        payable: boolean;
        payableBySc: boolean;
        readable: boolean;
        upgradeable: boolean;
    }

    • payable: boolean
    • payableBySc: boolean
    • readable: boolean
    • upgradeable: boolean
  • Computes the address of a Smart Contract. The address is computed deterministically, from the address of the owner and the nonce of the deployment transaction.

    Parameters

    • owner: IAddress

      The owner of the Smart Contract

    • nonce: INonce

      The owner nonce used for the deployment transaction

    Returns IAddress