-
Notifications
You must be signed in to change notification settings - Fork 0
/
Verifier.sol
44 lines (32 loc) · 1.08 KB
/
Verifier.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
37
38
39
40
41
42
43
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import { VerifRegAPI } from "@zondax/filecoin-solidity/contracts/v0.8/VerifRegAPI.sol";
import { VerifRegTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/VerifRegTypes.sol";
// import { Client } from "./Client.sol";
contract Verifier {
address public owner;
CommonTypes.FilAddress addr;
mapping (address => bool) public addressToStatus;
constructor() {
owner = msg.sender;
}
event verifApplication(
bytes applicant,
bool status
);
function apply() returns (bytes memory applicant) {
address memory applicant = bytes(msg.sender);
return applicant;
emit verifApplication(applicant, false);
}
function verifyClient(bytes memory params) onlyowner {
bytes memory result = VerifRegAPI.addCustomClient(params);
if (result != 0) {
addressToStatus[msg.sender] = true;
}
}
function getStatus() returns (bool) {
bool status = addressToStatus[msg.sender];
return status;
}
}