• Tuesday

    • Built a dapp on eth.
      • Angular component+service+material to transfer ether from one address to another.
      • Truffle for the contract, ng 13.2.2 for the app, ganache local network to test, connected to metamask for account mgmt + transaction approval.
    • https://www.l2savings.org/.
    • Remember odd node releases drops support after 6 months. Even numbers are LTS.
    • ctrl-enter in vscode enter a newline at the end of the current line (instead of <enter> right where the cursor is).
    • https://equityzen.com/accounts/manage/watchlist/.
    • strictPropertyInitialization: false -> add postfix operator ! so the compiler knows it won’t be undefined.
    • SPDX license identifiers.
    • Constructor visibility. “public” doesn’t make sense, only run once when the contract is deployed.
    • https://web3js.readthedocs.io/en/v1.2.9/.
    • Ng serve tries to bundle package.json to the browser, but some node core modules (eg crypto) cannot be shipped like this. Webpack <5 used to polyfill these for you, but now must do manually. webpack.config.js resolve.fallback: { “crypto”: require.resolve(“crypto-browserify”) } for example (and npm install crypto-browserify). Must use custom-webpack with angular-builders, since it abstracts behind the standard root webpack.config.js.