@lukso/lsp8-contracts 0.17.3 → 0.18.1
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/README.md +69 -24
- package/artifacts/IAccessControlExtended.json +1 -1
- package/artifacts/ILSP8CappedBalance.json +1 -1
- package/artifacts/ILSP8CappedSupply.json +1 -1
- package/artifacts/ILSP8IdentifiableDigitalAsset.json +1 -1
- package/artifacts/ILSP8Mintable.json +1 -1
- package/artifacts/ILSP8NonTransferable.json +8 -2
- package/artifacts/ILSP8Revokable.json +38 -1
- package/artifacts/LSP8Burnable.json +1 -1
- package/artifacts/LSP8BurnableInitAbstract.json +1 -1
- package/artifacts/LSP8CappedBalanceAbstract.json +1 -1
- package/artifacts/LSP8CappedBalanceInitAbstract.json +1 -1
- package/artifacts/LSP8CappedSupplyAbstract.json +1 -1
- package/artifacts/LSP8CappedSupplyInitAbstract.json +1 -1
- package/artifacts/LSP8CustomizableToken.json +64 -21
- package/artifacts/LSP8CustomizableTokenInit.json +59 -16
- package/artifacts/LSP8Enumerable.json +1 -1
- package/artifacts/LSP8EnumerableInitAbstract.json +1 -1
- package/artifacts/LSP8IdentifiableDigitalAsset.json +1 -1
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +1 -1
- package/artifacts/LSP8Mintable.json +1 -1
- package/artifacts/LSP8MintableAbstract.json +1 -1
- package/artifacts/LSP8MintableInit.json +1 -1
- package/artifacts/LSP8MintableInitAbstract.json +1 -1
- package/artifacts/LSP8NonTransferableAbstract.json +20 -14
- package/artifacts/LSP8NonTransferableInitAbstract.json +20 -14
- package/artifacts/LSP8RevokableAbstract.json +38 -1
- package/artifacts/LSP8RevokableInitAbstract.json +38 -1
- package/artifacts/LSP8Votes.json +1 -1
- package/artifacts/LSP8VotesInitAbstract.json +1 -1
- package/contracts/extensions/LSP8NonTransferable/ILSP8NonTransferable.sol +9 -3
- package/contracts/extensions/LSP8NonTransferable/LSP8NonTransferableAbstract.sol +17 -8
- package/contracts/extensions/LSP8NonTransferable/LSP8NonTransferableInitAbstract.sol +17 -8
- package/contracts/extensions/LSP8Revokable/ILSP8Revokable.sol +9 -0
- package/contracts/extensions/LSP8Revokable/LSP8RevokableAbstract.sol +8 -0
- package/contracts/extensions/LSP8Revokable/LSP8RevokableInitAbstract.sol +15 -1
- package/dist/abi.cjs +169 -29
- package/dist/abi.d.cts +216 -41
- package/dist/abi.d.mts +216 -41
- package/dist/abi.d.ts +216 -41
- package/dist/abi.mjs +169 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
# LSP8 Identifiable Digital Asset · [](https://www.npmjs.com/package/@lukso/lsp8-contracts)
|
|
2
2
|
|
|
3
|
-
npm package for the LSP8 Identifiable Digital Asset standard (NFTs and similar token IDs).
|
|
4
|
-
|
|
5
|
-
## Audits
|
|
6
|
-
|
|
7
|
-
The **LSP8 Customizable Token** presets and their token extensions listed below were reviewed by the AI auditing tool [Nethermind AI Audit Agent](https://www.nethermind.io/) (May 2026). See the [audit report PDF](../../audits/Nethermind_AI_Audit_Agent_2026_05_19.pdf).
|
|
8
|
-
|
|
9
|
-
**Presets**
|
|
10
|
-
|
|
11
|
-
- [`LSP8CustomizableToken`](contracts/presets/LSP8CustomizableToken.sol) (constructor-based deployment)
|
|
12
|
-
- [`LSP8CustomizableTokenInit`](contracts/presets/LSP8CustomizableTokenInit.sol) (proxy / upgradeable deployment)
|
|
13
|
-
- [`LSP8CustomizableTokenConstants`](contracts/presets/LSP8CustomizableTokenConstants.sol)
|
|
14
|
-
|
|
15
|
-
**Extensions** (standard and `Init` variants)
|
|
16
|
-
|
|
17
|
-
- [`AccessControlExtended`](contracts/extensions/AccessControlExtended/)
|
|
18
|
-
- [`LSP8Burnable`](contracts/extensions/LSP8Burnable/)
|
|
19
|
-
- [`LSP8Mintable`](contracts/extensions/LSP8Mintable/)
|
|
20
|
-
- [`LSP8CappedSupply`](contracts/extensions/LSP8CappedSupply/)
|
|
21
|
-
- [`LSP8CappedBalance`](contracts/extensions/LSP8CappedBalance/)
|
|
22
|
-
- [`LSP8NonTransferable`](contracts/extensions/LSP8NonTransferable/)
|
|
23
|
-
- [`LSP8Revokable`](contracts/extensions/LSP8Revokable/)
|
|
24
|
-
|
|
25
3
|
> The contracts [`LSP8Votes`](contracts/extensions/LSP8Votes/LSP8Votes.sol) and [`LSP8VotesInitAbstract`](contracts/extensions/LSP8Votes/LSP8VotesInitAbstract.sol) have not been formally audited by an external third party and are not recommended to be used in production without undergoing an independent security audit.
|
|
26
4
|
|
|
5
|
+
npm package for the LSP8 Identifiable Digital Asset standard (NFTs token IDs).
|
|
6
|
+
|
|
27
7
|
## Installation
|
|
28
8
|
|
|
29
9
|
```console
|
|
@@ -93,7 +73,10 @@ import {
|
|
|
93
73
|
|
|
94
74
|
## Foundry deployment
|
|
95
75
|
|
|
96
|
-
This package includes
|
|
76
|
+
This package includes two Foundry scripts to deploy the `LSP8CustomizableTokenInit` and `LSP8MintableInit` implementation contracts.
|
|
77
|
+
|
|
78
|
+
- `scripts/DeployLSP8CustomizableTokenInit.s.sol`
|
|
79
|
+
- `scripts/DeployLSP8MintableInit.s.sol`
|
|
97
80
|
|
|
98
81
|
Set your deployer key first:
|
|
99
82
|
|
|
@@ -103,20 +86,82 @@ export PRIVATE_KEY=0x...
|
|
|
103
86
|
|
|
104
87
|
## Dry run against LUKSO Testnet
|
|
105
88
|
|
|
89
|
+
<details>
|
|
90
|
+
<summary><code>LSP8CustomizableTokenInit</code></summary>
|
|
91
|
+
|
|
106
92
|
```console
|
|
107
93
|
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/DeployLSP8CustomizableTokenInit.s.sol:DeployLSP8CustomizableTokenInitScript --rpc-url https://rpc.testnet.lukso.network
|
|
108
94
|
```
|
|
109
95
|
|
|
96
|
+
</details>
|
|
97
|
+
|
|
98
|
+
<details>
|
|
99
|
+
<summary><code>LSP8MintableInit</code></summary>
|
|
100
|
+
|
|
101
|
+
```console
|
|
102
|
+
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/DeployLSP8MintableInit.s.sol:DeployLSP8MintableInitScript --rpc-url https://rpc.testnet.lukso.network
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</details>
|
|
106
|
+
|
|
110
107
|
## Broadcast the deployment
|
|
111
108
|
|
|
112
109
|
> Use one of the methods described in the [foundry docs](https://www.getfoundry.sh/forge/scripting#providing-a-private-key) to broadcast from a specific address
|
|
113
110
|
|
|
111
|
+
<details>
|
|
112
|
+
<summary><code>LSP8CustomizableTokenInit</code></summary>
|
|
113
|
+
|
|
114
114
|
```console
|
|
115
115
|
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/DeployLSP8CustomizableTokenInit.s.sol:DeployLSP8CustomizableTokenInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
</details>
|
|
119
|
+
|
|
120
|
+
<details>
|
|
121
|
+
<summary><code>LSP8MintableInit</code></summary>
|
|
122
|
+
|
|
123
|
+
```console
|
|
124
|
+
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/DeployLSP8MintableInit.s.sol:DeployLSP8MintableInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
</details>
|
|
128
|
+
|
|
118
129
|
Broadcast and verify on the LUKSO Testnet Blockscout explorer:
|
|
119
130
|
|
|
131
|
+
<details>
|
|
132
|
+
<summary><code>LSP8CustomizableTokenInit</code></summary>
|
|
133
|
+
|
|
134
|
+
```console
|
|
135
|
+
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/DeployLSP8CustomizableTokenInit.s.sol:DeployLSP8CustomizableTokenInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast --verify --verifier blockscout --verifier-url https://explorer.execution.testnet.lukso.network/api/
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
</details>
|
|
139
|
+
|
|
140
|
+
<details>
|
|
141
|
+
<summary><code>LSP8MintableInit</code></summary>
|
|
142
|
+
|
|
120
143
|
```console
|
|
121
|
-
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/
|
|
144
|
+
FOUNDRY_PROFILE=lsp8 forge script packages/lsp8-contracts/scripts/DeployLSP8MintableInit.s.sol:DeployLSP8MintableInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast --verify --verifier blockscout --verifier-url https://explorer.execution.testnet.lukso.network/api/
|
|
122
145
|
```
|
|
146
|
+
|
|
147
|
+
</details>
|
|
148
|
+
|
|
149
|
+
## Audits
|
|
150
|
+
|
|
151
|
+
The **LSP8 Customizable Token** presets and their token extensions listed below were reviewed by the AI auditing tool [Nethermind AI Audit Agent](https://www.nethermind.io/) (May 2026). See the [audit report PDF](../../audits/Nethermind_AI_Audit_Agent_2026_05_19.pdf).
|
|
152
|
+
|
|
153
|
+
**Presets**
|
|
154
|
+
|
|
155
|
+
- [`LSP8CustomizableToken`](contracts/presets/LSP8CustomizableToken.sol) (constructor-based deployment)
|
|
156
|
+
- [`LSP8CustomizableTokenInit`](contracts/presets/LSP8CustomizableTokenInit.sol) (proxy / upgradeable deployment)
|
|
157
|
+
- [`LSP8CustomizableTokenConstants`](contracts/presets/LSP8CustomizableTokenConstants.sol)
|
|
158
|
+
|
|
159
|
+
**Extensions** (standard and `Init` variants)
|
|
160
|
+
|
|
161
|
+
- [`AccessControlExtended`](contracts/extensions/AccessControlExtended/)
|
|
162
|
+
- [`LSP8Burnable`](contracts/extensions/LSP8Burnable/)
|
|
163
|
+
- [`LSP8Mintable`](contracts/extensions/LSP8Mintable/)
|
|
164
|
+
- [`LSP8CappedSupply`](contracts/extensions/LSP8CappedSupply/)
|
|
165
|
+
- [`LSP8CappedBalance`](contracts/extensions/LSP8CappedBalance/)
|
|
166
|
+
- [`LSP8NonTransferable`](contracts/extensions/LSP8NonTransferable/)
|
|
167
|
+
- [`LSP8Revokable`](contracts/extensions/LSP8Revokable/)
|
|
@@ -281,5 +281,5 @@
|
|
|
281
281
|
"deployedLinkReferences": {},
|
|
282
282
|
"immutableReferences": {},
|
|
283
283
|
"inputSourceName": "project/contracts/extensions/AccessControlExtended/IAccessControlExtended.sol",
|
|
284
|
-
"buildInfoId": "solc-0_8_28-
|
|
284
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
285
285
|
}
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"deployedLinkReferences": {},
|
|
24
24
|
"immutableReferences": {},
|
|
25
25
|
"inputSourceName": "project/contracts/extensions/LSP8CappedBalance/ILSP8CappedBalance.sol",
|
|
26
|
-
"buildInfoId": "solc-0_8_28-
|
|
26
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
27
27
|
}
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"deployedLinkReferences": {},
|
|
24
24
|
"immutableReferences": {},
|
|
25
25
|
"inputSourceName": "project/contracts/extensions/LSP8CappedSupply/ILSP8CappedSupply.sol",
|
|
26
|
-
"buildInfoId": "solc-0_8_28-
|
|
26
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
27
27
|
}
|
|
@@ -489,5 +489,5 @@
|
|
|
489
489
|
"deployedLinkReferences": {},
|
|
490
490
|
"immutableReferences": {},
|
|
491
491
|
"inputSourceName": "project/contracts/ILSP8IdentifiableDigitalAsset.sol",
|
|
492
|
-
"buildInfoId": "solc-0_8_28-
|
|
492
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
493
493
|
}
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"deployedLinkReferences": {},
|
|
59
59
|
"immutableReferences": {},
|
|
60
60
|
"inputSourceName": "project/contracts/extensions/LSP8Mintable/ILSP8Mintable.sol",
|
|
61
|
-
"buildInfoId": "solc-0_8_28-
|
|
61
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
62
62
|
}
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
{
|
|
7
7
|
"anonymous": false,
|
|
8
8
|
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"indexed": true,
|
|
11
|
+
"internalType": "bool",
|
|
12
|
+
"name": "nonTransferabilityEnabled",
|
|
13
|
+
"type": "bool"
|
|
14
|
+
},
|
|
9
15
|
{
|
|
10
16
|
"indexed": true,
|
|
11
17
|
"internalType": "uint256",
|
|
@@ -44,7 +50,7 @@
|
|
|
44
50
|
},
|
|
45
51
|
{
|
|
46
52
|
"inputs": [],
|
|
47
|
-
"name": "
|
|
53
|
+
"name": "nonTransferabilityEnabled",
|
|
48
54
|
"outputs": [
|
|
49
55
|
{
|
|
50
56
|
"internalType": "bool",
|
|
@@ -106,5 +112,5 @@
|
|
|
106
112
|
"deployedLinkReferences": {},
|
|
107
113
|
"immutableReferences": {},
|
|
108
114
|
"inputSourceName": "project/contracts/extensions/LSP8NonTransferable/ILSP8NonTransferable.sol",
|
|
109
|
-
"buildInfoId": "solc-0_8_28-
|
|
115
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
110
116
|
}
|
|
@@ -16,6 +16,43 @@
|
|
|
16
16
|
"name": "RevokableStatusChanged",
|
|
17
17
|
"type": "event"
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"anonymous": false,
|
|
21
|
+
"inputs": [
|
|
22
|
+
{
|
|
23
|
+
"indexed": true,
|
|
24
|
+
"internalType": "address",
|
|
25
|
+
"name": "revoker",
|
|
26
|
+
"type": "address"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"indexed": true,
|
|
30
|
+
"internalType": "address",
|
|
31
|
+
"name": "from",
|
|
32
|
+
"type": "address"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"indexed": true,
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "to",
|
|
38
|
+
"type": "address"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"indexed": false,
|
|
42
|
+
"internalType": "bytes32",
|
|
43
|
+
"name": "tokenId",
|
|
44
|
+
"type": "bytes32"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"indexed": false,
|
|
48
|
+
"internalType": "bytes",
|
|
49
|
+
"name": "data",
|
|
50
|
+
"type": "bytes"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"name": "TokenRevoked",
|
|
54
|
+
"type": "event"
|
|
55
|
+
},
|
|
19
56
|
{
|
|
20
57
|
"inputs": [],
|
|
21
58
|
"name": "disableRevokable",
|
|
@@ -71,5 +108,5 @@
|
|
|
71
108
|
"deployedLinkReferences": {},
|
|
72
109
|
"immutableReferences": {},
|
|
73
110
|
"inputSourceName": "project/contracts/extensions/LSP8Revokable/ILSP8Revokable.sol",
|
|
74
|
-
"buildInfoId": "solc-0_8_28-
|
|
111
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
75
112
|
}
|
|
@@ -942,5 +942,5 @@
|
|
|
942
942
|
"deployedLinkReferences": {},
|
|
943
943
|
"immutableReferences": {},
|
|
944
944
|
"inputSourceName": "project/contracts/extensions/LSP8Burnable/LSP8Burnable.sol",
|
|
945
|
-
"buildInfoId": "solc-0_8_28-
|
|
945
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
946
946
|
}
|
|
@@ -950,5 +950,5 @@
|
|
|
950
950
|
"deployedLinkReferences": {},
|
|
951
951
|
"immutableReferences": {},
|
|
952
952
|
"inputSourceName": "project/contracts/extensions/LSP8Burnable/LSP8BurnableInitAbstract.sol",
|
|
953
|
-
"buildInfoId": "solc-0_8_28-
|
|
953
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
954
954
|
}
|
|
@@ -1281,5 +1281,5 @@
|
|
|
1281
1281
|
"deployedLinkReferences": {},
|
|
1282
1282
|
"immutableReferences": {},
|
|
1283
1283
|
"inputSourceName": "project/contracts/extensions/LSP8CappedBalance/LSP8CappedBalanceAbstract.sol",
|
|
1284
|
-
"buildInfoId": "solc-0_8_28-
|
|
1284
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
1285
1285
|
}
|
|
@@ -1289,5 +1289,5 @@
|
|
|
1289
1289
|
"deployedLinkReferences": {},
|
|
1290
1290
|
"immutableReferences": {},
|
|
1291
1291
|
"inputSourceName": "project/contracts/extensions/LSP8CappedBalance/LSP8CappedBalanceInitAbstract.sol",
|
|
1292
|
-
"buildInfoId": "solc-0_8_28-
|
|
1292
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
1293
1293
|
}
|
|
@@ -937,5 +937,5 @@
|
|
|
937
937
|
"deployedLinkReferences": {},
|
|
938
938
|
"immutableReferences": {},
|
|
939
939
|
"inputSourceName": "project/contracts/extensions/LSP8CappedSupply/LSP8CappedSupplyAbstract.sol",
|
|
940
|
-
"buildInfoId": "solc-0_8_28-
|
|
940
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
941
941
|
}
|
|
@@ -945,5 +945,5 @@
|
|
|
945
945
|
"deployedLinkReferences": {},
|
|
946
946
|
"immutableReferences": {},
|
|
947
947
|
"inputSourceName": "project/contracts/extensions/LSP8CappedSupply/LSP8CappedSupplyInitAbstract.sol",
|
|
948
|
-
"buildInfoId": "solc-0_8_28-
|
|
948
|
+
"buildInfoId": "solc-0_8_28-a1f189205db65800e276c245fa7f2fa7071cb3a5"
|
|
949
949
|
}
|