-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sol
More file actions
43 lines (35 loc) · 1.25 KB
/
test.sol
File metadata and controls
43 lines (35 loc) · 1.25 KB
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
pragma solidity >= 0.6.0;
import "main.sol";
contract second {
uint[] public results;
modifier onlyOwnerAndAccept {
require(msg.pubkey() == tvm.pubkey());
tvm.accept();
_;
}
address adrFirst;
function change_address(address _adr) public onlyOwnerAndAccept {
adrFirst = _adr;
}
function setCode(TvmCell newcode) public view onlyOwnerAndAccept {
// Runtime function that creates an output action that would change this
// smart contract code to that given by cell newcode.
tvm.setcode(newcode);
// Runtime function that replaces current code of the contract with newcode.
tvm.setCurrentCode(newcode);
}
function _timer_handler(uint payload) public {
require(msg.sender == adrFirst, 101);
tvm.accept();
results.push(payload);
}
function createTimer(uint _payload,uint64 _time) public onlyOwnerAndAccept {
main(adrFirst).createTimer(_payload,_time);
}
function reverse() public onlyOwnerAndAccept {
revert(101);
}
// function reverse_send(address _adr) public onlyOwnerAndAccept {
// first(_adr).handler();
// }
}