Skip to content

Commit

Permalink
refactor: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscotobar committed Feb 16, 2024
1 parent a553f58 commit f279b30
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 24 deletions.
6 changes: 1 addition & 5 deletions contracts/factory/BaseSmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/cryptography/ECDSA.sol";
import "../interfaces/IWalletFactory.sol";
import "../interfaces/ISmartWalletFactory.sol";
import "../utils/RSKAddrValidator.sol";

Expand Down Expand Up @@ -72,10 +71,7 @@ PC | OPCODE| Mnemonic | Stack [top, bottom] | Comm

/** Factory of Proxies to the SmartWallet (Forwarder)
*/
abstract contract BaseSmartWalletFactory is
IWalletFactory,
ISmartWalletFactory
{
abstract contract BaseSmartWalletFactory is ISmartWalletFactory {
using ECDSA for bytes32;

bytes11 private constant _RUNTIME_START = hex"363D3D373D3D3D3D363D73";
Expand Down
8 changes: 4 additions & 4 deletions contracts/factory/BoltzSmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "../interfaces/ISmartWalletCreator.sol";
import "../interfaces/ISmartWalletRelayer.sol";
import "../interfaces/ICreateSmartWalletFactory.sol";
import "../interfaces/IRelayerSmartWalletFactory.sol";
import "./BaseSmartWalletFactory.sol";

/* solhint-disable no-inline-assembly */
/* solhint-disable avoid-low-level-calls */

contract BoltzSmartWalletFactory is
BaseSmartWalletFactory,
ISmartWalletCreator,
ISmartWalletRelayer
ICreateSmartWalletFactory,
IRelayerSmartWalletFactory
{
/* solhint-disable no-empty-blocks */
/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/factory/CustomSmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/cryptography/ECDSA.sol";
import "../interfaces/ICustomSmartWalletFactory.sol";
import "../interfaces/ICustomSmartWalletCreator.sol";
import "../interfaces/ISmartWalletRelayer.sol";
import "../interfaces/ICreateCustomSmartWalletFactory.sol";
import "../interfaces/IRelayerSmartWalletFactory.sol";
import "../utils/RSKAddrValidator.sol";

/* solhint-disable no-inline-assembly */
Expand Down Expand Up @@ -75,8 +75,8 @@ PC | OPCODE| Mnemonic | Stack [top, bottom] | Comm
The Forwarder itself is a Template with portions delegated to a custom logic (it is also a proxy) */
contract CustomSmartWalletFactory is
ICustomSmartWalletFactory,
ICustomSmartWalletCreator,
ISmartWalletRelayer
ICreateCustomSmartWalletFactory,
IRelayerSmartWalletFactory
{
using ECDSA for bytes32;

Expand Down
4 changes: 2 additions & 2 deletions contracts/factory/MinimalBoltzSmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "../interfaces/ISmartWalletRelayer.sol";
import "../interfaces/IRelayerSmartWalletFactory.sol";
import "./BaseSmartWalletFactory.sol";

/* solhint-disable no-inline-assembly */
/* solhint-disable avoid-low-level-calls */

contract MinimalBoltzSmartWalletFactory is
BaseSmartWalletFactory,
ISmartWalletRelayer
IRelayerSmartWalletFactory
{
/* solhint-disable no-empty-blocks */
/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/factory/SmartWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "../interfaces/ISmartWalletCreator.sol";
import "../interfaces/ISmartWalletRelayer.sol";
import "../interfaces/ICreateSmartWalletFactory.sol";
import "../interfaces/IRelayerSmartWalletFactory.sol";
import "./BaseSmartWalletFactory.sol";

/* solhint-disable no-inline-assembly */
/* solhint-disable avoid-low-level-calls */

contract SmartWalletFactory is
BaseSmartWalletFactory,
ISmartWalletCreator,
ISmartWalletRelayer
ICreateSmartWalletFactory,
IRelayerSmartWalletFactory
{
/* solhint-disable no-empty-blocks */
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma experimental ABIEncoderV2;

import "./IWalletFactory.sol";

interface ICustomSmartWalletCreator is IWalletFactory {
interface ICreateCustomSmartWalletFactory is IWalletFactory {
function createUserSmartWallet(
address owner,
address recoverer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma experimental ABIEncoderV2;

import "./IWalletFactory.sol";

interface ISmartWalletCreator is IWalletFactory {
interface ICreateSmartWalletFactory is IWalletFactory {
function createUserSmartWallet(
address owner,
address recoverer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma experimental ABIEncoderV2;

import "./IWalletFactory.sol";

interface ISmartWalletRelayer is IWalletFactory {
interface IRelayerSmartWalletFactory is IWalletFactory {
function relayedUserSmartWalletCreation(
IForwarder.DeployRequest memory req,
bytes32 suffixData,
Expand Down
6 changes: 4 additions & 2 deletions contracts/utils/Eip712Library.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma experimental ABIEncoderV2;

import "../interfaces/EnvelopingTypes.sol";
import "../interfaces/IForwarder.sol";
import "../interfaces/ISmartWalletRelayer.sol";
import "../interfaces/IRelayerSmartWalletFactory.sol";
import "./MinLibBytes.sol";

/**
Expand All @@ -22,7 +22,9 @@ library Eip712Library {
/* solhint-disable-next-line avoid-low-level-calls */
(deploySuccess, ret) = relayRequest.relayData.callForwarder.call(
abi.encodeWithSelector(
ISmartWalletRelayer.relayedUserSmartWalletCreation.selector,
IRelayerSmartWalletFactory
.relayedUserSmartWalletCreation
.selector,
relayRequest.request,
hashRelayData(relayRequest.relayData),
relayRequest.relayData.feesReceiver,
Expand Down

0 comments on commit f279b30

Please sign in to comment.