-
Notifications
You must be signed in to change notification settings - Fork 950
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
102 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ import "../common/SelfAuthorized.sol"; | |
/// @author Richard Meissner - <[email protected]> | ||
contract FallbackManager is SelfAuthorized { | ||
|
||
event IncomingTransaction( | ||
address from, uint256 value, bool hasData | ||
); | ||
|
||
// keccak256("fallback_manager.handler.address") | ||
bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5; | ||
|
||
|
@@ -32,6 +36,7 @@ contract FallbackManager is SelfAuthorized { | |
external | ||
payable | ||
{ | ||
emit IncomingTransaction(msg.sender, msg.value, msg.data.length != 0); | ||
// Only calls without value and with data will be forwarded | ||
if (msg.value > 0 || msg.data.length == 0) return; | ||
bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
"preversion": "npm run restore", | ||
"truffle-zos-merge": "node scripts/merge_zos.js", | ||
"restore": "rm -rf build && npx truffle compile && npm run truffle-zos-merge && npx tnt cB", | ||
"install": "cd $INIT_CWD && npm explore truffle -- npm install [email protected].7" | ||
"install": "cd $INIT_CWD && npm explore truffle -- npm install [email protected].11" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters