diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-09-12 22:21:43 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-09-12 22:21:43 +0800 |
commit | 879251a78b2d4e26dc71299d2d7ca989d0855d61 (patch) | |
tree | fedf7b035e527103f178f9670bce4cbbc81d283d /test/compilationTests/corion/module.sol | |
parent | 1994b51ef3eb8de3617efec9747979c9fb5ed453 (diff) | |
download | dexon-solidity-879251a78b2d4e26dc71299d2d7ca989d0855d61.tar.gz dexon-solidity-879251a78b2d4e26dc71299d2d7ca989d0855d61.tar.zst dexon-solidity-879251a78b2d4e26dc71299d2d7ca989d0855d61.zip |
Update test suite to use address payable.
Diffstat (limited to 'test/compilationTests/corion/module.sol')
-rw-r--r-- | test/compilationTests/corion/module.sol | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/test/compilationTests/corion/module.sol b/test/compilationTests/corion/module.sol index da4dd344..bd6952b1 100644 --- a/test/compilationTests/corion/module.sol +++ b/test/compilationTests/corion/module.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.11; contract abstractModuleHandler { - function transfer(address from, address to, uint256 value, bool fee) external returns (bool success) {} - function balanceOf(address owner) public view returns (bool success, uint256 value) {} + function transfer(address payable from, address payable to, uint256 value, bool fee) external returns (bool success) {} + function balanceOf(address payable owner) public view returns (bool success, uint256 value) {} } contract module { @@ -19,7 +19,7 @@ contract module { status public moduleStatus; uint256 public disabledUntil; - address public moduleHandlerAddress; + address payable public moduleHandlerAddress; function disableModule(bool forever) external onlyForModuleHandler returns (bool success) { _disableModule(forever); @@ -36,11 +36,11 @@ contract module { else { disabledUntil = block.number + 5760; } } - function replaceModuleHandler(address newModuleHandlerAddress) external onlyForModuleHandler returns (bool success) { + function replaceModuleHandler(address payable newModuleHandlerAddress) external onlyForModuleHandler returns (bool success) { _replaceModuleHandler(newModuleHandlerAddress); return true; } - function _replaceModuleHandler(address newModuleHandlerAddress) internal { + function _replaceModuleHandler(address payable newModuleHandlerAddress) internal { /* Replace the ModuleHandler address. This function calls the Publisher module. @@ -77,11 +77,11 @@ contract module { moduleStatus = status.Disconnected; } - function replaceModule(address newModuleAddress) external onlyForModuleHandler returns (bool success) { + function replaceModule(address payable newModuleAddress) external onlyForModuleHandler returns (bool success) { _replaceModule(newModuleAddress); return true; } - function _replaceModule(address newModuleAddress) internal { + function _replaceModule(address payable newModuleAddress) internal { /* Replace the module for an another new module. This function calls the Publisher module. @@ -101,20 +101,20 @@ contract module { moduleStatus = status.Disconnected; } - function transferEvent(address from, address to, uint256 value) external onlyForModuleHandler returns (bool success) { + function transferEvent(address payable from, address payable to, uint256 value) external onlyForModuleHandler returns (bool success) { return true; } function newSchellingRoundEvent(uint256 roundID, uint256 reward) external onlyForModuleHandler returns (bool success) { return true; } - function registerModuleHandler(address _moduleHandlerAddress) internal { + function registerModuleHandler(address payable _moduleHandlerAddress) internal { /* Module constructor function for registering ModuleHandler address. */ moduleHandlerAddress = _moduleHandlerAddress; } - function isModuleHandler(address addr) internal returns (bool ret) { + function isModuleHandler(address payable addr) internal returns (bool ret) { /* Test for ModuleHandler address. If the module is not connected then returns always false. @@ -140,4 +140,6 @@ contract module { require( msg.sender == moduleHandlerAddress ); _; } + function() external payable { + } } |