Skip to content
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

EVMScriptExecutor: add type for off-chain reading #391

Merged
merged 5 commits into from Aug 22, 2018
Merged

Conversation

sohkai
Copy link
Contributor

@sohkai sohkai commented Aug 21, 2018

Was getting worried that we always assume in aragon.js that the first executor in an organization's EVMScriptRegistry is the callscript executor, rather than doing an on-chain confirmation.

TODO:

  • Add tests

@sohkai sohkai requested review from izqui and bingen August 21, 2018 20:57
@sohkai sohkai changed the title EVMScriptExecutor: add type reading EVMScriptExecutor: add type for off-chain reading Aug 21, 2018
@coveralls
Copy link

coveralls commented Aug 21, 2018

Coverage Status

Coverage increased (+0.008%) to 99.018% when pulling b36776c on evmscriptexecutor-type into d07e4a1 on dev.

@@ -9,6 +9,8 @@ import "../IEVMScriptExecutor.sol";
contract CallsScript is IEVMScriptExecutor {
using ScriptHelpers for bytes;

bytes32 constant internal EXECUTOR_TYPE = keccak256("CALLSCRIPT");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be CALLSSCRIPT or CALLS_SCRIPT which will read nicer. Also from what I'm testing hardcoding the hash results in a 4k less gas when creating the contract

@sohkai
Copy link
Contributor Author

sohkai commented Aug 22, 2018

Bytecode size:

                              CODE DEPOSIT COST    DEPLOYED BYTES     INITIALIZATION BYTES
CallsScript.json              20600 more gas       +103               0

@sohkai sohkai merged commit ae97af2 into dev Aug 22, 2018
@sohkai sohkai deleted the evmscriptexecutor-type branch August 22, 2018 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants