mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
deposit() payable and receive()
This commit is contained in:
parent
696b2e7233
commit
8b20da9574
|
@ -35,7 +35,7 @@ contract Flusher {
|
|||
}
|
||||
|
||||
event LogInit(address indexed owner);
|
||||
event LogSwitch(bool indexed boooool);
|
||||
event LogSwitch(bool indexed shieldState);
|
||||
|
||||
event LogDeposit(
|
||||
address indexed caller,
|
||||
|
@ -58,7 +58,7 @@ contract Flusher {
|
|||
uint amount
|
||||
);
|
||||
|
||||
function deposit(address token) public isSigner {
|
||||
function deposit(address token) public payable isSigner {
|
||||
require(address(token) != address(0), "invalid-token");
|
||||
|
||||
address poolToken = registry.poolToken(token);
|
||||
|
@ -135,7 +135,7 @@ contract Flusher {
|
|||
*/
|
||||
function spell(address _target, bytes calldata _data) external isChief {
|
||||
require(!shield, "shield-access-denied");
|
||||
require(shieldBlockTime != 0 && shieldBlockTime <= block.number, "less-than-ninty-days");
|
||||
require(shieldBlockTime != 0 && shieldBlockTime <= block.number, "more-than-ninty-days");
|
||||
require(_target != address(0), "target-invalid");
|
||||
require(_data.length > 0, "data-invalid");
|
||||
bytes memory _callData = _data;
|
||||
|
@ -153,4 +153,6 @@ contract Flusher {
|
|||
require(_owner == owner, "owner-change-denied");
|
||||
}
|
||||
|
||||
receive() external payable {}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user