@lukso/lsp25-contracts 0.15.0 → 0.15.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 CHANGED
@@ -10,8 +10,20 @@ npm i @lukso/lsp25-contracts
10
10
 
11
11
  ## Available Constants & Types
12
12
 
13
- The `@lukso/lsp25-contracts` npm package contains useful constants such as InterfaceIds, and specific constants related to the LSP25 Standard. You can import and access them as follow:
13
+ The `@lukso/lsp25-contracts` npm package contains useful constants such as interface IDs, and specific constants related to the LSP25 Standard. You can import and access them as follows.
14
+
15
+ In Javascript.
14
16
 
15
17
  ```js
16
18
  import { LSP25_VERSION, INTERFACE_ID_LSP25 } from "@lukso/lsp25-contracts";
17
19
  ```
20
+
21
+ In Solidity.
22
+
23
+ <!-- prettier-ignore -->
24
+ ```solidity
25
+ import {
26
+ _INTERFACEID_LSP25,
27
+ LSP25_VERSION
28
+ } from "@lukso/lsp25-contracts/contracts/LSP25Constants.sol";
29
+ ```
@@ -15,7 +15,7 @@ import {RelayCallBeforeStartTime, RelayCallExpired} from "./LSP25Errors.sol";
15
15
  * @author Jean Cavallera (CJ42)
16
16
  * @dev This contract can be used as a backbone for other smart contracts to implement meta-transactions via the LSP25 Execute Relay Call interface.
17
17
  *
18
- * It contains a storage of nonces for signer addresses across various channel IDs, enabling these signers to submit signed transactions that order-independant.
18
+ * It contains a storage of nonces for signer addresses across various channel IDs, enabling these signers to submit signed transactions that order-independent.
19
19
  * (transactions that do not need to be submitted one after the other in a specific order).
20
20
  *
21
21
  * Finally, it contains internal functions to verify signatures for specific calldata according the signature format specified in the LSP25 standard.
package/dist/abi.cjs ADDED
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ const ilsp25ExecuteRelayCallAbi = [
4
+ {
5
+ type: "function",
6
+ inputs: [
7
+ { name: "signature", internalType: "bytes", type: "bytes" },
8
+ { name: "nonce", internalType: "uint256", type: "uint256" },
9
+ { name: "validityTimestamps", internalType: "uint256", type: "uint256" },
10
+ { name: "payload", internalType: "bytes", type: "bytes" }
11
+ ],
12
+ name: "executeRelayCall",
13
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
14
+ stateMutability: "payable"
15
+ },
16
+ {
17
+ type: "function",
18
+ inputs: [
19
+ { name: "signatures", internalType: "bytes[]", type: "bytes[]" },
20
+ { name: "nonces", internalType: "uint256[]", type: "uint256[]" },
21
+ {
22
+ name: "validityTimestamps",
23
+ internalType: "uint256[]",
24
+ type: "uint256[]"
25
+ },
26
+ { name: "values", internalType: "uint256[]", type: "uint256[]" },
27
+ { name: "payloads", internalType: "bytes[]", type: "bytes[]" }
28
+ ],
29
+ name: "executeRelayCallBatch",
30
+ outputs: [{ name: "", internalType: "bytes[]", type: "bytes[]" }],
31
+ stateMutability: "payable"
32
+ },
33
+ {
34
+ type: "function",
35
+ inputs: [
36
+ { name: "from", internalType: "address", type: "address" },
37
+ { name: "channelId", internalType: "uint128", type: "uint128" }
38
+ ],
39
+ name: "getNonce",
40
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
41
+ stateMutability: "view"
42
+ }
43
+ ];
44
+
45
+ exports.ilsp25ExecuteRelayCallAbi = ilsp25ExecuteRelayCallAbi;
package/dist/abi.d.cts ADDED
@@ -0,0 +1,77 @@
1
+ declare const ilsp25ExecuteRelayCallAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly inputs: readonly [{
4
+ readonly name: "signature";
5
+ readonly internalType: "bytes";
6
+ readonly type: "bytes";
7
+ }, {
8
+ readonly name: "nonce";
9
+ readonly internalType: "uint256";
10
+ readonly type: "uint256";
11
+ }, {
12
+ readonly name: "validityTimestamps";
13
+ readonly internalType: "uint256";
14
+ readonly type: "uint256";
15
+ }, {
16
+ readonly name: "payload";
17
+ readonly internalType: "bytes";
18
+ readonly type: "bytes";
19
+ }];
20
+ readonly name: "executeRelayCall";
21
+ readonly outputs: readonly [{
22
+ readonly name: "";
23
+ readonly internalType: "bytes";
24
+ readonly type: "bytes";
25
+ }];
26
+ readonly stateMutability: "payable";
27
+ }, {
28
+ readonly type: "function";
29
+ readonly inputs: readonly [{
30
+ readonly name: "signatures";
31
+ readonly internalType: "bytes[]";
32
+ readonly type: "bytes[]";
33
+ }, {
34
+ readonly name: "nonces";
35
+ readonly internalType: "uint256[]";
36
+ readonly type: "uint256[]";
37
+ }, {
38
+ readonly name: "validityTimestamps";
39
+ readonly internalType: "uint256[]";
40
+ readonly type: "uint256[]";
41
+ }, {
42
+ readonly name: "values";
43
+ readonly internalType: "uint256[]";
44
+ readonly type: "uint256[]";
45
+ }, {
46
+ readonly name: "payloads";
47
+ readonly internalType: "bytes[]";
48
+ readonly type: "bytes[]";
49
+ }];
50
+ readonly name: "executeRelayCallBatch";
51
+ readonly outputs: readonly [{
52
+ readonly name: "";
53
+ readonly internalType: "bytes[]";
54
+ readonly type: "bytes[]";
55
+ }];
56
+ readonly stateMutability: "payable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly inputs: readonly [{
60
+ readonly name: "from";
61
+ readonly internalType: "address";
62
+ readonly type: "address";
63
+ }, {
64
+ readonly name: "channelId";
65
+ readonly internalType: "uint128";
66
+ readonly type: "uint128";
67
+ }];
68
+ readonly name: "getNonce";
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly internalType: "uint256";
72
+ readonly type: "uint256";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ }];
76
+
77
+ export { ilsp25ExecuteRelayCallAbi };
package/dist/abi.d.mts ADDED
@@ -0,0 +1,77 @@
1
+ declare const ilsp25ExecuteRelayCallAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly inputs: readonly [{
4
+ readonly name: "signature";
5
+ readonly internalType: "bytes";
6
+ readonly type: "bytes";
7
+ }, {
8
+ readonly name: "nonce";
9
+ readonly internalType: "uint256";
10
+ readonly type: "uint256";
11
+ }, {
12
+ readonly name: "validityTimestamps";
13
+ readonly internalType: "uint256";
14
+ readonly type: "uint256";
15
+ }, {
16
+ readonly name: "payload";
17
+ readonly internalType: "bytes";
18
+ readonly type: "bytes";
19
+ }];
20
+ readonly name: "executeRelayCall";
21
+ readonly outputs: readonly [{
22
+ readonly name: "";
23
+ readonly internalType: "bytes";
24
+ readonly type: "bytes";
25
+ }];
26
+ readonly stateMutability: "payable";
27
+ }, {
28
+ readonly type: "function";
29
+ readonly inputs: readonly [{
30
+ readonly name: "signatures";
31
+ readonly internalType: "bytes[]";
32
+ readonly type: "bytes[]";
33
+ }, {
34
+ readonly name: "nonces";
35
+ readonly internalType: "uint256[]";
36
+ readonly type: "uint256[]";
37
+ }, {
38
+ readonly name: "validityTimestamps";
39
+ readonly internalType: "uint256[]";
40
+ readonly type: "uint256[]";
41
+ }, {
42
+ readonly name: "values";
43
+ readonly internalType: "uint256[]";
44
+ readonly type: "uint256[]";
45
+ }, {
46
+ readonly name: "payloads";
47
+ readonly internalType: "bytes[]";
48
+ readonly type: "bytes[]";
49
+ }];
50
+ readonly name: "executeRelayCallBatch";
51
+ readonly outputs: readonly [{
52
+ readonly name: "";
53
+ readonly internalType: "bytes[]";
54
+ readonly type: "bytes[]";
55
+ }];
56
+ readonly stateMutability: "payable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly inputs: readonly [{
60
+ readonly name: "from";
61
+ readonly internalType: "address";
62
+ readonly type: "address";
63
+ }, {
64
+ readonly name: "channelId";
65
+ readonly internalType: "uint128";
66
+ readonly type: "uint128";
67
+ }];
68
+ readonly name: "getNonce";
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly internalType: "uint256";
72
+ readonly type: "uint256";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ }];
76
+
77
+ export { ilsp25ExecuteRelayCallAbi };
package/dist/abi.d.ts ADDED
@@ -0,0 +1,77 @@
1
+ declare const ilsp25ExecuteRelayCallAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly inputs: readonly [{
4
+ readonly name: "signature";
5
+ readonly internalType: "bytes";
6
+ readonly type: "bytes";
7
+ }, {
8
+ readonly name: "nonce";
9
+ readonly internalType: "uint256";
10
+ readonly type: "uint256";
11
+ }, {
12
+ readonly name: "validityTimestamps";
13
+ readonly internalType: "uint256";
14
+ readonly type: "uint256";
15
+ }, {
16
+ readonly name: "payload";
17
+ readonly internalType: "bytes";
18
+ readonly type: "bytes";
19
+ }];
20
+ readonly name: "executeRelayCall";
21
+ readonly outputs: readonly [{
22
+ readonly name: "";
23
+ readonly internalType: "bytes";
24
+ readonly type: "bytes";
25
+ }];
26
+ readonly stateMutability: "payable";
27
+ }, {
28
+ readonly type: "function";
29
+ readonly inputs: readonly [{
30
+ readonly name: "signatures";
31
+ readonly internalType: "bytes[]";
32
+ readonly type: "bytes[]";
33
+ }, {
34
+ readonly name: "nonces";
35
+ readonly internalType: "uint256[]";
36
+ readonly type: "uint256[]";
37
+ }, {
38
+ readonly name: "validityTimestamps";
39
+ readonly internalType: "uint256[]";
40
+ readonly type: "uint256[]";
41
+ }, {
42
+ readonly name: "values";
43
+ readonly internalType: "uint256[]";
44
+ readonly type: "uint256[]";
45
+ }, {
46
+ readonly name: "payloads";
47
+ readonly internalType: "bytes[]";
48
+ readonly type: "bytes[]";
49
+ }];
50
+ readonly name: "executeRelayCallBatch";
51
+ readonly outputs: readonly [{
52
+ readonly name: "";
53
+ readonly internalType: "bytes[]";
54
+ readonly type: "bytes[]";
55
+ }];
56
+ readonly stateMutability: "payable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly inputs: readonly [{
60
+ readonly name: "from";
61
+ readonly internalType: "address";
62
+ readonly type: "address";
63
+ }, {
64
+ readonly name: "channelId";
65
+ readonly internalType: "uint128";
66
+ readonly type: "uint128";
67
+ }];
68
+ readonly name: "getNonce";
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly internalType: "uint256";
72
+ readonly type: "uint256";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ }];
76
+
77
+ export { ilsp25ExecuteRelayCallAbi };
package/dist/abi.mjs ADDED
@@ -0,0 +1,43 @@
1
+ const ilsp25ExecuteRelayCallAbi = [
2
+ {
3
+ type: "function",
4
+ inputs: [
5
+ { name: "signature", internalType: "bytes", type: "bytes" },
6
+ { name: "nonce", internalType: "uint256", type: "uint256" },
7
+ { name: "validityTimestamps", internalType: "uint256", type: "uint256" },
8
+ { name: "payload", internalType: "bytes", type: "bytes" }
9
+ ],
10
+ name: "executeRelayCall",
11
+ outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
12
+ stateMutability: "payable"
13
+ },
14
+ {
15
+ type: "function",
16
+ inputs: [
17
+ { name: "signatures", internalType: "bytes[]", type: "bytes[]" },
18
+ { name: "nonces", internalType: "uint256[]", type: "uint256[]" },
19
+ {
20
+ name: "validityTimestamps",
21
+ internalType: "uint256[]",
22
+ type: "uint256[]"
23
+ },
24
+ { name: "values", internalType: "uint256[]", type: "uint256[]" },
25
+ { name: "payloads", internalType: "bytes[]", type: "bytes[]" }
26
+ ],
27
+ name: "executeRelayCallBatch",
28
+ outputs: [{ name: "", internalType: "bytes[]", type: "bytes[]" }],
29
+ stateMutability: "payable"
30
+ },
31
+ {
32
+ type: "function",
33
+ inputs: [
34
+ { name: "from", internalType: "address", type: "address" },
35
+ { name: "channelId", internalType: "uint128", type: "uint128" }
36
+ ],
37
+ name: "getNonce",
38
+ outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
39
+ stateMutability: "view"
40
+ }
41
+ ];
42
+
43
+ export { ilsp25ExecuteRelayCallAbi };
package/package.json CHANGED
@@ -1,28 +1,9 @@
1
1
  {
2
2
  "name": "@lukso/lsp25-contracts",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Package for the LSP25 Execute Relay Call 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
- },
19
- "files": [
20
- "contracts/**/*.sol",
21
- "!contracts/Mocks/**/*.sol",
22
- "artifacts/*.json",
23
- "dist",
24
- "./README.md"
25
- ],
26
7
  "keywords": [
27
8
  "LUKSO",
28
9
  "LSP",
@@ -33,17 +14,46 @@
33
14
  "EVM",
34
15
  "Solidity"
35
16
  ],
