@lukso/lsp26-contracts 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/abi.mjs ADDED
@@ -0,0 +1,249 @@
1
+ const ilsp26FollowerSystemAbi = [
2
+ {
3
+ type: "event",
4
+ anonymous: false,
5
+ inputs: [
6
+ {
7
+ name: "follower",
8
+ internalType: "address",
9
+ type: "address",
10
+ indexed: false
11
+ },
12
+ {
13
+ name: "addr",
14
+ internalType: "address",
15
+ type: "address",
16
+ indexed: false
17
+ }
18
+ ],
19
+ name: "Follow"
20
+ },
21
+ {
22
+ type: "event",
23
+ anonymous: false,
24
+ inputs: [
25
+ {
26
+ name: "unfollower",
27
+ internalType: "address",
28
+ type: "address",
29
+ indexed: false
30
+ },
31
+ {
32
+ name: "addr",
33
+ internalType: "address",
34
+ type: "address",
35
+ indexed: false
36
+ }
37
+ ],
38
+ name: "Unfollow"
39
+ },
40
+ {
41
+ type: "function",
42
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
43
+ name: "follow",
44
+ outputs: [],
45
+ stateMutability: "nonpayable"
46
+ },
47
+ {
48
+ type: "function",
49
+ inputs: [
50
+ { name: "addresses", internalType: "address[]", type: "address[]" }
51
+ ],
52
+ name: "followBatch",
53
+ outputs: [],
54
+ stateMutability: "nonpayable"
55
+ },
56
+ {
57
+ type: "function",
58
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
59
+ name: "followerCount",
60
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
61
+ stateMutability: "view"
62
+ },
63
+ {
64
+ type: "function",
65
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
66
+ name: "followingCount",
67
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
68
+ stateMutability: "view"
69
+ },
70
+ {
71
+ type: "function",
72
+ inputs: [
73
+ { name: "addr", internalType: "address", type: "address" },
74
+ { name: "startIndex", internalType: "uint256", type: "uint256" },
75
+ { name: "endIndex", internalType: "uint256", type: "uint256" }
76
+ ],
77
+ name: "getFollowersByIndex",
78
+ outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
79
+ stateMutability: "view"
80
+ },
81
+ {
82
+ type: "function",
83
+ inputs: [
84
+ { name: "addr", internalType: "address", type: "address" },
85
+ { name: "startIndex", internalType: "uint256", type: "uint256" },
86
+ { name: "endIndex", internalType: "uint256", type: "uint256" }
87
+ ],
88
+ name: "getFollowsByIndex",
89
+ outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
90
+ stateMutability: "view"
91
+ },
92
+ {
93
+ type: "function",
94
+ inputs: [
95
+ { name: "follower", internalType: "address", type: "address" },
96
+ { name: "addr", internalType: "address", type: "address" }
97
+ ],
98
+ name: "isFollowing",
99
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
100
+ stateMutability: "view"
101
+ },
102
+ {
103
+ type: "function",
104
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
105
+ name: "unfollow",
106
+ outputs: [],
107
+ stateMutability: "nonpayable"
108
+ },
109
+ {
110
+ type: "function",
111
+ inputs: [
112
+ { name: "addresses", internalType: "address[]", type: "address[]" }
113
+ ],
114
+ name: "unfollowBatch",
115
+ outputs: [],
116
+ stateMutability: "nonpayable"
117
+ }
118
+ ];
119
+ const lsp26FollowerSystemAbi = [
120
+ {
121
+ type: "error",
122
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
123
+ name: "LSP26AlreadyFollowing"
124
+ },
125
+ { type: "error", inputs: [], name: "LSP26CannotSelfFollow" },
126
+ {
127
+ type: "error",
128
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
129
+ name: "LSP26NotFollowing"
130
+ },
131
+ {
132
+ type: "event",
133
+ anonymous: false,
134
+ inputs: [
135
+ {
136
+ name: "follower",
137
+ internalType: "address",
138
+ type: "address",
139
+ indexed: false
140
+ },
141
+ {
142
+ name: "addr",
143
+ internalType: "address",
144
+ type: "address",
145
+ indexed: false
146
+ }
147
+ ],
148
+ name: "Follow"
149
+ },
150
+ {
151
+ type: "event",
152
+ anonymous: false,
153
+ inputs: [
154
+ {
155
+ name: "unfollower",
156
+ internalType: "address",
157
+ type: "address",
158
+ indexed: false
159
+ },
160
+ {
161
+ name: "addr",
162
+ internalType: "address",
163
+ type: "address",
164
+ indexed: false
165
+ }
166
+ ],
167
+ name: "Unfollow"
168
+ },
169
+ {
170
+ type: "function",
171
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
172
+ name: "follow",
173
+ outputs: [],
174
+ stateMutability: "nonpayable"
175
+ },
176
+ {
177
+ type: "function",
178
+ inputs: [
179
+ { name: "addresses", internalType: "address[]", type: "address[]" }
180
+ ],
181
+ name: "followBatch",
182
+ outputs: [],
183
+ stateMutability: "nonpayable"
184
+ },
185
+ {
186
+ type: "function",
187
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
188
+ name: "followerCount",
189
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
190
+ stateMutability: "view"
191
+ },
192
+ {
193
+ type: "function",
194
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
195
+ name: "followingCount",
196
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
197
+ stateMutability: "view"
198
+ },
199
+ {
200
+ type: "function",
201
+ inputs: [
202
+ { name: "addr", internalType: "address", type: "address" },
203
+ { name: "startIndex", internalType: "uint256", type: "uint256" },
204
+ { name: "endIndex", internalType: "uint256", type: "uint256" }
205
+ ],
206
+ name: "getFollowersByIndex",
207
+ outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
208
+ stateMutability: "view"
209
+ },
210
+ {
211
+ type: "function",
212
+ inputs: [
213
+ { name: "addr", internalType: "address", type: "address" },
214
+ { name: "startIndex", internalType: "uint256", type: "uint256" },
215
+ { name: "endIndex", internalType: "uint256", type: "uint256" }
216
+ ],
217
+ name: "getFollowsByIndex",
218
+ outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
219
+ stateMutability: "view"
220
+ },
221
+ {
222
+ type: "function",
223
+ inputs: [
224
+ { name: "follower", internalType: "address", type: "address" },
225
+ { name: "addr", internalType: "address", type: "address" }
226
+ ],
227
+ name: "isFollowing",
228
+ outputs: [{ name: "", internalType: "bool", type: "bool" }],
229
+ stateMutability: "view"
230
+ },
231
+ {
232
+ type: "function",
233
+ inputs: [{ name: "addr", internalType: "address", type: "address" }],
234
+ name: "unfollow",
235
+ outputs: [],
236
+ stateMutability: "nonpayable"
237
+ },
238
+ {
239
+ type: "function",
240
+ inputs: [
241
+ { name: "addresses", internalType: "address[]", type: "address[]" }
242
+ ],
243
+ name: "unfollowBatch",
244
+ outputs: [],
245
+ stateMutability: "nonpayable"
246
+ }
247
+ ];
248
+
249
+ export { ilsp26FollowerSystemAbi, lsp26FollowerSystemAbi };
package/package.json CHANGED
@@ -1,21 +1,15 @@
1
1
  {
2
2
  "name": "@lukso/lsp26-contracts",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Package for the LSP26 Follower System standard",
5
5
  "license": "Apache-2.0",
6
6
  "author": "",
7
- "main": "./dist/index.cjs",
8
- "module": "./dist/index.mjs",
9
- "typings": "./dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "require": "./dist/index.cjs",
13
- "import": "./dist/index.mjs",
14
- "types": "./dist/index.d.ts"
15
- },
16
- "./artifacts/*": "./artifacts/*",
17
- "./package.json": "./package.json"
18
- },
7
+ "files": [
8
+ "contracts/**/*.sol",
9
+ "!contracts/Mocks/**/*.sol",
10
+ "artifacts/*.json",
11
+ "dist"
12
+ ],
19
13
  "keywords": [
20
14
  "LUKSO",
21
15
  "LSP",
@@ -26,15 +20,29 @@
26
20
  "EVM",
27
21
  "Solidity"
28
22
  ],
