diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 0005deac8..da10a1024 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -33,10 +33,10 @@ jobs: ref: ${{ github.event.pull_request.base.sha }} fetch-depth: 0 - - name: Use Node.js '16.15.0' - uses: actions/setup-node@v2 + - name: Use Node.js v20 + uses: actions/setup-node@v3 with: - node-version: "16.15.0" + node-version: "20.x" cache: "npm" - name: 📦 Install dependencies diff --git a/packages/lsp-smart-contracts/constants.ts b/packages/lsp-smart-contracts/constants.ts index 0de92c938..7c01753be 100644 --- a/packages/lsp-smart-contracts/constants.ts +++ b/packages/lsp-smart-contracts/constants.ts @@ -118,7 +118,7 @@ export const INTERFACE_IDS = { LSP20CallVerifier: INTERFACE_ID_LSP20CallVerifier, LSP11BasicSocialRecovery: '0x049a28f1', LSP25ExecuteRelayCall: INTERFACE_ID_LSP25, - LSP26FollowingSystem: INTERFACE_ID_LSP26, + LSP26FollowerSystem: INTERFACE_ID_LSP26, }; // ERC725Y diff --git a/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/ILSP26FollowingSystem.sol b/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/ILSP26FollowingSystem.sol index 12336b054..126727544 100644 --- a/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/ILSP26FollowingSystem.sol +++ b/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/ILSP26FollowingSystem.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.17; -import "@lukso/lsp26-contracts/contracts/ILSP26FollowingSystem.sol"; +import "@lukso/lsp26-contracts/contracts/ILSP26FollowerSystem.sol"; diff --git a/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/LSP26FollowingSystem.sol b/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/LSP26FollowingSystem.sol index 5412051ae..470b0c8e3 100644 --- a/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/LSP26FollowingSystem.sol +++ b/packages/lsp-smart-contracts/contracts/LSP26FollowerSystem/LSP26FollowingSystem.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.17; -import "@lukso/lsp26-contracts/contracts/LSP26FollowingSystem.sol"; +import "@lukso/lsp26-contracts/contracts/LSP26FollowerSystem.sol"; diff --git a/packages/lsp-smart-contracts/contracts/Mocks/ERC165Interfaces.sol b/packages/lsp-smart-contracts/contracts/Mocks/ERC165Interfaces.sol index a37e2d72e..89e9f3aa1 100644 --- a/packages/lsp-smart-contracts/contracts/Mocks/ERC165Interfaces.sol +++ b/packages/lsp-smart-contracts/contracts/Mocks/ERC165Interfaces.sol @@ -65,8 +65,8 @@ import { ILSP25ExecuteRelayCall as ILSP25 } from "@lukso/lsp25-contracts/contracts/ILSP25ExecuteRelayCall.sol"; import { - ILSP26FollowingSystem as ILSP26 -} from "@lukso/lsp26-contracts/contracts/ILSP26FollowingSystem.sol"; + ILSP26FollowerSystem as ILSP26 +} from "@lukso/lsp26-contracts/contracts/ILSP26FollowerSystem.sol"; // constants import { diff --git a/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts b/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts index af31f2909..4f0d05c02 100644 --- a/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts +++ b/packages/lsp-smart-contracts/tests/Mocks/ERC165Interfaces.test.ts @@ -99,9 +99,9 @@ describe('Calculate LSP interfaces', () => { expect(result).to.equal(INTERFACE_IDS.LSP25ExecuteRelayCall); }); - it('LSP26FollowingSystem', async () => { + it('LSP26FollowerSystem', async () => { const result = await contract.calculateInterfaceLSP26(); - expect(result).to.equal(INTERFACE_IDS.LSP26FollowingSystem); + expect(result).to.equal(INTERFACE_IDS.LSP26FollowerSystem); }); }); diff --git a/packages/lsp26-contracts/README.md b/packages/lsp26-contracts/README.md index 1a17db82a..e756f219c 100644 --- a/packages/lsp26-contracts/README.md +++ b/packages/lsp26-contracts/README.md @@ -1,6 +1,6 @@ -# LSP26 Following System · [![npm version](https://img.shields.io/npm/v/@lukso/lsp26-contracts.svg?style=flat)](https://www.npmjs.com/package/@lukso/lsp26-contracts) +# LSP26 Follower System · [![npm version](https://img.shields.io/npm/v/@lukso/lsp26-contracts.svg?style=flat)](https://www.npmjs.com/package/@lukso/lsp26-contracts) -Package for the LSP26 Following System standard. +Package for the LSP26 Follower System standard. ## Installation diff --git a/packages/lsp26-contracts/contracts/ILSP26FollowingSystem.sol b/packages/lsp26-contracts/contracts/ILSP26FollowerSystem.sol similarity index 99% rename from packages/lsp26-contracts/contracts/ILSP26FollowingSystem.sol rename to packages/lsp26-contracts/contracts/ILSP26FollowerSystem.sol index 32d91f509..b9154430d 100644 --- a/packages/lsp26-contracts/contracts/ILSP26FollowingSystem.sol +++ b/packages/lsp26-contracts/contracts/ILSP26FollowerSystem.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.17; -interface ILSP26FollowingSystem { +interface ILSP26FollowerSystem { /// @notice Emitted when following an address. /// @param follower The address that follows `addr` /// @param addr The address that is followed by `follower` diff --git a/packages/lsp26-contracts/contracts/LSP26FollowingSystem.sol b/packages/lsp26-contracts/contracts/LSP26FollowerSystem.sol similarity index 89% rename from packages/lsp26-contracts/contracts/LSP26FollowingSystem.sol rename to packages/lsp26-contracts/contracts/LSP26FollowerSystem.sol index 748ca0921..c6126d304 100644 --- a/packages/lsp26-contracts/contracts/LSP26FollowingSystem.sol +++ b/packages/lsp26-contracts/contracts/LSP26FollowerSystem.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.17; // interfaces -import {ILSP26FollowingSystem} from "./ILSP26FollowingSystem.sol"; +import {ILSP26FollowerSystem} from "./ILSP26FollowerSystem.sol"; import { ILSP1UniversalReceiver } from "@lukso/lsp1-contracts/contracts/ILSP1UniversalReceiver.sol"; @@ -31,38 +31,38 @@ import { LSP26NotFollowing } from "./LSP26Errors.sol"; -contract LSP26FollowingSystem is ILSP26FollowingSystem { +contract LSP26FollowerSystem is ILSP26FollowerSystem { using EnumerableSet for EnumerableSet.AddressSet; using ERC165Checker for address; mapping(address => EnumerableSet.AddressSet) private _followersOf; mapping(address => EnumerableSet.AddressSet) private _followingsOf; - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function follow(address addr) public { _follow(addr); } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function followBatch(address[] memory addresses) public { for (uint256 index = 0; index < addresses.length; ++index) { _follow(addresses[index]); } } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function unfollow(address addr) public { _unfollow(addr); } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function unfollowBatch(address[] memory addresses) public { for (uint256 index = 0; index < addresses.length; ++index) { _unfollow(addresses[index]); } } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function isFollowing( address follower, address addr @@ -70,17 +70,17 @@ contract LSP26FollowingSystem is ILSP26FollowingSystem { return _followingsOf[follower].contains(addr); } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function followerCount(address addr) public view returns (uint256) { return _followersOf[addr].length(); } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function followingCount(address addr) public view returns (uint256) { return _followingsOf[addr].length(); } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function getFollowsByIndex( address addr, uint256 startIndex, @@ -97,7 +97,7 @@ contract LSP26FollowingSystem is ILSP26FollowingSystem { return followings; } - // @inheritdoc ILSP26FollowingSystem + // @inheritdoc ILSP26FollowerSystem function getFollowersByIndex( address addr, uint256 startIndex, diff --git a/packages/lsp26-contracts/hardhat.config.ts b/packages/lsp26-contracts/hardhat.config.ts index 606a22ef3..69a544a89 100644 --- a/packages/lsp26-contracts/hardhat.config.ts +++ b/packages/lsp26-contracts/hardhat.config.ts @@ -112,7 +112,7 @@ const config: HardhatUserConfig = { }, packager: { // What contracts to keep the artifacts and the bindings for. - contracts: ['ILSP26FollowingSystem', 'LSP26FollowingSystem'], + contracts: ['ILSP26FollowerSystem', 'LSP26FollowerSystem'], // 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. includeFactories: true, diff --git a/packages/lsp26-contracts/package.json b/packages/lsp26-contracts/package.json index 1f7021329..fc40553df 100644 --- a/packages/lsp26-contracts/package.json +++ b/packages/lsp26-contracts/package.json @@ -1,7 +1,7 @@ { "name": "@lukso/lsp26-contracts", "version": "0.15.0", - "description": "Package for the LSP26 Following System standard", + "description": "Package for the LSP26 Follower System standard", "license": "Apache-2.0", "author": "", "main": "./dist/index.cjs", diff --git a/packages/lsp26-contracts/tests/LSP26FollowingSystem.test.ts b/packages/lsp26-contracts/tests/LSP26FollowerSystem.test.ts similarity index 96% rename from packages/lsp26-contracts/tests/LSP26FollowingSystem.test.ts rename to packages/lsp26-contracts/tests/LSP26FollowerSystem.test.ts index c8e897a9a..fe21b6d22 100644 --- a/packages/lsp26-contracts/tests/LSP26FollowingSystem.test.ts +++ b/packages/lsp26-contracts/tests/LSP26FollowerSystem.test.ts @@ -9,17 +9,17 @@ import { OPERATION_TYPES } from '@lukso/lsp0-contracts'; // types import { - LSP26FollowingSystem, - LSP26FollowingSystem__factory, + LSP26FollowerSystem, + LSP26FollowerSystem__factory, LSP0ERC725Account, LSP0ERC725Account__factory, RevertOnFollow__factory, RevertOnFollow, } from '../types'; -describe('testing `LSP26FollowingSystem`', () => { +describe('testing `LSP26FollowerSystem`', () => { let context: { - followerSystem: LSP26FollowingSystem; + followerSystem: LSP26FollowerSystem; followerSystemAddress: string; revertOnFollow: RevertOnFollow; revertOnFollowAddress: string; @@ -34,7 +34,7 @@ describe('testing `LSP26FollowingSystem`', () => { before(async () => { const signers = await ethers.getSigners(); const [owner, singleFollowSigner] = signers; - const followerSystem = await new LSP26FollowingSystem__factory(owner).deploy(); + const followerSystem = await new LSP26FollowerSystem__factory(owner).deploy(); const followerSystemAddress = await followerSystem.getAddress(); const universalProfile = await new LSP0ERC725Account__factory(owner).deploy(owner.address);