| // ---------------------------------------------------------------------------- // | |
| // GNOSIS SAFE DEPLOYMENT SCRIPT // | |
| // ---------------------------------------------------------------------------- // | |
| import { ethers } from 'ethers' | |
| import EthersAdapter from '@gnosis.pm/safe-ethers-lib' | |
| import SafeServiceClient from '@gnosis.pm/safe-service-client' | |
| import Safe, { SafeFactory, EthSignSignature } from '@gnosis.pm/safe-core-sdk' | |
| import * as dotenv from 'dotenv' |
| // ============================================================================= | |
| // XNU kperf/kpc demo | |
| // Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges | |
| // | |
| // | |
| // Demo 1 (profile a function in current thread): | |
| // 1. Open directory '/usr/share/kpep/', find your CPU PMC database. | |
| // M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist | |
| // M2 (Pro/Max): /usr/share/kpep/a15.plist | |
| // M3: /usr/share/kpep/as1.plist |
Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!
The advantages of versions 0.8.* over <0.8.0 are:
- Safemath by default from
0.8.0(can be more gas efficient than some library based safemath). - Low level inliner from
0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
| #!/usr/bin/env node | |
| var Decimal = require('decimal.js') // $ yarn add decimal.js | |
| // pulling out the big guns (maybe a tad excessive...) | |
| Decimal.config( | |
| { | |
| precision: 500, | |
| toExpNeg: -500 | |
| } | |
| ) |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real