solidity-study > PURE_SOLIDITY_ONLY
- Each net has an Id, the mainnet is the ID 1 and so on...
- Built-in data: solidity-study > PURE_SOLIDITY_ONLY > built-in.sol
- Click on plug icon
- Active lib: FLATTENER
- Select FLATTENER tab
- Click on "Flatten crypto currency name.sol"
- Cli on "Save crypto.._flat.sol"
- Fix the warning (just add a comment with SPDX license on top)
- Compile it selecting it flat file version
- On deploy tab:
- On deploy tab on remix choose: Injected Web3
- Add the necessary params (name, symbol & initialSupply)
- Click on deploy --> it will open meta mask & take sometime
- Copy the generated address on the token output after deploy
- Go to etherscan (under the testnet like: https://kovan.etherscan.io or https://rinkeby.etherscan.io)
- On search: paste the smart contract address
- --> It might take some time to the smart contract be available
- Click on "Contract" tab
- Click on "Verify and Publish"
- Compile type (in our case (OpenZepelin) is a "SingleFile" with optmization)
- Select compiler version
- No license or MIT as addded on SPDX comment
- On "Verify & Publish" upload the Coin.json, in this case is MintDollar.json
- Click on "verify" button on the bottom
- Copy the Contract address to add to MetaMask (click on Assets > Add Token > Paste address code)
Upgrading an existing smart contract archtecture: https://www.youtube.com/watch?v=RoXgaAvoIjg
Contract verified on EtherScan: https://rinkeby.etherscan.io/verifyContract-solc?a=0xcadfd54DC0F21571dB335044c7b14Eb1c8d38a71&c=v0.8.11%2bcommit.d7f03943&lictype=3 Contract itself: https://rinkeby.etherscan.io/address/0xcadfd54DC0F21571dB335044c7b14Eb1c8d38a71
- Create a function with "payable" identifier
- It allows us to get msg.sender & msg.value
- On the deploy JS EVM we need to add the amount to be sent on the input at the top (there is no input in the function place) and then click on the function
- --> remember to check the unit to be sent
- the balance retrieves it in wei unit
- if a key is not present in the dictionary (mapping) it is gonna to retrieve 0
This repository contains the core smart contract code for Multi Collateral Stable Coin (based on Dai). This is a high level description of the system, assuming familiarity with the basic economic mechanics as described in the whitepaper.
dss
is also documented in the wiki and in DEVELOPING.md
https://github.com/TonGarcia/DeFi/blob/master/README.sol.md
Dai (MakerDAO overall) uses DappTools as framework: https://github.com/dapphub/dapptools