-
Notifications
You must be signed in to change notification settings - Fork 2
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
[feature] Smart Gas Price #44
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 1.272 ETH (250.06 USD @ $196.59/ETH) attached to it.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 267 years, 1 month from now. 1) eswarasai has been approved to start work. Requirements are pretty straight forward and clear enough along with the UI/UX behaviour. If approved, I'd be able to wrap up this task in the next couple of days and provide a WIP PR for further feedback. Thanks! Learn more on the Gitcoin Issue Details page. |
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
4 similar comments
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
Will put up a WIP PR in the next couple of days. Sorry about the delay! |
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
Sorry about not being able to update earlier. I'm halfway through the changes and there's a slight delay due to missing elements and matching their design to the above spec. Will put up a WIP PR in the next couple of days. Thanks! |
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
1 similar comment
@eswarasai Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done @eswarasai due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
I'll be describing here the general flow of In general, In the export const DEFAULT_GAS_PRICE = 10 * 1e9; This is then passed to the The default gas price for this component is const defaultState = {
loading: false,
autoBroadcast: true,
signedTx: null,
signingAction: undefined,
openAdvanced: false,
gasPrice: 20, // default value for state.gasPrice
showAdvancedTab: true,
}; But we update this with the componentWillReceiveProps = nextProps => {
const { data } = nextProps;
if (data) {
const { txData } = data;
const { gasPrice } = txData; // txData comes from governance-ui-components
this.setState({ gasPrice: gasPrice / 1e9 });
}
} We have a method for updating the setGasPrice = gasPrice => {
this.setState({ gasPrice });
}; which is the callback that's called by the <Slider onUpdate={this.setGasPrice} range={range} start={[gasPrice]} step={1} /> For this task, you will probably want to update the UI for |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done @eswarasai due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
@mandres-digix - Thanks for the detailed explanation. I'll accommodate the above mentioned changes and update the PR accordingly 🙂 |
@mandres-digix -- I'd be needing some help for testing in order to wrap up the feature on the UI. I'm not sure in which scenario I'd be able to trigger the screen of |
@eswarasai okay sure. You don't need to KYC your user. You can just try to lock some DGDs first - that will make the transaction modal show up. @mikej-digix will message you on discord to help you with the process. 👍 |
@mandres-digix - Thanks for the quick response. I'll get in touch with @mikej-digix on Discord regarding the same 🙂 |
@mandres-digix - Is it okay if I keep the component of
|
@eswarasai sure, sounds good to me! At least that way we can keep styled components, right? |
@mandres-digix - Yep, we can keep the styled components. Will update the PR in a few. Thanks! |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 1.272 ETH (269.57 USD @ $211.93/ETH) has been submitted by: @tymat please take a look at the submitted work:
|
Ref: #44 DigixGlobal/governance-ui-components#381 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Before firing up the dev env, please make sure you also have the governance-ui-components PR is linked with this one during setup Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: DigixGlobal/governance-ui#44 DigixGlobal/governance-ui#46 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: #44 DigixGlobal/governance-ui-components#381 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Before firing up the dev env, please make sure you also have the governance-ui-components PR is linked with this one during setup Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: DigixGlobal/governance-ui#44 DigixGlobal/governance-ui#46 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: DigixGlobal/governance-ui#44 DigixGlobal/governance-ui#46 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: #44 DigixGlobal/governance-ui-components#381 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Before firing up the dev env, please make sure you also have the governance-ui-components PR is linked with this one during setup Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
@tymat - Any update on the payment for this one? It's been a while since I've heard back from you. |
Ref: DigixGlobal/governance-ui#44 DigixGlobal/governance-ui#46 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: #44 DigixGlobal/governance-ui-components#381 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Before firing up the dev env, please make sure you also have the governance-ui-components PR is linked with this one during setup Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Ref: DigixGlobal/governance-ui#44 DigixGlobal/governance-ui#46 Description Added a Smart Gas Price component with Advanced options mode to be able to switch fast between the amount of gas price user would like to pay based on transaction times whose values are being fetched directly from ETHGasStation API. Current behaviour just had a slider for gas price without any advanced options to quickly select it. Test Plan Once you have dev setup up and running, open the app and login using Import JSON option After logging in, click on Lock DGD button on the Header and enter the amount you'd like to lock In the transaction details and signing screen, you should now see options to select the gas price similar to the design mentioned in the issue description
Issue Status: 1. Open 2. Started 3. Submitted 4. Done The funding of 1.272 ETH (229.03 USD @ $180.05/ETH) attached to this issue has been approved & issued to @eswarasai.
|
At present, DigixDAO platform uses a hard-coded value of 10 gwei for the default gas price.
We would like to integrate Ethgasstation API to:
Details
Note: the gas limit can be found out from the
txData
object (refer)API
Endpoint: https://ethgasstation.info/json/ethgasAPI.json
Note:
gwei
unit, divide them by 10hours and minutes and seconds
If sample response is:
Then:
fast
transaction is 4 gweifastest
transaction is 6 gweisafeLow
transaction is 1 gweiaverage
transaction is 1 gweifast
transaction is 30 secondsfastest
transaction is 24 secondssafeLow
transaction is 3 minutes 36 secondsaverage
transaction is 3 minutes 36 secondsDesign
Behaviour
If
response
is the json response from the API callfast
option is selectedresponse.fast/10
format(response.fastWait)
advanced
section is set to the gas price valueTransaction Fee
is set totxData.gas * gasPrice
response
response
advanced
section, set it to the gas price valueTransaction Fee
based on the newly selectedgasPrice
advanced
section willTransaction Fee
based on the newly selectedgasPrice
Note: If the Ethgasstation API is down and returns
null
values:10 gwei
The text was updated successfully, but these errors were encountered: