Open leoslr opened 3 years ago
Hello,
change the function getData
in "path_accounts.go" like this:
func (b *PluginBackend) getData(client *ethclient.Client, fromAddress common.Address, data *framework.FieldData) (*TransactionParams, error) {
transactionParams, err := b.getBaseData(client, fromAddress, data, "to")
if err != nil {
return nil, err
}
var gasLimitIn *big.Int
gasLimitIn = util.ValidNumber(data.Get("gas_limit").(string))
gasLimit := gasLimitIn.Uint64()
return &TransactionParams{
Nonce: transactionParams.Nonce,
Address: transactionParams.Address,
Amount: transactionParams.Amount,
GasPrice: transactionParams.GasPrice,
GasLimit: gasLimit,
}, nil
}
GetDefaultOrZero
is changed to Get
Hello,
Brief Description
When trying to sign a transaction with any accounts, I'm unable to modify the gas_limit parameter of the transaction. It always takes the default value which is 21000.
Detailed Description
I've tried to send sign-tx request by using the cli with :
(Before trying to make this request I sent ether to the corresponding account). The response I get :
I've tried several gas_limit values including hexadecimal ones. It's value always stays at 21000. I'm able to change all of the other parameters' value.
I decoded the signed transaction and and indeed the transaction is crafted with the wrong gas_limit parameter (21000). I've also tried to make request with curl but the result is the same.
This makes it impossible to send transactions containing data that trigger smart contract functions : the gas_limit is too low. When sending the transaction to any RPC endpoint we get the following error :
Your Environment
OS : Debian 10. Vault and Vault-ethereum are running inside a docker container. Version of Vault utilisée : 1.5.3 Version of Vault-Ethereum plugin : 0.3.0 Vault ethereum config :