Skip to content

Commit

Permalink
fix(solidity): lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmp01 committed Jun 21, 2024
1 parent e1ae61f commit 63a2739
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
22 changes: 7 additions & 15 deletions solidity/src/Adapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import {IXERC20Registry} from "./interfaces/IXERC20Registry.sol";
import {IXERC20Lockbox} from "./interfaces/IXERC20Lockbox.sol";
import {ExcessivelySafeCall} from "./libraries/ExcessivelySafeCall.sol";

import "forge-std/console.sol";

contract Adapter is IAdapter, Ownable {
using ExcessivelySafeCall for address;

Expand Down Expand Up @@ -50,7 +48,8 @@ contract Adapter is IAdapter, Ownable {
* @param token ERC20 or xERC20 to move across chains
* @param amount token quantity to move across chains
* @param recipient whom will receive the token
* @param destinationChainId chain id where the wrapped version is destined to (it may be a sha256 hash of the relevant ID of the chain (i.e. sha256 of the chain id for EOS))
* @param destinationChainId chain id where the wrapped version is destined to
* (it may be a sha256 hash of the relevant ID of the chain (i.e. sha256 of the chain id for EOS))
* @param data metadata
*/
function swap(
Expand Down Expand Up @@ -122,7 +121,8 @@ contract Adapter is IAdapter, Ownable {
* @param token ERC20 or xERC20 to move across chains
* @param amount token quantity to move across chains
* @param recipient whom will receive the token
* @param destinationChainId chain id where the wrapped version is destined to (it may be a sha256 hash of the relevant ID of the chain (i.e. sha256 of the chain id for EOS))
* @param destinationChainId chain id where the wrapped version is destined to
* (it may be a sha256 hash of the relevant ID of the chain (i.e. sha256 of the chain id for EOS))
*/
function swap(
address token,
Expand Down Expand Up @@ -152,15 +152,6 @@ contract Adapter is IAdapter, Ownable {
IXERC20(xerc20).mint(address(this), operation.amount);

IERC20(xerc20).approve(lockbox, operation.amount);
console.log("adapter xerc20 address", address(xerc20));
console.log(
"adater allowance",
IERC20(xerc20).allowance(address(this), lockbox)
);
console.log(
"adater balance",
IERC20(xerc20).balanceOf(address(this))
);
IXERC20Lockbox(lockbox).withdrawTo(
hexStringToAddress(operation.recipient),
operation.amount
Expand All @@ -178,8 +169,9 @@ contract Adapter is IAdapter, Ownable {
// We do not want this mint transaction reverting if their receiveUserData function reverts,
// and thus we swallow any such errors, emitting a `ReceiveUserDataFailed` event instead.
// This way, a user also has the option include userData even when minting to an externally owned account.
// Here excessivelySafeCall executes a low-level call which does not revert the caller transaction if the callee reverts,
// with the increased protection for returnbombing, i.e. the returndata copy is limited to 256 bytes.
// Here excessivelySafeCall executes a low-level call which does not revert the caller transaction if
// the callee reverts, with the increased protection for returnbombing, i.e. the returndata copy is
// limited to 256 bytes.
bytes memory data = abi.encodeWithSelector(
IPReceiver.receiveUserData.selector,
operation.data
Expand Down
2 changes: 0 additions & 2 deletions solidity/src/FeesManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
import {IXERC20} from "./interfaces/IXERC20.sol";
import {IFeesManager} from "./interfaces/IFeesManager.sol";

import "forge-std/console.sol";

contract FeesManager is IFeesManager, Ownable {
using SafeERC20 for IERC20;
uint16 public currentEpoch;
Expand Down
2 changes: 0 additions & 2 deletions solidity/src/PAM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {IPAM} from "./interfaces/IPAM.sol";
import {IAdapter} from "./interfaces/IAdapter.sol";

import "forge-std/console.sol";

contract PAM is Ownable, IPAM {
bytes32 public constant SWAP_EVENT_TOPIC =
0xb255de8953b7f0014df3bb00e17f11f43945268f579979c7124353070c2db98d;
Expand Down

0 comments on commit 63a2739

Please sign in to comment.