Merge pull request #9230 from ethereum/issue-8716

Add unit denomination ``gwei``
This commit is contained in:
chriseth
2020-06-30 12:36:10 +02:00
committed by GitHub
16 changed files with 58 additions and 9 deletions
@@ -2,5 +2,6 @@ contract C {
uint constant a = 1 wei + 2 szabo + 3 finney + 4 ether;
uint constant b = 1 seconds + 2 minutes + 3 hours + 4 days + 5 weeks;
uint constant c = 2 szabo / 1 seconds + 3 finney * 3 hours;
uint constant d = 2 gwei / 1 seconds + 3 finney * 3 hours;
}
// ----
@@ -0,0 +1,3 @@
contract C {
uint constant gwei = 1 gwei;
}
@@ -1,15 +1,16 @@
contract c {
contract C {
function f() public
{
a = 1 wei;
b = 2 szabo;
c = 3 finney;
b = 4 ether;
d = 4 ether;
e = 5 gwei;
}
uint256 a;
uint256 b;
uint256 c;
uint256 d;
uint256 e;
}
// ----
// Warning 2519: (170-179): This declaration shadows an existing declaration.