Skip to content

Commit e1c1f0a

Browse files
authored
Merge pull request #2610 from pyth-network/evm-gov
fix(pyth-governance): add no-op for SetFeeInToken action on EVM chains and update action indices
2 parents e2caed9 + bd0b3d9 commit e1c1f0a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

target_chains/ethereum/contracts/contracts/pyth/PythGovernance.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ abstract contract PythGovernance is
9999
parseSetWormholeAddressPayload(gi.payload),
100100
encodedVM
101101
);
102+
} else if (gi.action == GovernanceAction.SetFeeInToken) {
103+
// No-op for EVM chains
102104
} else if (gi.action == GovernanceAction.SetTransactionFee) {
103105
setTransactionFee(parseSetTransactionFeePayload(gi.payload));
104106
} else if (gi.action == GovernanceAction.WithdrawFee) {

target_chains/ethereum/contracts/contracts/pyth/PythGovernanceInstructions.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ contract PythGovernanceInstructions {
3535
SetValidPeriod, // 4
3636
RequestGovernanceDataSourceTransfer, // 5
3737
SetWormholeAddress, // 6
38-
SetTransactionFee, // 7
39-
WithdrawFee // 8
38+
SetFeeInToken, // 7 - No-op for EVM chains
39+
SetTransactionFee, // 8
40+
WithdrawFee // 9
4041
}
4142

4243
struct GovernanceInstruction {
@@ -233,7 +234,7 @@ contract PythGovernanceInstructions {
233234
revert PythErrors.InvalidGovernanceMessage();
234235
}
235236

236-
/// @dev Parse a SetTransactionFeePayload (action 7) with minimal validation
237+
/// @dev Parse a SetTransactionFeePayload (action 8) with minimal validation
237238
function parseSetTransactionFeePayload(
238239
bytes memory encodedPayload
239240
) public pure returns (SetTransactionFeePayload memory stf) {
@@ -251,7 +252,7 @@ contract PythGovernanceInstructions {
251252
revert PythErrors.InvalidGovernanceMessage();
252253
}
253254

254-
/// @dev Parse a WithdrawFeePayload (action 8) with minimal validation
255+
/// @dev Parse a WithdrawFeePayload (action 9) with minimal validation
255256
function parseWithdrawFeePayload(
256257
bytes memory encodedPayload
257258
) public pure returns (WithdrawFeePayload memory wf) {

0 commit comments

Comments
 (0)