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
Support unit parsing in all relevant configs (e.g "10 ether", "200 wei", etc..) #816
Comments
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 60.0 DAI (60.0 USD @ $1.0/DAI) 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 6 days, 1 hour ago. 1) Powdurrrr has applied to start work (Funders only: approve worker | reject worker). Parse the data and compare to static values. Make the wei conversion accordingly, may be best to use a map with a multiplier. Learn more on the Gitcoin Issue Details page. 2) danlipert has been approved to start work. I'll be applying the utility function (getWeiBalanceFromString) that converts various Ether values in any standard denomination into wei during the loading of configuration files for contracts, project, blockchain etc. Currently, the configuration files only support wei values, and these need to be converted into wei on the fly so that the configuration files are a bit easier to manage for developers setting up their embark projects. Learn more on the Gitcoin Issue Details page. |
@kpulkit29 please note that the method to do the conversion is already there |
I have gone through the code in util.js can U please give a brief of what file needs to be changed |
I have seen the method Please explain which file needs to be modified??? |
The changes need to mostly be in |
Hi @kpulkit29 is work still being done on this issue from your end? Thanks! |
@kpulkit29 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 for delay I am having a hard time understanding what exactly needs to be changed |
@kpulkit29 It is indeed a bit hard to follow if you aren't familiar with the codebase (neither am I). However, I did some digging and I think what needs to be done is this:
To be fair, I couldn't find a configuration option for I hope this makes sense and @iurimatias and @jrainville please correct me here if anything of this is wrong! Does this help @kpulkit29 ? |
As far as I understand, the first step is to find which config values can represent Ether values.
I also found that for |
@StatusSceptre Looks like @Destiner has provided a good approach here; mind approving on Gitcoin to allow him to 'Start Work'? |
@iurimatias I've taken some time today to work on this issue and altered the existing tests to test the unit conversion - let me know if you think this type of test change should stay in: danlipert@33b8b00 Thanks! |
@danlipert would you mind sending a PR so we can review and comment right there? :) |
@PascalPrecht here it is: #910 still a WIP but wanted to see if I could get some feedback on the test change before proceeding. |
@danlipert 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 |
Yes - sorry for the delay! We got hit by a typhoon here this weekend but I'll have the updated PR soon |
@danlipert 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 |
Yup! Will have this wrapped up soon, was just waiting for some feedback on moving the final wei conversion into the config file. Looks like nobody has any issues with that so I'll make that change and get this squashed and rebased 👍 |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 60.0 DAI (60.0 USD @ $1.0/DAI) has been submitted by: @StatusSceptre please take a look at the submitted work:
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 60.0 DAI (60.0 USD @ $1.0/DAI) has been submitted by: @StatusSceptre please take a look at the submitted work:
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done The funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @danlipert.
|
This has landed as 594d132 |
Outline
A lot of configurations in embark need to define an amount in wei. The goal of this task is to support specifying these values as a nice string of the type "<number> <unit>" for e.g "200 finney".
The code for this is already available in embark in the utils class here. The goal is to support this feature in all the required configs.
Acceptance Criteria
**
unit
can be:wei
,kwei
,Kwei
,babbage
,femtoether
,mwei
,Mwei
,lovelace
,picoether
,gwei
,Gwei
,shannon
,nanoether
,nano
,szabo
,microether
,micro
,finney
,milliether
,milli
,ether
,kether
,grand
,mether
,gether
,tether
** in the following fields:
***
config/blockchain.js
:gasPrice
***
config/contracts.js
:gasPrice
*** any other relevant fields
wei
The text was updated successfully, but these errors were encountered: