-
Notifications
You must be signed in to change notification settings - Fork 0
/
Alienated.sol
50 lines (36 loc) · 826 Bytes
/
Alienated.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
44
45
46
47
48
49
50
// SPDX-License-Identifier: MIT
// didn't get it
pragma solidity ^0.5.0;
contract AlienCodex {
address public _owner;
bool public contact;
bytes32[] public codex;
constructor() public {
_owner = 0xb8558fba797321E4fF69a772664Da86B8C9fB0A3;
}
modifier contacted() {
assert(contact);
_;
}
function make_contact() public {
contact = true;
}
function record(bytes32 _content) contacted public {
codex.push(_content);
}
function retract() contacted public {
codex.length--;
}
function revise(uint i, bytes32 _content) contacted public {
codex[i] = _content;
}
}
contract Alienated {
AlienCodex public a;
constructor(address alien) public {
a = AlienCodex(alien);
}
function make_contact() public {
a.make_contact();
}
}