From 6cab6b6f4963bddab5d1137e42169f7fe104f050 Mon Sep 17 00:00:00 2001 From: benjaminion Date: Sat, 17 Jun 2017 21:01:42 +0100 Subject: LLL: Correctly label arguments to ecrecover built-in macro. (r s v hash) -> (hash v r s) which corresponds to the order that the built-in EVM contract uses. --- liblll/CompilerState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'liblll') diff --git a/liblll/CompilerState.cpp b/liblll/CompilerState.cpp index c22242a3..c76ef655 100644 --- a/liblll/CompilerState.cpp +++ b/liblll/CompilerState.cpp @@ -65,7 +65,7 @@ void CompilerState::populateStandard() "(def 'makeperm (name pos) { (def name (sload pos)) (def name (v) (sstore pos v)) } )" "(def 'permcount 0)" "(def 'perm (name) { (makeperm name permcount) (def 'permcount (+ permcount 1)) } )" - "(def 'ecrecover (r s v hash) { [0] r [32] s [64] v [96] hash (msg allgas 1 0 0 128) })" + "(def 'ecrecover (hash v r s) { [0] hash [32] v [64] r [96] s (msg allgas 1 0 0 128) })" "(def 'sha256 (data datasize) (msg allgas 2 0 data datasize))" "(def 'ripemd160 (data datasize) (msg allgas 3 0 data datasize))" "(def 'sha256 (val) { [0]:val (sha256 0 32) })" -- cgit