Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amazingandyyy/practical-dapp
A Collection of Some Practical Ethereum DApp Projects.
https://github.com/amazingandyyy/practical-dapp
blockchain dapp ethereum ethereum-contract ethereum-dapp nextjs react smart-contracts solidity web3
Last synced: 23 days ago
JSON representation
A Collection of Some Practical Ethereum DApp Projects.
- Host: GitHub
- URL: https://github.com/amazingandyyy/practical-dapp
- Owner: amazingandyyy
- Created: 2018-04-13T20:32:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T04:54:22.000Z (over 6 years ago)
- Last Synced: 2024-10-12T18:51:21.758Z (about 1 month ago)
- Topics: blockchain, dapp, ethereum, ethereum-contract, ethereum-dapp, nextjs, react, smart-contracts, solidity, web3
- Language: JavaScript
- Homepage: https://amazingandyyy.com/ether-dev/
- Size: 5.39 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ether Development
## Notes
### Data type
- string
- bool
- int, int8, int16, int32, int256
- uint
- fixed/ufixed
- address
- fixed array, int[3]
- use function to return a whole array
- dynamic array, int[]
- mapping, mapping(address => string)
- struct
```javascript
struct Kitty {
address owner;
int: price;
}
```## Function Types
- public
- private, tell developer that only the contract can call the funtion, but not for security purpose
- view/constant
- pure
- payable## web3 interface
```javascript
const web3 = new Web3(provider);
web3.utils.toWei('0.01', 'ether');
let someoneBalance = await web3.eth.getBalance(accounts[0]);
```### Global Variables
- mgs.data
- msg.gas
- msg.sender
- msg.value, in wei- ether
- block.defficulty
- now (time)
- this.balance## Global Functions
- require
- sha3, keccak256
- address.transfer()## Default value
- string to ""(empty string)
- bool to false
- uint to 0
- msg.value are in wei## Resource
[Ethereum and Solidity: The Complete Developer's Guide](https://www.udemy.com/ethereum-and-solidity-the-complete-developers-guide/learn/v4/)