Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Anirudh Suresh authored and Anirudh Suresh committed Feb 16, 2024
1 parent c34f877 commit 9402ac1
Show file tree
Hide file tree
Showing 5 changed files with 698 additions and 777 deletions.
1 change: 0 additions & 1 deletion per_multicall/remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/
forge-std/=lib/forge-std/src/
openzeppelin-contracts/=lib/openzeppelin-contracts/
@pythnetwork/pyth-sdk-solidity=node_modules/@pythnetwork/pyth-sdk-solidity/
solidity-bytes-utils=node_modules/solidity-bytes-utils
4 changes: 3 additions & 1 deletion per_multicall/src/PERMulticall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ contract PERMulticall {
function _bytesToAddress(
bytes memory bys
) private pure returns (address addr) {
(addr, ) = abi.decode(bys, (address, bytes));
// this does not assume the struct fields of the permission key
addr = address(uint160(uint256(bytes32(bys))));
}

/**
Expand Down Expand Up @@ -105,6 +106,7 @@ contract PERMulticall {
} catch Error(string memory reason) {
multicallStatuses[i].multicallRevertReason = reason;
}

// only count bid if call was successful (and bid was paid out)
if (multicallStatuses[i].externalSuccess) {
totalBid += bids[i];
Expand Down
Loading

0 comments on commit 9402ac1

Please sign in to comment.