Function setBytecode

  • Sets the executable bytecode of the current address.

    Remarks

    The maximum bytecode size is 10MB.

    Throws

    • if the caller address does not correspond to a smart contract in the ledger.
    • if the bytecode size exceeds maximum allowed size.
    • if the address does not exist
    • if the caller lacks write permissions on the address.

    Parameters

    • bytecode: StaticArray<number>

      The bytecode to be set. It should be a StaticArray<u8>.

    Returns void

Generated using TypeDoc