Skip to content

Commit a17c936

Browse files
authored
Create A-To-Z-Solidity.md
1 parent 28168c9 commit a17c936

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

A-To-Z-Solidity.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# ethereum
2+
[app example](https://github.com/StephenGrider/EthereumCasts)
3+
4+
5+
# smart contracts
6+
[Linux Foundation Hyperledger Fabric](https://www.hyperledger.org/projects/fabric)
7+
[hyperledger composer playground](http://composer-playground.mybluemix.net/login)
8+
[hyperledger composer playground tutorial](https://hyperledger.github.io/composer/latest/tutorials/playground-tutorial.html)
9+
```
10+
# application schema
11+
Business Application -> Hyperledger Composer -> Blockchain ( Hyperledger Fabric)
12+
```
13+
[documentation](http://solidity.readthedocs.io/en/latest/)
14+
15+
---
16+
user app to communicate with Ethereum
17+
* Metamask ( chrome extension )
18+
* Mist browser
19+
20+
---
21+
[Rinkeby ethereum account charger](rinkeby-faucet.com)
22+
[Rinkeby ethereum charger](https://faucet.rinkeby.io/)
23+
24+
---
25+
26+
## account address types:
27+
* external ( user account, common for all networks )
28+
* internal ( contract account, specific for each network )
29+
```
30+
balance
31+
storage - data storage
32+
code - compiled machine code
33+
```
34+
35+
## account credential saving
36+
[bip39](https://iancoleman.io/bip39/)
37+
38+
## [smart contract playground](http://remix.ethereum.org)
39+
40+
41+
## SmartContract API collaboration via nodejs app example
42+
* NodeJS ( min version 8.0.1 )
43+
```
44+
# ganache-cli
45+
const Web3 = require('web3')
46+
const web3 = new Web3("http://localhost:8545")
47+
48+
console.log(web3.eth.getAccounts().then(e=>console.log(e)))
49+
```
50+
* [Java](https://docs.web3j.io/getting_started.html)
51+
* [SpringBoot, gradle example, maven plugin](https://github.com/web3j/)
52+
53+
http://solidity.readthedocs.io/en/latest/
54+
55+
## contract development phases:
56+
* create project
57+
```
58+
npm init
59+
npm install -save solc
60+
61+
```
62+
* contract creation ( solidity compiler )
63+
* local testing ( Mocha framework )
64+
```
65+
# npm install mocha ganache-cli [email protected]
66+
npm install mocha ganache-cli web3
67+
68+
```
69+
* deployment ( script )
70+
```
71+
truffle
72+
```
73+
74+
# [syntax](http://solidity.readthedocs.io/en/latest/)
75+
[code examples](https://solidity.readthedocs.io/en/latest/solidity-by-example.html)
76+
[references](https://solidity.readthedocs.io/en/latest/solidity-in-depth.html)
77+
[source code of the smart contracts](https://github.com/ethereum/solidity)
78+
79+
## syntax highlighters
80+
* [Atom](https://atom.io/packages/language-ethereum)
81+
```
82+
Open the package installation manager in atom and search for 'language-ethereum'. After installing the package, you might have to manually change the highlighter in the .sol file. Look for the selector at the bottom right of your editor window.
83+
```
84+
[Sublime](https://packagecontrol.io/packages/Ethereum)
85+
[VSCode](https://github.com/juanfranblanco/vscode-solidity)
86+
[Webstorm](https://plugins.jetbrains.com/plugin/9475-intellij-solidity)
87+
[VIM](https://github.com/tomlion/vim-solidity)
88+
89+
## array types
90+
* fixed array
91+
```
92+
uint[5] exampleOfFixedArray;
93+
```
94+
* dynamic array
95+
```
96+
string[] public exampleOfDynamicPublicArray;
97+
```
98+
99+
## function types
100+
* public/private ( default - public )
101+
* view/constant ( return field, return constant)
102+
* pure ( don't use any contract-variables to manipulate, 'pure' functions )
103+
* payable
104+
105+
106+
## useful functions
107+
* eccak256
108+
```
109+
built in, which is a version of SHA3. A hash function basically maps an input string into a random 256-bit hexidecimal number.
110+
example:
111+
//b1f078126895a1424524de5321b339ab00408010b7cf0e6ed451514981e58aa9
112+
keccak256("aaaac");
113+
```

0 commit comments

Comments
 (0)