-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Emit SendEther on GenericCall * Separate Valut from Avatar * Bump version
- Loading branch information
1 parent
32ae08d
commit dc6dd31
Showing
6 changed files
with
52 additions
and
40 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
pragma solidity ^0.5.17; | ||
|
||
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol"; | ||
|
||
|
||
//Proxy contracts cannot recive eth via fallback function. | ||
//For now , we will use this vault to overcome that | ||
contract Vault is Ownable { | ||
event ReceiveEther(address indexed _sender, uint256 _value); | ||
event SendEther(address indexed _to, uint256 _value); | ||
|
||
/** | ||
* @dev enables this contract to receive ethers | ||
*/ | ||
function() external payable { | ||
emit ReceiveEther(msg.sender, msg.value); | ||
} | ||
|
||
function sendEther(uint256 _amountInWei, address payable _to) external onlyOwner returns(bool) { | ||
// solhint-disable-next-line avoid-call-value | ||
(bool success, ) = _to.call.value(_amountInWei)(""); | ||
require(success, "sendEther failed."); | ||
emit SendEther(_to, _amountInWei); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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