@lukso/lsp7-contracts 0.17.3 → 0.19.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/ILSP7CappedBalance.json +1 -1
- package/artifacts/ILSP7CappedSupply.json +1 -1
- package/artifacts/ILSP7DigitalAsset.json +1 -1
- package/artifacts/ILSP7Mintable.json +1 -1
- package/artifacts/ILSP7NonTransferable.json +8 -2
- package/artifacts/ILSP7Revokable.json +38 -1
- package/artifacts/LSP7Burnable.json +1 -1
- package/artifacts/LSP7BurnableInitAbstract.json +1 -1
- package/artifacts/LSP7CappedBalanceAbstract.json +1 -1
- package/artifacts/LSP7CappedBalanceInitAbstract.json +1 -1
- package/artifacts/LSP7CappedSupplyAbstract.json +1 -1
- package/artifacts/LSP7CappedSupplyInitAbstract.json +1 -1
- package/artifacts/LSP7CustomizableToken.json +63 -20
- package/artifacts/LSP7CustomizableTokenInit.json +59 -16
- package/artifacts/LSP7DigitalAsset.json +1 -1
- package/artifacts/LSP7DigitalAssetInitAbstract.json +1 -1
- package/artifacts/LSP7Mintable.json +27 -4
- package/artifacts/LSP7MintableAbstract.json +1 -1
- package/artifacts/LSP7MintableInit.json +26 -3
- package/artifacts/LSP7MintableInitAbstract.json +1 -1
- package/artifacts/LSP7NonTransferableAbstract.json +20 -14
- package/artifacts/LSP7NonTransferableInitAbstract.json +20 -14
- package/artifacts/LSP7RevokableAbstract.json +38 -1
- package/artifacts/LSP7RevokableInitAbstract.json +38 -1
- package/artifacts/LSP7Votes.json +1 -1
- package/artifacts/LSP7VotesInitAbstract.json +1 -1
- package/contracts/LSP7DigitalAsset.sol +6 -18
- package/contracts/extensions/AccessControlExtended/AccessControlExtendedAbstract.sol +3 -9
- package/contracts/extensions/AccessControlExtended/AccessControlExtendedInitAbstract.sol +4 -12
- package/contracts/extensions/AccessControlExtended/IAccessControlExtended.sol +1 -3
- package/contracts/extensions/LSP7CappedBalance/LSP7CappedBalanceAbstract.sol +1 -3
- package/contracts/extensions/LSP7CappedBalance/LSP7CappedBalanceInitAbstract.sol +3 -9
- package/contracts/extensions/LSP7CappedSupply/LSP7CappedSupplyInitAbstract.sol +1 -3
- package/contracts/extensions/LSP7Mintable/LSP7MintableAbstract.sol +1 -3
- package/contracts/extensions/LSP7Mintable/LSP7MintableInitAbstract.sol +3 -9
- package/contracts/extensions/LSP7MusicNDT/LSP7MusicNDTAbstract.sol +126 -0
- package/contracts/extensions/LSP7MusicNDT/LSP7MusicNDTConstants.sol +16 -0
- package/contracts/extensions/LSP7MusicNDT/LSP7MusicNDTErrors.sol +7 -0
- package/contracts/extensions/LSP7NonTransferable/ILSP7NonTransferable.sol +10 -4
- package/contracts/extensions/LSP7NonTransferable/LSP7NonTransferableAbstract.sol +24 -11
- package/contracts/extensions/LSP7NonTransferable/LSP7NonTransferableInitAbstract.sol +26 -17
- package/contracts/extensions/LSP7Revokable/ILSP7Revokable.sol +15 -1
- package/contracts/extensions/LSP7Revokable/LSP7RevokableAbstract.sol +10 -6
- package/contracts/extensions/LSP7Revokable/LSP7RevokableInitAbstract.sol +12 -12
- package/contracts/extensions/LSP7Votes/LSP7VotesInitAbstract.sol +2 -6
- package/contracts/presets/LSP7CustomizableToken.sol +8 -24
- package/contracts/presets/LSP7CustomizableTokenInit.sol +10 -30
- package/contracts/presets/LSP7Mintable.sol +49 -19
- package/contracts/presets/LSP7MintableInit.sol +57 -22
- package/dist/abi.cjs +191 -29
- package/dist/abi.d.cts +252 -41
- package/dist/abi.d.mts +252 -41
- package/dist/abi.d.ts +252 -41
- package/dist/abi.mjs +191 -29
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
# LSP7 Digital Asset · [](https://www.npmjs.com/package/@lukso/lsp7-contracts)
|
|
2
2
|
|
|
3
|
-
npm package for the LSP7 Digital Asset standard (fungible and similar tokens).
|
|
4
|
-
|
|
5
|
-
## Audits
|
|
6
|
-
|
|
7
|
-
The **LSP7 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
|
-
- [`LSP7CustomizableToken`](contracts/presets/LSP7CustomizableToken.sol) (constructor-based deployment)
|
|
12
|
-
- [`LSP7CustomizableTokenInit`](contracts/presets/LSP7CustomizableTokenInit.sol) (proxy / upgradeable deployment)
|
|
13
|
-
- [`LSP7CustomizableTokenConstants`](contracts/presets/LSP7CustomizableTokenConstants.sol)
|
|
14
|
-
|
|
15
|
-
**Extensions** (standard and `Init` variants)
|
|
16
|
-
|
|
17
|
-
- [`AccessControlExtended`](contracts/extensions/AccessControlExtended/)
|
|
18
|
-
- [`LSP7Burnable`](contracts/extensions/LSP7Burnable/)
|
|
19
|
-
- [`LSP7Mintable`](contracts/extensions/LSP7Mintable/)
|
|
20
|
-
- [`LSP7CappedSupply`](contracts/extensions/LSP7CappedSupply/)
|
|
21
|
-
- [`LSP7CappedBalance`](contracts/extensions/LSP7CappedBalance/)
|
|
22
|
-
- [`LSP7NonTransferable`](contracts/extensions/LSP7NonTransferable/)
|
|
23
|
-
- [`LSP7Revokable`](contracts/extensions/LSP7Revokable/)
|
|
24
|
-
|
|
25
3
|
> The contracts [`LSP7Votes`](contracts/extensions/LSP7Votes/LSP7Votes.sol) and [`LSP7VotesInitAbstract`](contracts/extensions/LSP7Votes/LSP7VotesInitAbstract.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 LSP7 Digital Asset standard (fungible token).
|
|
6
|
+
|
|
27
7
|
## Installation
|
|
28
8
|
|
|
29
9
|
```console
|
|
@@ -90,7 +70,10 @@ import {
|
|
|
90
70
|
|
|
91
71
|
## Foundry deployment
|
|
92
72
|
|
|
93
|
-
This package includes
|
|
73
|
+
This package includes two Foundry scripts to deploy the `LSP7CustomizableTokenInit` and `LSP7MintableInit` implementation contracts.
|
|
74
|
+
|
|
75
|
+
- `scripts/DeployLSP7CustomizableTokenInit.s.sol`
|
|
76
|
+
- `scripts/DeployLSP7MintableInit.s.sol`
|
|
94
77
|
|
|
95
78
|
Set your deployer key first:
|
|
96
79
|
|
|
@@ -100,20 +83,82 @@ export PRIVATE_KEY=0x...
|
|
|
100
83
|
|
|
101
84
|
## Dry run against LUKSO Testnet
|
|
102
85
|
|
|
86
|
+
<details>
|
|
87
|
+
<summary><code>LSP7CustomizableTokenInit</code></summary>
|
|
88
|
+
|
|
103
89
|
```console
|
|
104
90
|
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/DeployLSP7CustomizableTokenInit.s.sol:DeployLSP7CustomizableTokenInitScript --rpc-url https://rpc.testnet.lukso.network
|
|
105
91
|
```
|
|
106
92
|
|
|
93
|
+
</details>
|
|
94
|
+
|
|
95
|
+
<details>
|
|
96
|
+
<summary><code>LSP7MintableInit</code></summary>
|
|
97
|
+
|
|
98
|
+
```console
|
|
99
|
+
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/DeployLSP7MintableInit.s.sol:DeployLSP7MintableInitScript --rpc-url https://rpc.testnet.lukso.network
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
</details>
|
|
103
|
+
|
|
107
104
|
## Broadcast the deployment
|
|
108
105
|
|
|
109
106
|
> 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
|
|
110
107
|
|
|
108
|
+
<details>
|
|
109
|
+
<summary><code>LSP7CustomizableTokenInit</code></summary>
|
|
110
|
+
|
|
111
111
|
```console
|
|
112
112
|
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/DeployLSP7CustomizableTokenInit.s.sol:DeployLSP7CustomizableTokenInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><code>LSP7MintableInit</code></summary>
|
|
119
|
+
|
|
120
|
+
```console
|
|
121
|
+
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/DeployLSP7MintableInit.s.sol:DeployLSP7MintableInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
</details>
|
|
125
|
+
|
|
115
126
|
Broadcast and verify on the LUKSO Testnet Blockscout explorer:
|
|
116
127
|
|
|
128
|
+
<details>
|
|
129
|
+
<summary><code>LSP7CustomizableTokenInit</code></summary>
|
|
130
|
+
|
|
131
|
+
```console
|
|
132
|
+
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/DeployLSP7CustomizableTokenInit.s.sol:DeployLSP7CustomizableTokenInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast --verify --verifier blockscout --verifier-url https://explorer.execution.testnet.lukso.network/api/
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
</details>
|
|
136
|
+
|
|
137
|
+
<details>
|
|
138
|
+
<summary><code>LSP7MintableInit</code></summary>
|
|
139
|
+
|
|
117
140
|
```console
|
|
118
|
-
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/
|
|
141
|
+
FOUNDRY_PROFILE=lsp7 forge script packages/lsp7-contracts/scripts/DeployLSP7MintableInit.s.sol:DeployLSP7MintableInitScript --rpc-url https://rpc.testnet.lukso.network --broadcast --verify --verifier blockscout --verifier-url https://explorer.execution.testnet.lukso.network/api/
|
|
119
142
|
```
|
|
143
|
+
|
|
144
|
+
</details>
|
|
145
|
+
|
|
146
|
+
## Audits
|
|
147
|
+
|
|
148
|
+
The **LSP7 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).
|
|
149
|
+
|
|
150
|
+
**Presets**
|
|
151
|
+
|
|
152
|
+
- [`LSP7CustomizableToken`](contracts/presets/LSP7CustomizableToken.sol) (constructor-based deployment)
|
|
153
|
+
- [`LSP7CustomizableTokenInit`](contracts/presets/LSP7CustomizableTokenInit.sol) (proxy / upgradeable deployment)
|
|
154
|
+
- [`LSP7CustomizableTokenConstants`](contracts/presets/LSP7CustomizableTokenConstants.sol)
|
|
155
|
+
|
|
156
|
+
**Extensions** (standard and `Init` variants)
|
|
157
|
+
|
|
158
|
+
- [`AccessControlExtended`](contracts/extensions/AccessControlExtended/)
|
|
159
|
+
- [`LSP7Burnable`](contracts/extensions/LSP7Burnable/)
|
|
160
|
+
- [`LSP7Mintable`](contracts/extensions/LSP7Mintable/)
|
|
161
|
+
- [`LSP7CappedSupply`](contracts/extensions/LSP7CappedSupply/)
|
|
162
|
+
- [`LSP7CappedBalance`](contracts/extensions/LSP7CappedBalance/)
|
|
163
|
+
- [`LSP7NonTransferable`](contracts/extensions/LSP7NonTransferable/)
|
|
164
|
+
- [`LSP7Revokable`](contracts/extensions/LSP7Revokable/)
|
|
@@ -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-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
285
285
|
}
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"deployedLinkReferences": {},
|
|
24
24
|
"immutableReferences": {},
|
|
25
25
|
"inputSourceName": "project/contracts/extensions/LSP7CappedBalance/ILSP7CappedBalance.sol",
|
|
26
|
-
"buildInfoId": "solc-0_8_28-
|
|
26
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
27
27
|
}
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"deployedLinkReferences": {},
|
|
24
24
|
"immutableReferences": {},
|
|
25
25
|
"inputSourceName": "project/contracts/extensions/LSP7CappedSupply/ILSP7CappedSupply.sol",
|
|
26
|
-
"buildInfoId": "solc-0_8_28-
|
|
26
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
27
27
|
}
|
|
@@ -390,5 +390,5 @@
|
|
|
390
390
|
"deployedLinkReferences": {},
|
|
391
391
|
"immutableReferences": {},
|
|
392
392
|
"inputSourceName": "project/contracts/ILSP7DigitalAsset.sol",
|
|
393
|
-
"buildInfoId": "solc-0_8_28-
|
|
393
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
394
394
|
}
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"deployedLinkReferences": {},
|
|
59
59
|
"immutableReferences": {},
|
|
60
60
|
"inputSourceName": "project/contracts/extensions/LSP7Mintable/ILSP7Mintable.sol",
|
|
61
|
-
"buildInfoId": "solc-0_8_28-
|
|
61
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
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/LSP7NonTransferable/ILSP7NonTransferable.sol",
|
|
109
|
-
"buildInfoId": "solc-0_8_28-
|
|
115
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
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": "uint256",
|
|
43
|
+
"name": "amount",
|
|
44
|
+
"type": "uint256"
|
|
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/LSP7Revokable/ILSP7Revokable.sol",
|
|
74
|
-
"buildInfoId": "solc-0_8_28-
|
|
111
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
75
112
|
}
|
|
@@ -816,5 +816,5 @@
|
|
|
816
816
|
"deployedLinkReferences": {},
|
|
817
817
|
"immutableReferences": {},
|
|
818
818
|
"inputSourceName": "project/contracts/extensions/LSP7Burnable/LSP7Burnable.sol",
|
|
819
|
-
"buildInfoId": "solc-0_8_28-
|
|
819
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
820
820
|
}
|
|
@@ -824,5 +824,5 @@
|
|
|
824
824
|
"deployedLinkReferences": {},
|
|
825
825
|
"immutableReferences": {},
|
|
826
826
|
"inputSourceName": "project/contracts/extensions/LSP7Burnable/LSP7BurnableInitAbstract.sol",
|
|
827
|
-
"buildInfoId": "solc-0_8_28-
|
|
827
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
828
828
|
}
|
|
@@ -1155,5 +1155,5 @@
|
|
|
1155
1155
|
"deployedLinkReferences": {},
|
|
1156
1156
|
"immutableReferences": {},
|
|
1157
1157
|
"inputSourceName": "project/contracts/extensions/LSP7CappedBalance/LSP7CappedBalanceAbstract.sol",
|
|
1158
|
-
"buildInfoId": "solc-0_8_28-
|
|
1158
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
1159
1159
|
}
|
|
@@ -1163,5 +1163,5 @@
|
|
|
1163
1163
|
"deployedLinkReferences": {},
|
|
1164
1164
|
"immutableReferences": {},
|
|
1165
1165
|
"inputSourceName": "project/contracts/extensions/LSP7CappedBalance/LSP7CappedBalanceInitAbstract.sol",
|
|
1166
|
-
"buildInfoId": "solc-0_8_28-
|
|
1166
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
1167
1167
|
}
|
|
@@ -806,5 +806,5 @@
|
|
|
806
806
|
"deployedLinkReferences": {},
|
|
807
807
|
"immutableReferences": {},
|
|
808
808
|
"inputSourceName": "project/contracts/extensions/LSP7CappedSupply/LSP7CappedSupplyAbstract.sol",
|
|
809
|
-
"buildInfoId": "solc-0_8_28-
|
|
809
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
810
810
|
}
|
|
@@ -814,5 +814,5 @@
|
|
|
814
814
|
"deployedLinkReferences": {},
|
|
815
815
|
"immutableReferences": {},
|
|
816
816
|
"inputSourceName": "project/contracts/extensions/LSP7CappedSupply/LSP7CappedSupplyInitAbstract.sol",
|
|
817
|
-
"buildInfoId": "solc-0_8_28-
|
|
817
|
+
"buildInfoId": "solc-0_8_28-6687e4d17c572fa4680ff9f2dbe87132f6a57aaa"
|
|
818
818
|
}
|