Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename to LSP23LinkedContractsFactory #675

Merged
merged 6 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ILinkedContractsFactory {
interface ILSP23LinkedContractsFactory {
event DeployedContracts(
address indexed primaryContract,
address indexed secondaryContract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ pragma solidity ^0.8.4;
import {Create2} from "@openzeppelin/contracts/utils/Create2.sol";
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
import {IPostDeploymentModule} from "./IPostDeploymentModule.sol";
import {ILinkedContractsFactory} from "./ILinkedContractsFactory.sol";
import {ILSP23LinkedContractsFactory} from "./ILSP23LinkedContractsFactory.sol";
import {
InvalidValueSum,
PrimaryContractProxyInitFailureError,
SecondaryContractProxyInitFailureError
} from "./LSP23Errors.sol";

contract LinkedContractsFactory is ILinkedContractsFactory {
contract LSP23LinkedContractsFactory is ILSP23LinkedContractsFactory {
/**
* @inheritdoc ILinkedContractsFactory
* @inheritdoc ILSP23LinkedContractsFactory
*/
function deployContracts(
PrimaryContractDeployment calldata primaryContractDeployment,
Expand Down Expand Up @@ -69,7 +69,7 @@ contract LinkedContractsFactory is ILinkedContractsFactory {
}

/**
* @inheritdoc ILinkedContractsFactory
* @inheritdoc ILSP23LinkedContractsFactory
*/
function deployERC1167Proxies(
PrimaryContractDeploymentInit calldata primaryContractDeploymentInit,
Expand Down Expand Up @@ -128,7 +128,7 @@ contract LinkedContractsFactory is ILinkedContractsFactory {
}

/**
* @inheritdoc ILinkedContractsFactory
* @inheritdoc ILSP23LinkedContractsFactory
*/
function computeAddresses(
PrimaryContractDeployment calldata primaryContractDeployment,
Expand Down Expand Up @@ -174,7 +174,7 @@ contract LinkedContractsFactory is ILinkedContractsFactory {
}

/**
* @inheritdoc ILinkedContractsFactory
* @inheritdoc ILSP23LinkedContractsFactory
*/
function computeERC1167Addresses(
PrimaryContractDeploymentInit calldata primaryContractDeploymentInit,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {
OPERATION_4_DELEGATECALL
} from "@erc725/smart-contracts/contracts/constants.sol";

import {UniversalProfileInit} from "../../UniversalProfileInit.sol";

contract UniversalProfileInitPostDeploymentModule is UniversalProfileInit {
Expand Down Expand Up @@ -45,7 +49,7 @@ contract UniversalProfileInitPostDeploymentModule is UniversalProfileInit {

// call the execute function with delegate_call on the universalProfile contract to setData and transferOwnership
UniversalProfileInit(payable(universalProfile)).execute(
4,
OPERATION_4_DELEGATECALL,
address(this),
0,
abi.encodeWithSignature(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {
OPERATION_4_DELEGATECALL
} from "@erc725/smart-contracts/contracts/constants.sol";

import {UniversalProfile} from "../../UniversalProfile.sol";

contract UniversalProfilePostDeploymentModule is UniversalProfile {
Expand Down Expand Up @@ -43,7 +47,7 @@ contract UniversalProfilePostDeploymentModule is UniversalProfile {

// call the execute function with delegate_call on the universalProfile contract to setData and transferOwnership
UniversalProfile(payable(universalProfile)).execute(
4,
OPERATION_4_DELEGATECALL,
address(this),
0,
abi.encodeWithSignature(
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const config: HardhatUserConfig = {
// ------------------
'Create2Factory',
'LSP16UniversalFactory',
'LinkedContractsFactory',
'LSP23LinkedContractsFactory',
],
// Whether to include the TypeChain factories or not.
// If this is enabled, you need to run the TypeChain files through the TypeScript compiler before shipping to the registry.
Expand Down
Loading
Loading