Class SCProvider

Hierarchy (view full)

Constructors

Properties

account: Account
client: PublicAPI

Methods

  • Deploys a smart contract on the blockchain.

    Parameters

    • params: DeploySCParams

      Optional deployment details with defaults as follows:

    Returns Promise<string>

    The deployed smart contract.

    Throws

    If the account has insufficient balance to deploy the smart contract.

  • Returns the gas estimation for a given function.

    Parameters

    Returns Promise<bigint>

    The gas estimation for the function.

    Remarks

    To avoid running out of gas, the gas estimation is increased by 20%.

    Throws

    If the read operation returns an error.