Skip to content

Commit 60b6772

Browse files
committedNov 29, 2022
Remove one more error string
1 parent 79edbf9 commit 60b6772

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎ethereum/contracts/pyth/PythUpgradable.sol

+4-5
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ contract PythUpgradable is
127127
_upgradeToAndCallUUPS(payload.newImplementation, new bytes(0), false);
128128

129129
// Calling a method using `this.<method>` will cause a contract call that will use
130-
// the new contract.
131-
require(
132-
this.pythUpgradableMagic() == 0x97a6f304,
133-
"the new implementation is not a Pyth contract"
134-
);
130+
// the new contract. This call will fail if the method does not exists or the magic
131+
// is different.
132+
if (this.pythUpgradableMagic() != 0x97a6f304)
133+
revert PythErrors.InvalidGovernanceMessage();
135134

136135
emit ContractUpgraded(oldImplementation, _getImplementation());
137136
}

0 commit comments

Comments
 (0)