I set up test project based on the metacoin-box (truffle unbox metacoin mc) with two test folders
- test - has js tests
- test-solidity - has solidity tests
Test layout
╭─amal@falafel ~/.scratch/2022/07/18/swiss-dirs/mc ‹node-16.16.0› ‹›| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; | |
| contract A { | |
| function foo() public pure returns (uint) { return bar(); } | |
| function bar() public virtual pure returns (uint) { return 1; } | |
| } | |
| contract B is A { } |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
I set up test project based on the metacoin-box (truffle unbox metacoin mc) with two test folders
╭─amal@falafel ~/.scratch/2022/07/18/swiss-dirs/mc ‹node-16.16.0› ‹›reprod test-from truffle unbox metacoin rm contracts/Migrations.sol rm migrations/*.js cat << EOF > migrations/1_deploy_it.js const ConvertLib = artifacts.require("ConvertLib"); const MetaCoin = artifacts.require("MetaCoin");
module.exports = async function(deployer, network, accounts) { const from = accounts[1];
FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
| 1 EIP Purpose and Guidelines | |
| 2 Homestead Hard-fork Changes | |
| 3 Addition of CALLDEPTH opcode | |
| 4 EIP Classification | |
| 5 Gas Usage for `RETURN` and `CALL*` | |
| 6 Renaming SUICIDE opcode | |
| 7 DELEGATECALL | |
| 8 devp2p Forward Compatibility Requirements for Homestead | |
| 20 ERC-20 Token Standard | |
| 55 Mixed-case checksum address encoding |
| #!/bin/bash | |
| set -e | |
| # NOTE to create labels for your repo | |
| # to support types from commit message guide (feat, fix, docs, style, refactor, test, chore) | |
| # by hitting GitHub API v3 | |
| # | |
| # https://docs.github.com/en/rest/reference/issues#create-a-label | |
| # https://developer.github.com/v3/issues/labels/#create-a-label |
| #!/bin/bash | |
| # This is a very naive script, it doesn't do grouping and returns all branches | |
| # I only really care about branches that have not seen commits in two months | |
| # | |
| # I am hoping to find some time to write a tool that can output these reports for me | |
| # In the meantime, I am using this | |
| echo "Merged branches" | |
| for branch in `git branch -r --merged | grep -v HEAD`;do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch; done | sort -r |
| module.exports = { | |
| networks: { | |
| development: { | |
| host: "127.0.0.1", // Localhost (default: none) | |
| port: 8545, // Standard Ethereum port (default: none) | |
| network_id: "*", // Any network (default: none) | |
| }, | |
| }, | |
| // Set default mocha options here, use special reporters etc. |