-
Notifications
You must be signed in to change notification settings - Fork 0
/
deltasend
56 lines (45 loc) · 1.08 KB
/
deltasend
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
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
contract dvcontroller {
// string[] public wishlist;
Keyboard[] public wishlist;
function getwishes() view public returns(Wishes[] memory) {
return createdwishes;
}
function create(
wishtype _kind,
bool _isPBT,
string calldata _filter
) external {
Keyboard memory newWish = Wishes({
kind: _kind,
isPBT: _isPBT,
filter: _filter,
owner: msg.sender
});
createdKeyboards.push(newWish);
}
enum WishKind {
HundredPercent
EightyPercent,
SeventyFivePercent,
SixtySixPercent
FifyOnePercent
FifteenPercent
OnePercent
}
struct Wish {
KeyboardKind kind;
// ABS = false, PBT = true
bool isPBT;
// tailwind filters to layer over
string filter;
// user who created it!
address owner;
}
// contract parameter to recieve with fund dispersal at subsequent block
function tip(uint256 _index) external payable {
address payable owner = payable(createdWishes[_index].owner);
owner.transfer(msg.value);
}
}