diff --git a/doc/abi.html b/doc/abi.html index 12310cb..5cf58d3 100644 --- a/doc/abi.html +++ b/doc/abi.html @@ -179,77 +179,3494 @@

Table of Contents

+ + +
  • Scalar Value Types
  • + + + + + +
    +

    massa/abi/v1/abi.proto

    Top +
    +

    + + +

    AbiResponse

    +

    Generic message that encapsulate response from ABI calls.

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    resRespResult

    variant for success

    errorError

    variant for error

    + + + + + +

    AddNativeAmountRequest

    +

    Amount addition request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    amount1massa.model.v1.NativeAmount

    First amount to add

    amount2massa.model.v1.NativeAmount

    Second amount to add

    + + + + + +

    AddNativeAmountResult

    +

    Amount addition result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    summassa.model.v1.NativeAmount

    Sum of amounts

    + + + + + +

    AddressFromPubKeyRequest

    +

    Address from public key request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    pub_keystring

    Native public key

    + + + + + +

    AddressFromPubKeyResult

    +

    Address from public key result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    addressstring

    Address

    + + + + + +

    AppendDsValueRequest

    +

    Append data request

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keybytes

    key

    valuebytes

    value

    addressgoogle.protobuf.StringValueoptional

    Address to append data for, if none, use current address

    + + + + + +

    AppendDsValueResult

    +

    Append data result

    + + + + + +

    Base58CheckToBytesRequest

    +

    base58 to bytes request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    base58_checkstring

    + + + + + +

    Base58CheckToBytesResult

    +

    base58 to bytes result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    bytesbytes

    + + + + + +

    BytesToBase58CheckRequest

    +

    bytes to base58 request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    bytesbytes

    + + + + + +

    BytesToBase58CheckResult

    +

    bytes to base58 result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    base58_checkstring

    + + + + + +

    CallRequest

    +

    Call SC request

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    target_sc_addressstring

    Address of the smart contract to call

    target_function_namestring

    Function to call in the targeted smart contract

    function_argbytes

    Argument to the function serialized in a byte array.

    call_coinsmassa.model.v1.NativeAmount

    call_coins is the amount of coins to pay for the call

    + + + + + +

    CallResponse

    +

    Call SC response

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    Return_data is the return value of the function

    + + + + + +

    CallerHasWriteAccessRequest

    +

    Caller has write access request

    + + + + + +

    CallerHasWriteAccessResult

    +

    Caller has write access result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    has_write_accessbool

    Caller has write access

    + + + + + +

    CheckAddressRequest

    +

    Check address request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    to_checkstring

    Address to check

    + + + + + +

    CheckAddressResult

    +

    Check address result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    is_validbool

    Is address valid

    + + + + + +

    CheckNativeAmountRequest

    +

    Check Amount request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    to_checkmassa.model.v1.NativeAmount

    Amount to check

    + + + + + +

    CheckNativeAmountResult

    +

    Check Amount result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    is_validbool

    Is Amount valid

    + + + + + +

    CheckPubKeyRequest

    +

    Check PubKey request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    to_checkstring

    PubKey to check

    + + + + + +

    CheckPubKeyResult

    +

    Check PubKey result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    is_validbool

    Is PubKey valid

    + + + + + +

    CheckSigRequest

    +

    Check Sig request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    to_checkstring

    Sig to check

    + + + + + +

    CheckSigResult

    +

    Check Sig result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    is_validbool

    Is Sig valid

    + + + + + +

    CheckedAddNativeTimeRequest

    +

    Time addition checked request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    leftmassa.model.v1.NativeTime

    First time to add

    rightmassa.model.v1.NativeTime

    Second time to add

    + + + + + +

    CheckedAddNativeTimeResult

    +

    Time addition checked result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    summassa.model.v1.NativeTime

    Sum of times

    + + + + + +

    CheckedDivRemNativeTimeRequest

    +

    Time division checked request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    dividendmassa.model.v1.NativeTime

    Time to divide

    divisormassa.model.v1.NativeTime

    Divisor to divide by

    + + + + + +

    CheckedDivRemNativeTimeResult

    +

    Time division checked result

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    quotientuint64

    Quotient of time and divisor

    remaindermassa.model.v1.NativeTime

    Remainder of time and divisor

    + + + + + +

    CheckedScalarDivRemNativeTimeRequest

    +

    Time scalar divrem checked request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    dividendmassa.model.v1.NativeTime

    Time to divide

    divisoruint64

    Divisor to divide by

    + + + + + +

    CheckedScalarDivRemNativeTimeResult

    +

    Time scalar divrem checked result

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    quotientmassa.model.v1.NativeTime

    Quotient of time and divisor

    remaindermassa.model.v1.NativeTime

    Remainder of time and divisor

    + + + + + +

    CheckedScalarMulNativeTimeRequest

    +

    Time scalar mult checked request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    timemassa.model.v1.NativeTime

    Time to multiply

    coefficientuint64

    Coefficient to multiply by

    + + + + + +

    CheckedScalarMulNativeTimeResult

    +

    Time scalar mult checked result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    productmassa.model.v1.NativeTime

    Product of time and coefficient

    + + + + + +

    CheckedSubNativeTimeRequest

    +

    Time subtraction checked request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    leftmassa.model.v1.NativeTime

    First time to subtract from

    rightmassa.model.v1.NativeTime

    Second time to subtract

    + + + + + +

    CheckedSubNativeTimeResult

    +

    Time subtraction checked result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    differencemassa.model.v1.NativeTime

    Difference of times (left - right)

    + + + + + +

    CompareAddressRequest

    +

    Compare Address request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    leftstring

    First address to compare

    rightstring

    Second address to compare

    + + + + + +

    CompareAddressResult

    +

    Compare Address result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    resultmassa.model.v1.ComparisonResult

    Comparison result

    + + + + + +

    CompareNativeAmountRequest

    +

    Compare NativeAmount request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    leftmassa.model.v1.NativeAmount

    First amount to compare

    rightmassa.model.v1.NativeAmount

    Second amount to compare

    + + + + + +

    CompareNativeAmountResult

    +

    Compare NativeAmount result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    resultmassa.model.v1.ComparisonResult

    Comparison result

    + + + + + +

    CompareNativeTimeRequest

    +

    Time comparison request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    leftmassa.model.v1.NativeTime

    First time to compare

    rightmassa.model.v1.NativeTime

    Second time to compare

    + + + + + +

    CompareNativeTimeResult

    +

    Time comparison result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    resultmassa.model.v1.ComparisonResult

    Comparison result

    + + + + + +

    ComparePubKeyRequest

    +

    Compare PubKey request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    leftstring

    First public key to compare

    rightstring

    Second public key to compare

    + + + + + +

    ComparePubKeyResult

    +

    Compare PubKey result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    resultmassa.model.v1.ComparisonResult

    Comparison result

    + + + + + +

    CreateScRequest

    +

    Create SC request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    bytecodebytes

    Bytecode is the compiled code of the smart contract

    + + + + + +

    CreateScResult

    +

    Create SC result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    sc_addressstring

    Address of the just created smart contract

    + + + + + +

    DeleteDsEntryRequest

    +

    Delete data store entry request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keybytes

    key

    addressgoogle.protobuf.StringValueoptional

    Address to delete data for, if none, use current address

    + + + + + +

    DeleteDsEntryResult

    +

    Delete data store entry result

    + + + + + +

    DivRemNativeAmountRequest

    +

    Amount division request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    dividendmassa.model.v1.NativeAmount

    Amount to divide

    divisormassa.model.v1.NativeAmount

    Divisor to divide by

    + + + + + +

    DivRemNativeAmountResult

    +

    Amount division result

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    quotientuint64

    Quotient of amount and divisor

    remaindermassa.model.v1.NativeAmount

    Remainder of amount and divisor

    + + + + + +

    DsEntryExistsRequest

    +

    Data store entry exists request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keybytes

    key

    addressgoogle.protobuf.StringValueoptional

    Address to check data for, if none, use current address

    + + + + + +

    DsEntryExistsResult

    +

    Data store entry exists result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    has_databool

    has data

    + + + + + +

    Error

    +

    Error message used in abi Response

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    messagestring

    a string representing the error

    + + + + + +

    FunctionExistsRequest

    +

    Function exists request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    target_sc_addressstring

    Address of the smart contract to call

    function_namestring

    The name of the function to check the existance of

    + + + + + +

    FunctionExistsResult

    +

    Function exists result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    existsbool

    Exists is true if the function exists

    + + + + + +

    GenerateEventRequest

    +

    Generate event request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    eventbytes

    Event

    + + + + + +

    GenerateEventResult

    +

    Generate event resulst

    + + + + + +

    GetAddressCategoryRequest

    +

    Get the category of the address request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    addressstring

    + + + + + +

    GetAddressCategoryResult

    +

    Get the category of the address result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    categorymassa.model.v1.AddressCategory

    + + + + + +

    GetAddressVersionRequest

    +

    Get the version of the address request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    addressstring

    + + + + + +

    GetAddressVersionResult

    +

    Get the version of the address result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    versionuint64

    + + + + + +

    GetBalanceRequest

    +

    Get balance request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    addressgoogle.protobuf.StringValueoptional

    Address to get balance for, if none, use current address

    + + + + + +

    GetBalanceResult

    +

    Get balance result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    balancemassa.model.v1.NativeAmount

    balance

    + + + + + +

    GetBytecodeRequest

    +

    Get bytecode request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    addressgoogle.protobuf.StringValueoptional

    Address to get bytecode for, if none, use current address

    + + + + + +

    GetBytecodeResult

    +

    Get bytecode result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    bytecodebytes

    Bytecode

    + + + + + +

    GetCallCoinsRequest

    +

    Get call coins request

    + + + + + +

    GetCallCoinsResult

    +

    Get call coins result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    coinsmassa.model.v1.NativeAmount

    coins

    + + + + + +

    GetCallStackRequest

    +

    Get call stack request

    + + + + + +

    GetCallStackResult

    +

    Get call stack result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    callsstringrepeated

    call stack

    + + + + + +

    GetCurrentSlotRequest

    +

    Get current slot request

    + + + + + +

    GetCurrentSlotResult

    +

    Get current slot result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    slotmassa.model.v1.Slot

    Current slot

    + + + + + +

    GetDsKeysRequest

    +

    Get keys request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    prefixbytes

    keys prefix

    addressgoogle.protobuf.StringValueoptional

    Address to get keys for

    + + + + + +

    GetDsKeysResult

    +

    Get keys result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keysbytesrepeated

    keys

    + + + + + +

    GetDsValueRequest

    +

    Get data request

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keybytes

    key

    addressgoogle.protobuf.StringValueoptional

    Address to get data for, if none, use current address

    + + + + + +

    GetDsValueResult

    +

    Get data result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    valuebytes

    value

    + + + + + +

    GetNativeTimeRequest

    +

    Get native time request

    + + + + + +

    GetNativeTimeResult

    +

    Get native time result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    timemassa.model.v1.NativeTime

    Native time

    + + + + + +

    GetOpDataRequest

    +

    Get op data request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keybytes

    key

    + + + + + +

    GetOpDataResult

    +

    Get op data result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    valuebytes

    value

    + + + + + +

    GetOpKeysRequest

    +

    Get op keys request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    prefixbytes

    keys prefix

    + + + + + +

    GetOpKeysResult

    +

    Get op keys result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keysbytesrepeated

    keys

    + + + + + +

    GetOriginOperationIdRequest

    +

    Get origin operation id request

    + + + + + +

    GetOriginOperationIdResult

    +

    Get origin operation id result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    operation_idgoogle.protobuf.StringValueoptional

    + + + + + +

    GetOwnedAddressesRequest

    +

    Get owned addresses request

    + + + + + +

    GetOwnedAddressesResult

    +

    Get owned addresses result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    addressesstringrepeated

    owned addresses

    + + + + + +

    GetPubKeyVersionRequest

    +

    Get the version of the public key request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    pub_keystring

    + + + + + +

    GetPubKeyVersionResult

    +

    Get the version of the public key result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    versionuint64

    + + + + + +

    GetRemainingGasRequest

    +

    Get remaining gas request

    + + + + + +

    GetRemainingGasResult

    +

    Get remaining gas result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    remaining_gasuint64

    remaining gas

    + + + + + +

    GetSignatureVersionRequest

    +

    Get the version of the signature request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    signaturestring

    + + + + + +

    GetSignatureVersionResult

    +

    Get the version of the signature result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    versionuint64

    + + + + + +

    HashBlake3Request

    +

    Blake3 hash request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    Data to hash

    + + + + + +

    HashBlake3Result

    +

    Blake3 hash result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    hashbytes

    Hash of data

    + + + + + +

    HashSha256Request

    +

    Hash sha256 request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    data

    + + + + + +

    HashSha256Result

    +

    Hash sha256 result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    hashbytes

    hash

    + + + + + +

    Keccak256Request

    +

    Keccak256 hash request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    Data to hash

    + + + + + +

    Keccak256Result

    +

    Keccak256 hash result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    hashbytes

    Hash of data

    + + + + + +

    LocalExecutionRequest

    +

    Local execution request

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    bytecodebytes

    Bytecode is the compiled code of the smart contract

    target_function_namestring

    Function to call in the targeted smart contract

    function_argbytes

    Argument to the function serialized in a byte array.

    + + + + + +

    LocalExecutionResponse

    +

    Local call response

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    databytes

    Return_data is the return value of the function

    + + + + + +

    NativeAmountFromStringRequest

    +

    Amount from string request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    to_convertstring

    String to convert to Amount

    + + + + + +

    NativeAmountFromStringResult

    +

    Amount from string result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    converted_amountmassa.model.v1.NativeAmount

    Converted Amount

    + + + + + +

    NativeAmountToStringRequest

    +

    Amount to string request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    to_convertmassa.model.v1.NativeAmount

    Amount to convert to string

    + + + + + +

    NativeAmountToStringResult

    +

    Amount to string result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    converted_amountstring

    Converted Amount

    + + + + + +

    OpEntryExistsRequest

    +

    Op entry exists request

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    keybytes

    key

    + + + + + +

    OpEntryExistsResult

    +

    Op entry exists result

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    has_keybool

    has key

    + + + + + +

    RespResult

    +

    Tips to check for completeness exec:

    `rg message | rg "\{" | rg "Result" | wc -l`

    the given count should be equal to the number of messages in RespResult + 1

    the +1 comes from ResResult itself which is counted above

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
  • - MCreateSCRequest -
  • + + + + + + -
  • - MCreateSCResponse -
  • + + + + + + -
  • - MEmpty -
  • + + + + + + -
  • - MFunctionExistsRequest -
  • + +
    FieldTypeLabelDescription
    add_native_amount_resultAddNativeAmountResult

    address_from_pub_key_resultAddressFromPubKeyResult

    append_ds_value_resultAppendDsValueResult

    base58_check_to_bytes_resultBase58CheckToBytesResult

    bytes_to_base58_check_resultBytesToBase58CheckResult

    caller_has_write_access_resultCallerHasWriteAccessResult

    check_address_resultCheckAddressResult

    check_native_amount_resultCheckNativeAmountResult

    check_pub_key_resultCheckPubKeyResult

    check_sig_resultCheckSigResult

    checked_add_native_time_resultCheckedAddNativeTimeResult

    checked_div_rem_native_time_resultCheckedDivRemNativeTimeResult

    checked_scalar_div_rem_native_time_resultCheckedScalarDivRemNativeTimeResult

    checked_scalar_mul_native_time_resultCheckedScalarMulNativeTimeResult

    checked_sub_native_time_resultCheckedSubNativeTimeResult

    compare_address_resultCompareAddressResult

    compare_native_amount_resultCompareNativeAmountResult

    compare_native_time_resultCompareNativeTimeResult

    compare_pub_key_resultComparePubKeyResult

    create_sc_resultCreateScResult

    delete_ds_entry_resultDeleteDsEntryResult

    div_rem_native_amount_resultDivRemNativeAmountResult

    ds_entry_exists_resultDsEntryExistsResult

    function_exists_resultFunctionExistsResult

    generate_event_resultGenerateEventResult

    get_address_category_resultGetAddressCategoryResult

    get_address_version_resultGetAddressVersionResult

    get_balance_resultGetBalanceResult

    get_bytecode_resultGetBytecodeResult

    get_call_coins_resultGetCallCoinsResult

    get_call_stack_resultGetCallStackResult

    get_current_slot_resultGetCurrentSlotResult

    get_ds_keys_resultGetDsKeysResult

    get_ds_value_resultGetDsValueResult

    get_native_time_resultGetNativeTimeResult

    get_op_data_resultGetOpDataResult

    get_op_keys_resultGetOpKeysResult

    get_origin_operation_id_resultGetOriginOperationIdResult

    get_owned_addresses_resultGetOwnedAddressesResult

    get_pub_key_version_resultGetPubKeyVersionResult

    get_remaining_gas_resultGetRemainingGasResult

    get_signature_version_resultGetSignatureVersionResult

    hash_blake3_resultHashBlake3Result

    hash_sha256_resultHashSha256Result

    op_entry_exists_resultOpEntryExistsResult

    keccak256_resultKeccak256Result

    local_execution_responseLocalExecutionResponse

    native_amount_from_string_resultNativeAmountFromStringResult

    native_amount_to_string_resultNativeAmountToStringResult

    scalar_div_rem_native_amount_resultScalarDivRemNativeAmountResult

    scalar_mul_native_amount_resultScalarMulNativeAmountResult

    send_async_message_resultSendAsyncMessageResult

    set_bytecode_resultSetBytecodeResult

    set_ds_value_resultSetDsValueResult

    sub_native_amount_resultSubNativeAmountResult

    transfer_coins_resultTransferCoinsResult

    unsafe_random_resultUnsafeRandomResult

    verify_evm_sig_resultVerifyEvmSigResult

    verify_sig_resultVerifySigResult

    + + + + + +

    ScalarDivRemNativeAmountRequest

    +

    Amount division by scalar request

    Try to compute quotient = dividend / divisor

    Fails if divisor == 0

    Fails if underflow

    + + + + + + + -
  • - MFunctionExistsResponse -
  • + + + + + + -
  • - MGenerateEventRequest -
  • + + + + + + -
  • - MLocalCallRequest -
  • + +
    FieldTypeLabelDescription
    dividendmassa.model.v1.NativeAmount

    Amount to divide

    divisoruint64

    Divisor to divide by

    + + + + + +

    ScalarDivRemNativeAmountResult

    +

    Amount division by scalar result

    + + + + + + + -
  • - MLocalCallResponse -
  • + + + + + + -
  • - MTransferCoinsRequest -
  • + + + + + + + +
    FieldTypeLabelDescription
    quotientmassa.model.v1.NativeAmount

    Quotient of amount and divisor

    remaindermassa.model.v1.NativeAmount

    Remainder of amount and divisor

    + + + + + +

    ScalarMulNativeAmountRequest

    +

    Amount multiplication request

    Try to compute product = amount * coefficient (fail if overflow)

    + + + + + + + + + + + + + + + + + + + - - - -
  • Scalar Value Types
  • - - + +
    FieldTypeLabelDescription
    amountmassa.model.v1.NativeAmount

    Amount to multiply

    coefficientuint64

    Coefficient to multiply by

    - - -
    -

    massa/abi/v1/abi.proto

    Top -
    -

    + + -

    Address

    -

    Address

    +

    ScalarMulNativeAmountResult

    +

    Amount multiplication result

    @@ -259,10 +3676,10 @@

    Address

    - - + + - + @@ -272,8 +3689,8 @@

    Address

    -

    Amount

    -

    Amount

    +

    SendAsyncMessageFilter

    +

    Send async message request filter

    addressstringproductmassa.model.v1.NativeAmount

    Address is a string representation of the address

    Product of amount and coefficient

    @@ -283,10 +3700,17 @@

    Amount

    - - + + + + + + + + + - + @@ -296,8 +3720,8 @@

    Amount

    -

    CallRequest

    -

    CallSC

    +

    SendAsyncMessageRequest

    +

    Send async message request

    amountfixed64target_addressstring

    Target address

    target_keygoogle.protobuf.BytesValue

    Amount is a 64-bit unsigned integer

    Target key

    @@ -307,31 +3731,66 @@

    CallRequest

    - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - + @@ -341,8 +3800,15 @@

    CallRequest

    -

    CallResponse

    -

    CallResponse

    +

    SendAsyncMessageResult

    +

    Send async message result

    + + + + + +

    SetBytecodeRequest

    +

    Set bytecode request

    addressAddresstarget_addressstring

    Address is the address of the smart contract

    Target address

    functiontarget_handler string

    Function is the name of the function to call

    Target handler (function name)

    validity_startmassa.model.v1.Slot

    Start slot for the message execution

    validity_endmassa.model.v1.Slot

    End slot for the message execution

    execution_gasuint64

    Gas given for the execution

    raw_feeuint64

    Message fee

    raw_coinsuint64

    Coins sent to the execution context

    argdata bytes

    Arg is the argument to the function

    Message data

    call_coinsAmountfilterSendAsyncMessageFilter

    call_coins is the amount of coins to pay for the call

    Filter for the message

    @@ -352,10 +3818,17 @@

    CallResponse

    - + - + + + + + + + + @@ -365,8 +3838,15 @@

    CallResponse

    -

    CreateSCRequest

    -

    CreateSC

    +

    SetBytecodeResult

    +

    Set bytecode result

    + + + + + +

    SetDsValueRequest

    +

    Set data store value request

    return_databytecode bytes

    Return_data is the return value of the function

    Bytecode

    addressgoogle.protobuf.StringValueoptional

    Address to set bytecode for, if none, use current address

    @@ -376,10 +3856,24 @@

    CreateSCRequest

    - + - + + + + + + + + + + + + + + + @@ -389,8 +3883,15 @@

    CreateSCRequest

    -

    CreateSCResponse

    -

    CreateSCResponse

    +

    SetDsValueResult

    +

    Set data store value result

    + + + + + +

    SubNativeAmountRequest

    +

    Amount subtraction request

    try to compute difference = left - right

    fails if right > left

    bytecodekey bytes

    Bytecode is the compiled code of the smart contract

    key

    valuebytes

    value

    addressgoogle.protobuf.StringValueoptional

    Address to set data for, if none, use current address

    @@ -400,10 +3901,17 @@

    CreateSCResponse

    - - + + + + + + + + + - + @@ -413,15 +3921,32 @@

    CreateSCResponse

    -

    Empty

    -

    Empty

    +

    SubNativeAmountResult

    +

    Amount subtraction result

    +
    addressAddressleftmassa.model.v1.NativeAmount

    First amount to subtract from

    rightmassa.model.v1.NativeAmount

    Address is a string representation of the address

    Second amount to subtract

    + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    differencemassa.model.v1.NativeAmount

    Difference of amounts (left - right)

    + + -

    FunctionExistsRequest

    -

    FunctionExists

    +

    TransferCoinsRequest

    +

    Transfer coins request

    @@ -431,17 +3956,24 @@

    FunctionExistsRequest

    - - + + - + - - + + - + + + + + + + + @@ -451,8 +3983,15 @@

    FunctionExistsRequest

    -

    FunctionExistsResponse

    -

    FunctionExistsResponse

    +

    TransferCoinsResult

    +

    Transfer coin result

    + + + + + +

    UnsafeRandomRequest

    +

    Unsafe random request

    addressAddresstarget_addressstring

    Address is the address of the smart contract

    The address of the recipient

    functionstringamount_to_transfermassa.model.v1.NativeAmount

    Function is the name of the function to call

    The amount of coins to transfer

    sender_addressgoogle.protobuf.StringValueoptional

    The address of the sender, if none, use current address

    @@ -462,10 +4001,10 @@

    FunctionExistsResponse

    - - + + - + @@ -475,8 +4014,8 @@

    FunctionExistsResponse

    -

    GenerateEventRequest

    -

    GenerateEventRequest

    +

    UnsafeRandomResult

    +

    Unsafe random result

    existsboolnum_bytesuint32

    Exists is true if the function exists

    @@ -486,10 +4025,10 @@

    GenerateEventRequest

    - - + + - + @@ -499,8 +4038,8 @@

    GenerateEventRequest

    -

    LocalCallRequest

    -

    LocalCall

    +

    VerifyEvmSigRequest

    +

    EVM signature verification request

    eventstringrandom_bytesbytes

    Event

    Random bytes generated

    @@ -510,24 +4049,24 @@

    LocalCallRequest

    - - + + - + - - + + - + - + - + @@ -537,8 +4076,8 @@

    LocalCallRequest

    -

    LocalCallResponse

    -

    LocalCallResponse

    +

    VerifyEvmSigResult

    +

    EVM signature verification result

    addressAddresssigbytes

    Address is the address of the smart contract

    Signature to verify

    functionstringmessagebytes

    Function is the name of the function to call

    Message to verify

    argpub_key bytes

    Arg is the argument to the function

    Public key to verify with

    @@ -548,10 +4087,10 @@

    LocalCallResponse

    - - + + - + @@ -561,8 +4100,8 @@

    LocalCallResponse

    -

    TransferCoinsRequest

    -

    TransferCoins

    +

    VerifySigRequest

    +

    Verify Sig request

    return_databytesis_verifiedbool

    Return_data is the return value of the function

    Verification result

    @@ -572,17 +4111,48 @@

    TransferCoinsRequest

    - - + + + + + + + + + + + + + + + + - + + +
    to_addressAddresssigstring

    Signature to verify

    messagebytes

    Message to verify

    pub_keystring

    To_address is the address to transfer coins to

    Public key to verify with

    + + + + + +

    VerifySigResult

    +

    Verify Sig result

    + + + + + + + + - - + + - + diff --git a/doc/abi.md b/doc/abi.md index a239818..ddbf4ee 100644 --- a/doc/abi.md +++ b/doc/abi.md @@ -4,19 +4,130 @@ ## Table of Contents - [massa/abi/v1/abi.proto](#massa_abi_v1_abi-proto) - - [Address](#massa-abi-v1-Address) - - [Amount](#massa-abi-v1-Amount) + - [AbiResponse](#massa-abi-v1-AbiResponse) + - [AddNativeAmountRequest](#massa-abi-v1-AddNativeAmountRequest) + - [AddNativeAmountResult](#massa-abi-v1-AddNativeAmountResult) + - [AddressFromPubKeyRequest](#massa-abi-v1-AddressFromPubKeyRequest) + - [AddressFromPubKeyResult](#massa-abi-v1-AddressFromPubKeyResult) + - [AppendDsValueRequest](#massa-abi-v1-AppendDsValueRequest) + - [AppendDsValueResult](#massa-abi-v1-AppendDsValueResult) + - [Base58CheckToBytesRequest](#massa-abi-v1-Base58CheckToBytesRequest) + - [Base58CheckToBytesResult](#massa-abi-v1-Base58CheckToBytesResult) + - [BytesToBase58CheckRequest](#massa-abi-v1-BytesToBase58CheckRequest) + - [BytesToBase58CheckResult](#massa-abi-v1-BytesToBase58CheckResult) - [CallRequest](#massa-abi-v1-CallRequest) - [CallResponse](#massa-abi-v1-CallResponse) - - [CreateSCRequest](#massa-abi-v1-CreateSCRequest) - - [CreateSCResponse](#massa-abi-v1-CreateSCResponse) - - [Empty](#massa-abi-v1-Empty) + - [CallerHasWriteAccessRequest](#massa-abi-v1-CallerHasWriteAccessRequest) + - [CallerHasWriteAccessResult](#massa-abi-v1-CallerHasWriteAccessResult) + - [CheckAddressRequest](#massa-abi-v1-CheckAddressRequest) + - [CheckAddressResult](#massa-abi-v1-CheckAddressResult) + - [CheckNativeAmountRequest](#massa-abi-v1-CheckNativeAmountRequest) + - [CheckNativeAmountResult](#massa-abi-v1-CheckNativeAmountResult) + - [CheckPubKeyRequest](#massa-abi-v1-CheckPubKeyRequest) + - [CheckPubKeyResult](#massa-abi-v1-CheckPubKeyResult) + - [CheckSigRequest](#massa-abi-v1-CheckSigRequest) + - [CheckSigResult](#massa-abi-v1-CheckSigResult) + - [CheckedAddNativeTimeRequest](#massa-abi-v1-CheckedAddNativeTimeRequest) + - [CheckedAddNativeTimeResult](#massa-abi-v1-CheckedAddNativeTimeResult) + - [CheckedDivRemNativeTimeRequest](#massa-abi-v1-CheckedDivRemNativeTimeRequest) + - [CheckedDivRemNativeTimeResult](#massa-abi-v1-CheckedDivRemNativeTimeResult) + - [CheckedScalarDivRemNativeTimeRequest](#massa-abi-v1-CheckedScalarDivRemNativeTimeRequest) + - [CheckedScalarDivRemNativeTimeResult](#massa-abi-v1-CheckedScalarDivRemNativeTimeResult) + - [CheckedScalarMulNativeTimeRequest](#massa-abi-v1-CheckedScalarMulNativeTimeRequest) + - [CheckedScalarMulNativeTimeResult](#massa-abi-v1-CheckedScalarMulNativeTimeResult) + - [CheckedSubNativeTimeRequest](#massa-abi-v1-CheckedSubNativeTimeRequest) + - [CheckedSubNativeTimeResult](#massa-abi-v1-CheckedSubNativeTimeResult) + - [CompareAddressRequest](#massa-abi-v1-CompareAddressRequest) + - [CompareAddressResult](#massa-abi-v1-CompareAddressResult) + - [CompareNativeAmountRequest](#massa-abi-v1-CompareNativeAmountRequest) + - [CompareNativeAmountResult](#massa-abi-v1-CompareNativeAmountResult) + - [CompareNativeTimeRequest](#massa-abi-v1-CompareNativeTimeRequest) + - [CompareNativeTimeResult](#massa-abi-v1-CompareNativeTimeResult) + - [ComparePubKeyRequest](#massa-abi-v1-ComparePubKeyRequest) + - [ComparePubKeyResult](#massa-abi-v1-ComparePubKeyResult) + - [CreateScRequest](#massa-abi-v1-CreateScRequest) + - [CreateScResult](#massa-abi-v1-CreateScResult) + - [DeleteDsEntryRequest](#massa-abi-v1-DeleteDsEntryRequest) + - [DeleteDsEntryResult](#massa-abi-v1-DeleteDsEntryResult) + - [DivRemNativeAmountRequest](#massa-abi-v1-DivRemNativeAmountRequest) + - [DivRemNativeAmountResult](#massa-abi-v1-DivRemNativeAmountResult) + - [DsEntryExistsRequest](#massa-abi-v1-DsEntryExistsRequest) + - [DsEntryExistsResult](#massa-abi-v1-DsEntryExistsResult) + - [Error](#massa-abi-v1-Error) - [FunctionExistsRequest](#massa-abi-v1-FunctionExistsRequest) - - [FunctionExistsResponse](#massa-abi-v1-FunctionExistsResponse) + - [FunctionExistsResult](#massa-abi-v1-FunctionExistsResult) - [GenerateEventRequest](#massa-abi-v1-GenerateEventRequest) - - [LocalCallRequest](#massa-abi-v1-LocalCallRequest) - - [LocalCallResponse](#massa-abi-v1-LocalCallResponse) + - [GenerateEventResult](#massa-abi-v1-GenerateEventResult) + - [GetAddressCategoryRequest](#massa-abi-v1-GetAddressCategoryRequest) + - [GetAddressCategoryResult](#massa-abi-v1-GetAddressCategoryResult) + - [GetAddressVersionRequest](#massa-abi-v1-GetAddressVersionRequest) + - [GetAddressVersionResult](#massa-abi-v1-GetAddressVersionResult) + - [GetBalanceRequest](#massa-abi-v1-GetBalanceRequest) + - [GetBalanceResult](#massa-abi-v1-GetBalanceResult) + - [GetBytecodeRequest](#massa-abi-v1-GetBytecodeRequest) + - [GetBytecodeResult](#massa-abi-v1-GetBytecodeResult) + - [GetCallCoinsRequest](#massa-abi-v1-GetCallCoinsRequest) + - [GetCallCoinsResult](#massa-abi-v1-GetCallCoinsResult) + - [GetCallStackRequest](#massa-abi-v1-GetCallStackRequest) + - [GetCallStackResult](#massa-abi-v1-GetCallStackResult) + - [GetCurrentSlotRequest](#massa-abi-v1-GetCurrentSlotRequest) + - [GetCurrentSlotResult](#massa-abi-v1-GetCurrentSlotResult) + - [GetDsKeysRequest](#massa-abi-v1-GetDsKeysRequest) + - [GetDsKeysResult](#massa-abi-v1-GetDsKeysResult) + - [GetDsValueRequest](#massa-abi-v1-GetDsValueRequest) + - [GetDsValueResult](#massa-abi-v1-GetDsValueResult) + - [GetNativeTimeRequest](#massa-abi-v1-GetNativeTimeRequest) + - [GetNativeTimeResult](#massa-abi-v1-GetNativeTimeResult) + - [GetOpDataRequest](#massa-abi-v1-GetOpDataRequest) + - [GetOpDataResult](#massa-abi-v1-GetOpDataResult) + - [GetOpKeysRequest](#massa-abi-v1-GetOpKeysRequest) + - [GetOpKeysResult](#massa-abi-v1-GetOpKeysResult) + - [GetOriginOperationIdRequest](#massa-abi-v1-GetOriginOperationIdRequest) + - [GetOriginOperationIdResult](#massa-abi-v1-GetOriginOperationIdResult) + - [GetOwnedAddressesRequest](#massa-abi-v1-GetOwnedAddressesRequest) + - [GetOwnedAddressesResult](#massa-abi-v1-GetOwnedAddressesResult) + - [GetPubKeyVersionRequest](#massa-abi-v1-GetPubKeyVersionRequest) + - [GetPubKeyVersionResult](#massa-abi-v1-GetPubKeyVersionResult) + - [GetRemainingGasRequest](#massa-abi-v1-GetRemainingGasRequest) + - [GetRemainingGasResult](#massa-abi-v1-GetRemainingGasResult) + - [GetSignatureVersionRequest](#massa-abi-v1-GetSignatureVersionRequest) + - [GetSignatureVersionResult](#massa-abi-v1-GetSignatureVersionResult) + - [HashBlake3Request](#massa-abi-v1-HashBlake3Request) + - [HashBlake3Result](#massa-abi-v1-HashBlake3Result) + - [HashSha256Request](#massa-abi-v1-HashSha256Request) + - [HashSha256Result](#massa-abi-v1-HashSha256Result) + - [Keccak256Request](#massa-abi-v1-Keccak256Request) + - [Keccak256Result](#massa-abi-v1-Keccak256Result) + - [LocalExecutionRequest](#massa-abi-v1-LocalExecutionRequest) + - [LocalExecutionResponse](#massa-abi-v1-LocalExecutionResponse) + - [NativeAmountFromStringRequest](#massa-abi-v1-NativeAmountFromStringRequest) + - [NativeAmountFromStringResult](#massa-abi-v1-NativeAmountFromStringResult) + - [NativeAmountToStringRequest](#massa-abi-v1-NativeAmountToStringRequest) + - [NativeAmountToStringResult](#massa-abi-v1-NativeAmountToStringResult) + - [OpEntryExistsRequest](#massa-abi-v1-OpEntryExistsRequest) + - [OpEntryExistsResult](#massa-abi-v1-OpEntryExistsResult) + - [RespResult](#massa-abi-v1-RespResult) + - [ScalarDivRemNativeAmountRequest](#massa-abi-v1-ScalarDivRemNativeAmountRequest) + - [ScalarDivRemNativeAmountResult](#massa-abi-v1-ScalarDivRemNativeAmountResult) + - [ScalarMulNativeAmountRequest](#massa-abi-v1-ScalarMulNativeAmountRequest) + - [ScalarMulNativeAmountResult](#massa-abi-v1-ScalarMulNativeAmountResult) + - [SendAsyncMessageFilter](#massa-abi-v1-SendAsyncMessageFilter) + - [SendAsyncMessageRequest](#massa-abi-v1-SendAsyncMessageRequest) + - [SendAsyncMessageResult](#massa-abi-v1-SendAsyncMessageResult) + - [SetBytecodeRequest](#massa-abi-v1-SetBytecodeRequest) + - [SetBytecodeResult](#massa-abi-v1-SetBytecodeResult) + - [SetDsValueRequest](#massa-abi-v1-SetDsValueRequest) + - [SetDsValueResult](#massa-abi-v1-SetDsValueResult) + - [SubNativeAmountRequest](#massa-abi-v1-SubNativeAmountRequest) + - [SubNativeAmountResult](#massa-abi-v1-SubNativeAmountResult) - [TransferCoinsRequest](#massa-abi-v1-TransferCoinsRequest) + - [TransferCoinsResult](#massa-abi-v1-TransferCoinsResult) + - [UnsafeRandomRequest](#massa-abi-v1-UnsafeRandomRequest) + - [UnsafeRandomResult](#massa-abi-v1-UnsafeRandomResult) + - [VerifyEvmSigRequest](#massa-abi-v1-VerifyEvmSigRequest) + - [VerifyEvmSigResult](#massa-abi-v1-VerifyEvmSigResult) + - [VerifySigRequest](#massa-abi-v1-VerifySigRequest) + - [VerifySigResult](#massa-abi-v1-VerifySigResult) - [Scalar Value Types](#scalar-value-types) @@ -29,30 +140,164 @@ - + -### Address -Address +### AbiResponse +Generic message that encapsulate response from ABI calls. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [string](#string) | | Address is a string representation of the address | +| res | [RespResult](#massa-abi-v1-RespResult) | | variant for success | +| error | [Error](#massa-abi-v1-Error) | | variant for error | - + -### Amount -Amount +### AddNativeAmountRequest +Amount addition request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| amount | [fixed64](#fixed64) | | Amount is a 64-bit unsigned integer | +| amount1 | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | First amount to add | +| amount2 | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Second amount to add | + + + + + + + + +### AddNativeAmountResult +Amount addition result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sum | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Sum of amounts | + + + + + + + + +### AddressFromPubKeyRequest +Address from public key request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| pub_key | [string](#string) | | Native public key | + + + + + + + + +### AddressFromPubKeyResult +Address from public key result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [string](#string) | | Address | + + + + + + + + +### AppendDsValueRequest +Append data request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | +| value | [bytes](#bytes) | | value | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to append data for, if none, use current address | + + + + + + + + +### AppendDsValueResult +Append data result + + + + + + + + +### Base58CheckToBytesRequest +base58 to bytes request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| base58_check | [string](#string) | | | + + + + + + + + +### Base58CheckToBytesResult +base58 to bytes result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bytes | [bytes](#bytes) | | | + + + + + + + + +### BytesToBase58CheckRequest +bytes to base58 request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bytes | [bytes](#bytes) | | | + + + + + + + + +### BytesToBase58CheckResult +bytes to base58 result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| base58_check | [string](#string) | | | @@ -62,15 +307,15 @@ Amount ### CallRequest -CallSC +Call SC request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [Address](#massa-abi-v1-Address) | | Address is the address of the smart contract | -| function | [string](#string) | | Function is the name of the function to call | -| arg | [bytes](#bytes) | | Arg is the argument to the function | -| call_coins | [Amount](#massa-abi-v1-Amount) | | call_coins is the amount of coins to pay for the call | +| target_sc_address | [string](#string) | | Address of the smart contract to call | +| target_function_name | [string](#string) | | Function to call in the targeted smart contract | +| function_arg | [bytes](#bytes) | | Argument to the function serialized in a byte array. | +| call_coins | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | call_coins is the amount of coins to pay for the call | @@ -80,146 +325,1716 @@ CallSC ### CallResponse -CallResponse +Call SC response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | Return_data is the return value of the function | + + + + + + + + +### CallerHasWriteAccessRequest +Caller has write access request + + + + + + + + +### CallerHasWriteAccessResult +Caller has write access result | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| return_data | [bytes](#bytes) | | Return_data is the return value of the function | +| has_write_access | [bool](#bool) | | Caller has write access | - + -### CreateSCRequest -CreateSC +### CheckAddressRequest +Check address request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| bytecode | [bytes](#bytes) | | Bytecode is the compiled code of the smart contract | +| to_check | [string](#string) | | Address to check | - + -### CreateSCResponse -CreateSCResponse +### CheckAddressResult +Check address result | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [Address](#massa-abi-v1-Address) | | Address is a string representation of the address | +| is_valid | [bool](#bool) | | Is address valid | + + + +### CheckNativeAmountRequest +Check Amount request - -### Empty -Empty +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| to_check | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Amount to check | - + -### FunctionExistsRequest -FunctionExists +### CheckNativeAmountResult +Check Amount result | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [Address](#massa-abi-v1-Address) | | Address is the address of the smart contract | -| function | [string](#string) | | Function is the name of the function to call | +| is_valid | [bool](#bool) | | Is Amount valid | - + -### FunctionExistsResponse -FunctionExistsResponse +### CheckPubKeyRequest +Check PubKey request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| exists | [bool](#bool) | | Exists is true if the function exists | +| to_check | [string](#string) | | PubKey to check | - + -### GenerateEventRequest -GenerateEventRequest +### CheckPubKeyResult +Check PubKey result | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| event | [string](#string) | | Event | +| is_valid | [bool](#bool) | | Is PubKey valid | - + -### LocalCallRequest -LocalCall +### CheckSigRequest +Check Sig request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [Address](#massa-abi-v1-Address) | | Address is the address of the smart contract | -| function | [string](#string) | | Function is the name of the function to call | -| arg | [bytes](#bytes) | | Arg is the argument to the function | +| to_check | [string](#string) | | Sig to check | - + -### LocalCallResponse -LocalCallResponse +### CheckSigResult +Check Sig result | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| return_data | [bytes](#bytes) | | Return_data is the return value of the function | +| is_valid | [bool](#bool) | | Is Sig valid | - + -### TransferCoinsRequest -TransferCoins +### CheckedAddNativeTimeRequest +Time addition checked request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | First time to add | +| right | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Second time to add | + + + + + + + + +### CheckedAddNativeTimeResult +Time addition checked result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sum | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Sum of times | + + + + + + + + +### CheckedDivRemNativeTimeRequest +Time division checked request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| dividend | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Time to divide | +| divisor | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Divisor to divide by | + + + + + + + + +### CheckedDivRemNativeTimeResult +Time division checked result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| quotient | [uint64](#uint64) | | Quotient of time and divisor | +| remainder | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Remainder of time and divisor | + + + + + + + + +### CheckedScalarDivRemNativeTimeRequest +Time scalar divrem checked request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| dividend | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Time to divide | +| divisor | [uint64](#uint64) | | Divisor to divide by | + + + + + + + + +### CheckedScalarDivRemNativeTimeResult +Time scalar divrem checked result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| quotient | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Quotient of time and divisor | +| remainder | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Remainder of time and divisor | + + + + + + + + +### CheckedScalarMulNativeTimeRequest +Time scalar mult checked request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| time | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Time to multiply | +| coefficient | [uint64](#uint64) | | Coefficient to multiply by | + + + + + + + + +### CheckedScalarMulNativeTimeResult +Time scalar mult checked result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| product | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Product of time and coefficient | + + + + + + + + +### CheckedSubNativeTimeRequest +Time subtraction checked request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | First time to subtract from | +| right | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Second time to subtract | + + + + + + + + +### CheckedSubNativeTimeResult +Time subtraction checked result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| difference | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Difference of times (left - right) | + + + + + + + + +### CompareAddressRequest +Compare Address request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [string](#string) | | First address to compare | +| right | [string](#string) | | Second address to compare | + + + + + + + + +### CompareAddressResult +Compare Address result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [massa.model.v1.ComparisonResult](#massa-model-v1-ComparisonResult) | | Comparison result | + + + + + + + + +### CompareNativeAmountRequest +Compare NativeAmount request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | First amount to compare | +| right | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Second amount to compare | + + + + + + + + +### CompareNativeAmountResult +Compare NativeAmount result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [massa.model.v1.ComparisonResult](#massa-model-v1-ComparisonResult) | | Comparison result | + + + + + + + + +### CompareNativeTimeRequest +Time comparison request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | First time to compare | +| right | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Second time to compare | + + + + + + + + +### CompareNativeTimeResult +Time comparison result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [massa.model.v1.ComparisonResult](#massa-model-v1-ComparisonResult) | | Comparison result | + + + + + + + + +### ComparePubKeyRequest +Compare PubKey request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [string](#string) | | First public key to compare | +| right | [string](#string) | | Second public key to compare | + + + + + + + + +### ComparePubKeyResult +Compare PubKey result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [massa.model.v1.ComparisonResult](#massa-model-v1-ComparisonResult) | | Comparison result | + + + + + + + + +### CreateScRequest +Create SC request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bytecode | [bytes](#bytes) | | Bytecode is the compiled code of the smart contract | + + + + + + + + +### CreateScResult +Create SC result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sc_address | [string](#string) | | Address of the just created smart contract | + + + + + + + + +### DeleteDsEntryRequest +Delete data store entry request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to delete data for, if none, use current address | + + + + + + + + +### DeleteDsEntryResult +Delete data store entry result + + + + + + + + +### DivRemNativeAmountRequest +Amount division request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| dividend | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Amount to divide | +| divisor | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Divisor to divide by | + + + + + + + + +### DivRemNativeAmountResult +Amount division result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| quotient | [uint64](#uint64) | | Quotient of amount and divisor | +| remainder | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Remainder of amount and divisor | + + + + + + + + +### DsEntryExistsRequest +Data store entry exists request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to check data for, if none, use current address | + + + + + + + + +### DsEntryExistsResult +Data store entry exists result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| has_data | [bool](#bool) | | has data | + + + + + + + + +### Error +Error message used in abi Response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| message | [string](#string) | | a string representing the error | + + + + + + + + +### FunctionExistsRequest +Function exists request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| target_sc_address | [string](#string) | | Address of the smart contract to call | +| function_name | [string](#string) | | The name of the function to check the existance of | + + + + + + + + +### FunctionExistsResult +Function exists result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| exists | [bool](#bool) | | Exists is true if the function exists | + + + + + + + + +### GenerateEventRequest +Generate event request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| event | [bytes](#bytes) | | Event | + + + + + + + + +### GenerateEventResult +Generate event resulst + + + + + + + + +### GetAddressCategoryRequest +Get the category of the address request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [string](#string) | | | + + + + + + + + +### GetAddressCategoryResult +Get the category of the address result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| category | [massa.model.v1.AddressCategory](#massa-model-v1-AddressCategory) | | | + + + + + + + + +### GetAddressVersionRequest +Get the version of the address request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [string](#string) | | | + + + + + + + + +### GetAddressVersionResult +Get the version of the address result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version | [uint64](#uint64) | | | + + + + + + + + +### GetBalanceRequest +Get balance request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to get balance for, if none, use current address | + + + + + + + + +### GetBalanceResult +Get balance result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| balance | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | balance | + + + + + + + + +### GetBytecodeRequest +Get bytecode request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to get bytecode for, if none, use current address | + + + + + + + + +### GetBytecodeResult +Get bytecode result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bytecode | [bytes](#bytes) | | Bytecode | + + + + + + + + +### GetCallCoinsRequest +Get call coins request + + + + + + + + +### GetCallCoinsResult +Get call coins result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| coins | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | coins | + + + + + + + + +### GetCallStackRequest +Get call stack request + + + + + + + + +### GetCallStackResult +Get call stack result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| calls | [string](#string) | repeated | call stack | + + + + + + + + +### GetCurrentSlotRequest +Get current slot request + + + + + + + + +### GetCurrentSlotResult +Get current slot result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| slot | [massa.model.v1.Slot](#massa-model-v1-Slot) | | Current slot | + + + + + + + + +### GetDsKeysRequest +Get keys request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| prefix | [bytes](#bytes) | | keys prefix | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to get keys for | + + + + + + + + +### GetDsKeysResult +Get keys result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keys | [bytes](#bytes) | repeated | keys | + + + + + + + + +### GetDsValueRequest +Get data request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to get data for, if none, use current address | + + + + + + + + +### GetDsValueResult +Get data result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [bytes](#bytes) | | value | + + + + + + + + +### GetNativeTimeRequest +Get native time request + + + + + + + + +### GetNativeTimeResult +Get native time result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| time | [massa.model.v1.NativeTime](#massa-model-v1-NativeTime) | | Native time | + + + + + + + + +### GetOpDataRequest +Get op data request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | + + + + + + + + +### GetOpDataResult +Get op data result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [bytes](#bytes) | | value | + + + + + + + + +### GetOpKeysRequest +Get op keys request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| prefix | [bytes](#bytes) | | keys prefix | + + + + + + + + +### GetOpKeysResult +Get op keys result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keys | [bytes](#bytes) | repeated | keys | + + + + + + + + +### GetOriginOperationIdRequest +Get origin operation id request + + + + + + + + +### GetOriginOperationIdResult +Get origin operation id result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| operation_id | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | | + + + + + + + + +### GetOwnedAddressesRequest +Get owned addresses request + + + + + + + + +### GetOwnedAddressesResult +Get owned addresses result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| addresses | [string](#string) | repeated | owned addresses | + + + + + + + + +### GetPubKeyVersionRequest +Get the version of the public key request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| pub_key | [string](#string) | | | + + + + + + + + +### GetPubKeyVersionResult +Get the version of the public key result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version | [uint64](#uint64) | | | + + + + + + + + +### GetRemainingGasRequest +Get remaining gas request + + + + + + + + +### GetRemainingGasResult +Get remaining gas result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| remaining_gas | [uint64](#uint64) | | remaining gas | + + + + + + + + +### GetSignatureVersionRequest +Get the version of the signature request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| signature | [string](#string) | | | + + + + + + + + +### GetSignatureVersionResult +Get the version of the signature result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version | [uint64](#uint64) | | | + + + + + + + + +### HashBlake3Request +Blake3 hash request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | Data to hash | + + + + + + + + +### HashBlake3Result +Blake3 hash result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hash | [bytes](#bytes) | | Hash of data | + + + + + + + + +### HashSha256Request +Hash sha256 request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | data | + + + + + + + + +### HashSha256Result +Hash sha256 result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hash | [bytes](#bytes) | | hash | + + + + + + + + +### Keccak256Request +Keccak256 hash request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | Data to hash | + + + + + + + + +### Keccak256Result +Keccak256 hash result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hash | [bytes](#bytes) | | Hash of data | + + + + + + + + +### LocalExecutionRequest +Local execution request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bytecode | [bytes](#bytes) | | Bytecode is the compiled code of the smart contract | +| target_function_name | [string](#string) | | Function to call in the targeted smart contract | +| function_arg | [bytes](#bytes) | | Argument to the function serialized in a byte array. | + + + + + + + + +### LocalExecutionResponse +Local call response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [bytes](#bytes) | | Return_data is the return value of the function | + + + + + + + + +### NativeAmountFromStringRequest +Amount from string request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| to_convert | [string](#string) | | String to convert to Amount | + + + + + + + + +### NativeAmountFromStringResult +Amount from string result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| converted_amount | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Converted Amount | + + + + + + + + +### NativeAmountToStringRequest +Amount to string request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| to_convert | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Amount to convert to string | + + + + + + + + +### NativeAmountToStringResult +Amount to string result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| converted_amount | [string](#string) | | Converted Amount | + + + + + + + + +### OpEntryExistsRequest +Op entry exists request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | + + + + + + + + +### OpEntryExistsResult +Op entry exists result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| has_key | [bool](#bool) | | has key | + + + + + + + + +### RespResult +Tips to check for completeness exec: +`rg message | rg "\{" | rg "Result" | wc -l` +the given count should be equal to the number of messages in RespResult + 1 +the +1 comes from ResResult itself which is counted above + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| add_native_amount_result | [AddNativeAmountResult](#massa-abi-v1-AddNativeAmountResult) | | | +| address_from_pub_key_result | [AddressFromPubKeyResult](#massa-abi-v1-AddressFromPubKeyResult) | | | +| append_ds_value_result | [AppendDsValueResult](#massa-abi-v1-AppendDsValueResult) | | | +| base58_check_to_bytes_result | [Base58CheckToBytesResult](#massa-abi-v1-Base58CheckToBytesResult) | | | +| bytes_to_base58_check_result | [BytesToBase58CheckResult](#massa-abi-v1-BytesToBase58CheckResult) | | | +| caller_has_write_access_result | [CallerHasWriteAccessResult](#massa-abi-v1-CallerHasWriteAccessResult) | | | +| check_address_result | [CheckAddressResult](#massa-abi-v1-CheckAddressResult) | | | +| check_native_amount_result | [CheckNativeAmountResult](#massa-abi-v1-CheckNativeAmountResult) | | | +| check_pub_key_result | [CheckPubKeyResult](#massa-abi-v1-CheckPubKeyResult) | | | +| check_sig_result | [CheckSigResult](#massa-abi-v1-CheckSigResult) | | | +| checked_add_native_time_result | [CheckedAddNativeTimeResult](#massa-abi-v1-CheckedAddNativeTimeResult) | | | +| checked_div_rem_native_time_result | [CheckedDivRemNativeTimeResult](#massa-abi-v1-CheckedDivRemNativeTimeResult) | | | +| checked_scalar_div_rem_native_time_result | [CheckedScalarDivRemNativeTimeResult](#massa-abi-v1-CheckedScalarDivRemNativeTimeResult) | | | +| checked_scalar_mul_native_time_result | [CheckedScalarMulNativeTimeResult](#massa-abi-v1-CheckedScalarMulNativeTimeResult) | | | +| checked_sub_native_time_result | [CheckedSubNativeTimeResult](#massa-abi-v1-CheckedSubNativeTimeResult) | | | +| compare_address_result | [CompareAddressResult](#massa-abi-v1-CompareAddressResult) | | | +| compare_native_amount_result | [CompareNativeAmountResult](#massa-abi-v1-CompareNativeAmountResult) | | | +| compare_native_time_result | [CompareNativeTimeResult](#massa-abi-v1-CompareNativeTimeResult) | | | +| compare_pub_key_result | [ComparePubKeyResult](#massa-abi-v1-ComparePubKeyResult) | | | +| create_sc_result | [CreateScResult](#massa-abi-v1-CreateScResult) | | | +| delete_ds_entry_result | [DeleteDsEntryResult](#massa-abi-v1-DeleteDsEntryResult) | | | +| div_rem_native_amount_result | [DivRemNativeAmountResult](#massa-abi-v1-DivRemNativeAmountResult) | | | +| ds_entry_exists_result | [DsEntryExistsResult](#massa-abi-v1-DsEntryExistsResult) | | | +| function_exists_result | [FunctionExistsResult](#massa-abi-v1-FunctionExistsResult) | | | +| generate_event_result | [GenerateEventResult](#massa-abi-v1-GenerateEventResult) | | | +| get_address_category_result | [GetAddressCategoryResult](#massa-abi-v1-GetAddressCategoryResult) | | | +| get_address_version_result | [GetAddressVersionResult](#massa-abi-v1-GetAddressVersionResult) | | | +| get_balance_result | [GetBalanceResult](#massa-abi-v1-GetBalanceResult) | | | +| get_bytecode_result | [GetBytecodeResult](#massa-abi-v1-GetBytecodeResult) | | | +| get_call_coins_result | [GetCallCoinsResult](#massa-abi-v1-GetCallCoinsResult) | | | +| get_call_stack_result | [GetCallStackResult](#massa-abi-v1-GetCallStackResult) | | | +| get_current_slot_result | [GetCurrentSlotResult](#massa-abi-v1-GetCurrentSlotResult) | | | +| get_ds_keys_result | [GetDsKeysResult](#massa-abi-v1-GetDsKeysResult) | | | +| get_ds_value_result | [GetDsValueResult](#massa-abi-v1-GetDsValueResult) | | | +| get_native_time_result | [GetNativeTimeResult](#massa-abi-v1-GetNativeTimeResult) | | | +| get_op_data_result | [GetOpDataResult](#massa-abi-v1-GetOpDataResult) | | | +| get_op_keys_result | [GetOpKeysResult](#massa-abi-v1-GetOpKeysResult) | | | +| get_origin_operation_id_result | [GetOriginOperationIdResult](#massa-abi-v1-GetOriginOperationIdResult) | | | +| get_owned_addresses_result | [GetOwnedAddressesResult](#massa-abi-v1-GetOwnedAddressesResult) | | | +| get_pub_key_version_result | [GetPubKeyVersionResult](#massa-abi-v1-GetPubKeyVersionResult) | | | +| get_remaining_gas_result | [GetRemainingGasResult](#massa-abi-v1-GetRemainingGasResult) | | | +| get_signature_version_result | [GetSignatureVersionResult](#massa-abi-v1-GetSignatureVersionResult) | | | +| hash_blake3_result | [HashBlake3Result](#massa-abi-v1-HashBlake3Result) | | | +| hash_sha256_result | [HashSha256Result](#massa-abi-v1-HashSha256Result) | | | +| op_entry_exists_result | [OpEntryExistsResult](#massa-abi-v1-OpEntryExistsResult) | | | +| keccak256_result | [Keccak256Result](#massa-abi-v1-Keccak256Result) | | | +| local_execution_response | [LocalExecutionResponse](#massa-abi-v1-LocalExecutionResponse) | | | +| native_amount_from_string_result | [NativeAmountFromStringResult](#massa-abi-v1-NativeAmountFromStringResult) | | | +| native_amount_to_string_result | [NativeAmountToStringResult](#massa-abi-v1-NativeAmountToStringResult) | | | +| scalar_div_rem_native_amount_result | [ScalarDivRemNativeAmountResult](#massa-abi-v1-ScalarDivRemNativeAmountResult) | | | +| scalar_mul_native_amount_result | [ScalarMulNativeAmountResult](#massa-abi-v1-ScalarMulNativeAmountResult) | | | +| send_async_message_result | [SendAsyncMessageResult](#massa-abi-v1-SendAsyncMessageResult) | | | +| set_bytecode_result | [SetBytecodeResult](#massa-abi-v1-SetBytecodeResult) | | | +| set_ds_value_result | [SetDsValueResult](#massa-abi-v1-SetDsValueResult) | | | +| sub_native_amount_result | [SubNativeAmountResult](#massa-abi-v1-SubNativeAmountResult) | | | +| transfer_coins_result | [TransferCoinsResult](#massa-abi-v1-TransferCoinsResult) | | | +| unsafe_random_result | [UnsafeRandomResult](#massa-abi-v1-UnsafeRandomResult) | | | +| verify_evm_sig_result | [VerifyEvmSigResult](#massa-abi-v1-VerifyEvmSigResult) | | | +| verify_sig_result | [VerifySigResult](#massa-abi-v1-VerifySigResult) | | | + + + + + + + + +### ScalarDivRemNativeAmountRequest +Amount division by scalar request +Try to compute quotient = dividend / divisor +Fails if divisor == 0 +Fails if underflow + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| dividend | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Amount to divide | +| divisor | [uint64](#uint64) | | Divisor to divide by | + + + + + + + + +### ScalarDivRemNativeAmountResult +Amount division by scalar result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| quotient | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Quotient of amount and divisor | +| remainder | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Remainder of amount and divisor | + + + + + + + + +### ScalarMulNativeAmountRequest +Amount multiplication request +Try to compute product = amount * coefficient (fail if overflow) + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| amount | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Amount to multiply | +| coefficient | [uint64](#uint64) | | Coefficient to multiply by | + + + + + + + + +### ScalarMulNativeAmountResult +Amount multiplication result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| product | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Product of amount and coefficient | + + + + + + + + +### SendAsyncMessageFilter +Send async message request filter + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| target_address | [string](#string) | | Target address | +| target_key | [google.protobuf.BytesValue](#google-protobuf-BytesValue) | | Target key | + + + + + + + + +### SendAsyncMessageRequest +Send async message request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| target_address | [string](#string) | | Target address | +| target_handler | [string](#string) | | Target handler (function name) | +| validity_start | [massa.model.v1.Slot](#massa-model-v1-Slot) | | Start slot for the message execution | +| validity_end | [massa.model.v1.Slot](#massa-model-v1-Slot) | | End slot for the message execution | +| execution_gas | [uint64](#uint64) | | Gas given for the execution | +| raw_fee | [uint64](#uint64) | | Message fee | +| raw_coins | [uint64](#uint64) | | Coins sent to the execution context | +| data | [bytes](#bytes) | | Message data | +| filter | [SendAsyncMessageFilter](#massa-abi-v1-SendAsyncMessageFilter) | | Filter for the message | + + + + + + + + +### SendAsyncMessageResult +Send async message result + + + + + + + + +### SetBytecodeRequest +Set bytecode request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bytecode | [bytes](#bytes) | | Bytecode | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to set bytecode for, if none, use current address | + + + + + + + + +### SetBytecodeResult +Set bytecode result + + + + + + + + +### SetDsValueRequest +Set data store value request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [bytes](#bytes) | | key | +| value | [bytes](#bytes) | | value | +| address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | Address to set data for, if none, use current address | + + + + + + + + +### SetDsValueResult +Set data store value result + + + + + + + + +### SubNativeAmountRequest +Amount subtraction request +try to compute difference = left - right +fails if right > left + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| left | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | First amount to subtract from | +| right | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Second amount to subtract | + + + + + + + + +### SubNativeAmountResult +Amount subtraction result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| difference | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | Difference of amounts (left - right) | + + + + + + + + +### TransferCoinsRequest +Transfer coins request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| target_address | [string](#string) | | The address of the recipient | +| amount_to_transfer | [massa.model.v1.NativeAmount](#massa-model-v1-NativeAmount) | | The amount of coins to transfer | +| sender_address | [google.protobuf.StringValue](#google-protobuf-StringValue) | optional | The address of the sender, if none, use current address | + + + + + + + + +### TransferCoinsResult +Transfer coin result + + + + + + + + +### UnsafeRandomRequest +Unsafe random request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| num_bytes | [uint32](#uint32) | | | + + + + + + + + +### UnsafeRandomResult +Unsafe random result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| random_bytes | [bytes](#bytes) | | Random bytes generated | + + + + + + + + +### VerifyEvmSigRequest +EVM signature verification request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sig | [bytes](#bytes) | | Signature to verify | +| message | [bytes](#bytes) | | Message to verify | +| pub_key | [bytes](#bytes) | | Public key to verify with | + + + + + + + + +### VerifyEvmSigResult +EVM signature verification result + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| is_verified | [bool](#bool) | | Verification result | + + + + + + + + +### VerifySigRequest +Verify Sig request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sig | [string](#string) | | Signature to verify | +| message | [bytes](#bytes) | | Message to verify | +| pub_key | [string](#string) | | Public key to verify with | + + + + + + + + +### VerifySigResult +Verify Sig result | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| to_address | [Address](#massa-abi-v1-Address) | | To_address is the address to transfer coins to | -| raw_amount | [Amount](#massa-abi-v1-Amount) | | Amount is the amount of coins to transfer | +| is_verified | [bool](#bool) | | Verification result | diff --git a/doc/api.html b/doc/api.html index c4fc774..742fc92 100644 --- a/doc/api.html +++ b/doc/api.html @@ -1598,6 +1598,13 @@

    LargestStakersContext

    + + + + + + +
    FieldTypeLabelDescription
    raw_amountAmountis_verifiedbool

    Amount is the amount of coins to transfer

    Verification result

    Slot

    in_downtimebool

    If the chain is in downtime, we will return the last snapshot before the downtime

    diff --git a/doc/api.md b/doc/api.md index dbcecdd..b6d16e9 100644 --- a/doc/api.md +++ b/doc/api.md @@ -683,6 +683,7 @@ LargestStakers context | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | slot | [massa.model.v1.Slot](#massa-model-v1-Slot) | | Slot | +| in_downtime | [bool](#bool) | | If the chain is in downtime, we will return the last snapshot before the downtime | diff --git a/doc/commons.html b/doc/commons.html index 3713b35..266bdb0 100644 --- a/doc/commons.html +++ b/doc/commons.html @@ -260,10 +260,6 @@

    Table of Contents

    massa/model/v1/address.proto - - - -
  • - massa/model/v1/signature.proto -
  • @@ -528,21 +505,6 @@

    Table of Contents

    - - - - -
  • - massa/model/v1/hash.proto -
  • @@ -603,6 +565,10 @@

    Table of Contents

    +
  • + EComparisonResult +
  • + @@ -1275,44 +1241,6 @@

    massa/model/v1/address.proto

    NativeAddress -

    Massa NativeAddress

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    categoryAddressCategory

    Address category

    versionfixed64

    Address version

    contentbytes

    Address content

    - - - - -

    AddressCategory

    @@ -2905,82 +2833,6 @@

    SelectorDraws

    -
    -

    massa/model/v1/signature.proto

    Top -
    -

    - - -

    NativePubKey

    -

    - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    versionfixed64

    contentbytes

    - - - - - -

    NativeSig

    -

    - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    versionfixed64

    contentbytes

    - - - - - - - - - - - - -

    massa/model/v1/endorsement.proto

    Top
    @@ -3071,6 +2923,13 @@

    SignedEndorsement

    A secure hash of the data. See also [massa_hash::Hash]

    + + serialized_size + fixed64 + +

    The size of the serialized endorsement

    + + @@ -3104,14 +2963,14 @@

    NativeAmount

    mantissa - fixed64 + uint64

    Mantissa

    scale - fixed32 + uint32

    Scale

    @@ -3131,51 +2990,6 @@

    NativeAmount

    -
    -

    massa/model/v1/hash.proto

    Top -
    -

    - - -

    NativeHash

    -

    - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    versionfixed64

    contentbytes

    - - - - - - - - - - - - -

    massa/model/v1/block.proto

    Top
    @@ -3607,13 +3421,6 @@

    SecureShare

    A secure hash of the data. See also [massa_hash::Hash]

    - - serialized_size - fixed64 - -

    The size of the serialized endorsement

    - - @@ -3623,6 +3430,41 @@

    SecureShare

    +

    ComparisonResult

    +

    Comparison result

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameNumberDescription
    COMPARISON_RESULT_UNSPECIFIED0

    COMPARISON_RESULT_LOWER1

    left is lower

    COMPARISON_RESULT_EQUAL2

    left and right are equal

    COMPARISON_RESULT_GREATER3

    left is greater

    + diff --git a/doc/commons.md b/doc/commons.md index f88c4c4..16dfd13 100644 --- a/doc/commons.md +++ b/doc/commons.md @@ -25,8 +25,6 @@ - [OperationStatus](#massa-model-v1-OperationStatus) - [massa/model/v1/address.proto](#massa_model_v1_address-proto) - - [NativeAddress](#massa-model-v1-NativeAddress) - - [AddressCategory](#massa-model-v1-AddressCategory) - [massa/model/v1/execution.proto](#massa_model_v1_execution-proto) @@ -78,10 +76,6 @@ - [massa/model/v1/draw.proto](#massa_model_v1_draw-proto) - [SelectorDraws](#massa-model-v1-SelectorDraws) -- [massa/model/v1/signature.proto](#massa_model_v1_signature-proto) - - [NativePubKey](#massa-model-v1-NativePubKey) - - [NativeSig](#massa-model-v1-NativeSig) - - [massa/model/v1/endorsement.proto](#massa_model_v1_endorsement-proto) - [Endorsement](#massa-model-v1-Endorsement) - [SignedEndorsement](#massa-model-v1-SignedEndorsement) @@ -89,9 +83,6 @@ - [massa/model/v1/amount.proto](#massa_model_v1_amount-proto) - [NativeAmount](#massa-model-v1-NativeAmount) -- [massa/model/v1/hash.proto](#massa_model_v1_hash-proto) - - [NativeHash](#massa-model-v1-NativeHash) - - [massa/model/v1/block.proto](#massa_model_v1_block-proto) - [Block](#massa-model-v1-Block) - [BlockHeader](#massa-model-v1-BlockHeader) @@ -107,6 +98,8 @@ - [BytesMapFieldEntry](#massa-model-v1-BytesMapFieldEntry) - [SecureShare](#massa-model-v1-SecureShare) + - [ComparisonResult](#massa-model-v1-ComparisonResult) + - [Scalar Value Types](#scalar-value-types) @@ -405,23 +398,6 @@ Possible statuses for an operation ## massa/model/v1/address.proto - - - -### NativeAddress -Massa NativeAddress - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| category | [AddressCategory](#massa-model-v1-AddressCategory) | | Address category | -| version | [fixed64](#fixed64) | | Address version | -| content | [bytes](#bytes) | | Address content | - - - - - @@ -1166,54 +1142,6 @@ Selector draws - -

    Top

    - -## massa/model/v1/signature.proto - - - - - -### NativePubKey - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [fixed64](#fixed64) | | | -| content | [bytes](#bytes) | | | - - - - - - - - -### NativeSig - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [fixed64](#fixed64) | | | -| content | [bytes](#bytes) | | | - - - - - - - - - - - - - - -

    Top

    @@ -1251,6 +1179,7 @@ Signed endorsement | content_creator_pub_key | [string](#string) | | The public-key component used in the generation of the signature | | content_creator_address | [string](#string) | | Derived from the same public key used to generate the signature | | id | [string](#string) | | A secure hash of the data. See also [massa_hash::Hash] | +| serialized_size | [fixed64](#fixed64) | | The size of the serialized endorsement | @@ -1282,40 +1211,8 @@ the future. value = mantissa / (10^scale) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| mantissa | [fixed64](#fixed64) | | Mantissa | -| scale | [fixed32](#fixed32) | | Scale | - - - - - - - - - - - - - - - - -

    Top

    - -## massa/model/v1/hash.proto - - - - - -### NativeHash - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [fixed64](#fixed64) | | | -| content | [bytes](#bytes) | | | +| mantissa | [uint64](#uint64) | | Mantissa | +| scale | [uint32](#uint32) | | Scale | @@ -1521,7 +1418,6 @@ Packages a type such that it can be securely sent and received in a trust-free n | content_creator_pub_key | [string](#string) | | The public-key component used in the generation of the signature | | content_creator_address | [string](#string) | | Derived from the same public key used to generate the signature | | id | [string](#string) | | A secure hash of the data. See also [massa_hash::Hash] | -| serialized_size | [fixed64](#fixed64) | | The size of the serialized endorsement | @@ -1529,6 +1425,20 @@ Packages a type such that it can be securely sent and received in a trust-free n + + + +### ComparisonResult +Comparison result + +| Name | Number | Description | +| ---- | ------ | ----------- | +| COMPARISON_RESULT_UNSPECIFIED | 0 | | +| COMPARISON_RESULT_LOWER | 1 | left is lower | +| COMPARISON_RESULT_EQUAL | 2 | left and right are equal | +| COMPARISON_RESULT_GREATER | 3 | left is greater | + + diff --git a/proto/abis/massa/abi/v1/abi.proto b/proto/abis/massa/abi/v1/abi.proto index a160c42..009d90f 100644 --- a/proto/abis/massa/abi/v1/abi.proto +++ b/proto/abis/massa/abi/v1/abi.proto @@ -1,9 +1,15 @@ // Copyright (c) 2023 MASSA LABS syntax = "proto3"; - package massa.abi.v1; +import "google/protobuf/wrappers.proto"; +import "massa/model/v1/address.proto"; +import "massa/model/v1/amount.proto"; +import "massa/model/v1/commons.proto"; +import "massa/model/v1/slot.proto"; +import "massa/model/v1/time.proto"; + option csharp_namespace = "Com.Massa.Abi.V1"; option go_package = "github.com/massalabs/massa/abi/v1;v1"; option java_multiple_files = true; @@ -13,91 +19,901 @@ option php_namespace = "Com\\Massa\\Abi\\V1"; option ruby_package = "Com::Massa::Abi::V1"; option swift_prefix = "MABI"; -// Address -message Address { - // Address is a string representation of the address - string address = 1; -} - -// Amount -message Amount { - // Amount is a 64-bit unsigned integer - fixed64 amount = 1; +// Error message used in abi Response +message Error { + // a string representing the error + string message = 1; } -// Empty -message Empty {} - -// CreateSC -message CreateSCRequest { +// Create SC request +message CreateScRequest { // Bytecode is the compiled code of the smart contract bytes bytecode = 1; } -// CreateSCResponse -message CreateSCResponse { - // Address is a string representation of the address - Address address = 1; +// Create SC result +message CreateScResult { + // Address of the just created smart contract + string sc_address = 1; } -// CallSC +// Call SC request message CallRequest { - // Address is the address of the smart contract - Address address = 1; - // Function is the name of the function to call - string function = 2; - // Arg is the argument to the function - bytes arg = 3; + // Address of the smart contract to call + string target_sc_address = 1; + // Function to call in the targeted smart contract + string target_function_name = 2; + // Argument to the function serialized in a byte array. + bytes function_arg = 3; // call_coins is the amount of coins to pay for the call - Amount call_coins = 4; + massa.model.v1.NativeAmount call_coins = 4; } -// CallResponse +// Call SC response message CallResponse { // Return_data is the return value of the function - bytes return_data = 1; + bytes data = 1; } -// LocalCall -message LocalCallRequest { - // Address is the address of the smart contract - Address address = 1; - // Function is the name of the function to call - string function = 2; - // Arg is the argument to the function - bytes arg = 3; +// Local execution request +message LocalExecutionRequest { + // Bytecode is the compiled code of the smart contract + bytes bytecode = 1; + // Function to call in the targeted smart contract + string target_function_name = 2; + // Argument to the function serialized in a byte array. + bytes function_arg = 3; } -// LocalCallResponse -message LocalCallResponse { +// Local call response +message LocalExecutionResponse { // Return_data is the return value of the function - bytes return_data = 1; + bytes data = 1; } -// GenerateEventRequest +// Generate event request message GenerateEventRequest { // Event - string event = 1; + bytes event = 1; } -// TransferCoins +// Generate event resulst +message GenerateEventResult {} + +// Transfer coins request message TransferCoinsRequest { - // To_address is the address to transfer coins to - Address to_address = 1; - // Amount is the amount of coins to transfer - Amount raw_amount = 2; + // The address of the recipient + string target_address = 1; + // The amount of coins to transfer + massa.model.v1.NativeAmount amount_to_transfer = 2; + // The address of the sender, if none, use current address + optional google.protobuf.StringValue sender_address = 3; } -// FunctionExists +// Transfer coin result +message TransferCoinsResult {} + +// Function exists request message FunctionExistsRequest { - // Address is the address of the smart contract - Address address = 1; - // Function is the name of the function to call - string function = 2; + // Address of the smart contract to call + string target_sc_address = 1; + // The name of the function to check the existance of + string function_name = 2; } -// FunctionExistsResponse -message FunctionExistsResponse { +// Function exists result +message FunctionExistsResult { // Exists is true if the function exists bool exists = 1; } + +// Message returned in case of success of an ABI call. +// See the documentation of the specific result for the meaning of the fields. +// Call RespResult because Result will conflict with the Result type in Rust +// data MUST have the same name as they type in Rust they are converted to type + +// Tips to check for completeness exec: +// `rg message | rg "\{" | rg "Result" | wc -l` +// the given count should be equal to the number of messages in RespResult + 1 +// the +1 comes from ResResult itself which is counted above +message RespResult { + oneof res { + AddNativeAmountResult add_native_amount_result = 1; + AddressFromPubKeyResult address_from_pub_key_result = 2; + AppendDsValueResult append_ds_value_result = 3; + Base58CheckToBytesResult base58_check_to_bytes_result = 4; + BytesToBase58CheckResult bytes_to_base58_check_result = 5; + CallerHasWriteAccessResult caller_has_write_access_result = 6; + CheckAddressResult check_address_result = 7; + CheckNativeAmountResult check_native_amount_result = 8; + CheckPubKeyResult check_pub_key_result = 9; + CheckSigResult check_sig_result = 10; + CheckedAddNativeTimeResult checked_add_native_time_result = 11; + CheckedDivRemNativeTimeResult checked_div_rem_native_time_result = 12; + CheckedScalarDivRemNativeTimeResult checked_scalar_div_rem_native_time_result = 13; + CheckedScalarMulNativeTimeResult checked_scalar_mul_native_time_result = 14; + CheckedSubNativeTimeResult checked_sub_native_time_result = 15; + CompareAddressResult compare_address_result = 16; + CompareNativeAmountResult compare_native_amount_result = 17; + CompareNativeTimeResult compare_native_time_result = 18; + ComparePubKeyResult compare_pub_key_result = 19; + CreateScResult create_sc_result = 20; + DeleteDsEntryResult delete_ds_entry_result = 21; + DivRemNativeAmountResult div_rem_native_amount_result = 22; + DsEntryExistsResult ds_entry_exists_result = 23; + FunctionExistsResult function_exists_result = 24; + GenerateEventResult generate_event_result = 25; + GetAddressCategoryResult get_address_category_result = 26; + GetAddressVersionResult get_address_version_result = 27; + GetBalanceResult get_balance_result = 28; + GetBytecodeResult get_bytecode_result = 29; + GetCallCoinsResult get_call_coins_result = 30; + GetCallStackResult get_call_stack_result = 31; + GetCurrentSlotResult get_current_slot_result = 32; + GetDsKeysResult get_ds_keys_result = 33; + GetDsValueResult get_ds_value_result = 34; + GetNativeTimeResult get_native_time_result = 35; + GetOpDataResult get_op_data_result = 36; + GetOpKeysResult get_op_keys_result = 37; + GetOriginOperationIdResult get_origin_operation_id_result = 38; + GetOwnedAddressesResult get_owned_addresses_result = 39; + GetPubKeyVersionResult get_pub_key_version_result = 40; + GetRemainingGasResult get_remaining_gas_result = 41; + GetSignatureVersionResult get_signature_version_result = 42; + HashBlake3Result hash_blake3_result = 43; + HashSha256Result hash_sha256_result = 44; + OpEntryExistsResult op_entry_exists_result = 45; + Keccak256Result keccak256_result = 46; + LocalExecutionResponse local_execution_response = 47; + NativeAmountFromStringResult native_amount_from_string_result = 48; + NativeAmountToStringResult native_amount_to_string_result = 49; + ScalarDivRemNativeAmountResult scalar_div_rem_native_amount_result = 50; + ScalarMulNativeAmountResult scalar_mul_native_amount_result = 51; + SendAsyncMessageResult send_async_message_result = 52; + SetBytecodeResult set_bytecode_result = 53; + SetDsValueResult set_ds_value_result = 54; + SubNativeAmountResult sub_native_amount_result = 55; + TransferCoinsResult transfer_coins_result = 56; + UnsafeRandomResult unsafe_random_result = 57; + EvmVerifySigResult evm_verify_sig_result = 58; + VerifySigResult verify_sig_result = 59; + EvmGetAddressFromPubkeyResult evm_get_address_from_pubkey_result = 60; + EvmGetPubkeyFromSignatureResult evm_get_pubkey_from_signature_result = 61; + IsAddressEoaResult is_address_eoa_result = 62; + } +} + +// Generic message that encapsulate response from ABI calls. +message AbiResponse { + oneof resp { + // variant for success + RespResult res = 1; + // variant for error + Error error = 2; + } +} + +// Amount to string request +message NativeAmountToStringRequest { + // Amount to convert to string + massa.model.v1.NativeAmount to_convert = 1; +} + +// Amount to string result +message NativeAmountToStringResult { + // Converted Amount + string converted_amount = 1; +} + +// Amount from string request +message NativeAmountFromStringRequest { + // String to convert to Amount + string to_convert = 1; +} + +// Amount from string result +message NativeAmountFromStringResult { + // Converted Amount + massa.model.v1.NativeAmount converted_amount = 1; +} + +// Check address request +message CheckAddressRequest { + // Address to check + string to_check = 1; +} + +// Check address result +message CheckAddressResult { + // Is address valid + bool is_valid = 1; +} + +// Check PubKey request +message CheckPubKeyRequest { + // PubKey to check + string to_check = 1; +} + +// Check PubKey result +message CheckPubKeyResult { + // Is PubKey valid + bool is_valid = 1; +} + +// Check Sig request +message CheckSigRequest { + // Sig to check + string to_check = 1; +} + +// Check Sig result +message CheckSigResult { + // Is Sig valid + bool is_valid = 1; +} + +// Check Amount request +message CheckNativeAmountRequest { + // Amount to check + massa.model.v1.NativeAmount to_check = 1; +} + +// Check Amount result +message CheckNativeAmountResult { + // Is Amount valid + bool is_valid = 1; +} + +// Amount addition request +message AddNativeAmountRequest { + // First amount to add + massa.model.v1.NativeAmount amount1 = 1; + // Second amount to add + massa.model.v1.NativeAmount amount2 = 2; +} + +// Amount addition result +message AddNativeAmountResult { + // Sum of amounts + massa.model.v1.NativeAmount sum = 1; +} + +// Amount subtraction request +// try to compute difference = left - right +// fails if right > left +message SubNativeAmountRequest { + // First amount to subtract from + massa.model.v1.NativeAmount left = 1; + // Second amount to subtract + massa.model.v1.NativeAmount right = 2; +} + +// Amount subtraction result +message SubNativeAmountResult { + // Difference of amounts (left - right) + massa.model.v1.NativeAmount difference = 1; +} + +// Amount multiplication request +// Try to compute product = amount * coefficient (fail if overflow) +message ScalarMulNativeAmountRequest { + // Amount to multiply + massa.model.v1.NativeAmount amount = 1; + // Coefficient to multiply by + uint64 coefficient = 2; +} + +// Amount multiplication result +message ScalarMulNativeAmountResult { + // Product of amount and coefficient + massa.model.v1.NativeAmount product = 1; +} + +// Amount division by scalar request +// Try to compute quotient = dividend / divisor +// Fails if divisor == 0 +// Fails if underflow +message ScalarDivRemNativeAmountRequest { + // Amount to divide + massa.model.v1.NativeAmount dividend = 1; + // Divisor to divide by + uint64 divisor = 2; +} + +// Amount division by scalar result +message ScalarDivRemNativeAmountResult { + // Quotient of amount and divisor + massa.model.v1.NativeAmount quotient = 1; + // Remainder of amount and divisor + massa.model.v1.NativeAmount remainder = 2; +} + +// Amount division request +message DivRemNativeAmountRequest { + // Amount to divide + massa.model.v1.NativeAmount dividend = 1; + // Divisor to divide by + massa.model.v1.NativeAmount divisor = 2; +} + +// Amount division result +message DivRemNativeAmountResult { + // Quotient of amount and divisor + uint64 quotient = 1; + // Remainder of amount and divisor + massa.model.v1.NativeAmount remainder = 2; +} + +// Time addition checked request +message CheckedAddNativeTimeRequest { + // First time to add + massa.model.v1.NativeTime left = 1; + // Second time to add + massa.model.v1.NativeTime right = 2; +} + +// Time addition checked result +message CheckedAddNativeTimeResult { + // Sum of times + massa.model.v1.NativeTime sum = 1; +} + +// Time subtraction checked request +message CheckedSubNativeTimeRequest { + // First time to subtract from + massa.model.v1.NativeTime left = 1; + // Second time to subtract + massa.model.v1.NativeTime right = 2; +} + +// Time subtraction checked result +message CheckedSubNativeTimeResult { + // Difference of times (left - right) + massa.model.v1.NativeTime difference = 1; +} + +// Time scalar mult checked request +message CheckedScalarMulNativeTimeRequest { + // Time to multiply + massa.model.v1.NativeTime time = 1; + // Coefficient to multiply by + uint64 coefficient = 2; +} + +// Time scalar mult checked result +message CheckedScalarMulNativeTimeResult { + // Product of time and coefficient + massa.model.v1.NativeTime product = 1; +} + +// Time scalar divrem checked request +message CheckedScalarDivRemNativeTimeRequest { + // Time to divide + massa.model.v1.NativeTime dividend = 1; + // Divisor to divide by + uint64 divisor = 2; +} + +// Time scalar divrem checked result +message CheckedScalarDivRemNativeTimeResult { + // Quotient of time and divisor + massa.model.v1.NativeTime quotient = 1; + // Remainder of time and divisor + massa.model.v1.NativeTime remainder = 2; +} + +// Time division checked request +message CheckedDivRemNativeTimeRequest { + // Time to divide + massa.model.v1.NativeTime dividend = 1; + // Divisor to divide by + massa.model.v1.NativeTime divisor = 2; +} + +// Time division checked result +message CheckedDivRemNativeTimeResult { + // Quotient of time and divisor + uint64 quotient = 1; + // Remainder of time and divisor + massa.model.v1.NativeTime remainder = 2; +} + +// Time comparison request +message CompareNativeTimeRequest { + // First time to compare + massa.model.v1.NativeTime left = 1; + // Second time to compare + massa.model.v1.NativeTime right = 2; +} + +// Time comparison result +message CompareNativeTimeResult { + // Comparison result + massa.model.v1.ComparisonResult result = 1; +} + +// Compare Address request +message CompareAddressRequest { + // First address to compare + string left = 1; + // Second address to compare + string right = 2; +} + +// Compare Address result +message CompareAddressResult { + // Comparison result + massa.model.v1.ComparisonResult result = 1; +} + +// Compare PubKey request +message ComparePubKeyRequest { + // First public key to compare + string left = 1; + // Second public key to compare + string right = 2; +} + +// Compare PubKey result +message ComparePubKeyResult { + // Comparison result + massa.model.v1.ComparisonResult result = 1; +} + +// Verify Sig request +message VerifySigRequest { + // Signature to verify + string sig = 1; + // Message to verify + bytes message = 2; + // Public key to verify with + string pub_key = 3; +} + +// Verify Sig result +message VerifySigResult { + // Verification result + bool is_verified = 1; +} + +// Compare NativeAmount request +message CompareNativeAmountRequest { + // First amount to compare + massa.model.v1.NativeAmount left = 1; + // Second amount to compare + massa.model.v1.NativeAmount right = 2; +} + +// Compare NativeAmount result +message CompareNativeAmountResult { + // Comparison result + massa.model.v1.ComparisonResult result = 1; +} + +// Keccak256 hash request +message Keccak256Request { + // Data to hash + bytes data = 1; +} + +// Keccak256 hash result +message Keccak256Result { + // Hash of data + bytes hash = 1; +} + +// EVM signature verification request +message EvmVerifySigRequest { + // Signature to verify + bytes sig = 1; + // Message to verify + bytes message = 2; + // Public key to verify with + bytes pub_key = 3; +} + +// EVM signature verification result +message EvmVerifySigResult { + // Verification result + bool is_verified = 1; +} + +// EVM get address from public key request +message EvmGetAddressFromPubkeyRequest { + // Public key to get address from + bytes pub_key = 1; +} + +// EVM get address from public key result +message EvmGetAddressFromPubkeyResult { + // Address + bytes address = 1; +} + +// EVM get public key from signature request +message EvmGetPubkeyFromSignatureRequest { + // Signed hash to verify + bytes hash = 1; + // Signature to verify + bytes sig = 2; +} + +// EVM get public key from signature result +message EvmGetPubkeyFromSignatureResult { + // Public key + bytes pub_key = 1; +} + +// Is address EOA request +message IsAddressEoaRequest { + // Address to check + string address = 1; +} + +// Is address EOA result +message IsAddressEoaResult { + // Is address EOA + bool is_eoa = 1; +} + +// Blake3 hash request +message HashBlake3Request { + // Data to hash + bytes data = 1; +} + +// Blake3 hash result +message HashBlake3Result { + // Hash of data + bytes hash = 1; +} + +// Get keys request +message GetDsKeysRequest { + // keys prefix + bytes prefix = 1; + // Address to get keys for + optional google.protobuf.StringValue address = 2; +} + +// Get keys result +message GetDsKeysResult { + // keys + repeated bytes keys = 1; +} + +// Set data store value request +message SetDsValueRequest { + // key + bytes key = 1; + // value + bytes value = 2; + // Address to set data for, if none, use current address + optional google.protobuf.StringValue address = 3; +} + +// Set data store value result +message SetDsValueResult {} + +// Append data request +message AppendDsValueRequest { + // key + bytes key = 1; + // value + bytes value = 2; + // Address to append data for, if none, use current address + optional google.protobuf.StringValue address = 3; +} + +// Append data result +message AppendDsValueResult {} + +// Get data request +message GetDsValueRequest { + // key + bytes key = 1; + // Address to get data for, if none, use current address + optional google.protobuf.StringValue address = 2; +} + +// Get data result +message GetDsValueResult { + // value + bytes value = 1; +} + +// Delete data store entry request +message DeleteDsEntryRequest { + // key + bytes key = 1; + // Address to delete data for, if none, use current address + optional google.protobuf.StringValue address = 2; +} + +// Delete data store entry result +message DeleteDsEntryResult {} + +// Data store entry exists request +message DsEntryExistsRequest { + // key + bytes key = 1; + // Address to check data for, if none, use current address + optional google.protobuf.StringValue address = 2; +} + +// Data store entry exists result +message DsEntryExistsResult { + // has data + bool has_data = 1; +} + +// Get owned addresses request +message GetOwnedAddressesRequest {} + +// Get owned addresses result +message GetOwnedAddressesResult { + // owned addresses + repeated string addresses = 1; +} + +// Get call stack request +message GetCallStackRequest {} + +// Get call stack result +message GetCallStackResult { + // call stack + repeated string calls = 1; +} + +// Address from public key request +message AddressFromPubKeyRequest { + // Native public key + string pub_key = 1; +} + +// Address from public key result +message AddressFromPubKeyResult { + // Address + string address = 1; +} + +// Unsafe random request +message UnsafeRandomRequest { + uint32 num_bytes = 2; +} + +// Unsafe random result +message UnsafeRandomResult { + // Random bytes generated + bytes random_bytes = 1; +} + +// Send async message request filter +message SendAsyncMessageFilter { + // Target address + string target_address = 1; + // Target key + google.protobuf.BytesValue target_key = 2; +} + +// Send async message request +message SendAsyncMessageRequest { + // Target address + string target_address = 1; + // Target handler (function name) + string target_handler = 2; + // Start slot for the message execution + massa.model.v1.Slot validity_start = 3; + // End slot for the message execution + massa.model.v1.Slot validity_end = 4; + // Gas given for the execution + uint64 execution_gas = 5; + // Message fee + uint64 raw_fee = 6; + // Coins sent to the execution context + uint64 raw_coins = 7; + // Message data + bytes data = 8; + // Filter for the message + SendAsyncMessageFilter filter = 9; +} + +// Send async message result +message SendAsyncMessageResult {} + +// Get origin operation id request +message GetOriginOperationIdRequest {} + +// Get origin operation id result +message GetOriginOperationIdResult { + optional google.protobuf.StringValue operation_id = 1; +} + +// Get native time request +message GetNativeTimeRequest {} + +// Get native time result +message GetNativeTimeResult { + // Native time + massa.model.v1.NativeTime time = 1; +} + +// Get current slot request +message GetCurrentSlotRequest {} + +// Get current slot result +message GetCurrentSlotResult { + // Current slot + massa.model.v1.Slot slot = 1; +} + +// Set bytecode request +message SetBytecodeRequest { + // Bytecode + bytes bytecode = 1; + // Address to set bytecode for, if none, use current address + optional google.protobuf.StringValue address = 2; +} + +// Set bytecode result +message SetBytecodeResult {} + +// Get bytecode request +message GetBytecodeRequest { + // Address to get bytecode for, if none, use current address + optional google.protobuf.StringValue address = 1; +} + +// Get bytecode result +message GetBytecodeResult { + // Bytecode + bytes bytecode = 1; +} + +// Caller has write access request +message CallerHasWriteAccessRequest {} + +// Caller has write access result +message CallerHasWriteAccessResult { + // Caller has write access + bool has_write_access = 1; +} + +// Hash sha256 request +message HashSha256Request { + // data + bytes data = 1; +} + +// Hash sha256 result +message HashSha256Result { + // hash + bytes hash = 1; +} + +// Get op data request +message GetOpDataRequest { + // key + bytes key = 1; +} + +// Get op data result +message GetOpDataResult { + // value + bytes value = 1; +} + +// Op entry exists request +message OpEntryExistsRequest { + // key + bytes key = 1; +} + +// Op entry exists result +message OpEntryExistsResult { + // has key + bool has_key = 1; +} + +// Get op keys request +message GetOpKeysRequest { + // keys prefix + bytes prefix = 1; +} + +// Get op keys result +message GetOpKeysResult { + // keys + repeated bytes keys = 1; +} + +// Get remaining gas request +message GetRemainingGasRequest {} + +// Get remaining gas result +message GetRemainingGasResult { + // remaining gas + uint64 remaining_gas = 1; +} + +// Get balance request +message GetBalanceRequest { + // Address to get balance for, if none, use current address + optional google.protobuf.StringValue address = 1; +} + +// Get balance result +message GetBalanceResult { + // balance + massa.model.v1.NativeAmount balance = 1; +} + +// Get call coins request +message GetCallCoinsRequest {} + +// Get call coins result +message GetCallCoinsResult { + // coins + massa.model.v1.NativeAmount coins = 1; +} + +// Get the version of the address request +message GetAddressVersionRequest { + string address = 1; +} + +// Get the version of the address result +message GetAddressVersionResult { + uint64 version = 1; +} + +// Get the category of the address request +message GetAddressCategoryRequest { + string address = 1; +} + +// Get the category of the address result +message GetAddressCategoryResult { + massa.model.v1.AddressCategory category = 1; +} + +// Get the version of the public key request +message GetPubKeyVersionRequest { + string pub_key = 1; +} + +// Get the version of the public key result +message GetPubKeyVersionResult { + uint64 version = 1; +} + +// Get the version of the signature request +message GetSignatureVersionRequest { + string signature = 1; +} + +// Get the version of the signature result +message GetSignatureVersionResult { + uint64 version = 1; +} + +// bytes to base58 request +message BytesToBase58CheckRequest { + bytes bytes = 1; +} + +// bytes to base58 result +message BytesToBase58CheckResult { + string base58_check = 1; +} + +// base58 to bytes request +message Base58CheckToBytesRequest { + string base58_check = 1; +} + +// base58 to bytes result +message Base58CheckToBytesResult { + bytes bytes = 1; +} diff --git a/proto/apis/massa/api/v1/api.proto b/proto/apis/massa/api/v1/api.proto index 73a4b4d..7556845 100644 --- a/proto/apis/massa/api/v1/api.proto +++ b/proto/apis/massa/api/v1/api.proto @@ -268,6 +268,8 @@ message GetLargestStakersResponse { message LargestStakersContext { // Slot massa.model.v1.Slot slot = 1; + // If the chain is in downtime, we will return the last snapshot before the downtime + bool in_downtime = 2; } // LargestStakerEntry diff --git a/proto/commons/massa/model/v1/address.proto b/proto/commons/massa/model/v1/address.proto index 382da13..9146ea0 100644 --- a/proto/commons/massa/model/v1/address.proto +++ b/proto/commons/massa/model/v1/address.proto @@ -22,13 +22,3 @@ enum AddressCategory { // Smart contract address ADDRESS_CATEGORY_SC_ADDRESS = 2; } - -// Massa NativeAddress -message NativeAddress { - // Address category - AddressCategory category = 1; - // Address version - fixed64 version = 2; - // Address content - bytes content = 3; -} diff --git a/proto/commons/massa/model/v1/amount.proto b/proto/commons/massa/model/v1/amount.proto index 2c99c53..21dada2 100644 --- a/proto/commons/massa/model/v1/amount.proto +++ b/proto/commons/massa/model/v1/amount.proto @@ -17,7 +17,7 @@ option swift_prefix = "MMODEL"; // the future. value = mantissa / (10^scale) message NativeAmount { // Mantissa - fixed64 mantissa = 1; + uint64 mantissa = 1; // Scale - fixed32 scale = 2; + uint32 scale = 2; } diff --git a/proto/commons/massa/model/v1/commons.proto b/proto/commons/massa/model/v1/commons.proto index a0cd1ba..0c8cfeb 100644 --- a/proto/commons/massa/model/v1/commons.proto +++ b/proto/commons/massa/model/v1/commons.proto @@ -34,3 +34,14 @@ message SecureShare { // A secure hash of the data. See also [massa_hash::Hash] string id = 5; } + +// Comparison result +enum ComparisonResult { + COMPARISON_RESULT_UNSPECIFIED = 0; + // left is lower + COMPARISON_RESULT_LOWER = 1; + // left and right are equal + COMPARISON_RESULT_EQUAL = 2; + // left is greater + COMPARISON_RESULT_GREATER = 3; +} diff --git a/proto/commons/massa/model/v1/hash.proto b/proto/commons/massa/model/v1/hash.proto deleted file mode 100644 index 834d8fb..0000000 --- a/proto/commons/massa/model/v1/hash.proto +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2023 MASSA LABS - -syntax = "proto3"; - -package massa.model.v1; - -option csharp_namespace = "Com.Massa.Model.v1"; -option go_package = "github.com/massalabs/massa/model/v1;v1"; -option java_multiple_files = true; -option java_package = "com.massa.model.v1"; -option objc_class_prefix = "MMODEL"; -option php_namespace = "Com\\Massa\\Model\\V1"; -option ruby_package = "Com::Massa::Model::V1"; -option swift_prefix = "MMODEL"; - -// NativeHash. -message NativeHash { - // Version of the hash. - fixed64 version = 1; - // Content of the hash. - bytes content = 2; -} diff --git a/proto/commons/massa/model/v1/signature.proto b/proto/commons/massa/model/v1/signature.proto deleted file mode 100644 index 31672fa..0000000 --- a/proto/commons/massa/model/v1/signature.proto +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2023 MASSA LABS - -syntax = "proto3"; - -package massa.model.v1; - -option csharp_namespace = "Com.Massa.Model.v1"; -option go_package = "github.com/massalabs/massa/model/v1;v1"; -option java_multiple_files = true; -option java_package = "com.massa.model.v1"; -option objc_class_prefix = "MMODEL"; -option php_namespace = "Com\\Massa\\Model\\V1"; -option ruby_package = "Com::Massa::Model::V1"; -option swift_prefix = "MMODEL"; - -// Native Signature -message NativeSig { - // Version of the signature - fixed64 version = 1; - // Content of the signature - bytes content = 2; -} - -// Native Public Key -message NativePubKey { - // Version of the public key - fixed64 version = 1; - // Content of the public key - bytes content = 2; -}