harmony-one / HRC

HRC token standards
MIT License
16 stars 13 forks source link

API not support "hmy_estimateGas" #3

Open Renewwen opened 4 years ago

Renewwen commented 4 years ago

According to IBriz team reported, they got an issue when they tried to call a function through webapp (harmony js SDK) through backend.

(base) ultimate@ultimate-Blade-15-Mid-2019-Base:~/Desktop/Faucet/faucet-backend$ npm start

> harmony-api@1.0.0 start /home/ultimate/Desktop/iBriz/Faucet/faucet-backend
> node server.js

body-parser` deprecated undefined extended: provide extended option server.js:8:20
Server listening on port 5000...
The method hmy_estimateGas does not exist/is not available

Actually, the function of "hmy_estimateGas" has implemented, see this: https://github.com/harmony-one/sdk/blob/4b7d95c429433d29f627e0156aaf8fc695bc05fe/packages/harmony-contract/src/methods/method.ts#L158

the problem is we don't have a function in core-protocol...I am going to fix that.

Expected behavior After calling hmy_estimateGas, it should work.

neeboo commented 4 years ago

The sdk is aiming to support. However the blockchain rpc is not. To work around this problem, please use specify gasLimit and gasPrice amount manually.