mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Spacing
This commit is contained in:
parent
6749790c8d
commit
8f9f9e53e8
@ -463,6 +463,7 @@ import "github.com/ethereum/dapp-bin/library/iterable_mapping.sol";
|
|||||||
// Importing under active development
|
// Importing under active development
|
||||||
// Cannot currently be done at command line
|
// Cannot currently be done at command line
|
||||||
|
|
||||||
|
|
||||||
// 8. OTHER KEYWORDS
|
// 8. OTHER KEYWORDS
|
||||||
|
|
||||||
// A. Throwing
|
// A. Throwing
|
||||||
@ -529,6 +530,7 @@ reveal(100, "mySecret");
|
|||||||
// F. State machines
|
// F. State machines
|
||||||
// see example below for State enum and inState modifier
|
// see example below for State enum and inState modifier
|
||||||
|
|
||||||
|
|
||||||
// *** EXAMPLE: A crowdfunding example (broadly similar to Kickstarter) ***
|
// *** EXAMPLE: A crowdfunding example (broadly similar to Kickstarter) ***
|
||||||
// ** START EXAMPLE **
|
// ** START EXAMPLE **
|
||||||
|
|
||||||
@ -661,6 +663,7 @@ contract CrowdFunder {
|
|||||||
}
|
}
|
||||||
// ** END EXAMPLE **
|
// ** END EXAMPLE **
|
||||||
|
|
||||||
|
|
||||||
// 10. OTHER NATIVE FUNCTIONS
|
// 10. OTHER NATIVE FUNCTIONS
|
||||||
|
|
||||||
// Currency units
|
// Currency units
|
||||||
@ -686,7 +689,8 @@ sha3("ab", "cd");
|
|||||||
ripemd160("abc");
|
ripemd160("abc");
|
||||||
sha256("def");
|
sha256("def");
|
||||||
|
|
||||||
11. LOW LEVEL FUNCTIONS
|
|
||||||
|
// 11. LOW LEVEL FUNCTIONS
|
||||||
// call - low level, not often used, does not provide type safety
|
// call - low level, not often used, does not provide type safety
|
||||||
successBoolean = someContractAddress.call('function_name', 'arg1', 'arg2');
|
successBoolean = someContractAddress.call('function_name', 'arg1', 'arg2');
|
||||||
|
|
||||||
@ -694,6 +698,7 @@ successBoolean = someContractAddress.call('function_name', 'arg1', 'arg2');
|
|||||||
// provides library functionality
|
// provides library functionality
|
||||||
someContractAddress.callcode('function_name');
|
someContractAddress.callcode('function_name');
|
||||||
|
|
||||||
|
|
||||||
// 12. STYLE NOTES
|
// 12. STYLE NOTES
|
||||||
// Based on Python's PEP8 style guide
|
// Based on Python's PEP8 style guide
|
||||||
|
|
||||||
@ -703,6 +708,7 @@ someContractAddress.callcode('function_name');
|
|||||||
// Can omit curly braces for one line statement (if, for, etc)
|
// Can omit curly braces for one line statement (if, for, etc)
|
||||||
// else should be placed on own line
|
// else should be placed on own line
|
||||||
|
|
||||||
|
|
||||||
// 13. NATSPEC comments - used for documentation, commenting, and external UIs
|
// 13. NATSPEC comments - used for documentation, commenting, and external UIs
|
||||||
// Contract natspec - always above contract definition
|
// Contract natspec - always above contract definition
|
||||||
/// @title Contract title
|
/// @title Contract title
|
||||||
|
Loading…
Reference in New Issue
Block a user