-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a generic estimateGas()
function
#1391
Comments
Not sure if it's doable. also, frontend needs to estimate some transactions before hand, so it needs to be able to access that estimateGasXXX functions. |
@alexcos20 I think that it's possible. I have created an example of how to do it in another PR: ocean.js/src/utils/TokenUtils.ts Line 18 in f34573b
|
and how market will call that?
so market needs to know the contract, which is kind of ocean.js internal so far. |
@alexcos20 Ok, you're right. I thought that these "estimate gas" functions must be called only from inside the |
@alexcos20 I think that I have found a very simple solution to having a generic ocean.js/src/utils/TokenUtils.ts Line 16 in 605812e
With this, we only need three parameters:
|
…tegas-function Issue-#1391: Add generic estimateGas() function
Create a generic
estimateGas()
function that can be used whenever we want to estimate gas in a function.The text was updated successfully, but these errors were encountered: