Commit 7cc4a00
committed
fix(deploy): accept the key in the shape wallets actually export it
The owner's first mainnet deploy attempt failed on this, and the error was
correct and useless: "vm.envUint: failed parsing $DEPLOYER_PRIVATE_KEY as type
uint256: missing hex prefix (0x)".
vm.envUint requires the prefix. MetaMask - the obvious place an operator gets
the key from - exports it WITHOUT one. So the first attempt fails on a
formatting detail unrelated to the deployment, after the operator has already
typed a private key into a terminal. That is the worst moment to make someone
retry blind, and the second worst to make them re-handle the key.
Read as a string and normalised now. Both shapes work; the key is never
logged, only its length is checked, and a wrong length is refused with a
message that says what is expected.
Everything before it in the trace had already passed, which is the part worth
noting: the governance quorum guard read getThreshold() = 2 and getOwners() =
3 owners off the owner's real Safe and let it through. The guard added earlier
today works against a real Safe on the real chain, not just a mock.
Tested all three shapes: 64 chars bare, 66 with 0x, and garbage refused.1 parent 1c2672d commit 7cc4a00
1 file changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
140 | 170 | | |
141 | 171 | | |
142 | 172 | | |
| |||
0 commit comments