diff --git a/.github/workflows/solc_version.yml b/.github/workflows/solc_version.yml index a0e7f6cd9..73bba6ab9 100644 --- a/.github/workflows/solc_version.yml +++ b/.github/workflows/solc_version.yml @@ -80,9 +80,11 @@ jobs: --allow-paths $(pwd)/node_modules/,$(pwd)/packages/ \ @=node_modules/@ \ solidity-bytes-utils/=node_modules/solidity-bytes-utils/ \ - ../=$(pwd)/contracts/ + ../=$(pwd)/contracts/ \ + lsp25/=packages/LSP25ExecuteRelayCall/ else solc contracts/**/*.sol \ @=node_modules/@ \ - solidity-bytes-utils/=node_modules/solidity-bytes-utils/ + solidity-bytes-utils/=node_modules/solidity-bytes-utils/ \ + lsp25/=packages/LSP25ExecuteRelayCall/ fi; diff --git a/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol b/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol index 35be8f4e4..4a6722cc1 100644 --- a/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +++ b/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol @@ -15,7 +15,7 @@ import { } from "../LSP20CallVerification/ILSP20CallVerifier.sol"; import { ILSP25ExecuteRelayCall as ILSP25 -} from "../../packages/LSP25ExecuteRelayCall/contracts/ILSP25ExecuteRelayCall.sol"; +} from "lsp25/contracts/ILSP25ExecuteRelayCall.sol"; // modules import {ILSP14Ownable2Step} from "../LSP14Ownable2Step/ILSP14Ownable2Step.sol"; @@ -29,7 +29,7 @@ import { import {LSP6OwnershipModule} from "./LSP6Modules/LSP6OwnershipModule.sol"; import { LSP25MultiChannelNonce -} from "../../packages/LSP25ExecuteRelayCall/contracts/LSP25MultiChannelNonce.sol"; +} from "lsp25/contracts/LSP25MultiChannelNonce.sol"; // libraries import {BytesLib} from "solidity-bytes-utils/contracts/BytesLib.sol"; @@ -69,9 +69,7 @@ import { _LSP20_VERIFY_CALL_SUCCESS_VALUE_WITH_POST_VERIFICATION, _LSP20_VERIFY_CALL_RESULT_SUCCESS_VALUE } from "../LSP20CallVerification/LSP20Constants.sol"; -import { - _INTERFACEID_LSP25 -} from "../../packages/LSP25ExecuteRelayCall/contracts/LSP25Constants.sol"; +import {_INTERFACEID_LSP25} from "lsp25/contracts/LSP25Constants.sol"; /** * @title Core implementation of the LSP6 Key Manager standard. diff --git a/contracts/Mocks/ERC165Interfaces.sol b/contracts/Mocks/ERC165Interfaces.sol index 10dedeee8..827842f33 100644 --- a/contracts/Mocks/ERC165Interfaces.sol +++ b/contracts/Mocks/ERC165Interfaces.sol @@ -57,7 +57,7 @@ import { } from "../LSP20CallVerification/ILSP20CallVerifier.sol"; import { ILSP25ExecuteRelayCall as ILSP25 -} from "../../packages/LSP25ExecuteRelayCall/contracts/ILSP25ExecuteRelayCall.sol"; +} from "lsp25/contracts/ILSP25ExecuteRelayCall.sol"; // constants import {_INTERFACEID_LSP0} from "../LSP0ERC725Account/LSP0Constants.sol"; @@ -83,9 +83,7 @@ import { _INTERFACEID_LSP20_CALL_VERIFICATION, _INTERFACEID_LSP20_CALL_VERIFIER } from "../LSP20CallVerification/LSP20Constants.sol"; -import { - _INTERFACEID_LSP25 -} from "../../packages/LSP25ExecuteRelayCall/contracts/LSP25Constants.sol"; +import {_INTERFACEID_LSP25} from "lsp25/contracts/LSP25Constants.sol"; // libraries import { diff --git a/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol b/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol index dec309bbf..b04060d76 100644 --- a/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol +++ b/contracts/Mocks/Reentrancy/BatchReentrancyRelayer.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.4; // interfaces import { ILSP25ExecuteRelayCall -} from "../../../packages/LSP25ExecuteRelayCall/contracts/ILSP25ExecuteRelayCall.sol"; +} from "lsp25/contracts/ILSP25ExecuteRelayCall.sol"; contract BatchReentrancyRelayer { bytes[] private _signatures; diff --git a/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol b/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol index 27a2ffa34..351076001 100644 --- a/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol +++ b/contracts/Mocks/Reentrancy/SingleReentrancyRelayer.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.4; // interfaces import { ILSP25ExecuteRelayCall -} from "../../../packages/LSP25ExecuteRelayCall/contracts/ILSP25ExecuteRelayCall.sol"; +} from "lsp25/contracts/ILSP25ExecuteRelayCall.sol"; contract SingleReentrancyRelayer { bytes private _signature; diff --git a/dodoc/config.ts b/dodoc/config.ts index 019a2ecf7..98b881a31 100644 --- a/dodoc/config.ts +++ b/dodoc/config.ts @@ -20,7 +20,7 @@ export const dodocConfig = { 'contracts/LSP20CallVerification/LSP20CallVerification.sol', 'contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol', 'contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol', - 'contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol', + 'packages/LSP25ExecuteRelayCall/contracts/LSP25MultiChannelNonce.sol', // tokens 'contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol', diff --git a/package-lock.json b/package-lock.json index 4f884e84d..50a31beef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@erc725/smart-contracts": "^7.0.0", "@openzeppelin/contracts": "^4.9.2", "@openzeppelin/contracts-upgradeable": "^4.9.2", + "lsp25": "*", "solidity-bytes-utils": "0.8.0" }, "devDependencies": { @@ -33637,6 +33638,35 @@ "typescript": "^5.3.3" } }, + "lsp25": { + "version": "file:packages/LSP25ExecuteRelayCall", + "requires": { + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@openzeppelin/contracts": "^4.9.3", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "solhint": "^3.6.2", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^4.9.5" + }, + "dependencies": { + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true + } + } + }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", diff --git a/package.json b/package.json index b07a1fa0f..5216b70af 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,8 @@ "@erc725/smart-contracts": "^7.0.0", "@openzeppelin/contracts": "^4.9.2", "@openzeppelin/contracts-upgradeable": "^4.9.2", - "solidity-bytes-utils": "0.8.0" + "solidity-bytes-utils": "0.8.0", + "lsp25": "*" }, "devDependencies": { "@b00ste/hardhat-dodoc": "^0.3.15", diff --git a/packages/LSP25ExecuteRelayCall/.gitmodules b/packages/LSP25ExecuteRelayCall/.gitmodules deleted file mode 100644 index 3dce69ce0..000000000 --- a/packages/LSP25ExecuteRelayCall/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/forge-std"] - path = ../../lib/forge-std - url = https://github.com/foundry-rs/forge-std.git diff --git a/packages/LSP25ExecuteRelayCall/foundry.toml b/packages/LSP25ExecuteRelayCall/foundry.toml deleted file mode 100644 index aac84236b..000000000 --- a/packages/LSP25ExecuteRelayCall/foundry.toml +++ /dev/null @@ -1,10 +0,0 @@ -[profile.default] -src = 'contracts' -out = 'out' -libs = ['node_modules','lib'] -cache_path = 'forge-cache' -test = 'foundry' -solc_version = "0.8.17" -[fuzz] -runs = 10_000 -max_test_rejects = 200_000 diff --git a/packages/LSP25ExecuteRelayCall/remappings.txt b/packages/LSP25ExecuteRelayCall/remappings.txt deleted file mode 100644 index ca89288f2..000000000 --- a/packages/LSP25ExecuteRelayCall/remappings.txt +++ /dev/null @@ -1,9 +0,0 @@ -@erc725/smart-contracts/=node_modules/@erc725/smart-contracts/ -@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ -@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ -eth-gas-reporter/=node_modules/eth-gas-reporter/ -forge-std/=lib/forge-std/src/ -hardhat-deploy/=node_modules/hardhat-deploy/ -hardhat/=node_modules/hardhat/ -solidity-bytes-utils/=node_modules/solidity-bytes-utils/ -ds-test/=lib/forge-std/lib/ds-test/src/ diff --git a/remappings.txt b/remappings.txt index ca89288f2..ff83d2174 100644 --- a/remappings.txt +++ b/remappings.txt @@ -7,3 +7,4 @@ hardhat-deploy/=node_modules/hardhat-deploy/ hardhat/=node_modules/hardhat/ solidity-bytes-utils/=node_modules/solidity-bytes-utils/ ds-test/=lib/forge-std/lib/ds-test/src/ +lsp25/=packages/LSP25ExecuteRelayCall/ diff --git a/template/package.json b/template/package.json index ae6c466aa..5dfa1d135 100644 --- a/template/package.json +++ b/template/package.json @@ -1,7 +1,7 @@ { - "name": "lsp25", + "name": "lspN", "version": "0.12.1", - "description": "Package for the LSP25 Execute Relay Call standard", + "description": "Package for the LSPN standard", "license": "Apache-2.0", "author": "", "keywords": [