Skip to content

Instantly share code, notes, and snippets.

@bkawk
Last active July 21, 2017 00:01
Show Gist options
  • Save bkawk/087a6aad2191383c47d1485d1d2942ca to your computer and use it in GitHub Desktop.
Save bkawk/087a6aad2191383c47d1485d1d2942ca to your computer and use it in GitHub Desktop.
Contract Lessons
pragma solidity ^0.4.0;
contract myAge {
uint age = 41;
function getAge() constant returns(uint){
return age;
}
}
// Int types
// int and unit
// int 8 and 256
// int8's max size is 254
// int256 max size is 115792089237316195423570985008687907853269984665640564039457584007913129639935
// int256 min size -11579208923731619542357098500868790785326998466564056403945758400791312963993
// int without denoting the size will default to 256
// Integer division, Dividing 2 whole numbers resulting inoa adecimal value will leave the decimal remainer in the contract/wallet
pragma solidity ^0.4.0;
contract myName {
string public name = "@bkawk";
}
@bkawk
Copy link
Author

bkawk commented Jul 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment