diff --git a/.gitignore b/.gitignore index d45c861..1ca8e07 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ npm-debug.log* .openzeppelin /backup + +/typechain diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 96b640d..0000000 --- a/babel.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - presets: [ - '@babel/preset-env', - ['@babel/preset-react', {runtime: 'automatic'}], - ], -}; \ No newline at end of file diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/babel.config.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/contracts/PointSocial.sol b/contracts/PointSocial.sol index 865f2a4..f498ff7 100644 --- a/contracts/PointSocial.sol +++ b/contracts/PointSocial.sol @@ -3,6 +3,8 @@ pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Counters.sol"; +import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; + import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; @@ -12,6 +14,9 @@ import "point-contract-manager/contracts/IIdentity.sol"; contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeable { using Counters for Counters.Counter; + + /************************* STORAGE LAYOUT START *************************/ + Counters.Counter internal _postIds; Counters.Counter internal _commentIds; Counters.Counter internal _likeIds; @@ -108,8 +113,7 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus Counters.Counter internal _dislikeIds; mapping(uint256 => uint256[]) public dislikeIdsByPost; mapping(address => uint256[]) public dislikeIdsByUser; - mapping(address => mapping(uint256 => uint256)) - public dislikeIdByUserAndPost; + mapping(address => mapping(uint256 => uint256)) public dislikeIdByUserAndPost; mapping(uint256 => Dislike) public dislikeById; struct PostWithMetadata { @@ -123,10 +127,45 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus uint256 dislikesCount; bool liked; bool disliked; + bool flagged; + } + + /* + * Follow functions storage + */ + using EnumerableSet for EnumerableSet.AddressSet; + + struct FollowConnections { + EnumerableSet.AddressSet following; + EnumerableSet.AddressSet followers; + EnumerableSet.AddressSet blocked; + } + + mapping(address => FollowConnections) internal _followConnectionsByUser; + + enum FollowAction { + Follow, + UnFollow, + Block, + UnBlock + } + + event FollowEvent( + address indexed from, + address indexed to, + FollowAction action); + + enum FeedType { + Discover, + Follow, + Fresh, + Top } + /************************* STORAGE LAYOUT END *************************/ + modifier postExists(uint256 _postId) { - require(postById[_postId].from != address(0), "Post does not exist"); + require(postById[_postId].from != address(0), "ERROR_POST_DOES_NOT_EXISTS"); _; } @@ -135,7 +174,12 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus "ERROR_NOT_DEPLOYER" ); _; - } + } + + modifier onlyMigrator() { + require(msg.sender == _migrator, "ERROR_NOT_MIGRATOR"); + _; + } function initialize( address identityContractAddr, @@ -204,8 +248,7 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus uint256 postId, bytes32 contents, bytes32 image - ) public whenNotPaused { - require(postById[postId].createdAt != 0, "ERROR_POST_DOES_NOT_EXISTS"); + ) public whenNotPaused postExists(postId) { require( msg.sender == postById[postId].from, "ERROR_CANNOT_EDIT_OTHERS_POSTS" @@ -223,8 +266,7 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus ); } - function deletePost(uint256 postId) public whenNotPaused { - require(postById[postId].createdAt != 0, "ERROR_POST_DOES_NOT_EXISTS"); + function deletePost(uint256 postId) public whenNotPaused postExists(postId) { require( msg.sender == postById[postId].from, "ERROR_CANNOT_DELETE_OTHERS_POSTS" @@ -245,13 +287,8 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus ); } - function flagPost(uint256 postId) public whenNotPaused { - require(IIdentity(_identityContractAddr).isIdentityDeployer(_identityHandle, msg.sender), - "ERROR_PERMISSION_DENIED"); - require(postById[postId].createdAt != 0, "ERROR_POST_DOES_NOT_EXISTS"); - + function flagPost(uint256 postId) public onlyDeployer whenNotPaused postExists(postId) { postIsFlagged[postId] = !postIsFlagged[postId]; - emit StateChange(postId, msg.sender, block.timestamp, Component.Post, Action.Flag); } @@ -264,30 +301,73 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus } function getAllPostsLength() public view returns (uint256) { - uint256 length = 0; - for (uint256 i = 0; i < postIds.length; i++) { - if (postById[postIds[i]].createdAt > 0) { - length++; - } + return postIds.length; + } + + function getLastPostId() public view returns (uint256) { + return (postIds.length > 0)? postIds[postIds.length-1] : 0; + } + + function _includePost(uint256 postId, FeedType _type) internal view returns (bool) { + Post memory p = postById[postId]; + if (_type == FeedType.Discover) { + return (!postIsFlagged[postId] && /* Filter flagged posts */ + !(isBlocked(msg.sender, p.from) /* Filter blocked users */ + || isBlocked(p.from, msg.sender)) && /* Filter blocked users */ + !(p.from == msg.sender) //&& /* Filter own posts */ + //!isFollowing(msg.sender, p.from) /* Filter following users */ + ); + } + else if (_type == FeedType.Follow) { + return (isFollowing(msg.sender, p.from)); /* Filter following users */ + } + else if (_type == FeedType.Top) { + return (!postIsFlagged[postId] && /* Filter flagged posts */ + !(isBlocked(msg.sender, p.from) + || isBlocked(p.from, msg.sender)) && /* Filter blocked users */ + !(p.likesCount == 0)); /* Filter unvoted posts */ + } + else { + return (!(isBlocked(msg.sender, p.from) /* Filter blocked users */ + || isBlocked(p.from, msg.sender))); } - return length; } - function getPaginatedPosts(uint256 cursor, uint256 howMany) + function getPaginatedPosts(uint256 _cursor, uint256 _howMany, FeedType _type) public view returns (PostWithMetadata[] memory) { - uint256 length = howMany; - if (length > postIds.length - cursor) { - length = postIds.length - cursor; + require(_howMany > 0, "ERROR_INVALID_AMOUNT"); + require((_cursor > 0) && (_cursor <= postIds.length), "ERROR_INVALID_CURSOR"); + + uint256 length = _howMany; + if (length > _cursor) { + length = _cursor; } - PostWithMetadata[] memory postsWithMetadata = new PostWithMetadata[](length); - for (uint256 i = length; i > 0; i--) { - postsWithMetadata[length - i] = _getPostWithMetadata(postIds[postIds.length - cursor - i]); + PostWithMetadata[] memory posts = new PostWithMetadata[](length); + + //Do not check when user does not have followings + if ((_type == FeedType.Follow) && + (EnumerableSet.length(_followConnectionsByUser[msg.sender].following) == 0)) { + return posts; } - return postsWithMetadata; + + uint256 j = 0; + uint256 i = _cursor; + + do { + i--; + uint256 id = postIds[i]; + if (_includePost(id, _type)) { + posts[j] = _getPostWithMetadata(id); + j++; + } + } + while(i > 0 && j < length); + + return posts; } function getAllPostsByOwner(address owner) @@ -295,11 +375,16 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus view returns (PostWithMetadata[] memory) { - PostWithMetadata[] memory postsWithMetadata = new PostWithMetadata[](postIdsByOwner[owner].length); - for (uint256 i = 0; i < postIdsByOwner[owner].length; i++) { - postsWithMetadata[i] = _getPostWithMetadata(postIdsByOwner[owner][i]); + if (isBlocked(msg.sender, owner) || isBlocked(owner, msg.sender)) { + return new PostWithMetadata[](0); + } + else { + PostWithMetadata[] memory postsWithMetadata = new PostWithMetadata[](postIdsByOwner[owner].length); + for (uint256 i = 0; i < postIdsByOwner[owner].length; i++) { + postsWithMetadata[i] = _getPostWithMetadata(postIdsByOwner[owner][i]); + } + return postsWithMetadata; } - return postsWithMetadata; } function getAllPostsByOwnerLength(address owner) @@ -328,7 +413,8 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus post.commentsCount, getPostDislikesQty(_postId), checkLikeToPost(_postId), - checkDislikeToPost(_postId) + checkDislikeToPost(_postId), + postIsFlagged[_postId] ); return postWithMetadata; } @@ -645,6 +731,10 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus return false; } + /********************************************************************** + * User Profile Functions + ***********************************************************************/ + function setProfile( bytes32 name_, bytes32 location_, @@ -664,7 +754,9 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus return profileByOwner[id_]; } - // Data Migrator Functions - only callable by _migrator + /********************************************************************** + * Data Migrator Functions - only callable by _migrator + ***********************************************************************/ function add( uint256 id, @@ -673,8 +765,7 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus bytes32 image, uint16 likesCount, uint256 createdAt - ) public { - require(msg.sender == _migrator, "Access Denied"); + ) public onlyMigrator { Post memory _post = Post({ id: id, @@ -706,8 +797,7 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus address author, bytes32 contents, uint256 createdAt - ) public { - require(msg.sender == _migrator, "Access Denied"); + ) public onlyMigrator { Comment memory _comment = Comment({ id: id, @@ -738,8 +828,7 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus bytes32 about, bytes32 avatar, bytes32 banner - ) public { - require(msg.sender == _migrator, "Access Denied"); + ) public onlyMigrator { profileByOwner[user].displayName = name; profileByOwner[user].displayLocation = location; @@ -750,6 +839,85 @@ contract PointSocial is Initializable, UUPSUpgradeable, OwnableUpgradeable, Paus emit ProfileChange(user, block.timestamp); } + /********************************************************************** + * Follow functions + ***********************************************************************/ + + modifier onlyMutuals (address _user) { + require(isFollowing(msg.sender, _user), "ERROR_NOT_MUTUAL"); + require(isFollowing(_user, msg.sender), "ERROR_NOT_MUTUAL"); + _; + } + + modifier onlyFollowers (address _user) { + require((msg.sender == _user) || isFollowing(msg.sender, _user), "ERROR_NOT_FOLLOWING"); + _; + } + + modifier notBlocked (address _user) { + require(!isBlocked(msg.sender, _user), "ERROR_USER_BLOCKED"); + require(!isBlocked(_user, msg.sender), "ERROR_USER_BLOCKED"); + _; + } + + function followUser(address _user) public notBlocked(_user) { + EnumerableSet.add(_followConnectionsByUser[msg.sender].following, _user); + EnumerableSet.add(_followConnectionsByUser[_user].followers, msg.sender); + emit FollowEvent(msg.sender, _user, FollowAction.Follow); + } + + function unfollowUser(address _user) public { + EnumerableSet.remove(_followConnectionsByUser[msg.sender].following, _user); + EnumerableSet.remove(_followConnectionsByUser[_user].followers, msg.sender); + emit FollowEvent(msg.sender, _user, FollowAction.UnFollow); + } + + function isFollowing(address _owner, address _user) public view returns (bool) { + return EnumerableSet.contains(_followConnectionsByUser[_owner].following, _user); + } + + function followingList(address _user) public onlyFollowers(_user) view returns (address[] memory) { + return EnumerableSet.values(_followConnectionsByUser[_user].following); + } + + function followingCount(address _user) public view returns (uint256) { + return EnumerableSet.length(_followConnectionsByUser[_user].following); + } + + function followersList(address _user) public onlyFollowers(_user) view returns (address[] memory) { + return EnumerableSet.values(_followConnectionsByUser[_user].followers); + } + + function followersCount(address _user) public view returns (uint256) { + return EnumerableSet.length(_followConnectionsByUser[_user].followers); + } + + function blockUser(address _user) public { + EnumerableSet.remove(_followConnectionsByUser[msg.sender].following, _user); + EnumerableSet.remove(_followConnectionsByUser[msg.sender].followers, _user); + EnumerableSet.remove(_followConnectionsByUser[_user].following, msg.sender); + EnumerableSet.remove(_followConnectionsByUser[_user].followers, msg.sender); + EnumerableSet.add(_followConnectionsByUser[msg.sender].blocked, _user); + emit FollowEvent(msg.sender, _user, FollowAction.Block); + } + + function unBlockUser(address _user) public { + EnumerableSet.remove(_followConnectionsByUser[msg.sender].blocked, _user); + emit FollowEvent(msg.sender, _user, FollowAction.UnBlock); + } + + function isBlocked(address _owner, address _user) public view returns (bool) { + return EnumerableSet.contains(_followConnectionsByUser[_owner].blocked, _user); + } + + function blockList() public view returns (address[] memory) { + return EnumerableSet.values(_followConnectionsByUser[msg.sender].blocked); + } + + /********************************************************************** + * Like migration functions + ***********************************************************************/ + function addLike( uint256 _id, address _from, diff --git a/hardhat.config.ts b/hardhat.config.ts index 3ca9f86..20a3919 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -5,6 +5,7 @@ import '@typechain/hardhat'; import '@nomiclabs/hardhat-waffle'; import '@nomiclabs/hardhat-ethers'; import 'hardhat-gas-reporter'; +import "hardhat-contract-sizer"; import 'solidity-coverage'; import '@openzeppelin/hardhat-upgrades'; import './tasks/social-migrator'; diff --git a/package-lock.json b/package-lock.json index 7e5cbe9..4258083 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,7 @@ "ethereumjs-wallet": "^1.0.2", "ethers": "^5.5.4", "hardhat": "^2.9.8", + "hardhat-contract-sizer": "^2.6.1", "hardhat-gas-reporter": "^1.0.8", "https-proxy-agent": "^5.0.1", "identity-obj-proxy": "^3.0.0", @@ -2025,11 +2026,21 @@ "node": ">=0.1.95" } }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "devOptional": true, + "dev": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -2041,7 +2052,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "devOptional": true, + "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -4238,175 +4249,6 @@ "hardhat": "^2.0.0" } }, - "node_modules/@nomiclabs/hardhat-etherscan": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.0.tgz", - "integrity": "sha512-JroYgfN1AlYFkQTQ3nRwFi4o8NtZF7K/qFR2dxDUgHbCtIagkUseca9L4E/D2ScUm4XT40+8PbCdqZi+XmHyQA==", - "dev": true, - "peer": true, - "dependencies": { - "@ethersproject/abi": "^5.1.2", - "@ethersproject/address": "^5.0.2", - "cbor": "^5.0.2", - "chalk": "^2.4.2", - "debug": "^4.1.1", - "fs-extra": "^7.0.1", - "lodash": "^4.17.11", - "semver": "^6.3.0", - "table": "^6.8.0", - "undici": "^5.4.0" - }, - "peerDependencies": { - "hardhat": "^2.0.4" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", - "dev": true, - "peer": true, - "dependencies": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "peer": true - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "peer": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "peer": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@nomiclabs/hardhat-etherscan/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/@nomiclabs/hardhat-waffle": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.3.tgz", @@ -6519,25 +6361,6 @@ "node": ">=6" } }, - "node_modules/@testing-library/dom": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.17.1.tgz", - "integrity": "sha512-KnH2MnJUzmFNPW6RIKfd+zf2Wue8mEKX0M3cpX6aKl5ZXrJM1/c/Pc8c2xDNYQCnJO48Sm5ITbMXgqTr3h4jxQ==", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^5.0.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@testing-library/jest-dom": { "version": "5.16.2", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.2.tgz", @@ -6753,25 +6576,25 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "devOptional": true + "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "devOptional": true + "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "devOptional": true + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "devOptional": true + "dev": true }, "node_modules/@typechain/ethers-v5": { "version": "7.2.0", @@ -6870,17 +6693,6 @@ "@types/node": "*" } }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dev": true, - "peer": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, "node_modules/@types/chai": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", @@ -6896,16 +6708,6 @@ "@types/node": "*" } }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "peer": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/dotenv": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/dotenv/-/dotenv-8.2.0.tgz", @@ -6930,31 +6732,6 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" }, - "node_modules/@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", - "dev": true, - "peer": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.30", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz", - "integrity": "sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==", - "dev": true, - "peer": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, "node_modules/@types/form-data": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", @@ -7067,13 +6844,6 @@ "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", "dev": true }, - "node_modules/@types/mime": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", - "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", - "dev": true, - "peer": true - }, "node_modules/@types/mime-types": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz", @@ -7147,13 +6917,6 @@ "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true, - "peer": true - }, "node_modules/@types/react": { "version": "17.0.39", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.39.tgz", @@ -7198,17 +6961,6 @@ "@types/node": "*" } }, - "node_modules/@types/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==", - "dev": true, - "peer": true, - "dependencies": { - "@types/mime": "*", - "@types/node": "*" - } - }, "node_modules/@types/sinon": { "version": "10.0.11", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", @@ -8037,7 +7789,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "devOptional": true + "dev": true }, "node_modules/argparse": { "version": "1.0.10", @@ -9413,7 +9165,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", - "devOptional": true, + "dev": true, "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -10740,7 +10492,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "devOptional": true + "dev": true }, "node_modules/cross-spawn": { "version": "6.0.5", @@ -25109,6 +24861,34 @@ "chai": "^4.2.0" } }, + "node_modules/hardhat-contract-sizer": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.6.1.tgz", + "integrity": "sha512-b8wS7DBvyo22kmVwpzstAQTdDCThpl/ySBqZh5ga9Yxjf61/uTL12TEg5nl7lDeWy73ntEUzxMwY6XxbQEc2wA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "cli-table3": "^0.6.0" + }, + "peerDependencies": { + "hardhat": "^2.0.0" + } + }, + "node_modules/hardhat-contract-sizer/node_modules/cli-table3": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.2.tgz", + "integrity": "sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, "node_modules/hardhat-gas-reporter": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.8.tgz", @@ -29106,7 +28886,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "devOptional": true + "dev": true }, "node_modules/makeerror": { "version": "1.0.12", @@ -34420,6 +34200,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true, "bin": { "prettier": "bin-prettier.js" }, @@ -35398,19 +35179,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-scripts/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "optional": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/react-shallow-renderer": { "version": "16.15.0", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", @@ -40235,7 +40003,7 @@ "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "devOptional": true, + "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -40278,7 +40046,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.4.0" } @@ -40287,7 +40055,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.3.1" } @@ -40534,6 +40302,7 @@ "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -40924,7 +40693,7 @@ "version": "5.0.9", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", - "devOptional": true, + "dev": true, "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -41005,7 +40774,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "devOptional": true + "dev": true }, "node_modules/v8-to-istanbul": { "version": "7.1.2", @@ -44067,7 +43836,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "devOptional": true, + "dev": true, "engines": { "node": ">=6" } @@ -45400,11 +45169,18 @@ "minimist": "^1.2.0" } }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true + }, "@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "devOptional": true, + "dev": true, "requires": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -45413,7 +45189,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "devOptional": true, + "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -45805,8 +45581,7 @@ "version": "6.0.7", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz", "integrity": "sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==", - "dev": true, - "requires": {} + "dev": true }, "typechain": { "version": "3.0.0", @@ -46261,8 +46036,7 @@ "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -46874,8 +46648,7 @@ "@material-ui/types": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz", - "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==", - "requires": {} + "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==" }, "@material-ui/utils": { "version": "4.11.3", @@ -47012,146 +46785,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.6.tgz", "integrity": "sha512-q2Cjp20IB48rEn2NPjR1qxsIQBvFVYW9rFRCFq+bC4RUrn1Ljz3g4wM8uSlgIBZYBi2JMXxmOzFqHraczxq4Ng==", - "dev": true, - "requires": {} - }, - "@nomiclabs/hardhat-etherscan": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.0.tgz", - "integrity": "sha512-JroYgfN1AlYFkQTQ3nRwFi4o8NtZF7K/qFR2dxDUgHbCtIagkUseca9L4E/D2ScUm4XT40+8PbCdqZi+XmHyQA==", - "dev": true, - "peer": true, - "requires": { - "@ethersproject/abi": "^5.1.2", - "@ethersproject/address": "^5.0.2", - "cbor": "^5.0.2", - "chalk": "^2.4.2", - "debug": "^4.1.1", - "fs-extra": "^7.0.1", - "lodash": "^4.17.11", - "semver": "^6.3.0", - "table": "^6.8.0", - "undici": "^5.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "peer": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", - "dev": true, - "peer": true, - "requires": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "peer": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "peer": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "peer": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "peer": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "peer": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "peer": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "peer": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", - "dev": true, - "peer": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "peer": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "peer": true - } - } + "dev": true }, "@nomiclabs/hardhat-waffle": { "version": "2.0.3", @@ -48638,22 +48272,6 @@ "defer-to-connect": "^1.0.1" } }, - "@testing-library/dom": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.17.1.tgz", - "integrity": "sha512-KnH2MnJUzmFNPW6RIKfd+zf2Wue8mEKX0M3cpX6aKl5ZXrJM1/c/Pc8c2xDNYQCnJO48Sm5ITbMXgqTr3h4jxQ==", - "peer": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^5.0.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", - "pretty-format": "^27.0.2" - } - }, "@testing-library/jest-dom": { "version": "5.16.2", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.2.tgz", @@ -48839,25 +48457,25 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "devOptional": true + "dev": true }, "@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "devOptional": true + "dev": true }, "@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "devOptional": true + "dev": true }, "@tsconfig/node16": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "devOptional": true + "dev": true }, "@typechain/ethers-v5": { "version": "7.2.0", @@ -48873,8 +48491,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -48943,17 +48560,6 @@ "@types/node": "*" } }, - "@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dev": true, - "peer": true, - "requires": { - "@types/connect": "*", - "@types/node": "*" - } - }, "@types/chai": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", @@ -48969,16 +48575,6 @@ "@types/node": "*" } }, - "@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "peer": true, - "requires": { - "@types/node": "*" - } - }, "@types/dotenv": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/dotenv/-/dotenv-8.2.0.tgz", @@ -49002,31 +48598,6 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" }, - "@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", - "dev": true, - "peer": true, - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "@types/express-serve-static-core": { - "version": "4.17.30", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz", - "integrity": "sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==", - "dev": true, - "peer": true, - "requires": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, "@types/form-data": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", @@ -49139,13 +48710,6 @@ "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", "dev": true }, - "@types/mime": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", - "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", - "dev": true, - "peer": true - }, "@types/mime-types": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz", @@ -49219,13 +48783,6 @@ "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, - "@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true, - "peer": true - }, "@types/react": { "version": "17.0.39", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.39.tgz", @@ -49272,17 +48829,6 @@ "@types/node": "*" } }, - "@types/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==", - "dev": true, - "peer": true, - "requires": { - "@types/mime": "*", - "@types/node": "*" - } - }, "@types/sinon": { "version": "10.0.11", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", @@ -49757,8 +49303,7 @@ "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "requires": {} + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" }, "acorn-walk": { "version": "7.2.0", @@ -49834,14 +49379,12 @@ "ajv-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "requires": {} + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "requires": {} + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" }, "alphanum-sort": { "version": "1.0.2", @@ -49928,7 +49471,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "devOptional": true + "dev": true }, "argparse": { "version": "1.0.10", @@ -50496,8 +50039,7 @@ "babel-plugin-named-asset-import": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.8.tgz", - "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==", - "requires": {} + "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==" }, "babel-plugin-polyfill-corejs2": { "version": "0.3.1", @@ -51040,7 +50582,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", - "devOptional": true, + "dev": true, "requires": { "node-gyp-build": "^4.3.0" } @@ -52098,7 +51640,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "devOptional": true + "dev": true }, "cross-spawn": { "version": "6.0.5", @@ -52497,8 +52039,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.0.1.tgz", "integrity": "sha512-VNCHL364lh++/ono+S3j9NlUK+d97KNkxI77NlqZU2W3xd2/qmyN61dsa47pTpb55zuU4G4lI7qFjAXZJH1OAQ==", - "dev": true, - "requires": {} + "dev": true }, "csso": { "version": "4.2.0", @@ -53839,8 +53380,7 @@ "eslint-plugin-react-hooks": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", - "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", - "requires": {} + "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==" }, "eslint-plugin-testing-library": { "version": "3.10.2", @@ -63343,6 +62883,28 @@ } } }, + "hardhat-contract-sizer": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.6.1.tgz", + "integrity": "sha512-b8wS7DBvyo22kmVwpzstAQTdDCThpl/ySBqZh5ga9Yxjf61/uTL12TEg5nl7lDeWy73ntEUzxMwY6XxbQEc2wA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "cli-table3": "^0.6.0" + }, + "dependencies": { + "cli-table3": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.2.tgz", + "integrity": "sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw==", + "dev": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + } + } + }, "hardhat-gas-reporter": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.8.tgz", @@ -63818,8 +63380,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "requires": {} + "dev": true }, "identity-obj-proxy": { "version": "3.0.0", @@ -65139,8 +64700,7 @@ "jest-pnp-resolver": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "requires": {} + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==" }, "jest-regex-util": { "version": "26.0.0", @@ -66289,7 +65849,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "devOptional": true + "dev": true }, "makeerror": { "version": "1.0.12", @@ -69365,29 +68925,25 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.2.tgz", "integrity": "sha512-6VQ3pYTsJHEsN2Bic88Aa7J/Brn4Bv8j/rqaFQZkH+pcVkKYwxCIvoMQkykEW7fBjmofdTnQgcivt5CCBJhtrg==", - "dev": true, - "requires": {} + "dev": true }, "postcss-discard-duplicates": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.2.tgz", "integrity": "sha512-LKY81YjUjc78p6rbXIsnppsaFo8XzCoMZkXVILJU//sK0DgPkPSpuq/cZvHss3EtdKvWNYgWzQL+wiJFtEET4g==", - "dev": true, - "requires": {} + "dev": true }, "postcss-discard-empty": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.2.tgz", "integrity": "sha512-SxBsbTjlsKUvZLL+dMrdWauuNZU8TBq5IOL/DHa6jBUSXFEwmDqeXRfTIK/FQpPTa8MJMxEHjSV3UbiuyLARPQ==", - "dev": true, - "requires": {} + "dev": true }, "postcss-discard-overridden": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.3.tgz", "integrity": "sha512-yRTXknIZA4k8Yo4FiF1xbsLj/VBxfXEWxJNIrtIy6HC9KQ4xJxcPtoaaskh6QptCGrrcGnhKsTsENTRPZOBu4g==", - "dev": true, - "requires": {} + "dev": true }, "postcss-double-position-gradients": { "version": "1.0.0", @@ -69864,8 +69420,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "requires": {} + "dev": true }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -69952,8 +69507,7 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.2.tgz", "integrity": "sha512-fEMhYXzO8My+gC009qDc/3bgnFP8Fv1Ic8uw4ec4YTlhIOw63tGPk1YFd7fk9bZUf1DAbkhiL/QPWs9JLqdF2g==", - "dev": true, - "requires": {} + "dev": true }, "postcss-normalize-display-values": { "version": "5.0.2", @@ -70403,7 +69957,8 @@ "prettier": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==" + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true }, "prettier-plugin-solidity": { "version": "1.0.0-beta.19", @@ -70721,8 +70276,7 @@ "react-cool-inview": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/react-cool-inview/-/react-cool-inview-2.0.9.tgz", - "integrity": "sha512-r1FM52/xElWEDxOv61QSLS23NuzcuhaIkfNL/K4FQFZ+NN/O5vEx/HTdmR1r6SPqXSBhPy5lyD7+Ot3t8F9ttQ==", - "requires": {} + "integrity": "sha512-r1FM52/xElWEDxOv61QSLS23NuzcuhaIkfNL/K4FQFZ+NN/O5vEx/HTdmR1r6SPqXSBhPy5lyD7+Ot3t8F9ttQ==" }, "react-dev-utils": { "version": "11.0.4", @@ -71127,13 +70681,6 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "optional": true, - "peer": true } } }, @@ -71173,8 +70720,7 @@ "react-virtualized-auto-sizer": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.6.tgz", - "integrity": "sha512-7tQ0BmZqfVF6YYEWcIGuoR3OdYe8I/ZFbNclFlGOC3pMqunkYF/oL30NCjSGl9sMEb17AnzixDz98Kqc3N76HQ==", - "requires": {} + "integrity": "sha512-7tQ0BmZqfVF6YYEWcIGuoR3OdYe8I/ZFbNclFlGOC3pMqunkYF/oL30NCjSGl9sMEb17AnzixDz98Kqc3N76HQ==" }, "react-window": { "version": "1.8.7", @@ -71188,8 +70734,7 @@ "react-window-infinite-loader": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.7.tgz", - "integrity": "sha512-wg3LWkUpG21lhv+cZvNy+p0+vtclZw+9nP2vO6T9PKT50EN1cUq37Dq6FzcM38h/c2domE0gsUhb6jHXtGogAA==", - "requires": {} + "integrity": "sha512-wg3LWkUpG21lhv+cZvNy+p0+vtclZw+9nP2vO6T9PKT50EN1cUq37Dq6FzcM38h/c2domE0gsUhb6jHXtGogAA==" }, "read-pkg": { "version": "5.2.0", @@ -74939,7 +74484,7 @@ "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "devOptional": true, + "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -74960,13 +74505,13 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "devOptional": true + "dev": true }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "devOptional": true + "dev": true } } }, @@ -75132,8 +74677,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", - "dev": true, - "requires": {} + "dev": true }, "universalify": { "version": "0.1.2", @@ -75159,7 +74703,8 @@ "typescript": { "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true }, "typical": { "version": "2.6.1", @@ -75453,7 +74998,7 @@ "version": "5.0.9", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", - "devOptional": true, + "dev": true, "requires": { "node-gyp-build": "^4.3.0" } @@ -75521,7 +75066,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "devOptional": true + "dev": true }, "v8-to-istanbul": { "version": "7.1.2", @@ -77889,8 +77434,7 @@ "wouter": { "version": "2.7.5", "resolved": "https://registry.npmjs.org/wouter/-/wouter-2.7.5.tgz", - "integrity": "sha512-TOI9gD1wa7a8wW+lh3rjg0C+MjYGKMV3eC+++6D+7n1z36ZJIBPWe2G9Hs1jYNPsV7oKiPTI3UFC5TGhZjQfrQ==", - "requires": {} + "integrity": "sha512-TOI9gD1wa7a8wW+lh3rjg0C+MjYGKMV3eC+++6D+7n1z36ZJIBPWe2G9Hs1jYNPsV7oKiPTI3UFC5TGhZjQfrQ==" }, "wrap-ansi": { "version": "7.0.0", @@ -77931,8 +77475,7 @@ "ws": { "version": "7.5.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", - "requires": {} + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==" }, "xhr": { "version": "2.6.0", @@ -78104,7 +77647,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "devOptional": true + "dev": true }, "yocto-queue": { "version": "0.1.0", diff --git a/package.json b/package.json index 0f731ad..6e8f4cd 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "ethereumjs-wallet": "^1.0.2", "ethers": "^5.5.4", "hardhat": "^2.9.8", + "hardhat-contract-sizer": "^2.6.1", "hardhat-gas-reporter": "^1.0.8", "https-proxy-agent": "^5.0.1", "identity-obj-proxy": "^3.0.0", diff --git a/src/components/comments/Comment.jsx b/src/components/comments/Comment.jsx deleted file mode 100644 index 2a46b6c..0000000 --- a/src/components/comments/Comment.jsx +++ /dev/null @@ -1,69 +0,0 @@ -import './comments.css' -import { format } from "timeago.js"; -import { useState } from "react"; -import { useAppContext } from '../../context/AppContext'; -import { Link } from "wouter"; -import CommentEditor from './CommentEditor'; - -import Snackbar from '@material-ui/core/Snackbar'; -import MuiAlert from '@material-ui/lab/Alert'; - -function Alert(props) { - return ; -} - -const Comment = ({ postId, comment, reloadComments }) => { - const { walletAddress } = useAppContext(); - const [editComment, setEditComment] = useState(false); - const [alert, setAlert] = useState(false); - const [commentError, setCommentError] = useState(undefined); - - const toggleEditComment = () => { - setEditComment(!editComment); - } - - const handleAlert = (event, reason) => { - if (reason === 'clickaway') { - return; - } - setAlert(false); - }; - - - const deleteComment = async () => { - try { - await window.point.contract.send({contract: 'PointSocial', method: 'deleteCommentForPost', params: [postId, comment.id]}); - await reloadComments(); - } catch (e) { - console.error('Error deleting post: ', e.message); - setCommentError('Error deleting post: ', e.message); - setAlert(true); - } - } - - const date = {`(${format(comment.createdAt)})`}; - const editor = ; - - return ( - (editComment)? editor : -
- { walletAddress === comment.from ? - [ - You commented: , date, - Edit, - Delete - ]: - [{comment.identity} commented:, date] - } -
-

{comment.contents}

- - - { commentError } - - -
- ) -} - -export default Comment \ No newline at end of file diff --git a/src/components/comments/CommentEditor.jsx b/src/components/comments/CommentEditor.jsx deleted file mode 100644 index bda4afa..0000000 --- a/src/components/comments/CommentEditor.jsx +++ /dev/null @@ -1,85 +0,0 @@ -import './comments.css' -import { useState } from "react"; -import CommentManager from "../../services/CommentManager" - -const CommentEditor = ({ commentId, content, toggleEditComment, reloadComments }) => { - const DEFAULT_BTN_LABEL = 'Comment' - - const [btnLabel, setBtnLabel] = useState(DEFAULT_BTN_LABEL); - const [btnEnabled, setBtnEnabled] = useState(false); - - const [contents, setContents] = useState(content); - - const onContentsChange = event => { - let newContents = event.target.value; - setContents(newContents); - setBtnEnabled(newContents && newContents.trim().length > 0); - } - - const setSaving = (saving) => { - setBtnEnabled(!saving); - saving ? setBtnLabel('Saving...') : setBtnLabel(DEFAULT_BTN_LABEL); - } - - const cancelEditing = () => { - setSaving(false); - setBtnEnabled(false); - toggleEditComment(); - } - - const onFocus = event => { - const element = event.target; - element.selectionStart = element.value.length; - } - - const submitHandler = async (e) => { - e.preventDefault(); - setSaving(true); - - try { - // Save the post content to the storage layer and keep the storage id - let {data: storageId} = await window.point.storage.putString({data: contents}); - // Save the post contents storage id in the PoinSocial Smart Contract - await CommentManager.editComment(commentId, storageId); - setSaving(false); - // calling renderCommentsImmediate instead of fetching the comments due to issues with fetching content too soon from Arweave after posting. - // PD: using a timeout of 1000 apparently works - reloadComments(); - setContents(''); - toggleEditComment(false); - } catch (err) { - setSaving(false); - console.error('Error: ', err); - } - }; - - return ( -
-
- -
- - -
-
-
-
- ) -} - -export default CommentEditor diff --git a/src/components/comments/Comments.jsx b/src/components/comments/Comments.jsx deleted file mode 100644 index 1a7cbc6..0000000 --- a/src/components/comments/Comments.jsx +++ /dev/null @@ -1,133 +0,0 @@ -import "./comments.css"; -import { useState, useEffect } from "react"; -import { useAppContext } from '../../context/AppContext'; -import Comment from './Comment' -import CircularProgress from '@material-ui/core/CircularProgress'; -import Box from '@material-ui/core/Box'; -import { makeStyles } from '@material-ui/core/styles'; -import CommentManager from "../../services/CommentManager" - -const useStyles = makeStyles((theme) => ({ - root: { - display: 'flex', - alignItems: 'center', - justifyContent: 'center' - } -})); - -const Comments = ({ postId, commentsCount, setCommentsCount, reloadPostCounters }) => { - const DEFAULT_BTN_LABEL = 'Comment' - const [comments, setComments] = useState([]) - const [contents, setContents] = useState() - const [btnLabel, setBtnLabel] = useState(DEFAULT_BTN_LABEL); - const [btnEnabled, setBtnEnabled] = useState(false); - const [loading, setLoading] = useState(true); - const { walletAddress } = useAppContext(); - const classes = useStyles(); - - const onContentsChange = event => { - let newContents = event.target.value; - setContents(newContents) - setBtnEnabled(newContents && newContents.trim().length > 0) - } - - const setSaving = (saving) => { - setBtnEnabled(!saving); - saving ? setBtnLabel('Saving...') : setBtnLabel(DEFAULT_BTN_LABEL); - } - - const getComments = async () => { - setLoading(true); - const comments = await fetchComments(); - setComments(comments); - setLoading(false); - } - - const reloadComments = async() => { - setLoading(true); - await new Promise((res, rej) => setTimeout(res, 1000)); - await reloadPostCounters(); - await getComments(); - setLoading(false); - } - - useEffect(() => { - getComments() - }, [postId]) - - const fetchComments = async () => { - const response = await window.point.contract.call({contract: 'PointSocial', method: 'getAllCommentsForPost', params: [postId]}); - - const comments = response.data.filter(r => (parseInt(r[3]) !== 0)).map(([id, from, contents, createdAt]) => ( - {id, from, contents, createdAt: createdAt*1000} - ) - ) - - const commentsContent = await Promise.all(comments.map(async (comment) => { - const {data: contents} = await window.point.storage.getString({ id: comment.contents, encoding: 'utf-8' }); - const {data: {identity}} = await window.point.identity.ownerToIdentity({owner: comment.from}); - comment.identity = identity; - comment.contents = contents; - return comment; - })) - - return commentsContent; - } - - const submitHandler = async (e) => { - e.preventDefault(); - setSaving(true); - - try { - // Save the post content to the storage layer and keep the storage id - let {data: storageId} = await window.point.storage.putString({data: contents}); - // Save the post contents storage id in the PoinSocial Smart Contract - await CommentManager.addComment(postId, storageId) - setSaving(false); - // calling renderCommentsImmediate instead of fetching the comments due to issues with fetching content too soon from Arweave after posting. - //renderCommentsImmediate(contents); - reloadComments(); - setContents(''); - // await getComments(); - } catch (err) { - setSaving(false); - console.error('Error: ', err); - } - }; - - const loadingBlock =
; - - return ( -
- {loading? loadingBlock: - [
- - -
, -
, - (!loading && comments.length === 0) && 'No comments yet. Be the first!', - comments.filter(c => c.createdAt > 0).map((comment) => ([ - ,
]) - )] - } -
- ) -} - -export default Comments diff --git a/src/components/comments/comments.css b/src/components/comments/comments.css deleted file mode 100644 index 178d5f7..0000000 --- a/src/components/comments/comments.css +++ /dev/null @@ -1,79 +0,0 @@ - .commentCorners { - border-radius: 5px; - border: 1px solid #B4C1CE; - padding: 12px 8px; - width: calc(100% - 100px); - } - - .commentButton{ - border: none; - margin: 5px; - padding: 7px; - border-radius: 5px; - background-color: #1C385B; - font-weight: 500; - cursor: pointer; - color: white; - width:80px; - } - - .comment { - font-size: 14px; - color: white; - } - - .commentFrom { - font-weight: 500; - } - - .commentDate { - margin: 0 5px; - } - - .commentWrapper { - /* padding: 10px; */ - } - - .commentHr { - margin: 20px 0; - background:#dce2ea; - height: 1px; - border:none; - } - - .commentBottom { - display: flex; - align-items: center; - justify-content: space-between; - } - - p { - white-space: pre-wrap; - } - - .commentText { - margin: 5px; - margin-left: 10px; - font-size: 13px; - } - - .commentEditText { - margin-left: 5px; - cursor: pointer; - border-bottom: 1px dashed darkblue; - font-size: 10px; - } - - .commentDeleteText { - margin-left: 5px; - cursor: pointer; - border-bottom: 1px dashed darkred; - font-size: 10px; - } - - .commentButtons { - margin: 5px; - display: block; - align-items: center; - justify-content: space-between; - } diff --git a/src/components/feed/DiscoverFeed.jsx b/src/components/feed/DiscoverFeed.jsx new file mode 100644 index 0000000..8944a5e --- /dev/null +++ b/src/components/feed/DiscoverFeed.jsx @@ -0,0 +1,256 @@ +import "./feed.css"; +import { useState, useEffect } from "react"; +import { useAppContext } from '../../context/AppContext'; +import useInView from 'react-cool-inview' +import { makeStyles } from '@material-ui/core/styles'; + +import unionWith from "lodash/unionWith"; +import isEqual from "lodash/isEqual"; +import orderBy from "lodash/orderBy"; + +import { Box, Button, Snackbar, SnackbarContent, Typography } from '@material-ui/core'; + +import HourglassEmptyOutlinedIcon from '@material-ui/icons/HourglassEmptyOutlined'; +import CircularProgressWithIcon from '../generic/CircularProgressWithIcon'; +import InboxOutlinedIcon from '@material-ui/icons/InboxOutlined'; +import PostCard from "../post/PostCard"; + +import EventConstants from "../../events"; +import PostManager from '../../services/PostManager'; +import UserManager from "../../services/UserManager"; + +const NUM_POSTS_PER_CALL = 10; + +const useStyles = makeStyles((theme) => ({ + root: { + padding: 0, + margin: 0, + marginTop: '10px', + maxWidth: '900px' + }, + observer: { + display: 'flex', + justifyContent: 'center' + }, + empty: { + padding: theme.spacing(2, 2), + display: "flex", + flexDirection: "column", + alignItems:"center", + justifyContent: "center" + }, + backdrop: { + zIndex: theme.zIndex.drawer + 1, + }, + container: { + display: "flex", + height: "100%", + minHeight: "50vh", + flexDirection: "column", + }, + separator: { + marginTop: "20px", + marginBottom: "20px", + }, + extendedIcon: { + marginRight: theme.spacing(1), + }, +})); + +const DiscoverFeed = ({ setAlert, setUpperLoading }) => { + const {observe} = useInView({ + onEnter: async({observe,unobserve}) => { + if(length === posts.length) return; + unobserve(); + await getPosts(); + observe(); + } + }); + const styles = useStyles(); + const [posts, setPosts] = useState([]) + const [renderedPosts, setRenderedPosts] = useState([]) + const [length, setLength] = useState(0); + const [loading, setLoading] = useState(false); + const [reload, setReload] = useState(false); + + const { walletAddress, events } = useAppContext(); + + // sorts accending (newest first) + const compareByTimestamp = ( post1, post2 ) => { + if ( post1.createdAt < post2.createdAt ){ + return 1; + } + if ( post1.createdAt > post2.createdAt ){ + return -1; + } + return 0; + } + + useEffect(()=>{ + reloadPosts(); + }, []); + + useEffect(() => { + getEvents(); + return () => { + events.listeners["PointSocial"]["StateChange"].removeListener("StateChange", handleEvents, { type: 'discover-feed'}); + events.unsubscribe("PointSocial", "StateChange"); + }; + }, []); + + const getEvents = async() => { + try { + (await events.subscribe("PointSocial", "StateChange")).on("StateChange", handleEvents, { type: 'discover-feed'}); + } + catch(error) { + console.log(error.message); + } + } + + const handleEvents = async(event) => { + if (event) { + if (event.component === EventConstants.Component.Post) { + switch(event.action) { + case EventConstants.Action.Delete: + deletePost(event.id); + break; + default: + break; + } + } + } + } + + const getPostsLength = async() => { + try { + setLoading(true); + const data = await PostManager.getAllPostsLength(); + setLength(Number(data)); + } + catch(error) { + console.log(error.message); + setAlert(error.message); + } + setLoading(false); + } + + const fetchPosts = async (onlyNew = false) => { + try { + setLoading(true); + const lastId = Number(await PostManager.getLastPostId()); + const lastCurrentId = (posts.length > 0)? posts[posts.length - 1].id : lastId; + const data = (lastId > 0)? await PostManager.getPaginatedPosts(onlyNew?lastId:lastCurrentId,NUM_POSTS_PER_CALL,0) : []; + + const newPosts = data.filter(r => (parseInt(r[4]) !== 0)) + .map(([id, from, contents, image, createdAt, likesCount, commentsCount, dislikesCount, liked, disliked, flagged]) => ( + { + id, + from, + contents, + image, + createdAt: createdAt*1000, + likesCount: parseInt(likesCount, 10), + dislikesCount: parseInt(dislikesCount, 10), + commentsCount: parseInt(commentsCount, 10), + liked, + disliked, + flagged + } + ) + ); + + return await Promise.all(newPosts.map(async post => { + try { + post.weight = (await UserManager.isFollowing(walletAddress, post.from))? 1: 0; + } + catch(error) { + console.warn(error.message); + } + return post; + })); + //return newPosts; + + } catch(error) { + console.log(error.message); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const getPosts = async (loadNew = false) => { + try { + setLoading(true); + const posts = await fetchPosts(loadNew); + setPosts(prev => { + const result = unionWith(prev, posts, isEqual); + //result.sort(compareByTimestamp); + console.log("POSTS:"); + console.log(result); + return result; + }); + } + catch(error) { + console.log(error); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const reloadPosts = async () => { + await getPostsLength(); + await getPosts(true); + setReload(false); + } + + const deletePost = async (postId) => { + await getPostsLength(); + setPosts((posts) => posts.filter(post => post.id !== postId)); + } + + return ( + <> +
+ + { + (!loading && posts.length === 0)? + +
+ + {`No posts yet.`} + +
+
+ : + orderBy(posts.filter(post => post.createdAt > 0), ['weight', 'likesCount', 'commentsCount', 'dislikesCount', 'createdAt'], ['desc', 'desc', 'desc', 'asc', 'desc']) + .map((post) => ( +
+ +
+ )) + } +
+ { + loading && + } props={{color : "inherit"}} /> + } +
+
+
+ + ); + +} +export default DiscoverFeed diff --git a/src/components/feed/Feed.jsx b/src/components/feed/Feed.jsx index 6079fec..9d4c47a 100644 --- a/src/components/feed/Feed.jsx +++ b/src/components/feed/Feed.jsx @@ -158,7 +158,7 @@ const Feed = ({ account, setAlert, setUpperLoading, canPost=false }) => { PostManager.getPaginatedPosts(onlyNew?0:posts.length,NUM_POSTS_PER_CALL)); const newPosts = data.filter(r => (parseInt(r[4]) !== 0)) - .map(([id, from, contents, image, createdAt, likesCount, commentsCount, dislikesCount, liked, disliked]) => ( + .map(([id, from, contents, image, createdAt, likesCount, commentsCount, dislikesCount, liked, disliked, flagged]) => ( { id, from, @@ -170,19 +170,12 @@ const Feed = ({ account, setAlert, setUpperLoading, canPost=false }) => { commentsCount: parseInt(commentsCount, 10), liked, disliked, + flagged } ) ); - return await Promise.all(newPosts.map(async post => { - try { - post.isFlagged = await PostManager.isFlaggedPost(post.id); - } - catch(error) { - console.warn(error.message); - } - return post; - })); + return newPosts; } catch(error) { console.log(error.message); diff --git a/src/components/feed/FollowFeed.jsx b/src/components/feed/FollowFeed.jsx new file mode 100644 index 0000000..94d94b2 --- /dev/null +++ b/src/components/feed/FollowFeed.jsx @@ -0,0 +1,260 @@ +import "./feed.css"; +import { useState, useEffect } from "react"; +import { useAppContext } from '../../context/AppContext'; +import useInView from 'react-cool-inview' +import { makeStyles } from '@material-ui/core/styles'; + +import unionWith from "lodash/unionWith"; +import isEqual from "lodash/isEqual"; + +import { Box, Button, Snackbar, SnackbarContent, Typography } from '@material-ui/core'; + +import HourglassEmptyOutlinedIcon from '@material-ui/icons/HourglassEmptyOutlined'; +import CircularProgressWithIcon from '../generic/CircularProgressWithIcon'; +import InboxOutlinedIcon from '@material-ui/icons/InboxOutlined'; +import PostCard from "../post/PostCard"; + +import EventConstants from "../../events"; +import PostManager from '../../services/PostManager'; +import UserManager from "../../services/UserManager"; + +const NUM_POSTS_PER_CALL = 5; + +const useStyles = makeStyles((theme) => ({ + root: { + padding: 0, + margin: 0, + marginTop: '10px', + maxWidth: '900px' + }, + observer: { + display: 'flex', + justifyContent: 'center' + }, + empty: { + padding: theme.spacing(2, 2), + display: "flex", + flexDirection: "column", + alignItems:"center", + justifyContent: "center" + }, + backdrop: { + zIndex: theme.zIndex.drawer + 1, + }, + container: { + display: "flex", + height: "100%", + minHeight: "50vh", + flexDirection: "column", + }, + separator: { + marginTop: "20px", + marginBottom: "20px", + }, + extendedIcon: { + marginRight: theme.spacing(1), + }, +})); + +const FollowFeed = ({ setAlert, setUpperLoading}) => { + const {observe} = useInView({ + onEnter: async({observe,unobserve}) => { + if(length === posts.length) return; + unobserve(); + await getPosts(); + observe(); + } + }); + const styles = useStyles(); + const [posts, setPosts] = useState([]) + const [length, setLength] = useState(0); + const [loading, setLoading] = useState(false); + const [reload, setReload] = useState(false); + + const { walletAddress, events } = useAppContext(); + + // sorts accending (newest first) + const compareByTimestamp = ( post1, post2 ) => { + if ( post1.createdAt < post2.createdAt ){ + return 1; + } + if ( post1.createdAt > post2.createdAt ){ + return -1; + } + return 0; + } + + useEffect(()=>{ + reloadPosts(); + }, []); + + useEffect(() => { + getEvents(); + return () => { + events.listeners["PointSocial"]["StateChange"].removeListener("StateChange", handleEvents, { type: 'feed'}); + events.unsubscribe("PointSocial", "StateChange"); + }; + }, []); + + const getEvents = async() => { + try { + (await events.subscribe("PointSocial", "StateChange")).on("StateChange", handleEvents, { type: 'feed'}); + } + catch(error) { + console.log(error.message); + } + } + + const handleEvents = async(event) => { + if (event) { + if (event.component === EventConstants.Component.Feed) { + switch(event.action) { + case EventConstants.Action.Create: + if (await UserManager.isFollowing(walletAddress, event.from)) { + setReload(true); + } + break; + default: + break; + } + } + else if (event.component === EventConstants.Component.Post) { + switch(event.action) { + case EventConstants.Action.Delete: + deletePost(event.id); + break; + default: + break; + } + } + } + } + + const getPostsLength = async() => { + try { + setLoading(true); + const data = await PostManager.getAllPostsLength(); + setLength(Number(data)); + } + catch(error) { + console.log(error.message); + setAlert(error.message); + } + setLoading(false); + } + + const fetchPosts = async (onlyNew = false) => { + try { + setLoading(true); + const lastId = Number(await PostManager.getLastPostId()); + const lastCurrentId = (posts.length > 0)? parseInt(posts[posts.length - 1].id) : lastId; + const data = (lastId > 0)? await PostManager.getPaginatedPosts(onlyNew?lastId:lastCurrentId,NUM_POSTS_PER_CALL,1) : []; + + const newPosts = data.filter(r => (parseInt(r[4]) !== 0)) + .map(([id, from, contents, image, createdAt, likesCount, commentsCount, dislikesCount, liked, disliked,flagged]) => ( + { + id, + from, + contents, + image, + createdAt: createdAt*1000, + likesCount: parseInt(likesCount, 10), + dislikesCount: parseInt(dislikesCount, 10), + commentsCount: parseInt(commentsCount, 10), + liked, + disliked, + flagged + } + ) + ); + + return newPosts; + + } catch(error) { + console.log(error.message); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const getPosts = async (loadNew = false) => { + try { + setLoading(true); + const posts = await fetchPosts(loadNew); + setPosts(prev => { + const result = unionWith(prev, posts, isEqual); + result.sort(compareByTimestamp); + return result; + }); + } + catch(error) { + console.log(error); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const reloadPosts = async () => { + await getPostsLength(); + await getPosts(true); + setReload(false); + } + + const deletePost = async (postId) => { + await getPostsLength(); + setPosts((posts) => posts.filter(post => post.id !== postId)); + } + + return ( + <> + + } + /> + +
+ + { + (!loading && posts.length === 0)? + +
+ + {'No posts yet! Start following somebody!'} + +
+
+ : + posts.filter(post => post.createdAt > 0).map((post) => ( +
+ +
+ )) + } +
+ { + loading && + } props={{color : "inherit"}} /> + } +
+
+
+ + ); + +} +export default FollowFeed diff --git a/src/components/feed/FreshFeed.jsx b/src/components/feed/FreshFeed.jsx new file mode 100644 index 0000000..9a9f341 --- /dev/null +++ b/src/components/feed/FreshFeed.jsx @@ -0,0 +1,264 @@ +import "./feed.css"; +import { useState, useEffect } from "react"; +import { useAppContext } from '../../context/AppContext'; +import useInView from 'react-cool-inview' +import { makeStyles } from '@material-ui/core/styles'; + +import unionWith from "lodash/unionWith"; +import isEqual from "lodash/isEqual"; + +import { Box, Button, Snackbar, SnackbarContent, Typography } from '@material-ui/core'; + +import HourglassEmptyOutlinedIcon from '@material-ui/icons/HourglassEmptyOutlined'; +import CircularProgressWithIcon from '../generic/CircularProgressWithIcon'; +import InboxOutlinedIcon from '@material-ui/icons/InboxOutlined'; +import PostCard from "../post/PostCard"; + +import EventConstants from "../../events"; +import PostManager from '../../services/PostManager'; + +const NUM_POSTS_PER_CALL = 5; + +const useStyles = makeStyles((theme) => ({ + root: { + padding: 0, + margin: 0, + marginTop: '10px', + maxWidth: '900px' + }, + observer: { + display: 'flex', + justifyContent: 'center' + }, + empty: { + padding: theme.spacing(2, 2), + display: "flex", + flexDirection: "column", + alignItems:"center", + justifyContent: "center" + }, + backdrop: { + zIndex: theme.zIndex.drawer + 1, + }, + container: { + display: "flex", + height: "100%", + minHeight: "50vh", + flexDirection: "column", + }, + separator: { + marginTop: "20px", + marginBottom: "20px", + }, + extendedIcon: { + marginRight: theme.spacing(1), + }, +})); + +const FreshFeed = ({ setAlert, setUpperLoading, canPost=false }) => { + const {observe} = useInView({ + onEnter: async({observe,unobserve}) => { + if(length === posts.length) return; + unobserve(); + await getPosts(); + observe(); + } + }); + const styles = useStyles(); + const [posts, setPosts] = useState([]) + const [length, setLength] = useState(0); + const [loading, setLoading] = useState(false); + const [reload, setReload] = useState(false); + + const { walletAddress, events } = useAppContext(); + + // sorts accending (newest first) + const compareByTimestamp = ( post1, post2 ) => { + if ( post1.createdAt < post2.createdAt ){ + return 1; + } + if ( post1.createdAt > post2.createdAt ){ + return -1; + } + return 0; + } + + useEffect(()=>{ + reloadPosts(); + }, []); + + useEffect(() => { + getEvents(); + return () => { + events.listeners["PointSocial"]["StateChange"].removeListener("StateChange", handleEvents, { type: 'feed'}); + events.unsubscribe("PointSocial", "StateChange"); + }; + }, []); + + const getEvents = async() => { + try { + (await events.subscribe("PointSocial", "StateChange")).on("StateChange", handleEvents, { type: 'feed'}); + } + catch(error) { + console.log(error.message); + } + } + + const handleEvents = async(event) => { + if (event) { + if (event.component === EventConstants.Component.Feed) { + switch(event.action) { + case EventConstants.Action.Create: + if (event.from.toString().toLowerCase() === walletAddress.toLowerCase()) { + // Autoload own posts + await reloadPosts(); + } + else { + setReload(true); + } + break; + default: + break; + } + } + else if (event.component === EventConstants.Component.Post) { + switch(event.action) { + case EventConstants.Action.Delete: + deletePost(event.id); + break; + default: + break; + } + } + } + } + + const getPostsLength = async() => { + try { + setLoading(true); + const data = await PostManager.getAllPostsLength(); + setLength(Number(data)); + } + catch(error) { + console.log(error.message); + setAlert(error.message); + } + setLoading(false); + } + + const fetchPosts = async (onlyNew = false) => { + try { + setLoading(true); + const lastId = Number(await PostManager.getLastPostId()); + const lastCurrentId = (posts.length > 0)? parseInt(posts[posts.length - 1].id) : lastId; + const data = (lastId > 0)? await PostManager.getPaginatedPosts(onlyNew?lastId:lastCurrentId,NUM_POSTS_PER_CALL,2) : []; + console.log(posts); + + const newPosts = data.filter(r => (parseInt(r[4]) !== 0)) + .map(([id, from, contents, image, createdAt, likesCount, commentsCount, dislikesCount, liked, disliked, flagged]) => ( + { + id, + from, + contents, + image, + createdAt: createdAt*1000, + likesCount: parseInt(likesCount, 10), + dislikesCount: parseInt(dislikesCount, 10), + commentsCount: parseInt(commentsCount, 10), + liked, + disliked, + flagged + } + ) + ); + + return newPosts; + + } catch(error) { + console.log(error.message); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const getPosts = async (loadNew = false) => { + try { + setLoading(true); + const posts = await fetchPosts(loadNew); + setPosts(prev => { + const result = unionWith(prev, posts, isEqual); + result.sort(compareByTimestamp); + return result; + }); + } + catch(error) { + console.log(error); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const reloadPosts = async () => { + await getPostsLength(); + await getPosts(true); + setReload(false); + } + + const deletePost = async (postId) => { + await getPostsLength(); + setPosts((posts) => posts.filter(post => post.id !== postId)); + } + + return ( + <> + + } + /> + +
+ + { + (!loading && posts.length === 0)? + +
+ + {`No posts yet.${ canPost? " Be the first!" : "" }`} + +
+
+ : + posts.filter(post => post.createdAt > 0).map((post) => ( +
+ +
+ )) + } +
+ { + loading && + } props={{color : "inherit"}} /> + } +
+
+
+ + ); + +} +export default FreshFeed diff --git a/src/components/feed/TopFeed.jsx b/src/components/feed/TopFeed.jsx new file mode 100644 index 0000000..115706f --- /dev/null +++ b/src/components/feed/TopFeed.jsx @@ -0,0 +1,250 @@ +import "./feed.css"; +import { useState, useEffect } from "react"; +import { useAppContext } from '../../context/AppContext'; +import useInView from 'react-cool-inview' +import { makeStyles } from '@material-ui/core/styles'; + +import unionWith from "lodash/unionWith"; +import isEqual from "lodash/isEqual"; +import orderBy from "lodash/orderBy"; + +import { Box, Button, Snackbar, SnackbarContent, Typography } from '@material-ui/core'; + +import HourglassEmptyOutlinedIcon from '@material-ui/icons/HourglassEmptyOutlined'; +import CircularProgressWithIcon from '../generic/CircularProgressWithIcon'; +import InboxOutlinedIcon from '@material-ui/icons/InboxOutlined'; +import PostCard from "../post/PostCard"; + +import EventConstants from "../../events"; +import PostManager from '../../services/PostManager'; + +const NUM_POSTS_PER_CALL = 20; + +const useStyles = makeStyles((theme) => ({ + root: { + padding: 0, + margin: 0, + marginTop: '10px', + maxWidth: '900px' + }, + observer: { + display: 'flex', + justifyContent: 'center' + }, + empty: { + padding: theme.spacing(2, 2), + display: "flex", + flexDirection: "column", + alignItems:"center", + justifyContent: "center" + }, + backdrop: { + zIndex: theme.zIndex.drawer + 1, + }, + container: { + display: "flex", + height: "100%", + minHeight: "50vh", + flexDirection: "column", + }, + separator: { + marginTop: "20px", + marginBottom: "20px", + }, + extendedIcon: { + marginRight: theme.spacing(1), + }, +})); + +const TopFeed = ({ setAlert, setUpperLoading, canPost=false }) => { + const {observe} = useInView({ + onEnter: async({observe,unobserve}) => { + if(length === posts.length) return; + unobserve(); + await getPosts(); + observe(); + } + }); + const styles = useStyles(); + const [posts, setPosts] = useState([]) + const [length, setLength] = useState(0); + const [loading, setLoading] = useState(false); + const [reload, setReload] = useState(false); + + const { walletAddress, events } = useAppContext(); + + // sorts accending (newest first) + const compareByTimestamp = ( post1, post2 ) => { + if ( post1.createdAt < post2.createdAt ){ + return 1; + } + if ( post1.createdAt > post2.createdAt ){ + return -1; + } + return 0; + } + + useEffect(()=>{ + reloadPosts(); + }, []); + + useEffect(() => { + getEvents(); + return () => { + events.listeners["PointSocial"]["StateChange"].removeListener("StateChange", handleEvents, { type: 'feed'}); + events.unsubscribe("PointSocial", "StateChange"); + }; + }, []); + + const getEvents = async() => { + try { + (await events.subscribe("PointSocial", "StateChange")).on("StateChange", handleEvents, { type: 'feed'}); + } + catch(error) { + console.log(error.message); + } + } + + const handleEvents = async(event) => { + if (event) { + if (event.component === EventConstants.Component.Post) { + switch(event.action) { + case EventConstants.Action.Delete: + deletePost(event.id); + break; + default: + break; + } + } + } + } + + const getPostsLength = async() => { + try { + setLoading(true); + const data = await PostManager.getAllPostsLength(); + setLength(Number(data)); + } + catch(error) { + console.log(error.message); + setAlert(error.message); + } + setLoading(false); + } + + const fetchPosts = async (onlyNew = false) => { + try { + setLoading(true); + const lastId = Number(await PostManager.getLastPostId()); + const lastCurrentId = (posts.length > 0)? parseInt(posts[posts.length - 1].id) : lastId; + const data = (lastId > 0)? await PostManager.getPaginatedPosts(onlyNew?lastId:lastCurrentId,NUM_POSTS_PER_CALL,3) : []; + + const newPosts = data.filter(r => (parseInt(r[4]) !== 0)) + .map(([id, from, contents, image, createdAt, likesCount, commentsCount, dislikesCount, liked, disliked, flagged]) => ( + { + id, + from, + contents, + image, + createdAt: createdAt*1000, + likesCount: parseInt(likesCount, 10), + dislikesCount: parseInt(dislikesCount, 10), + commentsCount: parseInt(commentsCount, 10), + liked, + disliked, + flagged + } + ) + ); + + return newPosts; + + } catch(error) { + console.log(error.message); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const getPosts = async (loadNew = false) => { + try { + setLoading(true); + const posts = await fetchPosts(loadNew); + setPosts(prev => { + const result = unionWith(prev, posts, isEqual); + result.sort(compareByTimestamp); + return result; + }); + } + catch(error) { + console.log(error); + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const reloadPosts = async () => { + await getPostsLength(); + await getPosts(true); + setReload(false); + } + + const deletePost = async (postId) => { + await getPostsLength(); + setPosts((posts) => posts.filter(post => post.id !== postId)); + } + + return ( + <> + + } + /> + +
+ + { + (!loading && posts.length === 0)? + +
+ + {`No posts yet.${ canPost? " Be the first!" : "" }`} + +
+
+ : + orderBy(posts.filter(post => post.createdAt > 0), ['likesCount', 'commentsCount', 'dislikesCount'], ['desc', 'desc', 'asc']) + .map((post) => ( +
+ +
+ )) + } +
+ { + loading && + } props={{color : "inherit"}} /> + } +
+
+
+ + ); + +} +export default TopFeed diff --git a/src/components/feed/feed.css b/src/components/feed/feed.css index a1f16bf..ce572b6 100644 --- a/src/components/feed/feed.css +++ b/src/components/feed/feed.css @@ -14,11 +14,10 @@ font-weight: 400; } .no-post-to-show{ - background:url(http://neckcode.com/feed-show-ico.svg) no-repeat white; display: block; -text-align: center; -padding: 30px; -margin: 10px 0; -border-radius: 6px; -font-size:13px; + text-align: center; + padding: 30px; + margin: 10px 0; + border-radius: 6px; + font-size:13px; } diff --git a/src/components/generic/RichTextField.jsx b/src/components/generic/RichTextField.jsx index 2da268e..6780efe 100644 --- a/src/components/generic/RichTextField.jsx +++ b/src/components/generic/RichTextField.jsx @@ -75,7 +75,19 @@ const RichTextField = forwardRef(({value, minLength, maxLength, placeholder, dis autoFocus disabled={processing} /> - +
diff --git a/src/components/post/Post.jsx b/src/components/post/Post.jsx deleted file mode 100644 index eb9c692..0000000 --- a/src/components/post/Post.jsx +++ /dev/null @@ -1,197 +0,0 @@ -import "./post.css"; -import { useState, useEffect } from "react"; -import { useAppContext } from '../../context/AppContext'; -import { format } from "timeago.js"; -import { Link } from "wouter"; -import likeImg from '../../assets/like.png'; -import profileImg from '../../assets/profile-pic.jpg'; -import Comments from '../comments/Comments' -import PostEditor from "./PostEditor"; -import CircularProgress from '@material-ui/core/CircularProgress'; -import { makeStyles } from '@material-ui/core/styles'; - -import Snackbar from '@material-ui/core/Snackbar'; -import MuiAlert from '@material-ui/lab/Alert'; - -function Alert(props) { - return ; -} - -const useStyles = makeStyles((theme) => ({ - root: { - display: 'flex', - alignItems: 'center', - justifyContent: 'center' - } -})); - -export default function Post({ post, reloadPostCounts, reloadPostContent, renderDeletedPostImmediate }) { - const EMPTY_MEDIA = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const [showComments, setShowComments] = useState(false); - const [editPost, setEditPost] = useState(false); - const [commentsCount, setCommentsCount] = useState(post.commentsCount); - const { walletAddress } = useAppContext(); - const [loadImgError, setLoadImgError] = useState(false); - const [loadVideoError, setLoadVideoError] = useState(false); - const [loading, setLoading] = useState(false); - const [alert, setAlert] = useState(false); - const [postError, setPostError] = useState(undefined); - - const classes = useStyles(); - - const toggleShowComments = () => { - setShowComments(!showComments); - } - - const toggleEditPost = () => { - setEditPost(!editPost); - } - - const handleAlert = (event, reason) => { - if (reason === 'clickaway') { - return; - } - setAlert(false); - }; - - const deletePost = async () => { - try { - setLoading(true); - await window.point.contract.send({contract: 'PointSocial', method: 'deletePost', params: [post.id]}); - await renderDeletedPostImmediate(post.id); - } - catch (e) { - console.error('Error deleting post: ', e.message); - setLoading(false); - setPostError(`Error deleting post: ${e.message}`); - setAlert(true); - } - } - - const addLikeToPost = async () => { - try { - setLoading(true); - await window.point.contract.send({contract: 'PointSocial', method: 'addLikeToPost', params: [post.id]}); - reloadPostCounts(post.id); - } catch (e) { - console.error('Error updating likes: ', e.message); - setPostError(`Error updating likes: ${e.message}`); - setAlert(true); - } - finally { - setLoading(false); - } - }; - - const reloadPost = async (contents, image) => { - toggleEditPost(); - try { - setLoading(true); - reloadPostContent(post.id, contents, image); - } - catch(e) { - console.error('Error updating the post: ', e.message); - setPostError(`Error updating the post: ${e.message}`); - setAlert(true); - } - finally { - setLoading(false); - } - } - - const reloadPostCounters = async () => { - try { - setLoading(true); - const [likes, comments] = await reloadPostCounts(post.id); - setCommentsCount(comments); - } - catch(e) { - console.error('Error updating the post: ', e.message); - setPostError(`Error updating the post: ${e.message}`); - setAlert(true); - } - finally { - setLoading(false); - } - } - - const onImgErrorHandler = (e) => { - setLoadImgError(true); - } - - const onVideoErrorHandler = (e) => { - setLoadVideoError(true); - } - - let mediaTag; - if (!loadImgError){ - mediaTag = ; - }else{ - if(!loadVideoError){ - mediaTag = ; - }else{ - mediaTag = ''; - } - } - - const postedContent =

{post?.contents}

- const postedMedia = post.image !== EMPTY_MEDIA && mediaTag - const postEdit = (walletAddress === post.from) && Edit - const postDelete = (walletAddress === post.from) && Delete - const postLoading =
- - return ( -
- { loading? postLoading : -
-
-
- - - - {walletAddress === post.from ? You posted : {post.identity}} -
-
- {format(post.createdAt)} -
-
-
- { - editPost? - : - [postedContent, postedMedia] - } -
-
-
- - {post.likesCount} people like it -
-
- {commentsCount} comments - { (parseInt(commentsCount) === 0) && postEdit } - { (parseInt(commentsCount) === 0) && postDelete } -
-
-
- {showComments && } -
-
- } - - - { postError } - - -
- ); -} diff --git a/src/components/post/PostCard.jsx b/src/components/post/PostCard.jsx index 5585776..581b1c2 100644 --- a/src/components/post/PostCard.jsx +++ b/src/components/post/PostCard.jsx @@ -23,6 +23,7 @@ import SaveOutlinedIcon from '@material-ui/icons/SaveOutlined'; import DeleteOutlineOutlinedIcon from '@material-ui/icons/DeleteOutlineOutlined'; import FlagOutlinedIcon from '@material-ui/icons/FlagOutlined'; import VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined'; +import PanoramaOutlinedIcon from '@material-ui/icons/PanoramaOutlined'; import AccountTreeOutlinedIcon from '@material-ui/icons/AccountTreeOutlined'; import LanguageOutlinedIcon from '@material-ui/icons/LanguageOutlined'; @@ -841,11 +842,11 @@ const PostCard = ({ aria-describedby="alert-dialog-description" > {`${ - post.isFlagged ? 'Unflag' : 'Flag' + post.flagged ? 'Unflag' : 'Flag' } post?`} - {`Are you sure you want to ${post.isFlagged ? 'unflag' : 'flag'} this post?`} + {`Are you sure you want to ${post.flagged ? 'unflag' : 'flag'} this post?`} @@ -853,7 +854,7 @@ const PostCard = ({ Cancel @@ -886,7 +887,7 @@ const PostCard = ({ - {post.isFlagged ? 'Unflag' : 'Flag'} + {post.flagged ? 'Unflag' : 'Flag'} )} @@ -968,12 +969,12 @@ const PostCard = ({ return ( <>
- + {loading && } {flagged && (
{ diff --git a/src/components/post/PostEditor.jsx b/src/components/post/PostEditor.jsx deleted file mode 100644 index 7ba4834..0000000 --- a/src/components/post/PostEditor.jsx +++ /dev/null @@ -1,152 +0,0 @@ -import "./postEditor.css"; -import { AttachFileTwoTone } from "@material-ui/icons"; -import { useRef, useState } from "react"; -import PostManager from "../../services/PostManager" - -export default function PostEditor({ post, toggleEditPost, reloadPost }) { - const DEFAULT_BTN_LABEL = 'Save' - const EMPTY_MEDIA = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const EMPTY_CONTENT = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const [contents, setContents] = useState(post.contents); - const [media, setMedia] = useState(post.image); - - const [selectedFile, setSelectedFile] = useState(); - const [preview, setPreview] = useState(`/_storage/${media}`) - - const [btnLabel, setBtnLabel] = useState(DEFAULT_BTN_LABEL); - const [btnEnabled, setBtnEnabled] = useState(false); - - const [loadImgError, setLoadImgError] = useState(false); - const [loadVideoError, setLoadVideoError] = useState(false); - - - const fileInputRef = useRef() - - const onContentsChange = event => { - let newContents = event.target.value; - setContents(newContents); - setBtnEnabled(newContents && newContents.trim().length > 0); - } - - const onFileChange = event => { - let fileToUpload = event.target.files[0]; - if(fileToUpload.type.startsWith('image') || fileToUpload.type.startsWith('video') ) { - if (fileToUpload.size > 100 * 1024 * 1024){ - alert('Point Social only supports image and video until 100 MB. Please change to a samller image or video file!') - } - setSelectedFile(event.target.files[0]); - setPreview(URL.createObjectURL(event.target.files[0])); - setBtnEnabled(true); - } else { - alert('Point Social only supports image and video uploads for now. Please change to an image or video file!') - } - }; - - const onFocus = event => { - const element = event.target; - element.selectionStart = element.value.length; - } - - const onImgErrorHandler = (e) => { - setLoadImgError(true); - } - - const onVideoErrorHandler = (e) => { - setLoadVideoError(true); - } - - let mediaTag; - if (!loadImgError) { - mediaTag = ; - } else { - if(!loadVideoError) { - mediaTag = ; - } else { - mediaTag = ''; - } - } - - const postedMedia = (media !== EMPTY_MEDIA) && mediaTag - - const setSaving = (saving) => { - setBtnEnabled(!saving); - saving ? setBtnLabel('Saving...') : setBtnLabel(DEFAULT_BTN_LABEL); - } - - const cancelEditing = () => { - setSaving(false); - setBtnEnabled(false); - toggleEditPost(); - } - - const submitHandler = async (e) => { - e.preventDefault(); - setSaving(true); - - try { - // Save the post content to the storage layer and keep the storage id - let {data: storageId} = (contents && contents.trim().length > 0)? await window.point.storage.putString({data: contents}) : { data: EMPTY_CONTENT }; - let imageId = media; - if(selectedFile){ - const formData = new FormData() - formData.append("postfile", selectedFile); - const res = await window.point.storage.postFile(formData); - imageId = res.data; - } - // Save the post contents storage id in the PoinSocial Smart Contract - await PostManager.editPost(post.id, storageId, imageId); - setSaving(false); - setContents(''); - setSelectedFile(); - setBtnEnabled(false); - try { fileInputRef.current.value = null } catch (error) {} - reloadPost(contents, imageId); - } catch (e) { - console.error('Error sharing post: ', e.message); - setSaving(false); - setContents(''); - setSelectedFile(); - setBtnEnabled(false); - try { fileInputRef.current.value = null } catch (error) {} - } - }; - - return ( -
- - { postedMedia } -
-
-
- - -
- - -
-
-
- ); -} diff --git a/src/components/post/post.css b/src/components/post/post.css deleted file mode 100644 index 3a58d3b..0000000 --- a/src/components/post/post.css +++ /dev/null @@ -1,119 +0,0 @@ - .post { - width: 100%; - border-radius: 6px; - -webkit-box-shadow: 0px 0px 16px -8px rgba(172, 173, 181, 0.68); - box-shadow: 0px 0px 16px -8px rgba(172, 173, 181, 0.68); - margin: 12px 0; - } - - .postWrapper { - padding: 15px; - } - - .postImage { - padding: 0; - display: block; - margin: 0 auto; - max-height: 100%; - max-width: 100%; - } - - .postText { - display: flex; - margin-top: 10px; - margin-bottom: 10px; - } - - .postTop { - display: flex; - align-items: center; - justify-content: space-between; - } - - .postTopLeft { - display: flex; - align-items: center; - } - - .postProfileImg { - width: 32px; - height: 32px; - border-radius: 50%; - object-fit: cover; - } - - .postUsername { - font-size: 15px; - font-weight: 500; - margin: 0 10px; - } - - .postDate{ - font-size: 12px; - } - - .postCenter{ - margin: 20px 0; - } - - .postImg{ - margin-top: 20px; - width: 100%; - max-height: 500px; - object-fit: contain; - } - - .postBottom{ - display: flex; - align-items: center; - justify-content: space-between; - } - - .postBottomLeft{ - display: flex; - align-items: center; - } - - .likeIcon{ - width: 24px; - height: 24px; - margin-right: 5px; - cursor: pointer; - } - - .postLikeCounter{ - font-size: 15px; - } - - .postCommentText{ - cursor: pointer; - border-bottom: 1px dashed gray; - font-size: 15px; - } - - .postEditText{ - margin-left: 5px; - cursor: pointer; - border-bottom: 1px dashed darkblue; - font-size: 10px; - } - - .postDeleteText{ - margin-left: 5px; - cursor: pointer; - border-bottom: 1px dashed darkred; - font-size: 10px; - } - - .comments { - margin-top: 10px; - } - .postDate{ - color:rgb(148, 159, 173); - } - .posted-id{ - color:#1c385b; - } - p { - white-space: pre-wrap; - } \ No newline at end of file diff --git a/src/components/post/postEditor.css b/src/components/post/postEditor.css deleted file mode 100644 index 158bde9..0000000 --- a/src/components/post/postEditor.css +++ /dev/null @@ -1,65 +0,0 @@ -.postEditor { - width: 100%; - border-radius: 6px; - -webkit-box-shadow: 0px 0px 16px -8px rgba(172, 173, 181, 0.68); - box-shadow: 0px 0px 16px -8px rgba(172, 173, 181, 0.68); -} - -.editHr { - margin: 20px 0; - background:#dce2ea; - height: 1px; - border:none; -} - -.editInput { - border: none; - width: 100%; -} - -.editInput:focus { - outline: none; -} - -.editBottom { - margin-top: 5px; - display: flex; - align-items: flex-start; - justify-content: space-between; - width: 100%; -} - -.editOptions{ - display: flex; - /* margin-left: 20px; */ -} - -.editFilePicker { - display: flex; - align-items: center; - margin-right: 15px; - cursor: pointer; -} - -.editIcon { - font-size: 18px; - margin-right: 3px; -} - -.editOptionText{ - font-size: 14px; - font-weight: 500; -} - -.editButton { - border: none; - border-radius: 5px; - margin-left: 5px; - background-color: #1C385B; - font-weight: 500; - cursor: pointer; - color: white; - width:80px; -} - - diff --git a/src/components/profile/ProfileCard.jsx b/src/components/profile/ProfileCard.jsx index f3d5892..20e4fc0 100644 --- a/src/components/profile/ProfileCard.jsx +++ b/src/components/profile/ProfileCard.jsx @@ -6,7 +6,6 @@ import { useTheme } from '@material-ui/core/styles'; import { makeStyles } from '@material-ui/core/styles'; import useMediaQuery from '@material-ui/core/useMediaQuery'; -import Avatar from '@material-ui/core/Avatar'; import Backdrop from '@material-ui/core/Backdrop'; import Box from '@material-ui/core/Box'; import Card from '@material-ui/core/Card'; @@ -36,15 +35,24 @@ import MoreVertIcon from '@material-ui/icons/MoreVert'; import Close from '@material-ui/icons/Close'; import RoomOutlinedIcon from '@material-ui/icons/RoomOutlined'; import PanoramaOutlinedIcon from '@material-ui/icons/PanoramaOutlined'; +import PersonAddIcon from '@material-ui/icons/PersonAdd'; +import BlockOutlinedIcon from '@material-ui/icons/BlockOutlined'; +import PersonAddDisabledIcon from '@material-ui/icons/PersonAddDisabled'; +import CheckOutlinedIcon from '@material-ui/icons/CheckOutlined'; +import LockOpenOutlinedIcon from '@material-ui/icons/LockOpenOutlined'; +import LockOutlinedIcon from '@material-ui/icons/LockOutlined'; import TabPanel from '../tabs/TabPanel'; import Feed from '../feed/Feed'; import UserAvatar from '../avatar/UserAvatar'; +import UserList from '../user/UserList'; import point from "../../services/PointSDK"; import UserManager from "../../services/UserManager"; import { Link } from "wouter"; +import EventConstants from "../../events"; + const MAX_FILE_SIZE = 100 * 1024 * 1024; const EMPTY = '0x0000000000000000000000000000000000000000000000000000000000000000'; @@ -201,6 +209,13 @@ const useStyles = makeStyles((theme) => ({ justify: "center", alignItems:"center" }, + followBox: { + display: 'flex', + justifyContent: "end", + justify: "end", + alignItems:"end", + margin: theme.spacing(2) + } })); const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { @@ -213,12 +228,22 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { const [name, setName] = useState(EMPTY); const [location, setLocation] = useState(EMPTY); const [about, setAbout] = useState(EMPTY); + const [followers, setFollowers] = useState(0); const [following, setFollowing] = useState(0); + const [followersList, setFollowersList] = useState([]); + const [followingList, setFollowingList] = useState([]); + const [avatar, setAvatar] = useState(EMPTY); const [banner, setBanner] = useState(EMPTY); const [profile, setProfile] = useState(); + const [isOwner, setIsOwner] = useState(false); + const [isFollowed, setFollowed] = useState(false); + const [isFollower, setFollower] = useState(false); + const [isBlocked, setIsBlocked] = useState(false); + const [imBlocked, setImBlocked] = useState(false); + const [loading, setLoading] = useState(true); const [actionsOpen, setActionsOpen] = useState(false); const [edit, setEdit] = useState(false); @@ -231,7 +256,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { const displayAboutRef = useRef(); const actionsAnchor = useRef(); - const { walletAddress, processing, setProcessing, setUserProfile } = useAppContext(); + const { walletAddress, setUserProfile, events } = useAppContext(); useEffect(() => { loadProfile(); @@ -241,6 +266,41 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { renderProfile(profile); }, [profile]); + useEffect(() => { + getEvents(); + return () => { + events.listeners["PointSocial"]["FollowEvent"].removeListener("FollowEvent", handleEvents, { type: 'profile', id: address}); + events.unsubscribe("PointSocial", "FollowEvent"); + }; + }, []); + + const getEvents = async() => { + try { + (await events.subscribe("PointSocial", "FollowEvent")).on("FollowEvent", handleEvents, { type: 'profile', id: address}); + } + catch(error) { + console.log(error.message); + } + } + + const handleEvents = async(event) => { + if (event && (((event.from.toLowerCase() === walletAddress.toLowerCase()) && + (event.to.toLowerCase() === address.toLowerCase())) || + ((event.to.toLowerCase() === walletAddress.toLowerCase()) && + (event.from.toLowerCase() === address.toLowerCase())))) { + switch(event.action) { + case EventConstants.FollowAction.Follow: + case EventConstants.FollowAction.UnFollow: + case EventConstants.FollowAction.Block: + case EventConstants.FollowAction.UnBlock: + await loadFollowStatus(); + break; + default: + break; + } + } + } + const renderProfile = async (profile) => { if (profile) { try { @@ -250,11 +310,10 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { const location = (profile.displayLocation === EMPTY)? "Point Network" : await point.getString(profile.displayLocation, { encoding: 'utf-8' }); setLocation(location); const about = (profile.displayLocation === EMPTY)? "Hey I'm using Point Social!" : await point.getString(profile.displayAbout, { encoding: 'utf-8' }); - setAbout(about); - setFollowers(profile.followersCount || 0); - setFollowing(profile.followingCount || 0); + setAbout(about); setAvatar(`/_storage/${profile.avatar}`); setBanner((profile.banner=== EMPTY)?defaultBanner:`/_storage/${profile.banner}`); + await loadFollowStatus(); setLoading(false); } catch(error) { @@ -263,6 +322,36 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { } } + const loadFollowStatus = async () => { + setFollowers(await UserManager.followersCount(address) || 0); + setFollowing(await UserManager.followingCount(address) || 0); + + try { + setFollowersList(await UserManager.followersList(address)); + } + catch(error) { + setFollowersList([]); + } + + try { + setFollowingList(await UserManager.followingList(address)); + } + catch(error) { + setFollowingList([]); + } + + const owner = address.toLowerCase() === walletAddress.toLowerCase(); + if (owner) { + setIsOwner(true); + } + else { + setFollowed(await UserManager.isFollowing(walletAddress, address)); + setFollower(await UserManager.isFollowing(address, walletAddress)); + setIsBlocked(await UserManager.isBlocked(walletAddress, address)); + setImBlocked(await UserManager.isBlocked(address, walletAddress)); + } + } + const loadProfile = async () => { try { const profile = await UserManager.getProfile(address); @@ -276,7 +365,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { followersCount: 0, followingCount: 0, }); - } + } } catch(error) { setAlert(error.message); @@ -304,6 +393,10 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { case 'cancel': cancelEdit(); break; + case 'block': + case 'unblock': + toggleBlock(); + break; } setActionsOpen(false); @@ -352,7 +445,6 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { }; const saveEdit = async () => { - setProcessing(true); setLoading(true); const newProfile = { ...profile }; @@ -407,7 +499,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { followingCount: 0, }; - const result = await UserManager.setProfile( + await UserManager.setProfile( updatedProfile.displayName, updatedProfile.displayLocation, updatedProfile.displayAbout, @@ -432,10 +524,53 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { } finally { setLoading(false); - setProcessing(false); } }; + const toggleFollow = async () => { + try { + setLoading(true); + if (isFollowed) { + await UserManager.unfollowUser(address); + setFollowed(false); + setAlert(`You're no longer following to ${name}|success`); + } + else { + await UserManager.followUser(address); + setFollowed(true); + setAlert(`Now you're following ${name}|success`); + } + } + catch(error) { + setAlert(error.message); + } + finally { + setLoading(false); + } + } + + const toggleBlock = async () => { + try { + setLoading(true); + if (isBlocked) { + await UserManager.unblockUser(address); + setIsBlocked(false); + setAlert(`You unblocked all activity from ${name}|success`); + } + else { + await UserManager.blockUser(address); + setIsBlocked(true); + setAlert(`You blocked all activity from ${name}|success`); + } + } + catch(error) { + setAlert(error.message); + } + finally { + setLoading(false); + } + } + const bannerContent = @@ -451,7 +586,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { }/> - { (walletAddress === address) && + { (walletAddress.toLowerCase() === address.toLowerCase()) && { ref={actionsAnchor} onClick={handleActionsOpen} className={styles.actionButton} - color="secondary" - disabled={processing}> + color="secondary"> { transformOrigin={{ vertical: "top", horizontal: "right" }} onClose={handleActionsClose} open={actionsOpen}> - {!edit && + {!isOwner && isBlocked && + handleAction('unblock')}> + + + + Unblock + + } + {!isOwner && !isBlocked && + handleAction('block')}> + + + + Block + + } + {!edit && isOwner && handleAction('edit')}> @@ -478,7 +628,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { Edit } - {edit && + {edit && isOwner && handleAction('cancel')}> @@ -486,7 +636,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { Cancel } - {edit && + {edit && isOwner && handleAction('save')}> @@ -532,6 +682,21 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { + { !loading && !isOwner && + + { + isBlocked? + : } label={isBlocked? "Unblock" : "Block"} onClick={toggleBlock}/> + : + imBlocked? + } label="Blocked you" color="secondary"/> + : + isFollower && } label="Follows you" color="primary"/> + } +
+ { !(isBlocked || imBlocked) && : } label={isFollowed? "Unfollow" : "Follow"} onClick={toggleFollow}/> } +
+ } { edit && } @@ -587,7 +752,7 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { - {/* Temporarily disabling until functionality is available + {

Followers

@@ -601,14 +766,18 @@ const ProfileCard = ({ address, identity, setUpperLoading, setAlert }) => { {loading ? : following }

-
*/} + } + + {/* Temporarily disabling until functionality is available */} }/> + }/> + }/>
diff --git a/src/components/share/Share.jsx b/src/components/share/Share.jsx deleted file mode 100644 index 2fb45df..0000000 --- a/src/components/share/Share.jsx +++ /dev/null @@ -1,141 +0,0 @@ -import "./share.css"; -import { AttachFileTwoTone } from "@material-ui/icons"; -import { useRef, useState } from "react"; -import profileImg from '../../assets/profile-pic.jpg'; -import { useAppContext } from '../../context/AppContext'; - -import Snackbar from '@material-ui/core/Snackbar'; -import MuiAlert from '@material-ui/lab/Alert'; -import PostManager from "../../services/PostManager" - -function Alert(props) { - return ; -} - -export default function Share({reloadPosts}) { - const DEFAULT_BTN_LABEL = 'Share' - const EMPTY_IMAGE = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const EMPTY_TEXT = '0x0000000000000000000000000000000000000000000000000000000000000000'; - const [selectedFile, setSelectedFile] = useState(); - const [contents, setContents] = useState(''); - const [btnLabel, setBtnLabel] = useState(DEFAULT_BTN_LABEL); - const [alert, setAlert] = useState(false); - const [btnEnabled, setBtnEnabled] = useState(false); - const [shareError, setShareError] = useState(undefined); - const { identity } = useAppContext(); - - const fileInputRef = useRef() - - const onFileChange = event => { - let fileToUpload = event.target.files[0]; - if(fileToUpload.type.startsWith('image') || fileToUpload.type.startsWith('video') ) { - if (fileToUpload.size > 100 * 1024 * 1024){ - alert('Point Social only supports image and video until 100 MB. Please change to a smaller image or video file!') - } - setSelectedFile(event.target.files[0]); - setBtnEnabled(true); - } else { - alert('Point Social only supports image and video uploads for now. Please change to an image or video file!') - } - }; - - const handleAlert = (event, reason) => { - if (reason === 'clickaway') { - return; - } - setAlert(false); - }; - - const onContentsChange = event => { - let newContents = event.target.value; - setContents(newContents) - setBtnEnabled(newContents && newContents.length > 0) - } - - const setSaving = (saving) => { - setBtnEnabled(!saving); - saving ? setBtnLabel('Saving...') : setBtnLabel(DEFAULT_BTN_LABEL); - } - - const submitHandler = async (e) => { - e.preventDefault(); - setSaving(true); - - try { - // Save the post content to the storage layer and keep the storage id - let {data: storageId} = (contents && contents.trim().length > 0)? await window.point.storage.putString({data: contents}) : { data: EMPTY_TEXT }; - let imageId = EMPTY_IMAGE; - if(selectedFile){ - const formData = new FormData() - formData.append("postfile", selectedFile); - const res = await window.point.storage.postFile(formData); - imageId = res.data; - } - // Save the post contents storage id in the PoinSocial Smart Contract - await PostManager.addPost(storageId, imageId) - await reloadPosts(); - setSaving(false); - setContents(''); - setSelectedFile(); - fileInputRef.current.value = null - setBtnEnabled(false); - } catch (e) { - console.error('Error sharing post: ', e.message); - setSaving(false); - setContents(''); - setSelectedFile(); - fileInputRef.current.value = null - setBtnEnabled(false); - setShareError(e); - setAlert(true); - } - }; - - return ( -
-
-
- - -
-
-
-
-
- - -
-
- -
-
- - - Error sharing post: {shareError && shareError.message}. Did you deploy the contract sucessfully? - - -
- ); -} diff --git a/src/components/share/share.css b/src/components/share/share.css deleted file mode 100644 index 55035ed..0000000 --- a/src/components/share/share.css +++ /dev/null @@ -1,97 +0,0 @@ - .share { - width: 100%; - border-radius: 6px; - -webkit-box-shadow: 0px 0px 16px -8px rgba(172, 173, 181, 0.68); - box-shadow: 0px 0px 16px -8px rgba(172, 173, 181, 0.68); - } - - .shareWrapper { - padding: 15px; - } - - .shareTop { - display: flex; - align-items: center; - } - - .shareProfileImg { - width: 50px; - height: 50px; - border-radius: 50%; - object-fit: cover; - margin-right: 10px; - border:1px solid #dee0e6; - } - - .shareInput { - border: none; - width: 80%; - } - - .shareInput:focus { - outline: none; - } - - .shareHr { - margin: 20px 0; - background:#dce2ea; - height: 1px; - border:none; - } - - .shareBottom { - display: flex; - align-items: center; - justify-content: space-between; - } - - .shareOptions{ - display: flex; - /* margin-left: 20px; */ - } - - .shareOption{ - display: flex; - align-items: center; - margin-right: 15px; - cursor: pointer; - } - - .shareIcon{ - font-size: 18px; - margin-right: 3px; - } - - .shareOptionText{ - font-size: 14px; - font-weight: 500; - } - - .shareButton{ - border: none; - padding: 7px; - border-radius: 5px; - background-color: #1C385B; - font-weight: 500; - cursor: pointer; - color: white; - width:80px; - } - - .shareImgContainer{ - padding: 0 20px 10px 20px; - position: relative; - } - - .shareImg{ - width: 100%; - object-fit: cover; - } - - .shareCancelImg{ - position: absolute; - top: 0; - right: 20px; - cursor: pointer; - opacity: 0.7; - } \ No newline at end of file diff --git a/src/components/topbar/Topbar.jsx b/src/components/topbar/Topbar.jsx deleted file mode 100644 index 6a1996d..0000000 --- a/src/components/topbar/Topbar.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import "./topbar.css"; -import { useAppContext } from '../../context/AppContext'; -import { Link } from "wouter"; -import pointlogo from '../../assets/pointlogowhite.png'; - -import Avatar from '@material-ui/core/Avatar'; - -export default function Topbar() { - const { walletAddress } = useAppContext(); - const { identity } = useAppContext(); - const { profile } = useAppContext(); - - return ( -
-
- - - - - Point Social - -
-
-
-
-
-
-
-
-
-
- - { walletAddress && profile && - - } - -
-
- ); -} diff --git a/src/components/topbar/topbar.css b/src/components/topbar/topbar.css deleted file mode 100644 index a4a5435..0000000 --- a/src/components/topbar/topbar.css +++ /dev/null @@ -1,100 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Bungee+Inline&display=swap'); - -.topbarContainer { - height: 50px; - width: 100%; - background-color: #1c385b; - display: flex; - align-items: center; - position: sticky; - top: 0; - z-index: 999; - color:white; - } - - .topbarLeft { - margin-left: 10px; - flex: 3; - } - - .logo { - font-size: 24px; - margin-left: 5px; - font-weight: bold; - color: white; - cursor: pointer; - } - - .topbarCenter { - flex: 5; - } - - .searchbar { - width: 100%; - height: 30px; - background-color: white; - border-radius: 30px; - display: flex; - align-items: center; - } - - .searchIcon { - font-size: 20px !important; - margin-left: 10px; - } - - .searchInput { - border: none; - width: 70%; - } - - .searchInput:focus { - outline: none; - } - - .topbarRight { - flex: 4; - display: flex; - align-items: center; - justify-content: space-around; - color: white; - } - - .topbarLink { - margin-right: 10px; - font-size: 14px; - cursor: pointer; - } - - .topbarIcons { - display: flex; - } - - .topbarIconItem { - margin-right: 15px; - cursor: pointer; - position: relative; - } - - .topbarIconBadge { - width: 15px; - height: 15px; - background-color: red; - border-radius: 50%; - color: white; - position: absolute; - top: -5px; - right: -5px; - display: flex; - align-items: center; - justify-content: center; - font-size: 12px; - } - - .topbarImg { - width: 40px; - height: 40px; - border-radius: 50%; - object-fit: cover; - cursor: pointer; - } diff --git a/src/components/user/UserItem.jsx b/src/components/user/UserItem.jsx new file mode 100644 index 0000000..c1fcbb4 --- /dev/null +++ b/src/components/user/UserItem.jsx @@ -0,0 +1,69 @@ +import { useState, useEffect } from "react"; +import { useAppContext } from '../../context/AppContext'; +import { makeStyles } from '@material-ui/core/styles'; + +import ListItem from '@material-ui/core/ListItem'; +import Divider from '@material-ui/core/Divider'; +import ListItemText from '@material-ui/core/ListItemText'; +import ListItemAvatar from '@material-ui/core/ListItemAvatar'; +import UserAvatar from "../avatar/UserAvatar"; + +import point from "../../services/PointSDK"; +import UserManager from "../../services/UserManager"; + +const useStyles = makeStyles((theme) => ({ + root: { + cursor:'pointer', + }, +})); + +const EMPTY = '0x0000000000000000000000000000000000000000000000000000000000000000'; + +const UserItem = ({address}) => { + + const styles = useStyles(); + const [loading, setLoading] = useState(false); + const [name, setName] = useState(''); + const [about, setAbout] = useState(''); + + const { walletAddress, profile, identity } = useAppContext(); + + useEffect(() => { + loadUser(); + }, []); + + const loadUser = async () => { + setLoading(true); + if (address.toString().toLowerCase() === walletAddress.toString().toLowerCase()) { + setName((profile && profile.displayName) || identity); + setAbout(profile.displayAbout || "Hey I'm using Point Social!"); + } + else { + try { + const profile = await UserManager.getProfile(address); + const { identity } = await point.ownerToIdentity(address); + const name = (profile[0] === EMPTY)? identity : await point.getString(profile[0], { encoding: 'utf-8' }); + const about = (profile[2] === EMPTY)? "Hey I'm using Point Social!" : await point.getString(profile[2], {encoding: 'utf-8'}); + setName(name); + setAbout(about); + } + catch(error) {} + } + setLoading(false); + } + + return ( + <> + + + window.open(`/profile/${address}`, "_blank") }}/> + + + + + + ); + +}; + +export default UserItem \ No newline at end of file diff --git a/src/components/user/UserList.jsx b/src/components/user/UserList.jsx new file mode 100644 index 0000000..03f060d --- /dev/null +++ b/src/components/user/UserList.jsx @@ -0,0 +1,87 @@ +import { useEffect, useState, useRef } from "react"; +import { makeStyles } from '@material-ui/core/styles'; +import { useAppContext } from '../../context/AppContext'; + +import CircularProgressWithIcon from "../../components/generic/CircularProgressWithIcon"; + +import {Box, + Divider, + List, + Typography, + } from '@material-ui/core'; + +import Skeleton from '@material-ui/lab/Skeleton'; + +import InboxOutlinedIcon from '@material-ui/icons/InboxOutlined'; +import RichTextField from '../generic/RichTextField'; +import SendOutlinedIcon from '@material-ui/icons/SendOutlined'; +import IconButton from '@material-ui/core/IconButton'; +import SmsOutlinedIcon from '@material-ui/icons/SmsOutlined'; + +import point from "../../services/PointSDK"; +import UserManager from "../../services/UserManager"; +import EventConstants from "../../events"; + +import UserItem from "./UserItem"; + +const useStyles = makeStyles((theme) => ({ + backdrop: { + position: "absolute", + zIndex: theme.zIndex.drawer - 1, + opacity: 0.9 + }, + root: { + width: '100%', + height: '100%', + backgroundColor: theme.palette.background.paper, + }, + inline: { + display: 'inline', + }, + empty: { + padding: theme.spacing(2, 2), + display: "flex", + flexDirection: "column", + alignItems:"center", + justifyContent: "center", + marginBottom: theme.spacing(6) + }, + commentBox: { + display: 'flex', + alignItems: 'center', + justifyContent: 'center' + }, + list: { + minHeight: '50vh' + } +})); + +const UserList = ({users}) => { + + const styles = useStyles(); + return ( +
+ { + (users.length === 0) + ? + +
+ + No users yet. +
+
+ : + + { + users.map((user) => ( + + + )) + } + + } +
+ ) +} + +export default UserList \ No newline at end of file diff --git a/src/context/AppContext.js b/src/context/AppContext.js index 05bd95a..0da9926 100644 --- a/src/context/AppContext.js +++ b/src/context/AppContext.js @@ -10,6 +10,7 @@ const events = new EventManager(); const defaultContext = { walletAddress: undefined, deployer : false, + isGateWay: false, walletError: undefined, identity: undefined, profile: undefined, @@ -32,7 +33,7 @@ export const ProvideAppContext = ({ children }) => { const [, setLocation] = useLocation(); const [profile, setUserProfile] = useState(); const [deployer, setDeployer] = useState(false); - const [processing, setProcessing] = useState(false); + const [processing, setProcessing] = useState(point.isGateway() || false); useEffect(() => { (async () => { @@ -70,6 +71,7 @@ export const ProvideAppContext = ({ children }) => { const context = { walletAddress, deployer, + isGateway : point.isGateway(), walletError, identity, profile, diff --git a/src/events.js b/src/events.js index a27642a..3dc1210 100644 --- a/src/events.js +++ b/src/events.js @@ -14,6 +14,12 @@ const EventConstants = { Feed: "1", Post: "2", Comment: "3", + }, + FollowAction: { + Follow : "0", + UnFollow : "1", + Block : "2", + UnBlock : "3" } } diff --git a/src/pages/home/Home.jsx b/src/pages/home/Home.jsx index e621ae7..f9877da 100644 --- a/src/pages/home/Home.jsx +++ b/src/pages/home/Home.jsx @@ -1,81 +1,148 @@ -import Appbar from '../../components/topbar/Appbar'; -import Footer from '../../components/footer/Footer'; +import Appbar from "../../components/topbar/Appbar"; +import Footer from "../../components/footer/Footer"; -import { useState } from 'react'; +import { useState } from "react"; import { useAppContext } from '../../context/AppContext'; import { makeStyles } from '@material-ui/core/styles'; -import { Backdrop, CircularProgress, Snackbar, Container } from '@material-ui/core'; +import { Backdrop, + Button, + CircularProgress, + Snackbar, + SnackbarContent, + Container } from '@material-ui/core'; -import CircularProgressWithIcon from '../../components/generic/CircularProgressWithIcon'; -import ShareCard from '../../components/share/ShareCard'; -import Feed from '../../components/feed/Feed'; -import Alert from '../../components/generic/Alert'; +import Tabs from '@material-ui/core/Tabs'; +import Tab from '@material-ui/core/Tab'; +import TabPanel from '../../components/tabs/TabPanel'; +import Tooltip from '@material-ui/core/Tooltip'; + +import DiscoverFeed from '../../components/feed/DiscoverFeed'; +import FollowFeed from '../../components/feed/FollowFeed'; +import FreshFeed from '../../components/feed/FreshFeed'; +import TopFeed from '../../components/feed/TopFeed'; + +import ExploreOutlinedIcon from '@material-ui/icons/ExploreOutlined'; +import PersonPinCircleOutlinedIcon from '@material-ui/icons/PersonPinCircleOutlined'; +import EcoOutlinedIcon from '@material-ui/icons/EcoOutlined'; +import EmojiEventsOutlinedIcon from '@material-ui/icons/EmojiEventsOutlined'; + +import CircularProgressWithIcon from "../../components/generic/CircularProgressWithIcon"; +import ShareCard from "../../components/share/ShareCard"; +import Feed from "../../components/feed/Feed"; +import Alert from "../../components/generic/Alert"; import AccountBalanceWalletOutlinedIcon from '@material-ui/icons/AccountBalanceWalletOutlined'; + const useStyles = makeStyles((theme) => ({ - root: { - height: '100%', - padding: 0, - margin: 0, - }, - container: { - padding: theme.spacing(2, 2), - display: 'flex', - minHeight: '100%', - flexDirection: 'column', - justifyContent: 'center', - maxWidth: '900px', - }, - backdrop: { - zIndex: theme.zIndex.drawer + 1, - }, + root: { + height: "100%", + padding: 0, + margin: 0, + }, + container: { + padding: theme.spacing(2, 2), + display: "flex", + minHeight: "100%", + flexDirection: "column", + justifyContent: "center", + maxWidth: '900px', + }, + backdrop: { + zIndex: theme.zIndex.drawer + 1, + }, + tab: { + padding: 0, + margin: 0, + }, + tabpanel: { + padding: 0, + } })); -const Home = () => { - const [loading, setLoading] = useState(false); - const [alert, setAlert] = useState(''); - const { walletAddress } = useAppContext(); +function a11yProps(index) { + return { + id: `scrollable-prevent-tab-${index}`, + 'aria-controls': `scrollable-prevent-tabpanel-${index}`, + }; +} - const styles = useStyles(); +const Home = () => { + const [loading, setLoading] = useState(false); + const [alert, setAlert] = useState(""); + const { walletAddress, isGateway } = useAppContext(); + const [tabIndex, setTabIndex] = useState(0); - const handleAlert = (event, reason) => { - if (reason === 'clickaway') { - return; - } - setAlert(''); - }; + const styles = useStyles(); + + const handleAlert = (event, reason) => { + if (reason === 'clickaway') { + return; + } + setAlert(""); + }; - return ( -
- - {walletAddress ? ( - - ) : ( - } - props={{ color: 'inherit' }} - /> - )} - - {walletAddress && ( - <> - - - - - -
- - )} - - - {alert.split('|')[0]} - - -
- ); -}; + const handleChange = (event, newIndex) => { + setTabIndex(newIndex); + }; + + return ( +
+ { + !loading && + + Download + }/> + + } + + { + walletAddress? + : + } props={{color : "inherit"}} /> + } + + { + walletAddress && + <> + + + + } aria-label="discover" {...a11yProps(0)} /> + } aria-label="following" {...a11yProps(1)}/> + } aria-label="fresh" {...a11yProps(2)} /> + } aria-label="top" {...a11yProps(3)}/> + + + + + + + + + + + + + + + +
+ + } + + { alert.split("|")[0] } + +
+ ); +} -export default Home; +export default Home \ No newline at end of file diff --git a/src/pages/post/Post.jsx b/src/pages/post/Post.jsx index 31cdaad..0421c86 100644 --- a/src/pages/post/Post.jsx +++ b/src/pages/post/Post.jsx @@ -8,7 +8,10 @@ import PostManager from '../../services/PostManager'; import CircularProgress from '@material-ui/core/CircularProgress'; import Backdrop from '@material-ui/core/Backdrop'; +import Button from '@material-ui/core/Button'; import Snackbar from '@material-ui/core/Snackbar'; +import SnackbarContent from '@material-ui/core/SnackbarContent'; + import MuiAlert from '@material-ui/lab/Alert'; import CircularProgressWithIcon from "../../components/generic/CircularProgressWithIcon"; @@ -46,7 +49,7 @@ const Post = () => { const [alert, setAlert] = useState(""); const [post, setPost] = useState(); - const { walletAddress, events } = useAppContext(); + const { walletAddress, isGateway, events } = useAppContext(); const styles = useStyles(); @@ -143,6 +146,16 @@ const Post = () => { return (
{ walletAddress && } + { + !loading && + + Download + }/> + + } { walletAddress? diff --git a/src/pages/profile/Profile.jsx b/src/pages/profile/Profile.jsx index d790e44..0891f6b 100644 --- a/src/pages/profile/Profile.jsx +++ b/src/pages/profile/Profile.jsx @@ -8,7 +8,10 @@ import CircularProgress from '@material-ui/core/CircularProgress'; import CircularProgressWithIcon from "../../components/generic/CircularProgressWithIcon"; import Backdrop from '@material-ui/core/Backdrop'; +import Button from '@material-ui/core/Button'; import Snackbar from '@material-ui/core/Snackbar'; +import SnackbarContent from '@material-ui/core/SnackbarContent'; + import MuiAlert from '@material-ui/lab/Alert'; import Box from '@material-ui/core/Box'; @@ -41,7 +44,7 @@ const Profile = () => { const [identity, setIdentity] = useState(undefined); const [address, setAddress] = useState(undefined); - const { walletAddress } = useAppContext(); + const { walletAddress, isGateway } = useAppContext(); const styles = useStyles(); @@ -98,6 +101,16 @@ const Profile = () => { } props={{color : "inherit"}} /> } + { + !loading && + + Download + }/> + + } {walletAddress && <> { (address && identity)? <> diff --git a/src/services/PointSDK.js b/src/services/PointSDK.js index c87ddb1..a9bd779 100644 --- a/src/services/PointSDK.js +++ b/src/services/PointSDK.js @@ -1,8 +1,8 @@ const POINT_TIMEOUT = 30 * 1000; const MAX_TIMEOUT = 600 * 1000; -const DEBUG = false; -const DISPLAY_ERRORS = false; +const DEBUG = true; +const DISPLAY_ERRORS = true; class PointSDK { @@ -46,6 +46,11 @@ class PointSDK { return data; } + static isGateway() { + const point = PointSDK._getPoint(); + return point.isGateway; + } + /************** WALLET FUNCTIONS **************/ static getWalletAddress = async () => PointSDK._callSDKFunction('wallet', 'address'); // OK diff --git a/src/services/PostManager.js b/src/services/PostManager.js index cb7d38f..28f58be 100644 --- a/src/services/PostManager.js +++ b/src/services/PostManager.js @@ -4,7 +4,7 @@ const EMPTY = '0x0000000000000000000000000000000000000000'; class PostManager { static getPost = async (postId) => point.contractCall("PointSocial", "getPostById", [postId]); - static isFlaggedPost = async (postId) => point.contractCall("PointSocial", "postIsFlagged", [postId]); + static postIsFlagged = async (postId) => point.contractCall("PointSocial", "postIsFlagged", [postId]); static addPost = async (contentId, imageId) => point.contractCall("PointSocial", "addPost", [ (contentId) ? contentId : EMPTY, @@ -14,8 +14,8 @@ class PostManager { static editPost = async (postId, contentId, imageId) => { return point.contractCall("PointSocial", "editPost", [ postId, - (contentId) ? contentId : EMPTY, - (imageId) ? imageId : EMPTY + (contentId ? contentId : EMPTY), + (imageId ? imageId : EMPTY) ]); } static flagPost = async (postId) => point.contractCall("PointSocial", "flagPost", [postId]); @@ -23,8 +23,9 @@ class PostManager { static addDislikeToPost = async (postId) => point.contractSend("PointSocial", "addDislikeToPost", [postId]); static getAllPostsByOwnerLength = async (account) => point.contractCall("PointSocial", "getAllPostsByOwnerLength", [account]); static getAllPostsLength = async () => point.contractCall("PointSocial", "getAllPostsLength", []); + static getLastPostId = async () => point.contractCall("PointSocial", "getLastPostId", []); static getPaginatedPostsByOwner = async (account, length, amount) => point.contractCall("PointSocial", "getPaginatedPostsByOwner", [account, length, amount]); - static getPaginatedPosts = async (length, amount) => point.contractCall("PointSocial", "getPaginatedPosts", [length, amount]); + static getPaginatedPosts = async (length, amount, type = 2) => point.contractCall("PointSocial", "getPaginatedPosts", [length, amount, type]); static checkLikeToPost = async (postId) => point.contractCall("PointSocial", "checkLikeToPost", [postId]); } diff --git a/src/services/UserManager.js b/src/services/UserManager.js index 5ae355c..df6010a 100644 --- a/src/services/UserManager.js +++ b/src/services/UserManager.js @@ -3,6 +3,17 @@ import point from "./PointSDK" class UserManager { static getProfile = async (userAddress) => point.contractCall("PointSocial", "getProfile", [userAddress]); static setProfile = async (displayName, displayLocation, displayAbout, avatar, banner) => point.contractCall("PointSocial", "setProfile", [displayName, displayLocation, displayAbout, avatar, banner]); + static isFollowing = async (owner, user) => point.contractCall("PointSocial", "isFollowing", [owner, user]); + static followUser = async (user) => point.contractCall("PointSocial", "followUser", [user]); + static unfollowUser = async (user) => point.contractCall("PointSocial", "unfollowUser", [user]); + static blockUser = async (user) => point.contractCall("PointSocial", "blockUser", [user]); + static unblockUser = async (user) => point.contractCall("PointSocial", "unBlockUser", [user]); + static isBlocked = async (owner, user) => point.contractCall("PointSocial", "isBlocked", [owner, user]); + static blockList = async () => point.contractCall("PointSocial", "blockList", []); + static followingList = async (user) => point.contractCall("PointSocial", "followingList", [user]); + static followersList = async (user) => point.contractCall("PointSocial", "followersList", [user]); + static followingCount = async (user) => point.contractCall("PointSocial", "followingCount", [user]); + static followersCount = async (user) => point.contractCall("PointSocial", "followersCount", [user]); } export default UserManager diff --git a/tests/unit/smartcontracts/PointSocial.js b/tests/unit/smartcontracts/PointSocial.js index 034e30e..9fe1048 100644 --- a/tests/unit/smartcontracts/PointSocial.js +++ b/tests/unit/smartcontracts/PointSocial.js @@ -41,24 +41,41 @@ describe('PointSocial contract', function () { await upgrades.upgradeProxy(pointSocial.address, socialFactoryDeployer); }); - it('Should not upgrade the proxy by a non-deployer', async function () { - await identityContract.setDevMode(true); - await identityContract.register( - handle, - owner.address, - '0xed17268897bbcb67127ed550cee2068a15fdb6f69097eebeb6e2ace46305d1ce', - '0xe1e032c91d4c8fe6bab1f198871dbafb8842f073acff8ee9b822f748b180d7eb' - ); - - const factory = await ethers.getContractFactory('PointSocial'); - let socialFactoryDeployer = factory.connect(addr1); - await expect( - upgrades.upgradeProxy(pointSocial.address, socialFactoryDeployer) - ).to.be.revertedWith('ERROR_NOT_DEPLOYER'); + describe("Testing deployment functions", function () { + + it("Should upgrade the proxy by a deployer", async function () { + await identityContract.setDevMode(true); + await identityContract.register( + handle, + owner.address, + '0xed17268897bbcb67127ed550cee2068a15fdb6f69097eebeb6e2ace46305d1ce', + '0xe1e032c91d4c8fe6bab1f198871dbafb8842f073acff8ee9b822f748b180d7eb'); + await identityContract.addIdentityDeployer(handle, addr1.address); + const factory = await ethers.getContractFactory("PointSocial"); + let socialFactoryDeployer = factory.connect(addr1); + + await upgrades.upgradeProxy(pointSocial.address, socialFactoryDeployer); + }); + + it("Should not upgrade the proxy by a non-deployer", async function () { + await identityContract.setDevMode(true); + await identityContract.register( + handle, + owner.address, + '0xed17268897bbcb67127ed550cee2068a15fdb6f69097eebeb6e2ace46305d1ce', + '0xe1e032c91d4c8fe6bab1f198871dbafb8842f073acff8ee9b822f748b180d7eb'); + + const factory = await ethers.getContractFactory("PointSocial"); + let socialFactoryDeployer = factory.connect(addr1); + await expect( + upgrades.upgradeProxy(pointSocial.address, socialFactoryDeployer) + ).to.be.revertedWith('ERROR_NOT_DEPLOYER'); + }); + }); }); - /*describe("Testing migrator functions", function () { + describe("Testing migrator functions", function () { it("User can add migrator", async function () { await pointSocial.addMigrator( addr1.address @@ -161,7 +178,7 @@ describe('PointSocial contract', function () { pointSocial.connect(addr2).addMigrator(addr2.address) ).to.be.revertedWith("Ownable: caller is not the owner"); }); - });*/ + }); describe('Testing user functions', function () { it('User can create post', async function () { @@ -259,10 +276,16 @@ describe('PointSocial contract', function () { const postCommentId = await pointSocial.commentIdsByPost(1, 0); const postComments = await pointSocial.commentById(postCommentId); - expect(postComments.contents).to.be.equal( - '0x0090916c0e6846d5dc8d22560e90782ded96e4efdeb53db214f612a54d4f5fbe' - ); - }); + const paginatedPosts = await pointSocial.getPaginatedPosts("5", "5", "1"); + + expect(paginatedPosts.length).to.be.equal(5); + }); + + it("Add comments to posts", async function () { + await pointSocial.addPost( + postContent, + postimage + ) it('Add dislike to posts', async () => { await pointSocial.addPost(postContent, postimage); @@ -354,4 +377,4 @@ describe('PointSocial contract', function () { ); }); }); -}); +}); \ No newline at end of file diff --git a/typechain/ERC1967UpgradeUpgradeable.d.ts b/typechain/ERC1967UpgradeUpgradeable.d.ts deleted file mode 100644 index 329ad08..0000000 --- a/typechain/ERC1967UpgradeUpgradeable.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ERC1967UpgradeUpgradeableInterface extends ethers.utils.Interface { - functions: {}; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "Upgraded(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; -} - -export type AdminChangedEvent = TypedEvent< - [string, string] & { previousAdmin: string; newAdmin: string } ->; - -export type BeaconUpgradedEvent = TypedEvent<[string] & { beacon: string }>; - -export type UpgradedEvent = TypedEvent<[string] & { implementation: string }>; - -export class ERC1967UpgradeUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ERC1967UpgradeUpgradeableInterface; - - functions: {}; - - callStatic: {}; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - "BeaconUpgraded(address)"( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - BeaconUpgraded( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - "Upgraded(address)"( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - - Upgraded( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - }; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/typechain/IBeaconUpgradeable.d.ts b/typechain/IBeaconUpgradeable.d.ts deleted file mode 100644 index 864f4a0..0000000 --- a/typechain/IBeaconUpgradeable.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IBeaconUpgradeableInterface extends ethers.utils.Interface { - functions: { - "implementation()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "implementation", - values?: undefined - ): string; - - decodeFunctionResult( - functionFragment: "implementation", - data: BytesLike - ): Result; - - events: {}; -} - -export class IBeaconUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IBeaconUpgradeableInterface; - - functions: { - implementation(overrides?: CallOverrides): Promise<[string]>; - }; - - implementation(overrides?: CallOverrides): Promise; - - callStatic: { - implementation(overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - implementation(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - implementation(overrides?: CallOverrides): Promise; - }; -} diff --git a/typechain/IERC1822ProxiableUpgradeable.d.ts b/typechain/IERC1822ProxiableUpgradeable.d.ts deleted file mode 100644 index e45277d..0000000 --- a/typechain/IERC1822ProxiableUpgradeable.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC1822ProxiableUpgradeableInterface extends ethers.utils.Interface { - functions: { - "proxiableUUID()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - - events: {}; -} - -export class IERC1822ProxiableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC1822ProxiableUpgradeableInterface; - - functions: { - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - }; - - proxiableUUID(overrides?: CallOverrides): Promise; - - callStatic: { - proxiableUUID(overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - proxiableUUID(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - proxiableUUID(overrides?: CallOverrides): Promise; - }; -} diff --git a/typechain/IIdentity.d.ts b/typechain/IIdentity.d.ts deleted file mode 100644 index 46c24a1..0000000 --- a/typechain/IIdentity.d.ts +++ /dev/null @@ -1,919 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IIdentityInterface extends ethers.utils.Interface { - functions: { - "addIdentityDeployer(string,address)": FunctionFragment; - "canonical(string)": FunctionFragment; - "finishMigrations()": FunctionFragment; - "getCommPublicKeyByIdentity(string)": FunctionFragment; - "getDevMode()": FunctionFragment; - "getIdentityByOwner(address)": FunctionFragment; - "getMaxHandleLength()": FunctionFragment; - "getOracleAddress()": FunctionFragment; - "getOwnerByIdentity(string)": FunctionFragment; - "ikvGet(string,string)": FunctionFragment; - "ikvImportKV(string,string,string,string)": FunctionFragment; - "ikvPut(string,string,string,string)": FunctionFragment; - "isIdentityDeployer(string,address)": FunctionFragment; - "register(string,address,bytes32,bytes32)": FunctionFragment; - "registerVerified(string,address,bytes32,bytes32,bytes32,uint8,bytes32,bytes32)": FunctionFragment; - "removeIdentityDeployer(string,address)": FunctionFragment; - "setDevMode(bool)": FunctionFragment; - "setMaxHandleLength(uint256)": FunctionFragment; - "setOracleAddress(address)": FunctionFragment; - "transferIdentityOwnership(string,address)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "addIdentityDeployer", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "canonical", values: [string]): string; - encodeFunctionData( - functionFragment: "finishMigrations", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCommPublicKeyByIdentity", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getDevMode", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getIdentityByOwner", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getMaxHandleLength", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getOracleAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getOwnerByIdentity", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "ikvGet", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "ikvImportKV", - values: [string, string, string, string] - ): string; - encodeFunctionData( - functionFragment: "ikvPut", - values: [string, string, string, string] - ): string; - encodeFunctionData( - functionFragment: "isIdentityDeployer", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "register", - values: [string, string, BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "registerVerified", - values: [ - string, - string, - BytesLike, - BytesLike, - BytesLike, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeIdentityDeployer", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "setDevMode", values: [boolean]): string; - encodeFunctionData( - functionFragment: "setMaxHandleLength", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setOracleAddress", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "transferIdentityOwnership", - values: [string, string] - ): string; - - decodeFunctionResult( - functionFragment: "addIdentityDeployer", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "canonical", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "finishMigrations", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCommPublicKeyByIdentity", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getDevMode", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getIdentityByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getMaxHandleLength", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getOracleAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getOwnerByIdentity", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ikvGet", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ikvImportKV", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ikvPut", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "isIdentityDeployer", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "register", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "registerVerified", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeIdentityDeployer", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setDevMode", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setMaxHandleLength", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setOracleAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferIdentityOwnership", - data: BytesLike - ): Result; - - events: { - "IKVSet(string,string,string,string)": EventFragment; - "IdentityDeployerChanged(string,address,bool)": EventFragment; - "IdentityOwnershipTransferred(string,address,address,uint256)": EventFragment; - "IdentityRegistered(string,address,tuple)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "IKVSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IdentityDeployerChanged"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "IdentityOwnershipTransferred" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "IdentityRegistered"): EventFragment; -} - -export type IKVSetEvent = TypedEvent< - [string, string, string, string] & { - identity: string; - key: string; - value: string; - version: string; - } ->; - -export type IdentityDeployerChangedEvent = TypedEvent< - [string, string, boolean] & { - identity: string; - deployer: string; - allowed: boolean; - } ->; - -export type IdentityOwnershipTransferredEvent = TypedEvent< - [string, string, string, BigNumber] & { - handle: string; - oldOwner: string; - newOwner: string; - date: BigNumber; - } ->; - -export type IdentityRegisteredEvent = TypedEvent< - [string, string, [string, string] & { part1: string; part2: string }] & { - handle: string; - identityOwner: string; - commPublicKey: [string, string] & { part1: string; part2: string }; - } ->; - -export class IIdentity extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IIdentityInterface; - - functions: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical( - anyCase: string, - overrides?: CallOverrides - ): Promise<[string] & { canonicalCase: string }>; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise< - [[string, string] & { part1: string; part2: string }] & { - commPublicKey: [string, string] & { part1: string; part2: string }; - } - >; - - getDevMode(overrides?: CallOverrides): Promise<[boolean]>; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise<[string] & { identity: string }>; - - getMaxHandleLength(overrides?: CallOverrides): Promise<[BigNumber]>; - - getOracleAddress(overrides?: CallOverrides): Promise<[string]>; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise<[string] & { value: string }>; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise<[boolean]>; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical(anyCase: string, overrides?: CallOverrides): Promise; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner(owner: string, overrides?: CallOverrides): Promise; - - getMaxHandleLength(overrides?: CallOverrides): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - canonical(anyCase: string, overrides?: CallOverrides): Promise; - - finishMigrations(overrides?: CallOverrides): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getMaxHandleLength(overrides?: CallOverrides): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: CallOverrides - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: CallOverrides - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: CallOverrides - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: CallOverrides - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - setDevMode(value: boolean, overrides?: CallOverrides): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - setOracleAddress(addr: string, overrides?: CallOverrides): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "IKVSet(string,string,string,string)"( - identity?: null, - key?: null, - value?: null, - version?: null - ): TypedEventFilter< - [string, string, string, string], - { identity: string; key: string; value: string; version: string } - >; - - IKVSet( - identity?: null, - key?: null, - value?: null, - version?: null - ): TypedEventFilter< - [string, string, string, string], - { identity: string; key: string; value: string; version: string } - >; - - "IdentityDeployerChanged(string,address,bool)"( - identity?: null, - deployer?: null, - allowed?: null - ): TypedEventFilter< - [string, string, boolean], - { identity: string; deployer: string; allowed: boolean } - >; - - IdentityDeployerChanged( - identity?: null, - deployer?: null, - allowed?: null - ): TypedEventFilter< - [string, string, boolean], - { identity: string; deployer: string; allowed: boolean } - >; - - "IdentityOwnershipTransferred(string,address,address,uint256)"( - handle?: string | null, - oldOwner?: string | null, - newOwner?: string | null, - date?: null - ): TypedEventFilter< - [string, string, string, BigNumber], - { handle: string; oldOwner: string; newOwner: string; date: BigNumber } - >; - - IdentityOwnershipTransferred( - handle?: string | null, - oldOwner?: string | null, - newOwner?: string | null, - date?: null - ): TypedEventFilter< - [string, string, string, BigNumber], - { handle: string; oldOwner: string; newOwner: string; date: BigNumber } - >; - - "IdentityRegistered(string,address,tuple)"( - handle?: null, - identityOwner?: null, - commPublicKey?: null - ): TypedEventFilter< - [string, string, [string, string] & { part1: string; part2: string }], - { - handle: string; - identityOwner: string; - commPublicKey: [string, string] & { part1: string; part2: string }; - } - >; - - IdentityRegistered( - handle?: null, - identityOwner?: null, - commPublicKey?: null - ): TypedEventFilter< - [string, string, [string, string] & { part1: string; part2: string }], - { - handle: string; - identityOwner: string; - commPublicKey: [string, string] & { part1: string; part2: string }; - } - >; - }; - - estimateGas: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical(anyCase: string, overrides?: CallOverrides): Promise; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getMaxHandleLength(overrides?: CallOverrides): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical( - anyCase: string, - overrides?: CallOverrides - ): Promise; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getMaxHandleLength( - overrides?: CallOverrides - ): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/typechain/Identity.d.ts b/typechain/Identity.d.ts deleted file mode 100644 index 30f4c08..0000000 --- a/typechain/Identity.d.ts +++ /dev/null @@ -1,1401 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - PayableOverrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IdentityInterface extends ethers.utils.Interface { - functions: { - "addIdentityDeployer(string,address)": FunctionFragment; - "canonical(string)": FunctionFragment; - "finishMigrations()": FunctionFragment; - "getCommPublicKeyByIdentity(string)": FunctionFragment; - "getDevMode()": FunctionFragment; - "getIdentityByOwner(address)": FunctionFragment; - "getMaxHandleLength()": FunctionFragment; - "getOracleAddress()": FunctionFragment; - "getOwnerByIdentity(string)": FunctionFragment; - "identityList(uint256)": FunctionFragment; - "identityToCommPublicKey(string)": FunctionFragment; - "identityToOwner(string)": FunctionFragment; - "ikv(string,string)": FunctionFragment; - "ikvGet(string,string)": FunctionFragment; - "ikvImportKV(string,string,string,string)": FunctionFragment; - "ikvList(string,uint256)": FunctionFragment; - "ikvPut(string,string,string,string)": FunctionFragment; - "initialize()": FunctionFragment; - "isIdentityDeployer(string,address)": FunctionFragment; - "lowercaseToCanonicalIdentities(string)": FunctionFragment; - "migrationApplied()": FunctionFragment; - "owner()": FunctionFragment; - "ownerToIdentity(address)": FunctionFragment; - "proxiableUUID()": FunctionFragment; - "register(string,address,bytes32,bytes32)": FunctionFragment; - "registerVerified(string,address,bytes32,bytes32,bytes32,uint8,bytes32,bytes32)": FunctionFragment; - "removeIdentityDeployer(string,address)": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setDevMode(bool)": FunctionFragment; - "setMaxHandleLength(uint256)": FunctionFragment; - "setOracleAddress(address)": FunctionFragment; - "transferIdentityOwnership(string,address)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "upgradeTo(address)": FunctionFragment; - "upgradeToAndCall(address,bytes)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "addIdentityDeployer", - values: [string, string] - ): string; - encodeFunctionData(functionFragment: "canonical", values: [string]): string; - encodeFunctionData( - functionFragment: "finishMigrations", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCommPublicKeyByIdentity", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getDevMode", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getIdentityByOwner", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getMaxHandleLength", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getOracleAddress", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getOwnerByIdentity", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "identityList", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "identityToCommPublicKey", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "identityToOwner", - values: [string] - ): string; - encodeFunctionData(functionFragment: "ikv", values: [string, string]): string; - encodeFunctionData( - functionFragment: "ikvGet", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "ikvImportKV", - values: [string, string, string, string] - ): string; - encodeFunctionData( - functionFragment: "ikvList", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "ikvPut", - values: [string, string, string, string] - ): string; - encodeFunctionData( - functionFragment: "initialize", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "isIdentityDeployer", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "lowercaseToCanonicalIdentities", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "migrationApplied", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "ownerToIdentity", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "register", - values: [string, string, BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "registerVerified", - values: [ - string, - string, - BytesLike, - BytesLike, - BytesLike, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "removeIdentityDeployer", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "setDevMode", values: [boolean]): string; - encodeFunctionData( - functionFragment: "setMaxHandleLength", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setOracleAddress", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "transferIdentityOwnership", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string; - encodeFunctionData( - functionFragment: "upgradeToAndCall", - values: [string, BytesLike] - ): string; - - decodeFunctionResult( - functionFragment: "addIdentityDeployer", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "canonical", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "finishMigrations", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCommPublicKeyByIdentity", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getDevMode", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getIdentityByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getMaxHandleLength", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getOracleAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getOwnerByIdentity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "identityList", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "identityToCommPublicKey", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "identityToOwner", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ikv", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ikvGet", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ikvImportKV", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "ikvList", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ikvPut", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "isIdentityDeployer", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "lowercaseToCanonicalIdentities", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "migrationApplied", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "ownerToIdentity", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "register", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "registerVerified", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "removeIdentityDeployer", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setDevMode", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "setMaxHandleLength", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setOracleAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferIdentityOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "upgradeToAndCall", - data: BytesLike - ): Result; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "IKVSet(string,string,string,string)": EventFragment; - "IdentityDeployerChanged(string,address,bool)": EventFragment; - "IdentityOwnershipTransferred(string,address,address,uint256)": EventFragment; - "IdentityRegistered(string,address,tuple)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Upgraded(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IKVSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "IdentityDeployerChanged"): EventFragment; - getEvent( - nameOrSignatureOrTopic: "IdentityOwnershipTransferred" - ): EventFragment; - getEvent(nameOrSignatureOrTopic: "IdentityRegistered"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; -} - -export type AdminChangedEvent = TypedEvent< - [string, string] & { previousAdmin: string; newAdmin: string } ->; - -export type BeaconUpgradedEvent = TypedEvent<[string] & { beacon: string }>; - -export type IKVSetEvent = TypedEvent< - [string, string, string, string] & { - identity: string; - key: string; - value: string; - version: string; - } ->; - -export type IdentityDeployerChangedEvent = TypedEvent< - [string, string, boolean] & { - identity: string; - deployer: string; - allowed: boolean; - } ->; - -export type IdentityOwnershipTransferredEvent = TypedEvent< - [string, string, string, BigNumber] & { - handle: string; - oldOwner: string; - newOwner: string; - date: BigNumber; - } ->; - -export type IdentityRegisteredEvent = TypedEvent< - [string, string, [string, string] & { part1: string; part2: string }] & { - handle: string; - identityOwner: string; - commPublicKey: [string, string] & { part1: string; part2: string }; - } ->; - -export type OwnershipTransferredEvent = TypedEvent< - [string, string] & { previousOwner: string; newOwner: string } ->; - -export type UpgradedEvent = TypedEvent<[string] & { implementation: string }>; - -export class Identity extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IdentityInterface; - - functions: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical( - anyCase: string, - overrides?: CallOverrides - ): Promise<[string] & { canonicalCase: string }>; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise< - [[string, string] & { part1: string; part2: string }] & { - commPublicKey: [string, string] & { part1: string; part2: string }; - } - >; - - getDevMode(overrides?: CallOverrides): Promise<[boolean]>; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise<[string] & { identity: string }>; - - getMaxHandleLength(overrides?: CallOverrides): Promise<[BigNumber]>; - - getOracleAddress(overrides?: CallOverrides): Promise<[string]>; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise<[string] & { owner: string }>; - - identityList( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise<[string]>; - - identityToCommPublicKey( - arg0: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - identityToOwner(arg0: string, overrides?: CallOverrides): Promise<[string]>; - - ikv( - arg0: string, - arg1: string, - overrides?: CallOverrides - ): Promise<[string]>; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise<[string] & { value: string }>; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvList( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[string]>; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - initialize( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise<[boolean]>; - - lowercaseToCanonicalIdentities( - arg0: string, - overrides?: CallOverrides - ): Promise<[string]>; - - migrationApplied(overrides?: CallOverrides): Promise<[boolean]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - ownerToIdentity(arg0: string, overrides?: CallOverrides): Promise<[string]>; - - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical(anyCase: string, overrides?: CallOverrides): Promise; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner(owner: string, overrides?: CallOverrides): Promise; - - getMaxHandleLength(overrides?: CallOverrides): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - identityList(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - identityToCommPublicKey( - arg0: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - identityToOwner(arg0: string, overrides?: CallOverrides): Promise; - - ikv(arg0: string, arg1: string, overrides?: CallOverrides): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvList( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - initialize( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - lowercaseToCanonicalIdentities( - arg0: string, - overrides?: CallOverrides - ): Promise; - - migrationApplied(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerToIdentity(arg0: string, overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - callStatic: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - canonical(anyCase: string, overrides?: CallOverrides): Promise; - - finishMigrations(overrides?: CallOverrides): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getMaxHandleLength(overrides?: CallOverrides): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - identityList( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - identityToCommPublicKey( - arg0: string, - overrides?: CallOverrides - ): Promise<[string, string] & { part1: string; part2: string }>; - - identityToOwner(arg0: string, overrides?: CallOverrides): Promise; - - ikv(arg0: string, arg1: string, overrides?: CallOverrides): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: CallOverrides - ): Promise; - - ikvList( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: CallOverrides - ): Promise; - - initialize(overrides?: CallOverrides): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - lowercaseToCanonicalIdentities( - arg0: string, - overrides?: CallOverrides - ): Promise; - - migrationApplied(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerToIdentity(arg0: string, overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: CallOverrides - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: CallOverrides - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setDevMode(value: boolean, overrides?: CallOverrides): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: CallOverrides - ): Promise; - - setOracleAddress(addr: string, overrides?: CallOverrides): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: CallOverrides - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - "BeaconUpgraded(address)"( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - BeaconUpgraded( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - "IKVSet(string,string,string,string)"( - identity?: null, - key?: null, - value?: null, - version?: null - ): TypedEventFilter< - [string, string, string, string], - { identity: string; key: string; value: string; version: string } - >; - - IKVSet( - identity?: null, - key?: null, - value?: null, - version?: null - ): TypedEventFilter< - [string, string, string, string], - { identity: string; key: string; value: string; version: string } - >; - - "IdentityDeployerChanged(string,address,bool)"( - identity?: null, - deployer?: null, - allowed?: null - ): TypedEventFilter< - [string, string, boolean], - { identity: string; deployer: string; allowed: boolean } - >; - - IdentityDeployerChanged( - identity?: null, - deployer?: null, - allowed?: null - ): TypedEventFilter< - [string, string, boolean], - { identity: string; deployer: string; allowed: boolean } - >; - - "IdentityOwnershipTransferred(string,address,address,uint256)"( - handle?: string | null, - oldOwner?: string | null, - newOwner?: string | null, - date?: null - ): TypedEventFilter< - [string, string, string, BigNumber], - { handle: string; oldOwner: string; newOwner: string; date: BigNumber } - >; - - IdentityOwnershipTransferred( - handle?: string | null, - oldOwner?: string | null, - newOwner?: string | null, - date?: null - ): TypedEventFilter< - [string, string, string, BigNumber], - { handle: string; oldOwner: string; newOwner: string; date: BigNumber } - >; - - "IdentityRegistered(string,address,tuple)"( - handle?: null, - identityOwner?: null, - commPublicKey?: null - ): TypedEventFilter< - [string, string, [string, string] & { part1: string; part2: string }], - { - handle: string; - identityOwner: string; - commPublicKey: [string, string] & { part1: string; part2: string }; - } - >; - - IdentityRegistered( - handle?: null, - identityOwner?: null, - commPublicKey?: null - ): TypedEventFilter< - [string, string, [string, string] & { part1: string; part2: string }], - { - handle: string; - identityOwner: string; - commPublicKey: [string, string] & { part1: string; part2: string }; - } - >; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - "Upgraded(address)"( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - - Upgraded( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - }; - - estimateGas: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical(anyCase: string, overrides?: CallOverrides): Promise; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getMaxHandleLength(overrides?: CallOverrides): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - identityList( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - identityToCommPublicKey( - arg0: string, - overrides?: CallOverrides - ): Promise; - - identityToOwner( - arg0: string, - overrides?: CallOverrides - ): Promise; - - ikv( - arg0: string, - arg1: string, - overrides?: CallOverrides - ): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvList( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - initialize( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - lowercaseToCanonicalIdentities( - arg0: string, - overrides?: CallOverrides - ): Promise; - - migrationApplied(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerToIdentity( - arg0: string, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - addIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - canonical( - anyCase: string, - overrides?: CallOverrides - ): Promise; - - finishMigrations( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getCommPublicKeyByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - getDevMode(overrides?: CallOverrides): Promise; - - getIdentityByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getMaxHandleLength( - overrides?: CallOverrides - ): Promise; - - getOracleAddress(overrides?: CallOverrides): Promise; - - getOwnerByIdentity( - identity: string, - overrides?: CallOverrides - ): Promise; - - identityList( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - identityToCommPublicKey( - arg0: string, - overrides?: CallOverrides - ): Promise; - - identityToOwner( - arg0: string, - overrides?: CallOverrides - ): Promise; - - ikv( - arg0: string, - arg1: string, - overrides?: CallOverrides - ): Promise; - - ikvGet( - identity: string, - key: string, - overrides?: CallOverrides - ): Promise; - - ikvImportKV( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - ikvList( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - ikvPut( - identity: string, - key: string, - value: string, - version: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - initialize( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isIdentityDeployer( - handle: string, - deployer: string, - overrides?: CallOverrides - ): Promise; - - lowercaseToCanonicalIdentities( - arg0: string, - overrides?: CallOverrides - ): Promise; - - migrationApplied(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerToIdentity( - arg0: string, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - register( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - registerVerified( - handle: string, - identityOwner: string, - commPublicKeyPart1: BytesLike, - commPublicKeyPart2: BytesLike, - _hashedMessage: BytesLike, - _v: BigNumberish, - _r: BytesLike, - _s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - removeIdentityDeployer( - handle: string, - deployer: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setDevMode( - value: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setMaxHandleLength( - value: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setOracleAddress( - addr: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferIdentityOwnership( - handle: string, - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/typechain/OwnableUpgradeable.d.ts b/typechain/OwnableUpgradeable.d.ts deleted file mode 100644 index ab63862..0000000 --- a/typechain/OwnableUpgradeable.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface OwnableUpgradeableInterface extends ethers.utils.Interface { - functions: { - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export type OwnershipTransferredEvent = TypedEvent< - [string, string] & { previousOwner: string; newOwner: string } ->; - -export class OwnableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: OwnableUpgradeableInterface; - - functions: { - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - }; - - estimateGas: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/typechain/PausableUpgradeable.d.ts b/typechain/PausableUpgradeable.d.ts deleted file mode 100644 index 992d1b0..0000000 --- a/typechain/PausableUpgradeable.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface PausableUpgradeableInterface extends ethers.utils.Interface { - functions: { - "paused()": FunctionFragment; - }; - - encodeFunctionData(functionFragment: "paused", values?: undefined): string; - - decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; - - events: { - "Paused(address)": EventFragment; - "Unpaused(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; -} - -export type PausedEvent = TypedEvent<[string] & { account: string }>; - -export type UnpausedEvent = TypedEvent<[string] & { account: string }>; - -export class PausableUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: PausableUpgradeableInterface; - - functions: { - paused(overrides?: CallOverrides): Promise<[boolean]>; - }; - - paused(overrides?: CallOverrides): Promise; - - callStatic: { - paused(overrides?: CallOverrides): Promise; - }; - - filters: { - "Paused(address)"( - account?: null - ): TypedEventFilter<[string], { account: string }>; - - Paused(account?: null): TypedEventFilter<[string], { account: string }>; - - "Unpaused(address)"( - account?: null - ): TypedEventFilter<[string], { account: string }>; - - Unpaused(account?: null): TypedEventFilter<[string], { account: string }>; - }; - - estimateGas: { - paused(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - paused(overrides?: CallOverrides): Promise; - }; -} diff --git a/typechain/PointSocial.d.ts b/typechain/PointSocial.d.ts deleted file mode 100644 index 043fcc7..0000000 --- a/typechain/PointSocial.d.ts +++ /dev/null @@ -1,2520 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - PayableOverrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface PointSocialInterface extends ethers.utils.Interface { - functions: { - "add(uint256,address,bytes32,bytes32,uint16,uint256)": FunctionFragment; - "addComment(uint256,uint256,address,bytes32,uint256)": FunctionFragment; - "addCommentToPost(uint256,bytes32)": FunctionFragment; - "addDislikeToPost(uint256)": FunctionFragment; - "addLikeToPost(uint256)": FunctionFragment; - "addMigrator(address)": FunctionFragment; - "addPost(bytes32,bytes32)": FunctionFragment; - "addProfile(address,bytes32,bytes32,bytes32,bytes32,bytes32)": FunctionFragment; - "checkDislikeToPost(uint256)": FunctionFragment; - "checkLikeToPost(uint256)": FunctionFragment; - "commentById(uint256)": FunctionFragment; - "commentIdsByOwner(address,uint256)": FunctionFragment; - "commentIdsByPost(uint256,uint256)": FunctionFragment; - "deleteCommentForPost(uint256,uint256)": FunctionFragment; - "deletePost(uint256)": FunctionFragment; - "dislikeById(uint256)": FunctionFragment; - "dislikeIdByUserAndPost(address,uint256)": FunctionFragment; - "dislikeIdsByPost(uint256,uint256)": FunctionFragment; - "dislikeIdsByUser(address,uint256)": FunctionFragment; - "doPause(bool)": FunctionFragment; - "editCommentForPost(uint256,bytes32)": FunctionFragment; - "editPost(uint256,bytes32,bytes32)": FunctionFragment; - "flagPost(uint256)": FunctionFragment; - "getAllCommentsForPost(uint256)": FunctionFragment; - "getAllPosts()": FunctionFragment; - "getAllPostsByOwner(address)": FunctionFragment; - "getAllPostsByOwnerLength(address)": FunctionFragment; - "getAllPostsLength()": FunctionFragment; - "getCommentById(uint256)": FunctionFragment; - "getPaginatedPosts(uint256,uint256)": FunctionFragment; - "getPaginatedPostsByOwner(address,uint256,uint256)": FunctionFragment; - "getPostById(uint256)": FunctionFragment; - "getPostDislikesQty(uint256)": FunctionFragment; - "getProfile(address)": FunctionFragment; - "initialize(address,string)": FunctionFragment; - "isDeployer()": FunctionFragment; - "likeById(uint256)": FunctionFragment; - "likeIdsByPost(uint256,uint256)": FunctionFragment; - "owner()": FunctionFragment; - "paused()": FunctionFragment; - "postById(uint256)": FunctionFragment; - "postIds(uint256)": FunctionFragment; - "postIdsByOwner(address,uint256)": FunctionFragment; - "postIsFlagged(uint256)": FunctionFragment; - "profileByOwner(address)": FunctionFragment; - "proxiableUUID()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setProfile(bytes32,bytes32,bytes32,bytes32,bytes32)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "upgradeTo(address)": FunctionFragment; - "upgradeToAndCall(address,bytes)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "add", - values: [ - BigNumberish, - string, - BytesLike, - BytesLike, - BigNumberish, - BigNumberish - ] - ): string; - encodeFunctionData( - functionFragment: "addComment", - values: [BigNumberish, BigNumberish, string, BytesLike, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "addCommentToPost", - values: [BigNumberish, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "addDislikeToPost", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "addLikeToPost", - values: [BigNumberish] - ): string; - encodeFunctionData(functionFragment: "addMigrator", values: [string]): string; - encodeFunctionData( - functionFragment: "addPost", - values: [BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "addProfile", - values: [string, BytesLike, BytesLike, BytesLike, BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "checkDislikeToPost", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "checkLikeToPost", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "commentById", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "commentIdsByOwner", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "commentIdsByPost", - values: [BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "deleteCommentForPost", - values: [BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "deletePost", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "dislikeById", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "dislikeIdByUserAndPost", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "dislikeIdsByPost", - values: [BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "dislikeIdsByUser", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "doPause", values: [boolean]): string; - encodeFunctionData( - functionFragment: "editCommentForPost", - values: [BigNumberish, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "editPost", - values: [BigNumberish, BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "flagPost", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAllCommentsForPost", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getAllPosts", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getAllPostsByOwner", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getAllPostsByOwnerLength", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getAllPostsLength", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getCommentById", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPaginatedPosts", - values: [BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPaginatedPostsByOwner", - values: [string, BigNumberish, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPostById", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPostDislikesQty", - values: [BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getProfile", values: [string]): string; - encodeFunctionData( - functionFragment: "initialize", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "isDeployer", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "likeById", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "likeIdsByPost", - values: [BigNumberish, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData(functionFragment: "paused", values?: undefined): string; - encodeFunctionData( - functionFragment: "postById", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "postIds", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "postIdsByOwner", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "postIsFlagged", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "profileByOwner", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setProfile", - values: [BytesLike, BytesLike, BytesLike, BytesLike, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string; - encodeFunctionData( - functionFragment: "upgradeToAndCall", - values: [string, BytesLike] - ): string; - - decodeFunctionResult(functionFragment: "add", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addComment", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "addCommentToPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addDislikeToPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addLikeToPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addMigrator", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "addPost", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "addProfile", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "checkDislikeToPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkLikeToPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "commentById", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "commentIdsByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "commentIdsByPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "deleteCommentForPost", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "deletePost", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "dislikeById", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "dislikeIdByUserAndPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "dislikeIdsByPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "dislikeIdsByUser", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "doPause", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "editCommentForPost", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "editPost", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "flagPost", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getAllCommentsForPost", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAllPosts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAllPostsByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAllPostsByOwnerLength", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getAllPostsLength", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getCommentById", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPaginatedPosts", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPaginatedPostsByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPostById", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPostDislikesQty", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getProfile", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "isDeployer", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "likeById", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "likeIdsByPost", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "postById", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "postIds", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "postIdsByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "postIsFlagged", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "profileByOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setProfile", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "upgradeToAndCall", - data: BytesLike - ): Result; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Paused(address)": EventFragment; - "ProfileChange(address,uint256)": EventFragment; - "StateChange(uint256,address,uint256,uint8,uint8)": EventFragment; - "Unpaused(address)": EventFragment; - "Upgraded(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ProfileChange"): EventFragment; - getEvent(nameOrSignatureOrTopic: "StateChange"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; -} - -export type AdminChangedEvent = TypedEvent< - [string, string] & { previousAdmin: string; newAdmin: string } ->; - -export type BeaconUpgradedEvent = TypedEvent<[string] & { beacon: string }>; - -export type OwnershipTransferredEvent = TypedEvent< - [string, string] & { previousOwner: string; newOwner: string } ->; - -export type PausedEvent = TypedEvent<[string] & { account: string }>; - -export type ProfileChangeEvent = TypedEvent< - [string, BigNumber] & { from: string; date: BigNumber } ->; - -export type StateChangeEvent = TypedEvent< - [BigNumber, string, BigNumber, number, number] & { - id: BigNumber; - from: string; - date: BigNumber; - component: number; - action: number; - } ->; - -export type UnpausedEvent = TypedEvent<[string] & { account: string }>; - -export type UpgradedEvent = TypedEvent<[string] & { implementation: string }>; - -export class PointSocial extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: PointSocialInterface; - - functions: { - add( - id: BigNumberish, - author: string, - contents: BytesLike, - image: BytesLike, - likesCount: BigNumberish, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addComment( - id: BigNumberish, - postId: BigNumberish, - author: string, - contents: BytesLike, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addCommentToPost( - postId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addDislikeToPost( - _postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLikeToPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addMigrator( - migrator: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addPost( - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addProfile( - user: string, - name: BytesLike, - location: BytesLike, - about: BytesLike, - avatar: BytesLike, - banner: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkDislikeToPost( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise<[boolean]>; - - checkLikeToPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise<[boolean]>; - - commentById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - } - >; - - commentIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - commentIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - deleteCommentForPost( - postId: BigNumberish, - commentId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - deletePost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - dislikeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, string, BigNumber, boolean] & { - id: BigNumber; - post: BigNumber; - from: string; - createdAt: BigNumber; - active: boolean; - } - >; - - dislikeIdByUserAndPost( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - dislikeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - dislikeIdsByUser( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - doPause( - shouldPause: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editCommentForPost( - commentId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editPost( - postId: BigNumberish, - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - flagPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getAllCommentsForPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - ([BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - })[] - ] - >; - - getAllPosts( - overrides?: CallOverrides - ): Promise< - [ - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - ] - >; - - getAllPostsByOwner( - owner: string, - overrides?: CallOverrides - ): Promise< - [ - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - ] - >; - - getAllPostsByOwnerLength( - owner: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getAllPostsLength(overrides?: CallOverrides): Promise<[BigNumber]>; - - getCommentById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - [BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - } - ] - >; - - getPaginatedPosts( - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - ] - >; - - getPaginatedPostsByOwner( - owner: string, - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - ] - >; - - getPostById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - [ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - } - ] - >; - - getPostDislikesQty( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getProfile( - id_: string, - overrides?: CallOverrides - ): Promise< - [ - [string, string, string, string, string] & { - displayName: string; - displayLocation: string; - displayAbout: string; - avatar: string; - banner: string; - } - ] - >; - - initialize( - identityContractAddr: string, - identityHandle: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isDeployer(overrides?: CallOverrides): Promise<[boolean]>; - - likeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, BigNumber] & { - id: BigNumber; - from: string; - createdAt: BigNumber; - } - >; - - likeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - paused(overrides?: CallOverrides): Promise<[boolean]>; - - postById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, string, BigNumber, number, number] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - } - >; - - postIds( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - postIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - postIsFlagged( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise<[boolean]>; - - profileByOwner( - arg0: string, - overrides?: CallOverrides - ): Promise< - [string, string, string, string, string] & { - displayName: string; - displayLocation: string; - displayAbout: string; - avatar: string; - banner: string; - } - >; - - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setProfile( - name_: BytesLike, - location_: BytesLike, - about_: BytesLike, - avatar_: BytesLike, - banner_: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - add( - id: BigNumberish, - author: string, - contents: BytesLike, - image: BytesLike, - likesCount: BigNumberish, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addComment( - id: BigNumberish, - postId: BigNumberish, - author: string, - contents: BytesLike, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addCommentToPost( - postId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addDislikeToPost( - _postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLikeToPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addMigrator( - migrator: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addPost( - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addProfile( - user: string, - name: BytesLike, - location: BytesLike, - about: BytesLike, - avatar: BytesLike, - banner: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkDislikeToPost( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - checkLikeToPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - } - >; - - commentIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - deleteCommentForPost( - postId: BigNumberish, - commentId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - deletePost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - dislikeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, string, BigNumber, boolean] & { - id: BigNumber; - post: BigNumber; - from: string; - createdAt: BigNumber; - active: boolean; - } - >; - - dislikeIdByUserAndPost( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByUser( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - doPause( - shouldPause: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editCommentForPost( - commentId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editPost( - postId: BigNumberish, - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - flagPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getAllCommentsForPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise< - ([BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - })[] - >; - - getAllPosts( - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getAllPostsByOwner( - owner: string, - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getAllPostsByOwnerLength( - owner: string, - overrides?: CallOverrides - ): Promise; - - getAllPostsLength(overrides?: CallOverrides): Promise; - - getCommentById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - } - >; - - getPaginatedPosts( - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getPaginatedPostsByOwner( - owner: string, - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getPostById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - } - >; - - getPostDislikesQty( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getProfile( - id_: string, - overrides?: CallOverrides - ): Promise< - [string, string, string, string, string] & { - displayName: string; - displayLocation: string; - displayAbout: string; - avatar: string; - banner: string; - } - >; - - initialize( - identityContractAddr: string, - identityHandle: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isDeployer(overrides?: CallOverrides): Promise; - - likeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, BigNumber] & { - id: BigNumber; - from: string; - createdAt: BigNumber; - } - >; - - likeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - postById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, string, BigNumber, number, number] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - } - >; - - postIds(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - postIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - postIsFlagged( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - profileByOwner( - arg0: string, - overrides?: CallOverrides - ): Promise< - [string, string, string, string, string] & { - displayName: string; - displayLocation: string; - displayAbout: string; - avatar: string; - banner: string; - } - >; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setProfile( - name_: BytesLike, - location_: BytesLike, - about_: BytesLike, - avatar_: BytesLike, - banner_: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - callStatic: { - add( - id: BigNumberish, - author: string, - contents: BytesLike, - image: BytesLike, - likesCount: BigNumberish, - createdAt: BigNumberish, - overrides?: CallOverrides - ): Promise; - - addComment( - id: BigNumberish, - postId: BigNumberish, - author: string, - contents: BytesLike, - createdAt: BigNumberish, - overrides?: CallOverrides - ): Promise; - - addCommentToPost( - postId: BigNumberish, - contents: BytesLike, - overrides?: CallOverrides - ): Promise; - - addDislikeToPost( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - addLikeToPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - addMigrator(migrator: string, overrides?: CallOverrides): Promise; - - addPost( - contents: BytesLike, - image: BytesLike, - overrides?: CallOverrides - ): Promise; - - addProfile( - user: string, - name: BytesLike, - location: BytesLike, - about: BytesLike, - avatar: BytesLike, - banner: BytesLike, - overrides?: CallOverrides - ): Promise; - - checkDislikeToPost( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - checkLikeToPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - } - >; - - commentIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - deleteCommentForPost( - postId: BigNumberish, - commentId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - deletePost(postId: BigNumberish, overrides?: CallOverrides): Promise; - - dislikeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, BigNumber, string, BigNumber, boolean] & { - id: BigNumber; - post: BigNumber; - from: string; - createdAt: BigNumber; - active: boolean; - } - >; - - dislikeIdByUserAndPost( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByUser( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - doPause(shouldPause: boolean, overrides?: CallOverrides): Promise; - - editCommentForPost( - commentId: BigNumberish, - contents: BytesLike, - overrides?: CallOverrides - ): Promise; - - editPost( - postId: BigNumberish, - contents: BytesLike, - image: BytesLike, - overrides?: CallOverrides - ): Promise; - - flagPost(postId: BigNumberish, overrides?: CallOverrides): Promise; - - getAllCommentsForPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise< - ([BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - })[] - >; - - getAllPosts( - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getAllPostsByOwner( - owner: string, - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getAllPostsByOwnerLength( - owner: string, - overrides?: CallOverrides - ): Promise; - - getAllPostsLength(overrides?: CallOverrides): Promise; - - getCommentById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, BigNumber] & { - id: BigNumber; - from: string; - contents: string; - createdAt: BigNumber; - } - >; - - getPaginatedPosts( - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getPaginatedPostsByOwner( - owner: string, - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise< - ([ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - })[] - >; - - getPostById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise< - [ - BigNumber, - string, - string, - string, - BigNumber, - number, - number, - BigNumber, - boolean, - boolean - ] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - dislikesCount: BigNumber; - liked: boolean; - disliked: boolean; - } - >; - - getPostDislikesQty( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getProfile( - id_: string, - overrides?: CallOverrides - ): Promise< - [string, string, string, string, string] & { - displayName: string; - displayLocation: string; - displayAbout: string; - avatar: string; - banner: string; - } - >; - - initialize( - identityContractAddr: string, - identityHandle: string, - overrides?: CallOverrides - ): Promise; - - isDeployer(overrides?: CallOverrides): Promise; - - likeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, BigNumber] & { - id: BigNumber; - from: string; - createdAt: BigNumber; - } - >; - - likeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - postById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise< - [BigNumber, string, string, string, BigNumber, number, number] & { - id: BigNumber; - from: string; - contents: string; - image: string; - createdAt: BigNumber; - likesCount: number; - commentsCount: number; - } - >; - - postIds(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - postIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - postIsFlagged( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - profileByOwner( - arg0: string, - overrides?: CallOverrides - ): Promise< - [string, string, string, string, string] & { - displayName: string; - displayLocation: string; - displayAbout: string; - avatar: string; - banner: string; - } - >; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setProfile( - name_: BytesLike, - location_: BytesLike, - about_: BytesLike, - avatar_: BytesLike, - banner_: BytesLike, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: CallOverrides - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - "BeaconUpgraded(address)"( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - BeaconUpgraded( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - "Paused(address)"( - account?: null - ): TypedEventFilter<[string], { account: string }>; - - Paused(account?: null): TypedEventFilter<[string], { account: string }>; - - "ProfileChange(address,uint256)"( - from?: string | null, - date?: BigNumberish | null - ): TypedEventFilter<[string, BigNumber], { from: string; date: BigNumber }>; - - ProfileChange( - from?: string | null, - date?: BigNumberish | null - ): TypedEventFilter<[string, BigNumber], { from: string; date: BigNumber }>; - - "StateChange(uint256,address,uint256,uint8,uint8)"( - id?: BigNumberish | null, - from?: null, - date?: null, - component?: BigNumberish | null, - action?: BigNumberish | null - ): TypedEventFilter< - [BigNumber, string, BigNumber, number, number], - { - id: BigNumber; - from: string; - date: BigNumber; - component: number; - action: number; - } - >; - - StateChange( - id?: BigNumberish | null, - from?: null, - date?: null, - component?: BigNumberish | null, - action?: BigNumberish | null - ): TypedEventFilter< - [BigNumber, string, BigNumber, number, number], - { - id: BigNumber; - from: string; - date: BigNumber; - component: number; - action: number; - } - >; - - "Unpaused(address)"( - account?: null - ): TypedEventFilter<[string], { account: string }>; - - Unpaused(account?: null): TypedEventFilter<[string], { account: string }>; - - "Upgraded(address)"( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - - Upgraded( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - }; - - estimateGas: { - add( - id: BigNumberish, - author: string, - contents: BytesLike, - image: BytesLike, - likesCount: BigNumberish, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addComment( - id: BigNumberish, - postId: BigNumberish, - author: string, - contents: BytesLike, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addCommentToPost( - postId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addDislikeToPost( - _postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLikeToPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addMigrator( - migrator: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addPost( - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addProfile( - user: string, - name: BytesLike, - location: BytesLike, - about: BytesLike, - avatar: BytesLike, - banner: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkDislikeToPost( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - checkLikeToPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - deleteCommentForPost( - postId: BigNumberish, - commentId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - deletePost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - dislikeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdByUserAndPost( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByUser( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - doPause( - shouldPause: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editCommentForPost( - commentId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editPost( - postId: BigNumberish, - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - flagPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getAllCommentsForPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAllPosts(overrides?: CallOverrides): Promise; - - getAllPostsByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getAllPostsByOwnerLength( - owner: string, - overrides?: CallOverrides - ): Promise; - - getAllPostsLength(overrides?: CallOverrides): Promise; - - getCommentById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPaginatedPosts( - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPaginatedPostsByOwner( - owner: string, - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPostById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPostDislikesQty( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getProfile(id_: string, overrides?: CallOverrides): Promise; - - initialize( - identityContractAddr: string, - identityHandle: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isDeployer(overrides?: CallOverrides): Promise; - - likeById(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - likeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - postById(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - postIds(arg0: BigNumberish, overrides?: CallOverrides): Promise; - - postIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - postIsFlagged( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - profileByOwner(arg0: string, overrides?: CallOverrides): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setProfile( - name_: BytesLike, - location_: BytesLike, - about_: BytesLike, - avatar_: BytesLike, - banner_: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - add( - id: BigNumberish, - author: string, - contents: BytesLike, - image: BytesLike, - likesCount: BigNumberish, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addComment( - id: BigNumberish, - postId: BigNumberish, - author: string, - contents: BytesLike, - createdAt: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addCommentToPost( - postId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addDislikeToPost( - _postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addLikeToPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addMigrator( - migrator: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addPost( - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - addProfile( - user: string, - name: BytesLike, - location: BytesLike, - about: BytesLike, - avatar: BytesLike, - banner: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkDislikeToPost( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - checkLikeToPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - commentIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - deleteCommentForPost( - postId: BigNumberish, - commentId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - deletePost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - dislikeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdByUserAndPost( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - dislikeIdsByUser( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - doPause( - shouldPause: boolean, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editCommentForPost( - commentId: BigNumberish, - contents: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - editPost( - postId: BigNumberish, - contents: BytesLike, - image: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - flagPost( - postId: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - getAllCommentsForPost( - postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getAllPosts(overrides?: CallOverrides): Promise; - - getAllPostsByOwner( - owner: string, - overrides?: CallOverrides - ): Promise; - - getAllPostsByOwnerLength( - owner: string, - overrides?: CallOverrides - ): Promise; - - getAllPostsLength(overrides?: CallOverrides): Promise; - - getCommentById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPaginatedPosts( - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPaginatedPostsByOwner( - owner: string, - cursor: BigNumberish, - howMany: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPostById( - id: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPostDislikesQty( - _postId: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getProfile( - id_: string, - overrides?: CallOverrides - ): Promise; - - initialize( - identityContractAddr: string, - identityHandle: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - isDeployer(overrides?: CallOverrides): Promise; - - likeById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - likeIdsByPost( - arg0: BigNumberish, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - paused(overrides?: CallOverrides): Promise; - - postById( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - postIds( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - postIdsByOwner( - arg0: string, - arg1: BigNumberish, - overrides?: CallOverrides - ): Promise; - - postIsFlagged( - arg0: BigNumberish, - overrides?: CallOverrides - ): Promise; - - profileByOwner( - arg0: string, - overrides?: CallOverrides - ): Promise; - - proxiableUUID(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setProfile( - name_: BytesLike, - location_: BytesLike, - about_: BytesLike, - avatar_: BytesLike, - banner_: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/typechain/UUPSUpgradeable.d.ts b/typechain/UUPSUpgradeable.d.ts deleted file mode 100644 index d94fb19..0000000 --- a/typechain/UUPSUpgradeable.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - PayableOverrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface UUPSUpgradeableInterface extends ethers.utils.Interface { - functions: { - "proxiableUUID()": FunctionFragment; - "upgradeTo(address)": FunctionFragment; - "upgradeToAndCall(address,bytes)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "proxiableUUID", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string; - encodeFunctionData( - functionFragment: "upgradeToAndCall", - values: [string, BytesLike] - ): string; - - decodeFunctionResult( - functionFragment: "proxiableUUID", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "upgradeToAndCall", - data: BytesLike - ): Result; - - events: { - "AdminChanged(address,address)": EventFragment; - "BeaconUpgraded(address)": EventFragment; - "Upgraded(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; -} - -export type AdminChangedEvent = TypedEvent< - [string, string] & { previousAdmin: string; newAdmin: string } ->; - -export type BeaconUpgradedEvent = TypedEvent<[string] & { beacon: string }>; - -export type UpgradedEvent = TypedEvent<[string] & { implementation: string }>; - -export class UUPSUpgradeable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: UUPSUpgradeableInterface; - - functions: { - proxiableUUID(overrides?: CallOverrides): Promise<[string]>; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - proxiableUUID(overrides?: CallOverrides): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - - callStatic: { - proxiableUUID(overrides?: CallOverrides): Promise; - - upgradeTo( - newImplementation: string, - overrides?: CallOverrides - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AdminChanged(address,address)"( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - AdminChanged( - previousAdmin?: null, - newAdmin?: null - ): TypedEventFilter< - [string, string], - { previousAdmin: string; newAdmin: string } - >; - - "BeaconUpgraded(address)"( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - BeaconUpgraded( - beacon?: string | null - ): TypedEventFilter<[string], { beacon: string }>; - - "Upgraded(address)"( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - - Upgraded( - implementation?: string | null - ): TypedEventFilter<[string], { implementation: string }>; - }; - - estimateGas: { - proxiableUUID(overrides?: CallOverrides): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - proxiableUUID(overrides?: CallOverrides): Promise; - - upgradeTo( - newImplementation: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - upgradeToAndCall( - newImplementation: string, - data: BytesLike, - overrides?: PayableOverrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/typechain/common.d.ts b/typechain/common.d.ts deleted file mode 100644 index fc93782..0000000 --- a/typechain/common.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { EventFilter, Event } from "ethers"; -import { Result } from "@ethersproject/abi"; - -export interface TypedEventFilter<_EventArgsArray, _EventArgsObject> - extends EventFilter {} - -export interface TypedEvent extends Event { - args: EventArgs; -} - -export type TypedListener< - EventArgsArray extends Array, - EventArgsObject -> = ( - ...listenerArg: [ - ...EventArgsArray, - TypedEvent - ] -) => void; - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; -export type GetContractTypeFromFactory = F extends MinEthersFactory< - infer C, - any -> - ? C - : never; -export type GetARGsTypeFromFactory = F extends MinEthersFactory - ? Parameters - : never; diff --git a/typechain/factories/ERC1967UpgradeUpgradeable__factory.ts b/typechain/factories/ERC1967UpgradeUpgradeable__factory.ts deleted file mode 100644 index 0a85464..0000000 --- a/typechain/factories/ERC1967UpgradeUpgradeable__factory.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - ERC1967UpgradeUpgradeable, - ERC1967UpgradeUpgradeableInterface, -} from "../ERC1967UpgradeUpgradeable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "previousAdmin", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "AdminChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "beacon", - type: "address", - }, - ], - name: "BeaconUpgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, -]; - -export class ERC1967UpgradeUpgradeable__factory { - static readonly abi = _abi; - static createInterface(): ERC1967UpgradeUpgradeableInterface { - return new utils.Interface(_abi) as ERC1967UpgradeUpgradeableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ERC1967UpgradeUpgradeable { - return new Contract( - address, - _abi, - signerOrProvider - ) as ERC1967UpgradeUpgradeable; - } -} diff --git a/typechain/factories/IBeaconUpgradeable__factory.ts b/typechain/factories/IBeaconUpgradeable__factory.ts deleted file mode 100644 index 0000fa3..0000000 --- a/typechain/factories/IBeaconUpgradeable__factory.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - IBeaconUpgradeable, - IBeaconUpgradeableInterface, -} from "../IBeaconUpgradeable"; - -const _abi = [ - { - inputs: [], - name: "implementation", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IBeaconUpgradeable__factory { - static readonly abi = _abi; - static createInterface(): IBeaconUpgradeableInterface { - return new utils.Interface(_abi) as IBeaconUpgradeableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IBeaconUpgradeable { - return new Contract(address, _abi, signerOrProvider) as IBeaconUpgradeable; - } -} diff --git a/typechain/factories/IERC1822ProxiableUpgradeable__factory.ts b/typechain/factories/IERC1822ProxiableUpgradeable__factory.ts deleted file mode 100644 index e07d845..0000000 --- a/typechain/factories/IERC1822ProxiableUpgradeable__factory.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - IERC1822ProxiableUpgradeable, - IERC1822ProxiableUpgradeableInterface, -} from "../IERC1822ProxiableUpgradeable"; - -const _abi = [ - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IERC1822ProxiableUpgradeable__factory { - static readonly abi = _abi; - static createInterface(): IERC1822ProxiableUpgradeableInterface { - return new utils.Interface(_abi) as IERC1822ProxiableUpgradeableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC1822ProxiableUpgradeable { - return new Contract( - address, - _abi, - signerOrProvider - ) as IERC1822ProxiableUpgradeable; - } -} diff --git a/typechain/factories/IIdentity__factory.ts b/typechain/factories/IIdentity__factory.ts deleted file mode 100644 index 365d321..0000000 --- a/typechain/factories/IIdentity__factory.ts +++ /dev/null @@ -1,554 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IIdentity, IIdentityInterface } from "../IIdentity"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "identity", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "key", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "value", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "version", - type: "string", - }, - ], - name: "IKVSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "identity", - type: "string", - }, - { - indexed: false, - internalType: "address", - name: "deployer", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "allowed", - type: "bool", - }, - ], - name: "IdentityDeployerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "string", - name: "handle", - type: "string", - }, - { - indexed: true, - internalType: "address", - name: "oldOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "date", - type: "uint256", - }, - ], - name: "IdentityOwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "handle", - type: "string", - }, - { - indexed: false, - internalType: "address", - name: "identityOwner", - type: "address", - }, - { - components: [ - { - internalType: "bytes32", - name: "part1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "part2", - type: "bytes32", - }, - ], - indexed: false, - internalType: "struct IIdentity.PubKey64", - name: "commPublicKey", - type: "tuple", - }, - ], - name: "IdentityRegistered", - type: "event", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "deployer", - type: "address", - }, - ], - name: "addIdentityDeployer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "anyCase", - type: "string", - }, - ], - name: "canonical", - outputs: [ - { - internalType: "string", - name: "canonicalCase", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "finishMigrations", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - ], - name: "getCommPublicKeyByIdentity", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "part1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "part2", - type: "bytes32", - }, - ], - internalType: "struct IIdentity.PubKey64", - name: "commPublicKey", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getDevMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "getIdentityByOwner", - outputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getMaxHandleLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getOracleAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - ], - name: "getOwnerByIdentity", - outputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "key", - type: "string", - }, - ], - name: "ikvGet", - outputs: [ - { - internalType: "string", - name: "value", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - ], - name: "ikvImportKV", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - ], - name: "ikvPut", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "deployer", - type: "address", - }, - ], - name: "isIdentityDeployer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "identityOwner", - type: "address", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart2", - type: "bytes32", - }, - ], - name: "register", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "identityOwner", - type: "address", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart2", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_hashedMessage", - type: "bytes32", - }, - { - internalType: "uint8", - name: "_v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "_r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_s", - type: "bytes32", - }, - ], - name: "registerVerified", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "deployer", - type: "address", - }, - ], - name: "removeIdentityDeployer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - name: "setDevMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "setMaxHandleLength", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "addr", - type: "address", - }, - ], - name: "setOracleAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferIdentityOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IIdentity__factory { - static readonly abi = _abi; - static createInterface(): IIdentityInterface { - return new utils.Interface(_abi) as IIdentityInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IIdentity { - return new Contract(address, _abi, signerOrProvider) as IIdentity; - } -} diff --git a/typechain/factories/Identity__factory.ts b/typechain/factories/Identity__factory.ts deleted file mode 100644 index 707636a..0000000 --- a/typechain/factories/Identity__factory.ts +++ /dev/null @@ -1,893 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { Identity, IdentityInterface } from "../Identity"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "previousAdmin", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "AdminChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "beacon", - type: "address", - }, - ], - name: "BeaconUpgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "identity", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "key", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "value", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "version", - type: "string", - }, - ], - name: "IKVSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "identity", - type: "string", - }, - { - indexed: false, - internalType: "address", - name: "deployer", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "allowed", - type: "bool", - }, - ], - name: "IdentityDeployerChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "string", - name: "handle", - type: "string", - }, - { - indexed: true, - internalType: "address", - name: "oldOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "date", - type: "uint256", - }, - ], - name: "IdentityOwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "handle", - type: "string", - }, - { - indexed: false, - internalType: "address", - name: "identityOwner", - type: "address", - }, - { - components: [ - { - internalType: "bytes32", - name: "part1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "part2", - type: "bytes32", - }, - ], - indexed: false, - internalType: "struct IIdentity.PubKey64", - name: "commPublicKey", - type: "tuple", - }, - ], - name: "IdentityRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "deployer", - type: "address", - }, - ], - name: "addIdentityDeployer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "anyCase", - type: "string", - }, - ], - name: "canonical", - outputs: [ - { - internalType: "string", - name: "canonicalCase", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "finishMigrations", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - ], - name: "getCommPublicKeyByIdentity", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "part1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "part2", - type: "bytes32", - }, - ], - internalType: "struct IIdentity.PubKey64", - name: "commPublicKey", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getDevMode", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "getIdentityByOwner", - outputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getMaxHandleLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getOracleAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - ], - name: "getOwnerByIdentity", - outputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "identityList", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - name: "identityToCommPublicKey", - outputs: [ - { - internalType: "bytes32", - name: "part1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "part2", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - name: "identityToOwner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - { - internalType: "string", - name: "", - type: "string", - }, - ], - name: "ikv", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "key", - type: "string", - }, - ], - name: "ikvGet", - outputs: [ - { - internalType: "string", - name: "value", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - ], - name: "ikvImportKV", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "ikvList", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "string", - name: "value", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - ], - name: "ikvPut", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "deployer", - type: "address", - }, - ], - name: "isIdentityDeployer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - name: "lowercaseToCanonicalIdentities", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "migrationApplied", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "ownerToIdentity", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "identityOwner", - type: "address", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart2", - type: "bytes32", - }, - ], - name: "register", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "identityOwner", - type: "address", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart1", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "commPublicKeyPart2", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_hashedMessage", - type: "bytes32", - }, - { - internalType: "uint8", - name: "_v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "_r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "_s", - type: "bytes32", - }, - ], - name: "registerVerified", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "deployer", - type: "address", - }, - ], - name: "removeIdentityDeployer", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "value", - type: "bool", - }, - ], - name: "setDevMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "setMaxHandleLength", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "addr", - type: "address", - }, - ], - name: "setOracleAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "string", - name: "handle", - type: "string", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferIdentityOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, -]; - -const _bytecode = - "0x60a06040523060601b60805234801561001757600080fd5b5060805160601c613c1b610060600039600081816109a801528181610a2d01528181610c6201528181610ce701528181610e9f0152818161134001526113c50152613c1b6000f3fe6080604052600436106102345760003560e01c80637e038b7b11610138578063b203df40116100b0578063c5624f661161007f578063e5833a6511610064578063e5833a65146106a5578063f2fde38b146106c5578063f563b82c146106e557600080fd5b8063c5624f6614610631578063d7f428111461065157600080fd5b8063b203df40146105bc578063b42e4d1f146105dc578063bc8c700e146105fc578063c1a92f031461061157600080fd5b8063860b8d80116101075780638fd1086b116100ec5780638fd1086b1461055f578063af1d5e481461057e578063b18b78dd1461059e57600080fd5b8063860b8d80146105215780638da5cb5b1461054157600080fd5b80637e038b7b146104ac5780638129fc1c146104cc578063842a4127146104e157806384811c2f1461050157600080fd5b80634f564f0a116101cb57806369b131001161019a5780637ab42dc41161017f5780637ab42dc41461044c5780637c897da21461046c5780637d72f8ad1461048c57600080fd5b806369b1310014610417578063715018a61461043757600080fd5b80634f564f0a1461038757806352d1902d146103a75780635c2897df146103ca5780635d1ff9e6146103ea57600080fd5b80633c764593116102075780633c764593146102fd578063474cf5b51461032a5780634c69c00f146103545780634f1ef2861461037457600080fd5b806304bf8d2c14610239578063072152161461029757806329e424c8146102bd5780633659cfe6146102dd575b600080fd5b34801561024557600080fd5b5061027a610254366004613674565b805160208183018101805160c9825292820191909301209152546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102a357600080fd5b506102bb60d0805460ff19166001179055601060d155565b005b3480156102c957600080fd5b506102bb6102d83660046136a9565b610705565b3480156102e957600080fd5b506102bb6102f83660046134b7565b61099d565b34801561030957600080fd5b5061031d6103183660046136f7565b610b19565b60405161028e9190613992565b34801561033657600080fd5b5060d0546103449060ff1681565b604051901515815260200161028e565b34801561036057600080fd5b506102bb61036f3660046134b7565b610bdb565b6102bb6103823660046134d2565b610c57565b34801561039357600080fd5b5061031d6103a23660046136f7565b610dc4565b3480156103b357600080fd5b506103bc610e92565b60405190815260200161028e565b3480156103d657600080fd5b5061031d6103e5366004613674565b610f57565b3480156103f657600080fd5b5061040a610405366004613674565b611015565b60405161028e9190613a6b565b34801561042357600080fd5b5061027a610432366004613674565b61106d565b34801561044357600080fd5b506102bb6110a6565b34801561045857600080fd5b5061031d6104673660046137fe565b61110c565b34801561047857600080fd5b506102bb610487366004613534565b611153565b34801561049857600080fd5b5061031d6104a7366004613674565b6111e6565b3480156104b857600080fd5b506102bb6104c736600461356f565b61120a565b3480156104d857600080fd5b506102bb611282565b3480156104ed57600080fd5b506102bb6104fc366004613751565b6114fa565b34801561050d57600080fd5b5061031d61051c366004613843565b61155f565b34801561052d57600080fd5b506102bb61053c366004613751565b61158a565b34801561054d57600080fd5b506097546001600160a01b031661027a565b34801561056b57600080fd5b5060d354600160a01b900460ff16610344565b34801561058a57600080fd5b506103446105993660046136a9565b61166a565b3480156105aa57600080fd5b5060d3546001600160a01b031661027a565b3480156105c857600080fd5b5061031d6105d73660046134b7565b6116d8565b3480156105e857600080fd5b506102bb6105f7366004613843565b611784565b34801561060857600080fd5b5060d1546103bc565b34801561061d57600080fd5b5061031d61062c3660046134b7565b6117e3565b34801561063d57600080fd5b506102bb61064c3660046136a9565b6117fc565b34801561065d57600080fd5b5061069061066c366004613674565b805160208183018101805160ce825292820191909301209152805460019091015482565b6040805192835260208301919091520161028e565b3480156106b157600080fd5b506102bb6106c03660046136a9565b611a39565b3480156106d157600080fd5b506102bb6106e03660046134b7565b611cf4565b3480156106f157600080fd5b506102bb6107003660046135d5565b611dd3565b8161070f8161106d565b6001600160a01b0316336001600160a01b0316146107835760405162461bcd60e51b815260206004820152602660248201527f596f7520617265206e6f7420746865206f776e6572206f662074686973206964604482015265656e7469747960d01b60648201526084015b60405180910390fd5b6001600160a01b0382166107ff5760405162461bcd60e51b815260206004820152602260248201527f43616e27742072656d6f766520616464726573732030206173206465706c6f7960448201527f6572000000000000000000000000000000000000000000000000000000000000606482015260840161077a565b6108088361106d565b6001600160a01b0316826001600160a01b0316141561088e5760405162461bcd60e51b8152602060048201526024808201527f4f776e65722063616e27742062652072656d6f7665642061732061206465706c60448201527f6f79657200000000000000000000000000000000000000000000000000000000606482015260840161077a565b60d28360405161089e9190613888565b908152604080519182900360209081019092206001600160a01b0385166000908152925290205460ff1615156001146109195760405162461bcd60e51b815260206004820152601960248201527f41646472657373206973206e6f742061206465706c6f79657200000000000000604482015260640161077a565b600060d28460405161092b9190613888565b90815260408051602092819003830181206001600160a01b03871660009081529352908220805460ff1916931515939093179092557f4f50763fef612e27245baa74f3711360db73971438a4d862b1880de7c99354e1916109909186918691906139a5565b60405180910390a1505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610a2b5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b606482015260840161077a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a867f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610af15760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b606482015260840161077a565b610afa816120fb565b60408051600080825260208201909252610b1691839190612155565b50565b815160208184018101805160cb82529282019482019490942091909352815180830184018051928152908401929093019190912091528054610b5a90613b26565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8690613b26565b8015610bd35780601f10610ba857610100808354040283529160200191610bd3565b820191906000526020600020905b815481529060010190602001808311610bb657829003601f168201915b505050505081565b6097546001600160a01b03163314610c355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077a565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610ce55760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b606482015260840161077a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610d407f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610dab5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b606482015260840161077a565b610db4826120fb565b610dc082826001612155565b5050565b606060cb83604051610dd69190613888565b908152602001604051809103902082604051610df29190613888565b90815260200160405180910390208054610e0b90613b26565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3790613b26565b8015610e845780601f10610e5957610100808354040283529160200191610e84565b820191906000526020600020905b815481529060010190602001808311610e6757829003601f168201915b505050505090505b92915050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f325760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161077a565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60606000610f6483612309565b905060cd81604051610f769190613888565b90815260200160405180910390208054610f8f90613b26565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbb90613b26565b80156110085780601f10610fdd57610100808354040283529160200191611008565b820191906000526020600020905b815481529060010190602001808311610feb57829003601f168201915b5050505050915050919050565b604080518082019091526000808252602082015260ce61103483610f57565b6040516110419190613888565b908152604080519182900360209081018320838301909252815483526001909101549082015292915050565b600060c961107a83610f57565b6040516110879190613888565b908152604051908190036020019020546001600160a01b031692915050565b6097546001600160a01b031633146111005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077a565b61110a6000612483565b565b815160208184018101805160cc82529282019185019190912091905280548290811061113757600080fd5b90600052602060002001600091509150508054610b5a90613b26565b6097546001600160a01b031633146111ad5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077a565b60d38054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b805160208183018101805160cd8252928201919093012091528054610b5a90613b26565b61122685858560d360149054906101000a900460ff16156124d5565b5060408051808201825283815260208082018490528251601f8801829004820281018201909352868352909161127a9188908890819084018382808284376000920191909152508892508591506129659050565b505050505050565b600054610100900460ff1661129d5760005460ff16156112a1565b303b155b6113135760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161077a565b600054610100900460ff16158015611335576000805461ffff19166101011790555b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156113c35760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b606482015260840161077a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661141e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146114895760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b606482015260840161077a565b611491612aa0565b611499612b13565b60d0805460ff19169055601060d15560d380547fffffffffffffffffffffff00000000000000000000000000000000000000000016738e2fb20c427b54bfe8e529484421fae41fa6c9f61790558015610b16576000805461ff001916905550565b60d05460ff161561154d5760405162461bcd60e51b815260206004820152600d60248201527f4163636573732064656e69656400000000000000000000000000000000000000604482015260640161077a565b61155984848484612b7e565b50505050565b60cf818154811061156f57600080fd5b906000526020600020016000915090508054610b5a90613b26565b836115948161106d565b6001600160a01b0316336001600160a01b031614806115e5575060d2816040516115be9190613888565b90815260408051918290036020908101909220336000908152925290205460ff1615156001145b6116575760405162461bcd60e51b815260206004820152602560248201527f596f7520617265206e6f74206465706c6f796572206f6620746869732069646560448201527f6e74697479000000000000000000000000000000000000000000000000000000606482015260840161077a565b61166385858585612b7e565b5050505050565b60006116758361106d565b6001600160a01b0316826001600160a01b0316141561169657506001610e8c565b60d2836040516116a69190613888565b908152604080519182900360209081019092206001600160a01b0385166000908152925290205460ff16905092915050565b6001600160a01b038116600090815260ca602052604090208054606091906116ff90613b26565b80601f016020809104026020016040519081016040528092919081815260200182805461172b90613b26565b80156117785780601f1061174d57610100808354040283529160200191611778565b820191906000526020600020905b81548152906001019060200180831161175b57829003601f168201915b50505050509050919050565b6097546001600160a01b031633146117de5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077a565b60d155565b60ca6020526000908152604090208054610b5a90613b26565b816118068161106d565b6001600160a01b0316336001600160a01b0316146118755760405162461bcd60e51b815260206004820152602660248201527f596f7520617265206e6f7420746865206f776e6572206f662074686973206964604482015265656e7469747960d01b606482015260840161077a565b6001600160a01b0382166118cb5760405162461bcd60e51b815260206004820152601f60248201527f43616e27742073657420616464726573732030206173206465706c6f79657200604482015260640161077a565b6118d48361106d565b6001600160a01b0316826001600160a01b031614156119355760405162461bcd60e51b815260206004820152601b60248201527f4f776e657220697320616c72656164792061206465706c6f7965720000000000604482015260640161077a565b60d2836040516119459190613888565b908152604080519182900360209081019092206001600160a01b0385166000908152925290205460ff161515600114156119c15760405162461bcd60e51b815260206004820152601d60248201527f4164647265737320697320616c72656164792061206465706c6f796572000000604482015260640161077a565b600160d2846040516119d39190613888565b90815260408051602092819003830181206001600160a01b038716600090815293529120805460ff1916921515929092179091557f4f50763fef612e27245baa74f3711360db73971438a4d862b1880de7c99354e19061099090859085906001906139a5565b81611a438161106d565b6001600160a01b0316336001600160a01b031614611ab25760405162461bcd60e51b815260206004820152602660248201527f596f7520617265206e6f7420746865206f776e6572206f662074686973206964604482015265656e7469747960d01b606482015260840161077a565b6001600160a01b038216611b2e5760405162461bcd60e51b815260206004820152602560248201527f43616e2774207472616e73666572206f776e65727368697020746f206164647260448201527f6573732030000000000000000000000000000000000000000000000000000000606482015260840161077a565b6001600160a01b038216331415611bad5760405162461bcd60e51b815260206004820152602860248201527f43616e2774207472616e73666572206f776e65727368697020746f2073616d6560448201527f2061646472657373000000000000000000000000000000000000000000000000606482015260840161077a565b6001600160a01b038216600090815260ca602052604090208054611bd090613b26565b159050611c1f5760405162461bcd60e51b815260206004820152601b60248201527f4f776e657220616c72656164792068617320612068616e646c652e0000000000604482015260640161077a565b33600081815260ca60205260408120611c37916132e9565b8260c985604051611c489190613888565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918516600090815260ca8252919091208551611c9192870190613323565b50826001600160a01b0316816001600160a01b031685604051611cb49190613888565b604051908190038120428252907fce2ee58446153358a542cb030db803ba54839b0aac0437f2c6213b8a38aafc7b9060200160405180910390a450505050565b6097546001600160a01b03163314611d4e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077a565b6001600160a01b038116611dca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161077a565b610b1681612483565b611de089898960006124d5565b5060006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250905060008186604051602001611e309291906138a4565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa158015611e9b573d6000803e3d6000fd5b5050604051601f19015160d3549092506001600160a01b038084169116149050611f2d5760405162461bcd60e51b815260206004820152602f60248201527f4964656e7469747920636c61696d206d7367206d757374206265207369676e6560448201527f6420627920746865206f7261636c650000000000000000000000000000000000606482015260840161077a565b6000611f6e8d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230992505050565b611f828c6001600160a01b03166014612ca4565b604051602001611f939291906138c6565b6040516020818303038152906040528051906020012090506000611fec8e8e8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230992505050565b6120008d6001600160a01b03166014612ca4565b60405160200161201192919061392c565b6040516020818303038152906040528051906020012090508189148061203657508089145b6120825760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206964656e7469747920636c61696d206d7367000000000000604482015260640161077a565b600060405180604001604052808d81526020018c81525090506120ea8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e83612965565b505050505050505050505050505050565b6097546001600160a01b03163314610b165760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161077a565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561218d5761218883612e70565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c657600080fd5b505afa9250505080156121f6575060408051601f3d908101601f191682019092526121f391810190613556565b60015b6122685760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f742055555053000000000000000000000000000000000000606482015260840161077a565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146122fd5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c65555549440000000000000000000000000000000000000000000000606482015260840161077a565b50612188838383612f2e565b606060008290506000815167ffffffffffffffff81111561232c5761232c613ba8565b6040519080825280601f01601f191660200182016040528015612356576020820181803683370190505b50905060005b825181101561247b578251604160f81b9084908390811061237f5761237f613b92565b01602001516001600160f81b031916108015906123c357508251602d60f91b908490839081106123b1576123b1613b92565b01602001516001600160f81b03191611155b15612422578281815181106123da576123da613b92565b016020908101516123f19160f89190911c90613aac565b60f81b82828151811061240657612406613b92565b60200101906001600160f81b031916908160001a905350612469565b82818151811061243457612434613b92565b602001015160f81c60f81b82828151811061245157612451613b92565b60200101906001600160f81b031916908160001a9053505b8061247381613b61565b91505061235c565b509392505050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001821515141561260a576040517f796e65745f000000000000000000000000000000000000000000000000000000602082015260250160408051601f19818403018152919052805160209091012061257161253760056000888a613a82565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230992505050565b6040516020016125819190613888565b604051602081830303815290604052805190602001201461260a5760405162461bcd60e51b815260206004820152602260248201527f796e65742068616e646c6573206d757374207374617274207769746820796e6560448201527f745f000000000000000000000000000000000000000000000000000000000000606482015260840161077a565b60d05460ff1615156001141561269857336001600160a01b038416146126985760405162461bcd60e51b815260206004820152603860248201527f43616e6e6f74207265676973746572206964656e74697469657320666f72206f60448201527f746865722061646472657373207468616e2073656e6465720000000000000000606482015260840161077a565b6126d785858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f5392505050565b6127495760405162461bcd60e51b815260206004820152603660248201527f4f6e6c7920616c7068616e756d65726963206368617261637465727320616e6460448201527f20616e20756e64657273636f726520616c6c6f77656400000000000000000000606482015260840161077a565b600061278a86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230992505050565b905061283b60cd8260405161279f9190613888565b908152602001604051809103902080546127b890613b26565b80601f01602080910402602001604051908101604052809291908181526020018280546127e490613b26565b80156128315780601f1061280657610100808354040283529160200191612831565b820191906000526020600020905b81548152906001019060200180831161281457829003601f168201915b5050505050511590565b6128ad5760405162461bcd60e51b815260206004820152602960248201527f54686973206964656e746974792068617320616c7265616479206265656e207260448201527f6567697374657265640000000000000000000000000000000000000000000000606482015260840161077a565b60d05460ff16151560011415612957576001600160a01b038416600090815260ca6020526040902080546128e591906127b890613b26565b6129575760405162461bcd60e51b815260206004820152602b60248201527f54686973206f776e657220616c72656164792068617320616e206964656e746960448201527f7479206174746163686564000000000000000000000000000000000000000000606482015260840161077a565b60019150505b949350505050565b8160c9846040516129769190613888565b908152604080516020928190038301902080546001600160a01b0319166001600160a01b03948516179055918416600090815260ca82529190912084516129bf92860190613323565b508060ce846040516129d19190613888565b90815260405160209181900382019020825181559101516001909101558260cd6129fa82612309565b604051612a079190613888565b90815260200160405180910390209080519060200190612a28929190613323565b5060cf80546001810182556000919091528351612a6c917facb8d954e2cfef495862221e91bd7523613cf8808827cb33edfe4904cc51bf2901906020860190613323565b507f601421519ee1007ace4b75506db9b1d1657c6cf0a9c48a3f1a5f14af66a7f68d838383604051610990939291906139d8565b600054610100900460ff16612b0b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161077a565b61110a612fd2565b600054610100900460ff1661110a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161077a565b60cb84604051612b8e9190613888565b908152602001604051809103902083604051612baa9190613888565b90815260200160405180910390208054612bc390613b26565b15159050612c125760cc84604051612bdb9190613888565b9081526040516020918190038201902080546001810182556000918252908290208551612c1093919092019190860190613323565b505b8160cb85604051612c239190613888565b908152602001604051809103902084604051612c3f9190613888565b90815260200160405180910390209080519060200190612c60929190613323565b507f7ceb36c945355d3a62e4775b6ef9321c7ce0745df258799ec6350d281cd7d96884848484604051612c969493929190613a13565b60405180910390a150505050565b60606000612cb3836002613ac4565b612cbe906002613aac565b67ffffffffffffffff811115612cd657612cd6613ba8565b6040519080825280601f01601f191660200182016040528015612d00576020820181803683370190505b509050600360fc1b81600081518110612d1b57612d1b613b92565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612d6657612d66613b92565b60200101906001600160f81b031916908160001a9053506000612d8a846002613ac4565b612d95906001613aac565b90505b6001811115612e1a577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612dd657612dd6613b92565b1a60f81b828281518110612dec57612dec613b92565b60200101906001600160f81b031916908160001a90535060049490941c93612e1381613b0f565b9050612d98565b508315612e695760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161077a565b9392505050565b6001600160a01b0381163b612eed5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161077a565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b612f3783613046565b600082511180612f445750805b15612188576115598383613086565b60d154815160009183911115612f6c5750600092915050565b60005b8151811015612fc8576000828281518110612f8c57612f8c613b92565b01602001516001600160f81b0319169050612fa681613191565b612fb557506000949350505050565b5080612fc081613b61565b915050612f6f565b5060019392505050565b600054610100900460ff1661303d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161077a565b61110a33612483565b61304f81612e70565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6131055760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161077a565b600080846001600160a01b0316846040516131209190613888565b600060405180830381855af49150503d806000811461315b576040519150601f19603f3d011682016040523d82523d6000602084013e613160565b606091505b50915091506131888282604051806060016040528060278152602001613bbf602791396132b0565b95945050505050565b6000600360fc1b6001600160f81b03198316108015906131db57507f39000000000000000000000000000000000000000000000000000000000000006001600160f81b0319831611155b8061320d5750604160f81b6001600160f81b031983161080159061320d5750602d60f91b6001600160f81b0319831611155b8061327757507f61000000000000000000000000000000000000000000000000000000000000006001600160f81b031983161080159061327757507f7a000000000000000000000000000000000000000000000000000000000000006001600160f81b0319831611155b80610e8c57506001600160f81b031982167f5f000000000000000000000000000000000000000000000000000000000000001492915050565b606083156132bf575081612e69565b8251156132cf5782518084602001fd5b8160405162461bcd60e51b815260040161077a9190613992565b5080546132f590613b26565b6000825580601f10613305575050565b601f016020900490600052602060002090810190610b1691906133a7565b82805461332f90613b26565b90600052602060002090601f0160209004810192826133515760008555613397565b82601f1061336a57805160ff1916838001178555613397565b82800160010185558215613397579182015b8281111561339757825182559160200191906001019061337c565b506133a39291506133a7565b5090565b5b808211156133a357600081556001016133a8565b600067ffffffffffffffff808411156133d7576133d7613ba8565b604051601f8501601f19908116603f011681019082821181831017156133ff576133ff613ba8565b8160405280935085815286868601111561341857600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461344957600080fd5b919050565b60008083601f84011261346057600080fd5b50813567ffffffffffffffff81111561347857600080fd5b60208301915083602082850101111561349057600080fd5b9250929050565b600082601f8301126134a857600080fd5b612e69838335602085016133bc565b6000602082840312156134c957600080fd5b612e6982613432565b600080604083850312156134e557600080fd5b6134ee83613432565b9150602083013567ffffffffffffffff81111561350a57600080fd5b8301601f8101851361351b57600080fd5b61352a858235602084016133bc565b9150509250929050565b60006020828403121561354657600080fd5b81358015158114612e6957600080fd5b60006020828403121561356857600080fd5b5051919050565b60008060008060006080868803121561358757600080fd5b853567ffffffffffffffff81111561359e57600080fd5b6135aa8882890161344e565b90965094506135bd905060208701613432565b94979396509394604081013594506060013592915050565b60008060008060008060008060006101008a8c0312156135f457600080fd5b893567ffffffffffffffff81111561360b57600080fd5b6136178c828d0161344e565b909a50985061362a905060208b01613432565b965060408a0135955060608a0135945060808a0135935060a08a013560ff8116811461365557600080fd5b8093505060c08a0135915060e08a013590509295985092959850929598565b60006020828403121561368657600080fd5b813567ffffffffffffffff81111561369d57600080fd5b61295d84828501613497565b600080604083850312156136bc57600080fd5b823567ffffffffffffffff8111156136d357600080fd5b6136df85828601613497565b9250506136ee60208401613432565b90509250929050565b6000806040838503121561370a57600080fd5b823567ffffffffffffffff8082111561372257600080fd5b61372e86838701613497565b9350602085013591508082111561374457600080fd5b5061352a85828601613497565b6000806000806080858703121561376757600080fd5b843567ffffffffffffffff8082111561377f57600080fd5b61378b88838901613497565b955060208701359150808211156137a157600080fd5b6137ad88838901613497565b945060408701359150808211156137c357600080fd5b6137cf88838901613497565b935060608701359150808211156137e557600080fd5b506137f287828801613497565b91505092959194509250565b6000806040838503121561381157600080fd5b823567ffffffffffffffff81111561382857600080fd5b61383485828601613497565b95602094909401359450505050565b60006020828403121561385557600080fd5b5035919050565b60008151808452613874816020860160208601613ae3565b601f01601f19169290920160200192915050565b6000825161389a818460208701613ae3565b9190910192915050565b600083516138b6818460208801613ae3565b9190910191825250602001919050565b600083516138d8818460208801613ae3565b601f60fa1b90830190815283516138f6816001840160208801613ae3565b7f7c6672656500000000000000000000000000000000000000000000000000000060019290910191820152600601949350505050565b6000835161393e818460208801613ae3565b601f60fa1b908301908152835161395c816001840160208801613ae3565b7f7c74616b656e000000000000000000000000000000000000000000000000000060019290910191820152600701949350505050565b602081526000612e69602083018461385c565b6060815260006139b8606083018661385c565b6001600160a01b0394909416602083015250901515604090910152919050565b6080815260006139eb608083018661385c565b90506001600160a01b038416602083015261295d604083018480518252602090810151910152565b608081526000613a26608083018761385c565b8281036020840152613a38818761385c565b90508281036040840152613a4c818661385c565b90508281036060840152613a60818561385c565b979650505050505050565b815181526020808301519082015260408101610e8c565b60008085851115613a9257600080fd5b83861115613a9f57600080fd5b5050820193919092039150565b60008219821115613abf57613abf613b7c565b500190565b6000816000190483118215151615613ade57613ade613b7c565b500290565b60005b83811015613afe578181015183820152602001613ae6565b838111156115595750506000910152565b600081613b1e57613b1e613b7c565b506000190190565b600181811c90821680613b3a57607f821691505b60208210811415613b5b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613b7557613b75613b7c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122070d8746ae386a71c0ea6269d8bfbdcf3e2519f81f6ec5f30059b0c50f8e3182b64736f6c63430008070033"; - -export class Identity__factory extends ContractFactory { - constructor( - ...args: [signer: Signer] | ConstructorParameters - ) { - if (args.length === 1) { - super(_abi, _bytecode, args[0]); - } else { - super(...args); - } - } - - deploy( - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - getDeployTransaction( - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - attach(address: string): Identity { - return super.attach(address) as Identity; - } - connect(signer: Signer): Identity__factory { - return super.connect(signer) as Identity__factory; - } - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): IdentityInterface { - return new utils.Interface(_abi) as IdentityInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Identity { - return new Contract(address, _abi, signerOrProvider) as Identity; - } -} diff --git a/typechain/factories/OwnableUpgradeable__factory.ts b/typechain/factories/OwnableUpgradeable__factory.ts deleted file mode 100644 index 7d69092..0000000 --- a/typechain/factories/OwnableUpgradeable__factory.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - OwnableUpgradeable, - OwnableUpgradeableInterface, -} from "../OwnableUpgradeable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class OwnableUpgradeable__factory { - static readonly abi = _abi; - static createInterface(): OwnableUpgradeableInterface { - return new utils.Interface(_abi) as OwnableUpgradeableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): OwnableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as OwnableUpgradeable; - } -} diff --git a/typechain/factories/PausableUpgradeable__factory.ts b/typechain/factories/PausableUpgradeable__factory.ts deleted file mode 100644 index 453974a..0000000 --- a/typechain/factories/PausableUpgradeable__factory.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - PausableUpgradeable, - PausableUpgradeableInterface, -} from "../PausableUpgradeable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Unpaused", - type: "event", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class PausableUpgradeable__factory { - static readonly abi = _abi; - static createInterface(): PausableUpgradeableInterface { - return new utils.Interface(_abi) as PausableUpgradeableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): PausableUpgradeable { - return new Contract(address, _abi, signerOrProvider) as PausableUpgradeable; - } -} diff --git a/typechain/factories/PointSocial__factory.ts b/typechain/factories/PointSocial__factory.ts deleted file mode 100644 index 3317cf1..0000000 --- a/typechain/factories/PointSocial__factory.ts +++ /dev/null @@ -1,1618 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PointSocial, PointSocialInterface } from "../PointSocial"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "previousAdmin", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "AdminChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "beacon", - type: "address", - }, - ], - name: "BeaconUpgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Paused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "date", - type: "uint256", - }, - ], - name: "ProfileChange", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "date", - type: "uint256", - }, - { - indexed: true, - internalType: "enum PointSocial.Component", - name: "component", - type: "uint8", - }, - { - indexed: true, - internalType: "enum PointSocial.Action", - name: "action", - type: "uint8", - }, - ], - name: "StateChange", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "Unpaused", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "author", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - ], - name: "add", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - { - internalType: "address", - name: "author", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - ], - name: "addComment", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - ], - name: "addCommentToPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_postId", - type: "uint256", - }, - ], - name: "addDislikeToPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - ], - name: "addLikeToPost", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "migrator", - type: "address", - }, - ], - name: "addMigrator", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - ], - name: "addPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "user", - type: "address", - }, - { - internalType: "bytes32", - name: "name", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "location", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "about", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "avatar", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "banner", - type: "bytes32", - }, - ], - name: "addProfile", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_postId", - type: "uint256", - }, - ], - name: "checkDislikeToPost", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - ], - name: "checkLikeToPost", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "commentById", - outputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "commentIdsByOwner", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "commentIdsByPost", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - { - internalType: "uint256", - name: "commentId", - type: "uint256", - }, - ], - name: "deleteCommentForPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - ], - name: "deletePost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "dislikeById", - outputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "uint256", - name: "post", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "bool", - name: "active", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "dislikeIdByUserAndPost", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "dislikeIdsByPost", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "dislikeIdsByUser", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bool", - name: "shouldPause", - type: "bool", - }, - ], - name: "doPause", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "commentId", - type: "uint256", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - ], - name: "editCommentForPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - ], - name: "editPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - ], - name: "flagPost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "postId", - type: "uint256", - }, - ], - name: "getAllCommentsForPost", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - ], - internalType: "struct PointSocial.Comment[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getAllPosts", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint16", - name: "commentsCount", - type: "uint16", - }, - { - internalType: "uint256", - name: "dislikesCount", - type: "uint256", - }, - { - internalType: "bool", - name: "liked", - type: "bool", - }, - { - internalType: "bool", - name: "disliked", - type: "bool", - }, - ], - internalType: "struct PointSocial.PostWithMetadata[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "getAllPostsByOwner", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint16", - name: "commentsCount", - type: "uint16", - }, - { - internalType: "uint256", - name: "dislikesCount", - type: "uint256", - }, - { - internalType: "bool", - name: "liked", - type: "bool", - }, - { - internalType: "bool", - name: "disliked", - type: "bool", - }, - ], - internalType: "struct PointSocial.PostWithMetadata[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "getAllPostsByOwnerLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getAllPostsLength", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - ], - name: "getCommentById", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - ], - internalType: "struct PointSocial.Comment", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "cursor", - type: "uint256", - }, - { - internalType: "uint256", - name: "howMany", - type: "uint256", - }, - ], - name: "getPaginatedPosts", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint16", - name: "commentsCount", - type: "uint16", - }, - { - internalType: "uint256", - name: "dislikesCount", - type: "uint256", - }, - { - internalType: "bool", - name: "liked", - type: "bool", - }, - { - internalType: "bool", - name: "disliked", - type: "bool", - }, - ], - internalType: "struct PointSocial.PostWithMetadata[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "cursor", - type: "uint256", - }, - { - internalType: "uint256", - name: "howMany", - type: "uint256", - }, - ], - name: "getPaginatedPostsByOwner", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint16", - name: "commentsCount", - type: "uint16", - }, - { - internalType: "uint256", - name: "dislikesCount", - type: "uint256", - }, - { - internalType: "bool", - name: "liked", - type: "bool", - }, - { - internalType: "bool", - name: "disliked", - type: "bool", - }, - ], - internalType: "struct PointSocial.PostWithMetadata[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - ], - name: "getPostById", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint16", - name: "commentsCount", - type: "uint16", - }, - { - internalType: "uint256", - name: "dislikesCount", - type: "uint256", - }, - { - internalType: "bool", - name: "liked", - type: "bool", - }, - { - internalType: "bool", - name: "disliked", - type: "bool", - }, - ], - internalType: "struct PointSocial.PostWithMetadata", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_postId", - type: "uint256", - }, - ], - name: "getPostDislikesQty", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "id_", - type: "address", - }, - ], - name: "getProfile", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "displayName", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "displayLocation", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "displayAbout", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "avatar", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "banner", - type: "bytes32", - }, - ], - internalType: "struct PointSocial.Profile", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "identityContractAddr", - type: "address", - }, - { - internalType: "string", - name: "identityHandle", - type: "string", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "isDeployer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "likeById", - outputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "likeIdsByPost", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "paused", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postById", - outputs: [ - { - internalType: "uint256", - name: "id", - type: "uint256", - }, - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "bytes32", - name: "contents", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "image", - type: "bytes32", - }, - { - internalType: "uint256", - name: "createdAt", - type: "uint256", - }, - { - internalType: "uint16", - name: "likesCount", - type: "uint16", - }, - { - internalType: "uint16", - name: "commentsCount", - type: "uint16", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postIds", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postIdsByOwner", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - name: "postIsFlagged", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "profileByOwner", - outputs: [ - { - internalType: "bytes32", - name: "displayName", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "displayLocation", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "displayAbout", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "avatar", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "banner", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "name_", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "location_", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "about_", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "avatar_", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "banner_", - type: "bytes32", - }, - ], - name: "setProfile", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, -]; - -const _bytecode = - "0x60a06040523060601b60805234801561001757600080fd5b5060805160601c614ca4610060600039600081816114ae0152818161153301528181611e7d01528181611f020152818161200e0152818161355e01526135e30152614ca46000f3fe6080604052600436106103345760003560e01c8063787d9df4116101b0578063c6aa9b7b116100ec578063deb18f9211610095578063f2fde38b1161006f578063f2fde38b14610c62578063f399e22e14610c82578063f77f442914610ca2578063fccde34014610cd357600080fd5b8063deb18f9214610b22578063f046f2c114610bcf578063f2135cf914610c4257600080fd5b8063db108833116100c6578063db10883314610a60578063dbfc2c0c14610ad5578063de5bae5814610af557600080fd5b8063c6aa9b7b14610a00578063c8b472d914610a20578063d21650a914610a4057600080fd5b80638f3537b111610159578063a6ebe41211610133578063a6ebe41214610980578063b250b7d2146109a0578063b9b5f1e8146109c0578063bdb0195b146109e057600080fd5b80638f3537b11461092057806395a39e38146109405780639c5303eb1461096057600080fd5b806384b3d3e51161018a57806384b3d3e5146108b85780638b591e84146108d85780638da5cb5b146108f857600080fd5b8063787d9df4146108635780637d2a5bac14610878578063836b42e81461089857600080fd5b80634ccc6d001161027f5780635c975abb116102285780636c43dbb4116102025780636c43dbb4146107795780636c89be151461080e578063715018a61461082e57806373a6e1911461084357600080fd5b80635c975abb1461071f57806364e958951461073757806366cab95c1461076457600080fd5b806350cde8ef1161025957806350cde8ef146106a357806352d1902d146106d1578063585d6c5a146106e657600080fd5b80634ccc6d00146106505780634ebd798d146106705780634f1ef2861461069057600080fd5b806328a1b31b116102e1578063440e2f1e116102bb578063440e2f1e146105f05780634aa3c385146106105780634bd74a3f1461063057600080fd5b806328a1b31b1461055257806330561100146105bb5780633659cfe6146105d057600080fd5b80631918c4f9116103125780631918c4f9146104725780631c84de40146105025780631fcef5911461053257600080fd5b8063094cd5ee146103395780630f53a4701461035b5780631224736f14610445575b600080fd5b34801561034557600080fd5b506103596103543660046146e9565b610cf3565b005b34801561036757600080fd5b506103fa610376366004614432565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152506001600160a01b031660009081526101096020908152604091829020825160a0810184528154815260018201549281019290925260028101549282019290925260038201546060820152600490910154608082015290565b60405161043c9190600060a082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b60405180910390f35b34801561045157600080fd5b50610465610460366004614432565b610f10565b60405161043c9190614908565b34801561047e57600080fd5b506104ca61048d3660046146e9565b61010f6020526000908152604090208054600182015460028301546003840154600490940154929391926001600160a01b03909116919060ff1685565b6040805195865260208601949094526001600160a01b039092169284019290925260608301919091521515608082015260a00161043c565b34801561050e57600080fd5b5061052261051d3660046146e9565b611063565b604051901515815260200161043c565b34801561053e57600080fd5b5061035961054d3660046146e9565b6110ec565b34801561055e57600080fd5b5061059861056d3660046146e9565b6101076020526000908152604090208054600182015460029092015490916001600160a01b03169083565b604080519384526001600160a01b0390921660208401529082015260600161043c565b3480156105c757600080fd5b506104656113a4565b3480156105dc57600080fd5b506103596105eb366004614432565b6114a3565b3480156105fc57600080fd5b5061035961060b36600461444d565b61161f565b34801561061c57600080fd5b5061035961062b36600461468c565b6116d1565b34801561063c57600080fd5b5061035961064b3660046146ae565b6118e2565b34801561065c57600080fd5b5061052261066b3660046146e9565b611985565b34801561067c57600080fd5b5061035961068b366004614765565b611d15565b61035961069e366004614497565b611e72565b3480156106af57600080fd5b506106c36106be3660046146e9565b611fdf565b60405190815260200161043c565b3480156106dd57600080fd5b506106c3612001565b3480156106f257600080fd5b506106c36107013660046145dc565b61010e60209081526000928352604080842090915290825290205481565b34801561072b57600080fd5b5060c95460ff16610522565b34801561074357600080fd5b506107576107523660046146e9565b6120c6565b60405161043c9190614a73565b34801561077057600080fd5b50610522612126565b34801561078557600080fd5b506108016107943660046146e9565b60408051608080820183526000808352602080840182905283850182905260609384018290529481526101048552839020835191820184528054825260018101546001600160a01b0316948201949094526002840154928101929092526003909201549181019190915290565b60405161043c9190614a3f565b34801561081a57600080fd5b5061035961082936600461468c565b6121af565b34801561083a57600080fd5b50610359612337565b34801561084f57600080fd5b5061046561085e36600461468c565b61239d565b34801561086f57600080fd5b506106c36124e4565b34801561088457600080fd5b506106c36108933660046146e9565b612552565b3480156108a457600080fd5b506105226108b33660046146e9565b612566565b3480156108c457600080fd5b506103596108d3366004614639565b612641565b3480156108e457600080fd5b506106c36108f33660046145dc565b612726565b34801561090457600080fd5b506097546040516001600160a01b03909116815260200161043c565b34801561092c57600080fd5b5061035961093b366004614791565b612758565b34801561094c57600080fd5b506106c361095b3660046145dc565b6128f2565b34801561096c57600080fd5b5061035961097b366004614432565b61290f565b34801561098c57600080fd5b5061035961099b36600461468c565b6129f8565b3480156109ac57600080fd5b506106c36109bb3660046145dc565b612b30565b3480156109cc57600080fd5b506106c36109db36600461468c565b612b4d565b3480156109ec57600080fd5b506103596109fb366004614702565b612b6a565b348015610a0c57600080fd5b506106c3610a1b36600461468c565b612d7c565b348015610a2c57600080fd5b50610359610a3b3660046146e9565b612d99565b348015610a4c57600080fd5b50610359610a5b36600461468c565b612f33565b348015610a6c57600080fd5b50610aad610a7b3660046146e9565b61010460205260009081526040902080546001820154600283015460039093015491926001600160a01b039091169184565b604080519485526001600160a01b03909316602085015291830152606082015260800161043c565b348015610ae157600080fd5b506106c3610af0366004614432565b613092565b348015610b0157600080fd5b50610b15610b103660046146e9565b61312c565b60405161043c9190614890565b348015610b2e57600080fd5b50610b8b610b3d3660046146e9565b6101026020526000908152604090208054600182015460028301546003840154600485015460059095015493946001600160a01b03909316939192909161ffff808216916201000090041687565b604080519788526001600160a01b039096166020880152948601939093526060850191909152608084015261ffff90811660a08401521660c082015260e00161043c565b348015610bdb57600080fd5b50610c1a610bea366004614432565b61010960205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a00161043c565b348015610c4e57600080fd5b50610465610c5d366004614606565b613274565b348015610c6e57600080fd5b50610359610c7d366004614432565b6133c1565b348015610c8e57600080fd5b50610359610c9d366004614559565b6134a0565b348015610cae57600080fd5b50610522610cbd3660046146e9565b61010a6020526000908152604090205460ff1681565b348015610cdf57600080fd5b506106c3610cee36600461468c565b6136f7565b60c95460ff1615610d3e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b60008181526101026020526040902060040154610d9d5760405162461bcd60e51b815260206004820152601a60248201527f4552524f525f504f53545f444f45535f4e4f545f4558495354530000000000006044820152606401610d35565b600081815261010260205260409020600101546001600160a01b03163314610e075760405162461bcd60e51b815260206004820181905260248201527f4552524f525f43414e4e4f545f44454c4554455f4f54484552535f504f5354536044820152606401610d35565b6000818152610102602052604090206005015462010000900461ffff1615610e975760405162461bcd60e51b815260206004820152602660248201527f4552524f525f43414e4e4f545f44454c4554455f504f53545f574954485f434f60448201527f4d4d454e545300000000000000000000000000000000000000000000000000006064820152608401610d35565b6000818152610102602052604081208181556001810180546001600160a01b0319169055600281018290556003810182905560048101919091556005908101805463ffffffff191690555b6002604080513381524260208201528491600080516020614c2883398151915291015b60405180910390a450565b6001600160a01b038116600090815261010160205260408120546060919067ffffffffffffffff811115610f4657610f46614c03565b604051908082528060200260200182016040528015610fc557816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082018190526101208201528252600019909201910181610f645790505b50905060005b6001600160a01b0384166000908152610101602052604090205481101561105c576001600160a01b038416600090815261010160205260409020805461102c91908390811061101c5761101c614bed565b9060005260206000200154613714565b82828151811061103e5761103e614bed565b6020026020010181905250808061105490614b90565b915050610fcb565b5092915050565b33600090815261010e602090815260408083208484529091528120548181156110e55750600081815261010f6020908152604091829020825160a0810184528154815260018201549281019290925260028101546001600160a01b0316928201929092526003820154606082015260049091015460ff16151560809091018190525b9392505050565b60c95460ff16156111325760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b6000818152610102602052604090206001015481906001600160a01b031661119c5760405162461bcd60e51b815260206004820152601360248201527f506f737420646f6573206e6f74206578697374000000000000000000000000006044820152606401610d35565b33600090815261010e6020908152604080832085845290915281205490811561121e5750600081815261010f6020908152604091829020825160a0810184528154815260018201549281019290925260028101546001600160a01b0316928201929092526003820154606082015260049091015460ff16151560809091018190525b801561125f5761125a8433600090815261010e6020908152604080832093835292815282822054825261010f905220600401805460ff19169055565b611370565b600061126b61010b5490565b905061127c61010b80546001019055565b6040805160a081018252828152602080820188815233838501818152426060860190815260016080870181815260008a815261010f88528981208951815596518784015593516002870180546001600160a01b0319166001600160a01b039092169190911790559151600386015590516004909401805460ff19169415159490941790935581815261010e84528581208b8252845285812087905590815261010d835284812080548084018255818352848320018790558a825261010c8452948120805492830181558082529290200184905590919061135b886138b3565b1561136b5761136988611985565b505b505050505b60065b6002604080513381524260208201528791600080516020614c2883398151915291015b60405180910390a450505050565b6101005460609060009067ffffffffffffffff8111156113c6576113c6614c03565b60405190808252806020026020018201604052801561144557816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082015282526000199092019101816113e45790505b50905060005b6101005481101561149d5761146d610100828154811061101c5761101c614bed565b82828151811061147f5761147f614bed565b6020026020010181905250808061149590614b90565b91505061144b565b50919050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156115315760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610d35565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661158c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146115f75760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610d35565b61160081613993565b6040805160008082526020820190925261161c91839190613a62565b50565b610108546001600160a01b0316331461166a5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc811195b9a5959609a1b6044820152606401610d35565b6001600160a01b03861660008181526101096020526040808220888155600181018890556002810187905560038101869055600401849055514292917f8dae5272df3f304c1a17877bd58319e303b545befe662f14ecbd747e944d5a2791a3505050505050565b60c95460ff16156117175760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b600081815261010460205260409020600301546117765760405162461bcd60e51b815260206004820152601d60248201527f4552524f525f434f4d4d454e545f444f45535f4e4f545f4558495354530000006044820152606401610d35565b600081815261010460205260409020600101546001600160a01b031633146118065760405162461bcd60e51b815260206004820152602360248201527f4552524f525f43414e4e4f545f44454c4554455f4f54484552535f434f4d4d4560448201527f4e545300000000000000000000000000000000000000000000000000000000006064820152608401610d35565b60008281526101026020526040902060050180546001919060029061183690849062010000900461ffff16614ac0565b825461ffff9182166101009390930a9283029190920219909116179055506000818152610104602052604081208181556001810180546001600160a01b0319169055600281018290556003908101919091556002604080513381524260208201528591600080516020614c28833981519152910160405180910390a460056003604080513381524260208201528491600080516020614c28833981519152910160405180910390a45050565b60c95460ff16156119285760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b3360008181526101096020526040808220888155600181018890556002810187905560038101869055600401849055514292917f8dae5272df3f304c1a17877bd58319e303b545befe662f14ecbd747e944d5a2791a35050505050565b600061199360c95460ff1690565b156119d35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b600082815261010660209081526040808320610102909252822090918080805b8554811015611a8857336001600160a01b03166101076000888481548110611a1d57611a1d614bed565b600091825260208083209091015483528201929092526040019020600101546001600160a01b03161415611a765760019250809350858181548110611a6457611a64614bed565b90600052602060002001549150611a88565b80611a8081614b90565b9150506119f3565b508115611bc957825b8554611a9f90600190614ae3565b811015611afd5785611ab2826001614aa8565b81548110611ac257611ac2614bed565b9060005260206000200154868281548110611adf57611adf614bed565b60009182526020909120015580611af581614b90565b915050611a91565b5084805480611b0e57611b0e614bd7565b6000828152602080822083016000199081018390559092019092558282526101079052604081208181556001810180546001600160a01b031916905560020181905560058501805461ffff1691611b6483614b26565b91906101000a81548161ffff021916908361ffff1602179055505060026007811115611b9257611b92614bc1565b6002604080513381524260208201528a91600080516020614c28833981519152910160405180910390a45060009695505050505050565b611bff8733600090815261010e6020908152604080832093835292815282822054825261010f905220600401805460ff19169055565b611c0d60fd80546001019055565b6000611c1860fd5490565b60408051606081018252828152336020808301918252428385019081528b5460018082018e5560008e8152848120909201889055878252610107845286822086518155945185820180546001600160a01b0319166001600160a01b0390921691909117905591516002909401939093558d835261010290915292812060050180549495509193611cad90849061ffff16614a82565b92506101000a81548161ffff021916908361ffff16021790555060026007811115611cda57611cda614bc1565b6002604080513381524260208201528c91600080516020614c28833981519152910160405180910390a460019750505050505050505b919050565b60c95460ff1615611d5b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b60008381526101026020526040902060040154611dba5760405162461bcd60e51b815260206004820152601a60248201527f4552524f525f504f53545f444f45535f4e4f545f4558495354530000000000006044820152606401610d35565b600083815261010260205260409020600101546001600160a01b03163314611e245760405162461bcd60e51b815260206004820152601e60248201527f4552524f525f43414e4e4f545f454449545f4f54484552535f504f53545300006044820152606401610d35565b60008381526101026020526040902060028101839055600301819055600460025b604080513381524260208201528691600080516020614c28833981519152910160405180910390a4505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415611f005760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610d35565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611f5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614611fc65760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610d35565b611fcf82613993565b611fdb82826001613a62565b5050565b6101008181548110611ff057600080fd5b600091825260209091200154905081565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146120a15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610d35565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915261212082613714565b92915050565b60fe546040516315e3abc960e31b81526000916001600160a01b03169063af1d5e489061215a9060ff90339060040161497e565b60206040518083038186803b15801561217257600080fd5b505afa158015612186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121aa9190614656565b905090565b60c95460ff16156121f55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b61220360fb80546001019055565b600061220e60fb5490565b6040805160e081018252828152336020808301828152838501898152606085018981524260808701908152600060a0880181815260c08901828152610100805460018181019092557f45e010b9ae401e2eb71529478da8bd513a9bdc2d095a111e324f5b95c09ed87b018d90558c845261010289528b84208b518155975188820180546001600160a01b03929092166001600160a01b0319909216919091179055955160028801559351600387015591516004860155905160059094018054925161ffff908116620100000263ffffffff199094169516949094179190911790925592815261010182529384208054808401825590855293209092018390559192506001604080513381524260208201528591600080516020614c288339815191529101611396565b6097546001600160a01b031633146123915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d35565b61239b6000613c16565b565b6101005460609082906123b1908590614ae3565b8111156123ca57610100546123c7908590614ae3565b90505b60008167ffffffffffffffff8111156123e5576123e5614c03565b60405190808252806020026020018201604052801561246457816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082015282526000199092019101816124035790505b509050815b80156124db576124a26101008288610100805490506124889190614ae3565b6124929190614ae3565b8154811061101c5761101c614bed565b826124ad8386614ae3565b815181106124bd576124bd614bed565b602002602001018190525080806124d390614b44565b915050612469565b50949350505050565b600080805b6101005481101561149d5760006101026000610100848154811061250f5761250f614bed565b90600052602060002001548152602001908152602001600020600401541115612540578161253c81614b90565b9250505b8061254a81614b90565b9150506124e9565b60008061255e83613c68565b519392505050565b600081815261010660209081526040808320805482518185028101850190935280835284938301828280156125ba57602002820191906000526020600020905b8154815260200190600101908083116125a6575b5050505050905060005b815181101561263757336001600160a01b031661010760008484815181106125ee576125ee614bed565b6020908102919091018101518252810191909152604001600020600101546001600160a01b03161415612625575060019392505050565b8061262f81614b90565b9150506125c4565b5060009392505050565b60fe546040516315e3abc960e31b81526001600160a01b039091169063af1d5e48906126749060ff90339060040161497e565b60206040518083038186803b15801561268c57600080fd5b505afa1580156126a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126c49190614656565b6127105760405162461bcd60e51b815260206004820152601260248201527f4552524f525f4e4f545f4445504c4f59455200000000000000000000000000006044820152606401610d35565b801561271e5761161c613eae565b61161c613f46565b610101602052816000526040600020818154811061274357600080fd5b90600052602060002001600091509150505481565b610108546001600160a01b031633146127a35760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc811195b9a5959609a1b6044820152606401610d35565b604080516080810182528681526001600160a01b0380861660208084019182528385018781526060850187815260008b81526101038452878120805460018181018355918352858320018e90558751825261010485528882208851815595518682018054919098166001600160a01b0319909116811790975592516002860155905160039094019390935592825261010581529381208054928301815581529290922090910186905561285a60fc80546001019055565b60008581526101026020526040902060050180546001919060029061288a90849062010000900461ffff16614a82565b92506101000a81548161ffff021916908361ffff160217905550600360078111156128b7576128b7614bc1565b6003604080516001600160a01b03881681524260208201528891600080516020614c28833981519152910160405180910390a4505050505050565b610105602052816000526040600020818154811061274357600080fd5b6097546001600160a01b031633146129695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d35565b610108546001600160a01b0316156129b35760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc811195b9a5959609a1b6044820152606401610d35565b61010880546001600160a01b0319166001600160a01b03831617905560008060408051338152426020820152600091600080516020614c288339815191529101610f05565b60c95460ff1615612a3e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b6000828152610104602052604090206003810154612a9e5760405162461bcd60e51b815260206004820152601a60248201527f4552524f525f504f53545f444f45535f4e4f545f4558495354530000000000006044820152606401610d35565b60018101546001600160a01b03163314612b205760405162461bcd60e51b815260206004820152602160248201527f4552524f525f43414e4e4f545f454449545f4f54484552535f434f4d4d454e5460448201527f53000000000000000000000000000000000000000000000000000000000000006064820152608401610d35565b6002810182905560046003611e45565b61010d602052816000526040600020818154811061274357600080fd5b610103602052816000526040600020818154811061274357600080fd5b610108546001600160a01b03163314612bb55760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc811195b9a5959609a1b6044820152606401610d35565b60006040518060e00160405280888152602001876001600160a01b031681526020018681526020018581526020018381526020018461ffff168152602001600061ffff168152509050610100879080600181540180825580915050600190039060005260206000200160009091909190915055610101600082602001516001600160a01b03166001600160a01b03168152602001908152602001600020879080600181540180825580915050600190039060005260206000200160009091909190915055806101026000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548161ffff021916908361ffff16021790555060c08201518160050160026101000a81548161ffff021916908361ffff160217905550905050612d3e60fb80546001019055565b60016002604080516001600160a01b038a1681524260208201528a91600080516020614c28833981519152910160405180910390a450505050505050565b61010c602052816000526040600020818154811061274357600080fd5b60c95460ff1615612ddf5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b60fe546040516315e3abc960e31b81526001600160a01b039091169063af1d5e4890612e129060ff90339060040161497e565b60206040518083038186803b158015612e2a57600080fd5b505afa158015612e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e629190614656565b612eae5760405162461bcd60e51b815260206004820152601760248201527f4552524f525f5045524d495353494f4e5f44454e4945440000000000000000006044820152606401610d35565b60008181526101026020526040902060040154612f0d5760405162461bcd60e51b815260206004820152601a60248201527f4552524f525f504f53545f444f45535f4e4f545f4558495354530000000000006044820152606401610d35565b600081815261010a60205260409020805460ff19811660ff909116151790556007610ee2565b60c95460ff1615612f795760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b612f8760fc80546001019055565b6000612f9260fc5490565b60408051608081018252828152336020808301828152838501888152426060860190815260008b81526101038552878120805460018082018355918352868320018a9055898252610104865288822088518155945185820180546001600160a01b0319166001600160a01b039092169190911790559251600280860191909155915160039094019390935593825261010583528582208054808301825590835283832001879055898252610102909252939093206005018054949550919361306590849062010000900461ffff16614a82565b92506101000a81548161ffff021916908361ffff1602179055506003600781111561137357611373614bc1565b600080805b6001600160a01b0384166000908152610101602052604090205481101561105c576001600160a01b0384166000908152610101602052604081208054610102918391859081106130e9576130e9614bed565b9060005260206000200154815260200190815260200160002060040154111561311a578161311681614b90565b9250505b8061312481614b90565b915050613097565b600081815261010360205260408120546060919067ffffffffffffffff81111561315857613158614c03565b6040519080825280602002602001820160405280156131aa57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816131765790505b50905060005b6000848152610103602052604090205481101561105c576000848152610103602052604081208054610104929190849081106131ee576131ee614bed565b60009182526020808320909101548352828101939093526040918201902081516080810183528154815260018201546001600160a01b031693810193909352600281015491830191909152600301546060820152825183908390811061325657613256614bed565b6020026020010181905250808061326c90614b90565b9150506131b0565b6001600160a01b038316600090815261010160205260409020546060908261329c8583614ae3565b8111156132b0576132ad8583614ae3565b90505b60008167ffffffffffffffff8111156132cb576132cb614c03565b60405190808252806020026020018201604052801561334a57816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082015282526000199092019101816132e95790505b509050815b80156133b6576001600160a01b03881660009081526101016020526040902061337d90826124888a88614ae3565b826133888386614ae3565b8151811061339857613398614bed565b602002602001018190525080806133ae90614b44565b91505061334f565b509695505050505050565b6097546001600160a01b0316331461341b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d35565b6001600160a01b0381166134975760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610d35565b61161c81613c16565b600054610100900460ff166134bb5760005460ff16156134bf565b303b155b6135315760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610d35565b600054610100900460ff16158015613553576000805461ffff19166101011790555b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156135e15760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610d35565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661363c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146136a75760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610d35565b6136af613fc9565b6136b761403c565b60fe80546001600160a01b0319166001600160a01b0386161790556136de60ff8484614382565b5080156136f1576000805461ff00191690555b50505050565b610106602052816000526040600020818154811061274357600080fd5b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152600061010260008481526020019081526020016000206040518060e0016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820154815260200160038201548152602001600482015481526020016005820160009054906101000a900461ffff1661ffff1661ffff1681526020016005820160029054906101000a900461ffff1661ffff1661ffff16815250509050600060405180610140016040528085815260200183602001516001600160a01b031681526020018360400151815260200183606001518152602001836080015181526020018360a0015161ffff1681526020018360c0015161ffff16815260200161388986612552565b815260200161389786612566565b151581526020016138a786611063565b15159052949350505050565b6000818152610106602090815260408083208054825181850281018501909352808352849383018282801561390757602002820191906000526020600020905b8154815260200190600101908083116138f3575b505083519394506000925050505b8181101561398857336001600160a01b0316610107600085848151811061393e5761393e614bed565b6020908102919091018101518252810191909152604001600020600101546001600160a01b0316141561397657506001949350505050565b8061398081614b90565b915050613915565b506000949350505050565b60fe546040516315e3abc960e31b81526001600160a01b039091169063af1d5e48906139c69060ff90339060040161497e565b60206040518083038186803b1580156139de57600080fd5b505afa1580156139f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a169190614656565b61161c5760405162461bcd60e51b815260206004820152601260248201527f4552524f525f4e4f545f4445504c4f59455200000000000000000000000000006044820152606401610d35565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613a9a57613a95836140a7565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613ad357600080fd5b505afa925050508015613b03575060408051601f3d908101601f19168201909252613b0091810190614673565b60015b613b755760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610d35565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114613c0a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610d35565b50613a95838383614165565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081815261010c6020526040812054606091808267ffffffffffffffff811115613c9557613c95614c03565b604051908082528060200260200182016040528015613d0357816020015b613cf06040518060a00160405280600081526020016000815260200160006001600160a01b03168152602001600081526020016000151581525090565b815260200190600190039081613cb35790505b50905060005b83811015613dcd57600086815261010c60205260408120805483908110613d3257613d32614bed565b600091825260208083209091015480835261010f8252604092839020835160a0810185528154815260018201549381019390935260028101546001600160a01b0316938301939093526003830154606083015260049092015460ff16158015608083015291925090613dc35780848481518110613db157613db1614bed565b60209081029190910101526001909401935b5050600101613d09565b5060008267ffffffffffffffff811115613de957613de9614c03565b604051908082528060200260200182016040528015613e5757816020015b613e446040518060a00160405280600081526020016000815260200160006001600160a01b03168152602001600081526020016000151581525090565b815260200190600190039081613e075790505b50905060005b83811015613ea457828181518110613e7757613e77614bed565b6020026020010151828281518110613e9157613e91614bed565b6020908102919091010152600101613e5d565b5095945050505050565b60c95460ff1615613ef45760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d35565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613f293390565b6040516001600160a01b03909116815260200160405180910390a1565b60c95460ff16613f985760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610d35565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613f29565b600054610100900460ff166140345760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610d35565b61239b61418a565b600054610100900460ff1661239b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610d35565b6001600160a01b0381163b6141245760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610d35565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b61416e836141fe565b60008251118061417b5750805b15613a95576136f1838361423e565b600054610100900460ff166141f55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610d35565b61239b33613c16565b614207816140a7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6142bd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610d35565b600080846001600160a01b0316846040516142d89190614874565b600060405180830381855af49150503d8060008114614313576040519150601f19603f3d011682016040523d82523d6000602084013e614318565b606091505b50915091506143408282604051806060016040528060278152602001614c4860279139614349565b95945050505050565b606083156143585750816110e5565b8251156143685782518084602001fd5b8160405162461bcd60e51b8152600401610d35919061494b565b82805461438e90614b5b565b90600052602060002090601f0160209004810192826143b057600085556143f6565b82601f106143c95782800160ff198235161785556143f6565b828001600101855582156143f6579182015b828111156143f65782358255916020019190600101906143db565b50614402929150614406565b5090565b5b808211156144025760008155600101614407565b80356001600160a01b0381168114611d1057600080fd5b60006020828403121561444457600080fd5b6110e58261441b565b60008060008060008060c0878903121561446657600080fd5b61446f8761441b565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b600080604083850312156144aa57600080fd5b6144b38361441b565b9150602083013567ffffffffffffffff808211156144d057600080fd5b818501915085601f8301126144e457600080fd5b8135818111156144f6576144f6614c03565b604051601f8201601f19908116603f0116810190838211818310171561451e5761451e614c03565b8160405282815288602084870101111561453757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006040848603121561456e57600080fd5b6145778461441b565b9250602084013567ffffffffffffffff8082111561459457600080fd5b818601915086601f8301126145a857600080fd5b8135818111156145b757600080fd5b8760208285010111156145c957600080fd5b6020830194508093505050509250925092565b600080604083850312156145ef57600080fd5b6145f88361441b565b946020939093013593505050565b60008060006060848603121561461b57600080fd5b6146248461441b565b95602085013595506040909401359392505050565b60006020828403121561464b57600080fd5b81356110e581614c19565b60006020828403121561466857600080fd5b81516110e581614c19565b60006020828403121561468557600080fd5b5051919050565b6000806040838503121561469f57600080fd5b50508035926020909101359150565b600080600080600060a086880312156146c657600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000602082840312156146fb57600080fd5b5035919050565b60008060008060008060c0878903121561471b57600080fd5b8635955061472b6020880161441b565b94506040870135935060608701359250608087013561ffff8116811461475057600080fd5b8092505060a087013590509295509295509295565b60008060006060848603121561477a57600080fd5b505081359360208301359350604090920135919050565b600080600080600060a086880312156147a957600080fd5b85359450602086013593506147c06040870161441b565b94979396509394606081013594506080013592915050565b8051825260208101516147f660208401826001600160a01b03169052565b5060408101516040830152606081015160608301526080810151608083015260a081015161482a60a084018261ffff169052565b5060c081015161484060c084018261ffff169052565b5060e081015160e08301526101008082015161485f8285018215159052565b505061012081810151801515848301526136f1565b60008251614886818460208701614afa565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156148fc576148e9838551805182526001600160a01b03602082015116602083015260408101516040830152606081015160608301525050565b92840192608092909201916001016148ac565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156148fc576149378385516147d8565b928401926101409290920191600101614924565b602081526000825180602084015261496a816040850160208701614afa565b601f01601f19169190910160400192915050565b60408152600080845481600182811c91508083168061499e57607f831692505b60208084108214156149be57634e487b7160e01b86526022600452602486fd5b60408801849052606088018280156149dd57600181146149ee57614a19565b60ff19871682528282019750614a19565b60008c81526020902060005b87811015614a13578154848201529086019084016149fa565b83019850505b5050859650614a328189018a6001600160a01b03169052565b5050505050509392505050565b815181526020808301516001600160a01b031690820152604080830151908201526060808301519082015260808101612120565b610140810161212082846147d8565b600061ffff808316818516808303821115614a9f57614a9f614bab565b01949350505050565b60008219821115614abb57614abb614bab565b500190565b600061ffff83811690831681811015614adb57614adb614bab565b039392505050565b600082821015614af557614af5614bab565b500390565b60005b83811015614b15578181015183820152602001614afd565b838111156136f15750506000910152565b600061ffff821680614b3a57614b3a614bab565b6000190192915050565b600081614b5357614b53614bab565b506000190190565b600181811c90821680614b6f57607f821691505b6020821081141561149d57634e487b7160e01b600052602260045260246000fd5b6000600019821415614ba457614ba4614bab565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461161c57600080fdfe11d6066287c09b4bdde6835ec219eddcff06922b86c8482aa93f2f5f9c799729416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a1e637cf6740000028944e455e317f7a6beacf18401b3b544ec2d7d79e0391c364736f6c63430008070033"; - -export class PointSocial__factory extends ContractFactory { - constructor( - ...args: [signer: Signer] | ConstructorParameters - ) { - if (args.length === 1) { - super(_abi, _bytecode, args[0]); - } else { - super(...args); - } - } - - deploy( - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - getDeployTransaction( - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - attach(address: string): PointSocial { - return super.attach(address) as PointSocial; - } - connect(signer: Signer): PointSocial__factory { - return super.connect(signer) as PointSocial__factory; - } - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): PointSocialInterface { - return new utils.Interface(_abi) as PointSocialInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): PointSocial { - return new Contract(address, _abi, signerOrProvider) as PointSocial; - } -} diff --git a/typechain/factories/UUPSUpgradeable__factory.ts b/typechain/factories/UUPSUpgradeable__factory.ts deleted file mode 100644 index 1b41aac..0000000 --- a/typechain/factories/UUPSUpgradeable__factory.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - UUPSUpgradeable, - UUPSUpgradeableInterface, -} from "../UUPSUpgradeable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "previousAdmin", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "AdminChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "beacon", - type: "address", - }, - ], - name: "BeaconUpgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, -]; - -export class UUPSUpgradeable__factory { - static readonly abi = _abi; - static createInterface(): UUPSUpgradeableInterface { - return new utils.Interface(_abi) as UUPSUpgradeableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): UUPSUpgradeable { - return new Contract(address, _abi, signerOrProvider) as UUPSUpgradeable; - } -} diff --git a/typechain/hardhat.d.ts b/typechain/hardhat.d.ts deleted file mode 100644 index ae4993f..0000000 --- a/typechain/hardhat.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { ethers } from "ethers"; -import { - FactoryOptions, - HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; - -import * as Contracts from "."; - -declare module "hardhat/types/runtime" { - interface HardhatEthersHelpers extends HardhatEthersHelpersBase { - getContractFactory( - name: "OwnableUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC1822ProxiableUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IBeaconUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC1967UpgradeUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "UUPSUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "PausableUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Identity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "PointSocial", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IIdentity", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - - getContractAt( - name: "OwnableUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC1822ProxiableUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IBeaconUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC1967UpgradeUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "UUPSUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "PausableUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Identity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "PointSocial", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IIdentity", - address: string, - signer?: ethers.Signer - ): Promise; - - // default types - getContractFactory( - name: string, - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - abi: any[], - bytecode: ethers.utils.BytesLike, - signer?: ethers.Signer - ): Promise; - getContractAt( - nameOrAbi: string | any[], - address: string, - signer?: ethers.Signer - ): Promise; - } -} diff --git a/typechain/index.ts b/typechain/index.ts deleted file mode 100644 index 8d570e5..0000000 --- a/typechain/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { OwnableUpgradeable } from "./OwnableUpgradeable"; -export type { IERC1822ProxiableUpgradeable } from "./IERC1822ProxiableUpgradeable"; -export type { IBeaconUpgradeable } from "./IBeaconUpgradeable"; -export type { ERC1967UpgradeUpgradeable } from "./ERC1967UpgradeUpgradeable"; -export type { UUPSUpgradeable } from "./UUPSUpgradeable"; -export type { PausableUpgradeable } from "./PausableUpgradeable"; -export type { Identity } from "./Identity"; -export type { IIdentity } from "./IIdentity"; -export type { PointSocial } from "./PointSocial"; - -export { OwnableUpgradeable__factory } from "./factories/OwnableUpgradeable__factory"; -export { IERC1822ProxiableUpgradeable__factory } from "./factories/IERC1822ProxiableUpgradeable__factory"; -export { IBeaconUpgradeable__factory } from "./factories/IBeaconUpgradeable__factory"; -export { ERC1967UpgradeUpgradeable__factory } from "./factories/ERC1967UpgradeUpgradeable__factory"; -export { UUPSUpgradeable__factory } from "./factories/UUPSUpgradeable__factory"; -export { PausableUpgradeable__factory } from "./factories/PausableUpgradeable__factory"; -export { Identity__factory } from "./factories/Identity__factory"; -export { IIdentity__factory } from "./factories/IIdentity__factory"; -export { PointSocial__factory } from "./factories/PointSocial__factory";