Skip to content

Commit

Permalink
fix: lints
Browse files Browse the repository at this point in the history
  • Loading branch information
mustermeiszer committed Jul 23, 2024
1 parent ee35da7 commit 6dd3f14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions test/integration/LocalAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pragma solidity 0.8.26;

import {Auth} from "./../../src/Auth.sol";

interface PrecompileLike {
function execute(
bytes32 commandId,
Expand Down
10 changes: 5 additions & 5 deletions test/integration/PassthroughAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ contract PassthroughAdapterScript is Deployer {
vm.stopBroadcast();
}

function toString(address account) public pure returns(string memory) {
function toString(address account) public pure returns (string memory) {
return toString(abi.encodePacked(account));
}

function toString(bytes memory data) public pure returns(string memory) {
function toString(bytes memory data) public pure returns (string memory) {
bytes memory alphabet = "0123456789abcdef";

bytes memory str = new bytes(2 + data.length * 2);
str[0] = "0";
str[1] = "x";
for (uint i = 0; i < data.length; i++) {
str[2+i*2] = alphabet[uint(uint8(data[i] >> 4))];
str[3+i*2] = alphabet[uint(uint8(data[i] & 0x0f))];
for (uint256 i = 0; i < data.length; i++) {
str[2 + i * 2] = alphabet[uint256(uint8(data[i] >> 4))];
str[3 + i * 2] = alphabet[uint256(uint8(data[i] & 0x0f))];
}
return string(str);
}
Expand Down
10 changes: 4 additions & 6 deletions test/integration/PassthroughAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract PassthroughAdapter is Auth {

/// @notice Execute message on centrifuge
function executeOnCentrifuge(string calldata _sourceChain, string calldata _sourceAddress, bytes calldata payload)
external
external
{
PrecompileLike precompile = PrecompileLike(PRECOMPILE);
precompile.execute(FAKE_COMMAND_ID, _sourceChain, _sourceAddress, payload);
Expand All @@ -86,11 +86,9 @@ contract PassthroughAdapter is Auth {
}

/// @notice Execute message on other domain
function executeOnDomain(
string calldata _sourceChain,
string calldata _sourceAddress,
bytes calldata payload
) external {
function executeOnDomain(string calldata _sourceChain, string calldata _sourceAddress, bytes calldata payload)
external
{
gateway.handle(payload);
emit ExecuteOnDomain(_sourceChain, _sourceAddress, payload);
}
Expand Down

0 comments on commit 6dd3f14

Please sign in to comment.