@multiversx/sdk-core - v14.0.1
    Preparing search index...

    Class CodeMetadata

    The metadata of a Smart Contract, as an abstraction.

    Index

    Constructors

    • Creates a metadata object. By default, set the upgradeable attribute, and uset all others.

      Parameters

      • upgradeable: boolean = true

        Whether the contract is upgradeable

      • readable: boolean = false

        Whether other contracts can read this contract's data (without calling one of its pure functions)

      • payable: boolean = false

        Whether the contract is payable

      • payableBySc: boolean = false

        Whether the contract is payable by other smart contracts

      Returns CodeMetadata

    Properties

    payable: boolean
    payableBySc: boolean
    readable: boolean
    upgradeable: boolean
    ByteOne: { Payable: number; PayableBySc: number; Reserved1: number } = ...
    ByteZero: { Readable: number; Reserved2: number; Upgradeable: number } = ...

    Methods

    • Converts the metadata to the protocol-friendly representation.

      Returns Uint8Array

    • Adjust the metadata (the payable attribute), when preparing the deployment transaction.

      Parameters

      • value: boolean

      Returns void

    • Adjust the metadata (the payableBySc attribute), when preparing the deployment transaction.

      Parameters

      • value: boolean

      Returns void

    • Adjust the metadata (the readable attribute), when preparing the deployment transaction.

      Parameters

      • value: boolean

      Returns void

    • Adjust the metadata (the upgradeable attribute), when preparing the deployment transaction.

      Parameters

      • value: boolean

      Returns void