29
- "files": [
30
- "contracts/**/*.sol",
31
- "!contracts/Mocks/**/*.sol",
32
- "artifacts/*.json",
33
- "dist",
34
- "types",
35
- "!types/factories",
36
- "./README.md"
37
- ],
23
+ "main": "./dist/constants.cjs",
24
+ "module": "./dist/constants.mjs",
25
+ "typings": "./dist/constants.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "require": "./dist/constants.cjs",
29
+ "import": "./dist/constants.mjs",
30
+ "types": "./dist/constants.d.ts"
31
+ },
32
+ "./constants": {
33
+ "require": "./dist/constants.cjs",
34
+ "import": "./dist/constants.mjs",
35
+ "types": "./dist/constants.d.ts"
36
+ },
37
+ "./abi": {
38
+ "require": "./dist/abi.cjs",
39
+ "import": "./dist/abi.mjs",
40
+ "types": "./dist/abi.d.ts"
41
+ },
42
+ "./artifacts/*": "./artifacts/*",
43
+ "./dist/*": "./dist/*",
44
+ "./package.json": "./package.json"
45
+ },
38
46
  "scripts": {
39
47
  "build": "hardhat compile --show-stack-traces",
40
48
  "build:js": "unbuild",
@@ -45,7 +53,7 @@
45
53
  "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",
46
54
  "test": "hardhat test --no-compile tests/*.test.ts",
47
55
  "test:coverage": "hardhat coverage",
48
- "package": "hardhat prepare-package"
56
+ "build:package": "hardhat prepare-package"
49
57
  },
