-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVoteProxy.sol
36 lines (30 loc) · 941 Bytes
/
VoteProxy.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/Iauction.sol";
contract VoteProxy is Ownable {
Iauction public auctioneer;
function updateAuctioneer(address _auctioneer) external onlyOwner {
auctioneer = Iauction(_auctioneer);
}
function isValidSignature(bytes32 _hash, bytes calldata _signature)
external
view
returns (bytes4)
{
// Validate signatures
if (auctioneer.isWinningSignature(_hash, _signature) == true) {
return 0x1626ba7e;
} else {
return 0xffffffff;
}
}
function execute(
address _to,
uint256 _value,
bytes calldata _data
) external onlyOwner returns (bool, bytes memory) {
(bool success, bytes memory result) = _to.call{value: _value}(_data);
return (success, result);
}
}