https://github.com/decentralisedme/blck_chn_eng
https://github.com/decentralisedme/blck_chn_eng
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/decentralisedme/blck_chn_eng
- Owner: Decentralisedme
- Created: 2022-03-29T15:53:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-01T20:12:26.000Z (over 4 years ago)
- Last Synced: 2024-12-30T12:27:19.236Z (over 1 year ago)
- Language: Solidity
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BLCK_CHN_Eng
## Sol Basic:
### In each file there will be examples of specific use of Solidity language:
###
### A) MyRun.sol:
### You can create a list of runs you do specifying name of the run and related distance in Km. It is a simple example of:
### - Contract{}
### - struct Name{typeVarN VarN;...}
### - ArrayName[] public name;
### - function functionName(typeVarN _varN, ... ) public {}
### - mapping(type1 => type2) public name;
### The file can be run in Remix or VSC
### //
### B) ChainlinkETHUSD.sol:
### Retrieve ETH/USD last price using ChainLink interface. It is an exeample to:
### - Use an interface via:
#### -- import "@chainlink/contracts..."
#### -- import "./fileInSameFolder"
### - Call Call interface functions:
#### -– version(): returns interface version
#### -– latestRoundData(): returns non decimal price, last update timestamp >> example of multivariable function
### You can run it in Remix, but if you run it using vsc you need to twick it a bit - it is explained in the comments
### //
### C) AggregatorV3Interface.sol:
### Interface code from npm Chainlink, copied from:
### https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol
### It is needed if you want to import the interface file directly from your directory