50
58
  "dependencies": {
51
59
  "@openzeppelin/contracts": "^4.9.6",
@@ -1,221 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "ILSP26FollowerSystem",
4
- "sourceName": "contracts/ILSP26FollowerSystem.sol",
5
- "abi": [
6
- {
7
- "anonymous": false,
8
- "inputs": [
9
- {
10
- "indexed": false,
11
- "internalType": "address",
12
- "name": "follower",
13
- "type": "address"
14
- },
15
- {
16
- "indexed": false,
17
- "internalType": "address",
18
- "name": "addr",
19
- "type": "address"
20
- }
21
- ],
22
- "name": "Follow",
23
- "type": "event"
24
- },
25
- {
26
- "anonymous": false,
27
- "inputs": [
28
- {
29
- "indexed": false,
30
- "internalType": "address",
31
- "name": "unfollower",
32
- "type": "address"
33
- },
34
- {
35
- "indexed": false,
36
- "internalType": "address",
37
- "name": "addr",
38
- "type": "address"
39
- }
40
- ],
41
- "name": "Unfollow",
42
- "type": "event"
43
- },
44
- {
45
- "inputs": [
46
- {
47
- "internalType": "address",
48
- "name": "addr",
49
- "type": "address"
50
- }
51
- ],
52
- "name": "follow",
53
- "outputs": [],
54
- "stateMutability": "nonpayable",
55
- "type": "function"
56
- },
57
- {
58
- "inputs": [
59
- {
60
- "internalType": "address[]",
61
- "name": "addresses",
62
- "type": "address[]"
63
- }
64
- ],
65
- "name": "followBatch",
66
- "outputs": [],
67
- "stateMutability": "nonpayable",
68
- "type": "function"
69
- },
70
- {
71
- "inputs": [
72
- {
73
- "internalType": "address",
74
- "name": "addr",
75
- "type": "address"
76
- }
77
- ],
78
- "name": "followerCount",
79
- "outputs": [
80
- {
81
- "internalType": "uint256",
82
- "name": "",
83
- "type": "uint256"
84
- }
85
- ],
86
- "stateMutability": "view",
87
- "type": "function"
88
- },
89
- {
90
- "inputs": [
91
- {
92
- "internalType": "address",
93
- "name": "addr",
94
- "type": "address"
95
- }
96
- ],
97
- "name": "followingCount",
98
- "outputs": [
99
- {
100
- "internalType": "uint256",
101
- "name": "",
102
- "type": "uint256"
103
- }
104
- ],
105
- "stateMutability": "view",
106
- "type": "function"
107
- },
108
- {
109
- "inputs": [
110
- {
111
- "internalType": "address",
112
- "name": "addr",
113
- "type": "address"
114
- },
115
- {
116
- "internalType": "uint256",
117
- "name": "startIndex",
118
- "type": "uint256"
119
- },
120
- {
121
- "internalType": "uint256",
122
- "name": "endIndex",
123
- "type": "uint256"
124
- }
125
- ],
126
- "name": "getFollowersByIndex",
127
- "outputs": [
128
- {
129
- "internalType": "address[]",
130
- "name": "",
131
- "type": "address[]"
132
- }
133
- ],
134
- "stateMutability": "view",
135
- "type": "function"
136
- },
137
- {
138
- "inputs": [
139
- {
140
- "internalType": "address",
141
- "name": "addr",
142
- "type": "address"
143
- },
144
- {
145
- "internalType": "uint256",
146
- "name": "startIndex",
147
- "type": "uint256"
148
- },
149
- {
150
- "internalType": "uint256",
151
- "name": "endIndex",
152
- "type": "uint256"
153
- }
154
- ],
155
- "name": "getFollowsByIndex",
156
- "outputs": [
157
- {
158
- "internalType": "address[]",
159
- "name": "",
160
- "type": "address[]"
161
- }
162
- ],
163
- "stateMutability": "view",
164
- "type": "function"
165
- },
166
- {
167
- "inputs": [
168
- {
169
- "internalType": "address",
170
- "name": "follower",
171
- "type": "address"
172
- },
173
- {
174
- "internalType": "address",
175
- "name": "addr",
176
- "type": "address"
177
- }
178
- ],
179
- "name": "isFollowing",
180
- "outputs": [
181
- {
182
- "internalType": "bool",
183
- "name": "",
184
- "type": "bool"
185
- }
186
- ],
187
- "stateMutability": "view",
188
- "type": "function"
189
- },
190
- {
191
- "inputs": [
192
- {
193
- "internalType": "address",
194
- "name": "addr",
195
- "type": "address"
196
- }
197
- ],
198
- "name": "unfollow",
199
- "outputs": [],
200
- "stateMutability": "nonpayable",
201
- "type": "function"
202
- },
203
- {
204
- "inputs": [
205
- {
206
- "internalType": "address[]",
207
- "name": "addresses",
208
- "type": "address[]"
209
- }
210
- ],
211
- "name": "unfollowBatch",
212
- "outputs": [],
213
- "stateMutability": "nonpayable",
214
- "type": "function"
215
- }
216
- ],
217
- "bytecode": "0x",
218
- "deployedBytecode": "0x",
219
- "linkReferences": {},
220
- "deployedLinkReferences": {}
221
- }