Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prt/contracts/src/tournament/abstracts/Tournament.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ abstract contract Tournament is ITournament {
Time.Instant lastMatchDeleted;

uint256 constant MAX_GAS_PRICE = 50 gwei;
uint256 constant MESSAGE_SENDER_PROFIT = 10 gwei;
uint256 constant PRIORITY_FEE_CAP = 10 gwei;
bool transient locked;

mapping(Tree.Node => Clock.State) clocks;
Expand Down Expand Up @@ -623,7 +623,7 @@ abstract contract Tournament is ITournament {
address(this).balance,
bondValue() * gasEstimate / _totalGasEstimate(),
(Gas.TX + gasBefore - gasAfter)
* (tx.gasprice + MESSAGE_SENDER_PROFIT)
* tx.gasprice.min(block.basefee + PRIORITY_FEE_CAP)
);

(bool status, bytes memory ret) =
Expand Down
2 changes: 1 addition & 1 deletion prt/contracts/src/tournament/libs/Gas.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pragma solidity ^0.8.17;

library Gas {
uint256 constant TX = 21000;
uint256 constant TX = 25000;

uint256 constant ADVANCE_MATCH = 65175 + TX;
uint256 constant WIN_MATCH_BY_TIMEOUT = 86203 + TX;
Expand Down
1 change: 1 addition & 0 deletions prt/contracts/test/Tournament.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ contract TournamentTest is Util {

uint256 tournamentBalanceBefore = address(topTournament).balance;
uint256 callerBalanceBefore = address(this).balance;
vm.txGasPrice(2);
topTournament.eliminateMatchByTimeout(_matchId);
uint256 tournamentBalanceAfter = address(topTournament).balance;
uint256 callerBalanceAfter = address(this).balance;
Expand Down
Loading