-
Notifications
You must be signed in to change notification settings - Fork 465
[sol-meta] Solidity meta compiler #1127
base: development
Are you sure you want to change the base?
Changes from all commits
5a06e56
f156ebf
02382c1
3667fdd
9787b36
62c0699
fd9d44b
d3a6094
6ccb906
7e3592f
2cee9c2
048155b
17d002e
120d872
36bdbec
3843019
557f059
fa2925a
fb0b1a8
d4b8898
2805a5c
b7a5e18
de0e443
6b2ce88
d999642
88e2ed5
75696e3
74efc84
5eca80d
8d02db9
ef64e8c
fe4cc6e
24bc4dd
2c91d80
612fe7e
e4527ba
081e104
b1aac19
41ccf53
69b26b7
1bab108
135d9e5
5d9ab19
12a8ffd
1e8688e
5352a53
7f72146
ef50229
a8dab3d
6835719
79e7f7d
ddf32d7
eb7a98f
d2192fc
d0188a5
6b98ba6
d989c2c
733bced
f18f13f
b18d9bd
cc6b064
724ade1
ec9f18a
27a1eb6
3af23ea
b15f26a
25b3349
5d7fc0c
56c8544
15cd924
ba6603d
f00ae95
7e59676
3f81ed4
5a6da6f
8731a06
fe3761e
ad3b0b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
*/ | ||
|
||
pragma solidity 0.4.24; | ||
pragma experimental ABIEncoderV2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above :) |
||
|
||
import "../../../utils/SafeMath/SafeMath.sol"; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
*/ | ||
|
||
pragma solidity 0.4.24; | ||
pragma experimental ABIEncoderV2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
|
||
import "./LibEIP712.sol"; | ||
|
||
|
@@ -45,13 +46,13 @@ contract LibOrder is | |
// A valid order remains fillable until it is expired, fully filled, or cancelled. | ||
// An order's state is unaffected by external factors, like account balances. | ||
enum OrderStatus { | ||
INVALID, // Default value | ||
INVALID_MAKER_ASSET_AMOUNT, // Order does not have a valid maker asset amount | ||
INVALID_TAKER_ASSET_AMOUNT, // Order does not have a valid taker asset amount | ||
FILLABLE, // Order is fillable | ||
EXPIRED, // Order has already expired | ||
FULLY_FILLED, // Order is fully filled | ||
CANCELLED // Order has been cancelled | ||
INVALID, // 0 Default value | ||
INVALID_MAKER_ASSET_AMOUNT, // 1 Order does not have a valid maker asset amount | ||
INVALID_TAKER_ASSET_AMOUNT, // 2 Order does not have a valid taker asset amount | ||
FILLABLE, // 3 Order is fillable | ||
EXPIRED, // 4 Order has already expired | ||
FULLY_FILLED, // 5 Order is fully filled | ||
CANCELLED // 6 Order has been cancelled | ||
} | ||
|
||
// solhint-disable max-line-length | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,9 +79,6 @@ export class ASTVisitor { | |
public WhileStatement(ast: Parser.WhileStatement): void { | ||
this._visitStatement(ast); | ||
} | ||
public SimpleStatement(ast: Parser.SimpleStatement): void { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK, there's no such node. The |
||
this._visitStatement(ast); | ||
} | ||
public ThrowStatement(ast: Parser.ThrowStatement): void { | ||
this._visitStatement(ast); | ||
} | ||
|
@@ -159,7 +156,7 @@ export class ASTVisitor { | |
} | ||
const loc = this._getExpressionRange(ast); | ||
this._fnMap[this._entryId++] = { | ||
name: ast.name, | ||
name: ast.name || '', | ||
line: loc.start.line, | ||
loc, | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this will actually change the bytecode of this contract and we purposely removed
pragma experimental ABIEncoderV2;
when not necessary because it reduced gas costs. What is the reason for adding this back in?Edit: I see why we need this to generate public wrappers for all of these internal functions. Is there a better way to do this that doesn't require us altering the underlying contract?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the final
Exchange
contract has ABIv2 enabled, doesn't that automatically enable it for all parent contracts?There are ways around it, I just thought it was incorrectly missing here since everything will be compiled with ABIv2 anyway. In the same way that we want the solidity version the same everywhere, we also want the compiler flags the same.