We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79edbf9 commit 60b6772Copy full SHA for 60b6772
ethereum/contracts/pyth/PythUpgradable.sol
@@ -127,11 +127,10 @@ contract PythUpgradable is
127
_upgradeToAndCallUUPS(payload.newImplementation, new bytes(0), false);
128
129
// 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
- );
+ // the new contract. This call will fail if the method does not exists or the magic
+ // is different.
+ if (this.pythUpgradableMagic() != 0x97a6f304)
+ revert PythErrors.InvalidGovernanceMessage();
135
136
emit ContractUpgraded(oldImplementation, _getImplementation());
137
}
0 commit comments