OPNet
    Preparing search index...

    Class BaseContract<T>

    Represents the base contract class.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    "[internal]": undefined | keyof T

    The internal functions of the contract.

    address: string | Address

    The address of the contract.

    from?: Address

    Who is sending the transaction.

    interface: BitcoinInterface

    The interface of the contract.

    network: Network

    The address of the contract.

    A generic provider for the contract.

    Accessors

    • get contractAddress(): Promise<Address>

      Gets the contract address as an Address object.

      Returns Promise<Address>

      The contract address as an Address object.

    • get p2opOrTweaked(): string

      The P2OP address of the contract.

      Returns string

      The P2OP address of the contract.

    Methods

    • Encodes the calldata for a function.

      Parameters

      • functionName: string

        The name of the function.

      • args: unknown[]

        The arguments for the function.

      Returns Buffer

      The encoded calldata.