Class MNS

Example

const mns = await MNS.mainnet(provider);
const address = await mns.resolve("example");

Hierarchy (view full)

Constructors

Properties

address: string
provider: Provider

Methods

  • Executes a smart contract call operation

    Parameters

    • func: string

      The smart contract function to be called.

    • args: Uint8Array | Args = ...
    • options: CallSCOptions = {}

      Includes optional and required parameters like fee, maxGas, coins, and periodToLive.

    Returns Promise<Operation>

    A promise that resolves to an Operation object representing the transaction.

  • Executes a smart contract read operation

    Parameters

    • func: string

      The smart contract function to be called.

    • args: Uint8Array | Args = ...

      Parameter for the function call in Uint8Array format.

    • options: ReadSCOptions = {}

      Includes optional parameters like fee, maxGas, coins, and periodToLive.

    Returns Promise<ReadSCData>

    A promise that resolves to the result of the read operation.

  • Executes a smart contract read operation

    Parameters

    • provider: Provider

      Web3 provider.

    • byteCode: Uint8Array

      Compiled SmartContract bytecode.

    • constructorArgs: Uint8Array | Args = ...

      Parameter for call of constructor function.

    • options: DeploySCOptions = {}

      Includes optional parameters like fee, maxGas, coins, and periodToLive.

    Returns Promise<SmartContract>

    A promise that resolves to the result of the read operation.