Skip to content

Commit

Permalink
Fixed _decodeBoolean
Browse files Browse the repository at this point in the history
  • Loading branch information
k1rill-fedoseev committed Nov 24, 2019
1 parent 8ad02bc commit 73ccd30
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/deploy/deploy-home/contracts/MessageDecoder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract MessageDecoder {

function _decodeBoolean(bytes memory message) pure internal returns (bool a) {
assembly {
a := mload(add(message, 34))
a := and(mload(add(message, 34)), 1)
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/deploy/deploy-home/contracts/MessageHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ contract MessageHandler is Government, MessageDecoder {
require(message.length == 117, "Incorrect message length");
(address to, uint value) = _decodeTransfer(message);
_transfer(to, value);
// 0b
// 0000000000000000000000000000000000000000000000000000000000000001
// 73824c9dc9318568f803a7fd6a147d67f0c1c328f0ed955456ed7357e6b470f8
// ad6c8127143032d843a260c5d379d8d9b3d51f15
// 0000000000000000000000000000000000000000000000004563918244f40000
} else {
revert("Unknown message action");
}
Expand Down
14 changes: 1 addition & 13 deletions src/deploy/deploy-side/contracts/SignedMessageStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,7 @@ contract SignedMessageStorage {
}

mapping(bytes32 => SignedMessage) public signedMessages;
// 0xc17c720a
// 0000000000000000000000000000000000000000000000000000000000000040
// 00000000000000000000000000000000000000000000000000000000000000e0
// 0000000000000000000000000000000000000000000000000000000000000061
// 00
// 0000000000000000000000000000000000000000000000000000000000000001
// 7681bd587db2576708db7085c2704c84e19db65f5b8a90897866c411a4002f86
// 6c66695a8595b4b41f779877b2a177c79969bfd627bd691bcd14f27eaab7ad3c
// 00000000000000000000000000000000000000000000000000000000000000
// 0000000000000000000000000000000000000000000000000000000000000041
// 82b4f5c4211ca2c5a0a5ec8d5476da5d537e282b852108bcfb006058b942d6a1
// 51ca56bfe41529215fe1f6b8a56b69ecb1357d588bfb38a9f7bd858df82d8038
// 1c00000000000000000000000000000000000000000000000000000000000000

function addSignature(bytes memory message, bytes memory rsv) public {
require(message.length > 0, "Incorrect message length");
require(rsv.length == 65, "Incorrect signature length");
Expand Down

0 comments on commit 73ccd30

Please sign in to comment.