-
Notifications
You must be signed in to change notification settings - Fork 0
/
Basic.sol
57 lines (50 loc) · 1.42 KB
/
Basic.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
51
52
53
54
55
56
57
pragma solidity ^0.4.18;
contract Basic {
address owner;
function Basic () {
owner = msg.sender;
}
function getMinersAddress() constant returns(address){
return block.coinbase;
}
function getCurrentBlockDifficulty() constant returns(uint){
return block.difficulty;
}
function getCurrentBlockGasLimit() constant returns(uint){
return block.gaslimit;
}
function getCurrentBlockNumber() constant returns(uint){
return block.number;
}
function getCurrentBlockTimeStamp() constant returns(uint){
return block.timestamp;
}
function getMessageData() constant returns(bytes){
return msg.data;
}
function getOwnerAddress() constant returns(address){
return msg.sender;
}
function getMessageValue() constant returns(uint){
return msg.value;
}
function getCurrentTimeStamp() constant returns(uint){
return now;
}
function getTransactionGasPrice() constant returns(uint){
return tx.gasprice;
}
function getTransactionOrigin() constant returns(address){
return tx.origin;
}
function getCurrentAddress() constant returns(address){
return this;
}
function getCurrentBlance() constant returns(uint){
return this.balance;
}
function kill() {
if(msg.sender == owner)
selfdestruct(owner);
}
}