17
+ "files": [
18
+ "contracts/**/*.sol",
19
+ "!contracts/Mocks/**/*.sol",
20
+ "artifacts/*.json",
21
+ "dist"
22
+ ],
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
+ },
36
46
  "scripts": {
37
47
  "build": "hardhat compile --show-stack-traces",
38
48
  "build:js": "unbuild",
39
49
  "build:types": "npx wagmi generate",
40
- "clean": "hardhat clean && rm -Rf dist/",
50
+ "build:package": "hardhat prepare-package",
51
+ "clean": "hardhat clean && rm -Rf dist/ cache/ node_modules/ .turbo/ types/ typechain/ build/ artifacts/",
41
52
  "format": "prettier --write .",
42
53
  "lint": "eslint . --ext .ts,.js",
43
54
  "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'",
44
55
  "test": "hardhat test --no-compile tests/*.test.ts",
45
- "test:coverage": "hardhat coverage",
46
- "package": "hardhat prepare-package"
56
+ "test:coverage": "hardhat coverage"
47
57
  },
48
58
  "dependencies": {
49
59
  "@openzeppelin/contracts": "^4.9.3"
@@ -1,108 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "ILSP25ExecuteRelayCall",
4
- "sourceName": "contracts/ILSP25ExecuteRelayCall.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "bytes",
10
- "name": "signature",
11
- "type": "bytes"
12
- },
13
- {
14
- "internalType": "uint256",
15
- "name": "nonce",
16
- "type": "uint256"
17
- },
18
- {
19
- "internalType": "uint256",
20
- "name": "validityTimestamps",
21
- "type": "uint256"
22
- },
23
- {
24
- "internalType": "bytes",
25
- "name": "payload",
26
- "type": "bytes"
27
- }
28
- ],
29
- "name": "executeRelayCall",
30
- "outputs": [
31
- {
32
- "internalType": "bytes",
33
- "name": "",
34
- "type": "bytes"
35
- }
36
- ],
37
- "stateMutability": "payable",
38
- "type": "function"
39
- },
40
- {
41
- "inputs": [
42
- {
43
- "internalType": "bytes[]",
44
- "name": "signatures",
45
- "type": "bytes[]"
46
- },
47
- {
48
- "internalType": "uint256[]",
49
- "name": "nonces",
50
- "type": "uint256[]"
51
- },
52
- {
53
- "internalType": "uint256[]",
54
- "name": "validityTimestamps",
55
- "type": "uint256[]"
56
- },
57
- {
58
- "internalType": "uint256[]",
59
- "name": "values",
60
- "type": "uint256[]"
61
- },
62
- {
63
- "internalType": "bytes[]",
64
- "name": "payloads",
65
- "type": "bytes[]"
66
- }
67
- ],
68
- "name": "executeRelayCallBatch",
69
- "outputs": [
70
- {
71
- "internalType": "bytes[]",
72
- "name": "",
73
- "type": "bytes[]"
74
- }
75
- ],
76
- "stateMutability": "payable",
77
- "type": "function"
78
- },
79
- {
80
- "inputs": [
81
- {
82
- "internalType": "address",
83
- "name": "from",
84
- "type": "address"
85
- },
86
- {
87
- "internalType": "uint128",
88
- "name": "channelId",
89
- "type": "uint128"
90
- }
91
- ],
92
- "name": "getNonce",
93
- "outputs": [
94
- {
95
- "internalType": "uint256",
96
- "name": "",
97
- "type": "uint256"
98
- }
99
- ],
100
- "stateMutability": "view",
101
- "type": "function"
102
- }
103
- ],
104
- "bytecode": "0x",
105
- "deployedBytecode": "0x",
106
- "linkReferences": {},
107
- "deployedLinkReferences": {}
108
- }
File without changes
File without changes
File without changes
File without changes
File without changes