Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
slither/tests/ast-parsing/units_and_global_variables-...

61 lines
1.1 KiB

contract Test{
function ether_unit() public{
1 wei;
1 finney;
1 szabo;
1 ether;
}
function time_unit() public{
1 seconds;
1 minutes;
1 hours;
1 days;
1 weeks;
1 years;
}
function block_and_transactions() public{
block.blockhash(0);
block.coinbase;
block.difficulty;
block.gaslimit;
block.number;
block.timestamp;
msg.data;
msg.gas;
msg.sender;
msg.sig;
msg.value;
now;
tx.gasprice;
tx.origin;
}
function math_and_crypto() public{
addmod(0, 0, 1);
mulmod(0, 0, 1);
sha3("");
sha256("");
ripemd160("");
bytes32 hash;
uint8 v;
bytes32 r;
bytes32 s;
ecrecover(hash,v,r,s);
}
function address_related() public{
address a;
a.balance;
a.send(0);
}
function contract_related() public{
this;
address a;
selfdestruct(a);
}
}