Add msg, block, and tx global variables to std#454
Conversation
|
I do wonder if the msg/tx grouping makes any importance here (compared to having It would be different to have effects or context associated with the "special" TLDR: I'd suggest to not have this wrapping/grouping until context or effects make it more appropriate. |
I think the adoption of Core Solidity is going to live or die by how similar it feels to Solidity. People have tried to make new, better EVM languages, and adoption of all them together has been almost zero. There's danger that if Core Solidity diverges too much, people will just not use it, and stick with what they are familiar with. So where there's not a compelling reasons to switch up syntax, I'd lean towards keeping things like classic solidity. |
|
Will check on the test failure |
|
The failing test seems to be this one: |
|
Those are the timestamp/blocknumber constants. I think they increase with each transaction. |
|
Yeah, will just move this check into the code, against assembly. |
|
After further thought, it seems like a better idea for the tests to be deterministic inside a test file json. I've changed it so that block numbers and timestamps reset to known values at the start of each test json. |
This adds stdlib support for
msg,block, andtx, so that developers can domsg.sender()rather than using assembly.datakeyword.Also updated the tests to remove the helper functions that were used to work around the lack of these methods.