-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAcessLibrary.sol
More file actions
41 lines (33 loc) · 945 Bytes
/
AcessLibrary.sol
File metadata and controls
41 lines (33 loc) · 945 Bytes
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
pragma solidity ^0.4.19;
import "browser/DemoLibrary.sol";
contract AcessLibrary{
address creator = msg.sender;
using Calculation for uint;
function Add(uint x, uint y) public constant returns(uint){
return Calculation.Addition(x,y);
}
function Subtract(int x, int y) public constant returns(int){
if(x < 0 && y < 0) {
revert();
}
else{
return Calculation.Subtraction(x,y);
}
}
function Multiply(uint x, uint y) public constant returns(uint){
return Calculation.Multiply(x,y);
}
function Divide(uint x, uint y) public constant returns(uint){
if(x < y){
revert();
}
else{
return Calculation.Division(x,y);
}
}
function kill()
{
if (msg.sender == creator)
suicide(creator);
}
}