Skip to content

evmGas Object in example not matching api-proto description #1

Description

@FunnyFloOD

In your example code at

const gasObject = {
maxFee: {value: '100000'}, // use google.protobuf.StringValue
maxPriorityFee: {value: '50000'},
gasLimit: {value: '21000'}
};
const evmGas = EVMGas.create(gasObject);

you create the object with variable names maxFee, maxPriorityFee and gasLimit.

I tried to apply this to my project and for some reason the evmGas was always ignored when I tried to submit this in an API call. Instead, MPCVault API always processed the request with evmGas = null, calculated the fees by itself from current market rates and for the gas limit applied some default of eight million gas units.

There are no warnings or errors coming up, it just seems like the evmGas was ignored in the request.

The solution: looking into the api.proto definitions at

message EVMGas {
// max_fee is the maximum fee that the user is willing to pay, denominated in wei.
google.protobuf.StringValue max_fee = 1;
// max_priority_fee is the maximum priority fee that the user is willing to pay for EIP-1559 transactions, denominated in wei.
// leave this field empty if you do not want to use EIP-1559.
google.protobuf.StringValue max_priority_fee = 2;
// gas_limit is the maximum amount of gas that the tx is allowed to consume.
google.protobuf.StringValue gas_limit = 3;
}

the actual variable names are max_fee, max_priority_fee and gas_limit.

Replacing this in the example code, everything works fine. So I suggest you update your example to match the api.proto definitions. Since there are now warnings whatsoever, this costed me couple of hours trying with many different attempts to call the MPCVault API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions