File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
target_chains/ethereum/contracts Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ abstract contract PythGovernance is
3939 address newWormholeAddress
4040 );
4141 event TransactionFeeSet (uint oldFee , uint newFee );
42- event FeeWithdrawn (address targetAddress , uint amount );
42+ event FeeWithdrawn (address targetAddress , uint fee );
4343
4444 function verifyGovernanceVM (
4545 bytes memory encodedVM
@@ -260,14 +260,12 @@ abstract contract PythGovernance is
260260 }
261261
262262 function withdrawFee (WithdrawFeePayload memory payload ) internal {
263- if (payload.amount > address (this ).balance)
263+ if (payload.fee > address (this ).balance)
264264 revert PythErrors.InsufficientFee ();
265265
266- (bool success , ) = payload.targetAddress.call {value: payload.amount}(
267- ""
268- );
266+ (bool success , ) = payload.targetAddress.call {value: payload.fee}("" );
269267 require (success, "Failed to withdraw fees " );
270268
271- emit FeeWithdrawn (payload.targetAddress, payload.amount );
269+ emit FeeWithdrawn (payload.targetAddress, payload.fee );
272270 }
273271}
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ contract PythGovernanceInstructions {
8585
8686 struct WithdrawFeePayload {
8787 address targetAddress;
88- // Amount in wei, matching the native uint256 type used for address.balance in EVM
89- uint256 amount ;
88+ // Fee in wei, matching the native uint256 type used for address.balance in EVM
89+ uint256 fee ;
9090 }
9191
9292 /// @dev Parse a GovernanceInstruction
@@ -266,7 +266,7 @@ contract PythGovernanceInstructions {
266266 uint64 expo = encodedPayload.toUint64 (index);
267267 index += 8 ;
268268
269- wf.amount = uint256 (val) * uint256 (10 ) ** uint256 (expo);
269+ wf.fee = uint256 (val) * uint256 (10 ) ** uint256 (expo);
270270
271271 if (encodedPayload.length != index)
272272 revert PythErrors.InvalidGovernanceMessage ();
Original file line number Diff line number Diff line change @@ -705,5 +705,5 @@ contract PythGovernanceTest is
705705 address newWormholeAddress
706706 );
707707 event TransactionFeeSet (uint oldFee , uint newFee );
708- event FeeWithdrawn (address recipient , uint256 amount );
708+ event FeeWithdrawn (address recipient , uint256 fee );
709709}
You can’t perform that action at this time.
0 commit comments