We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 523a2a4 commit 275ba6cCopy full SHA for 275ba6c
src/bridge/ERC20Bridge.sol
@@ -65,6 +65,9 @@ contract ERC20Bridge is AbsBridge, IERC20Bridge {
65
/// @notice When upgrading a custom fee chain from v1.x.x to v2.1.2, nativeTokenDecimals must be set to 18.
66
/// This is because v1.x.x contracts assume 18 decimals, but the ERC20Bridge does not have the decimals set in storage.
67
function postUpgradeInit() external onlyDelegated onlyProxyOwner {
68
+ // this zero check might save you from accidentally upgrading from v2.x.x to v2.1.2
69
+ // it will not save you if your native token is supposed to have 0 decimals
70
+ require(nativeTokenDecimals == 0, "NONZERO_NATIVE_TOKEN_DECIMALS");
71
nativeTokenDecimals = 18;
72
}
73
0 commit comments