Skip to content

Commit

Permalink
remove fee
Browse files Browse the repository at this point in the history
  • Loading branch information
Code0x2 committed Nov 22, 2023
2 parents 3984342 + ab35926 commit 787e588
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts
16 changes: 3 additions & 13 deletions src/contracts/atlas/ExecutionEnvironment.sol
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ contract ExecutionEnvironment is Base {
function allocateValue(
address bidToken,
uint256 bidAmount,
bytes memory returnData
bytes memory allocateData
)
external
onlyAtlasEnvironment(ExecutionPhase.HandlingPayments, _ENVIRONMENT_DEPTH)
Expand All @@ -265,18 +265,8 @@ contract ExecutionEnvironment is Base {
// msg.sender = escrow
// address(this) = ExecutionEnvironment

uint256 payment = (bidAmount * 5) / 100;

if (bidToken != address(0)) {
SafeTransferLib.safeTransfer(ERC20(bidToken), address(0xa71a5), payment);
} else {
SafeTransferLib.safeTransferETH(address(0xa71a5), payment);
}

uint256 netBidAmount = bidAmount - payment;

bytes memory allocateData =
abi.encodeWithSelector(IDAppControl.allocateValueCall.selector, bidToken, netBidAmount, returnData);
allocateData =
abi.encodeWithSelector(IDAppControl.allocateValueCall.selector, bidToken, bidAmount, allocateData);

(bool success,) = _control().delegatecall(forward(allocateData));
require(success, "ERR-EC02 DelegateRevert");
Expand Down

0 comments on commit 787e588

Please sign in to comment.