Skip to content

Commit 41e9ba7

Browse files
committed
fix ERC1404 visibility layers and move custom errors to internal interface
1 parent 1e66afe commit 41e9ba7

16 files changed

+280
-47
lines changed

abi/ERC1404Base.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[
2+
{
3+
"inputs": [],
4+
"name": "ERC1404Base__ArrayLengthMismatch",
5+
"type": "error"
6+
},
27
{
38
"inputs": [],
49
"name": "ERC20Base__ApproveFromZeroAddress",

abi/ERC1404BaseInternal.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[
2+
{
3+
"inputs": [],
4+
"name": "ERC1404Base__ArrayLengthMismatch",
5+
"type": "error"
6+
},
27
{
38
"inputs": [],
49
"name": "ERC20Base__ApproveFromZeroAddress",

abi/ERC1404BaseStorage.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

abi/IERC1404Base.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,54 @@
11
[
2+
{
3+
"inputs": [],
4+
"name": "ERC1404Base__ArrayLengthMismatch",
5+
"type": "error"
6+
},
7+
{
8+
"inputs": [],
9+
"name": "ERC20Base__ApproveFromZeroAddress",
10+
"type": "error"
11+
},
12+
{
13+
"inputs": [],
14+
"name": "ERC20Base__ApproveToZeroAddress",
15+
"type": "error"
16+
},
17+
{
18+
"inputs": [],
19+
"name": "ERC20Base__BurnExceedsBalance",
20+
"type": "error"
21+
},
22+
{
23+
"inputs": [],
24+
"name": "ERC20Base__BurnFromZeroAddress",
25+
"type": "error"
26+
},
27+
{
28+
"inputs": [],
29+
"name": "ERC20Base__InsufficientAllowance",
30+
"type": "error"
31+
},
32+
{
33+
"inputs": [],
34+
"name": "ERC20Base__MintToZeroAddress",
35+
"type": "error"
36+
},
37+
{
38+
"inputs": [],
39+
"name": "ERC20Base__TransferExceedsBalance",
40+
"type": "error"
41+
},
42+
{
43+
"inputs": [],
44+
"name": "ERC20Base__TransferFromZeroAddress",
45+
"type": "error"
46+
},
47+
{
48+
"inputs": [],
49+
"name": "ERC20Base__TransferToZeroAddress",
50+
"type": "error"
51+
},
252
{
353
"anonymous": false,
454
"inputs": [

abi/IERC1404BaseInternal.json

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[
2+
{
3+
"inputs": [],
4+
"name": "ERC1404Base__ArrayLengthMismatch",
5+
"type": "error"
6+
},
7+
{
8+
"inputs": [],
9+
"name": "ERC20Base__ApproveFromZeroAddress",
10+
"type": "error"
11+
},
12+
{
13+
"inputs": [],
14+
"name": "ERC20Base__ApproveToZeroAddress",
15+
"type": "error"
16+
},
17+
{
18+
"inputs": [],
19+
"name": "ERC20Base__BurnExceedsBalance",
20+
"type": "error"
21+
},
22+
{
23+
"inputs": [],
24+
"name": "ERC20Base__BurnFromZeroAddress",
25+
"type": "error"
26+
},
27+
{
28+
"inputs": [],
29+
"name": "ERC20Base__InsufficientAllowance",
30+
"type": "error"
31+
},
32+
{
33+
"inputs": [],
34+
"name": "ERC20Base__MintToZeroAddress",
35+
"type": "error"
36+
},
37+
{
38+
"inputs": [],
39+
"name": "ERC20Base__TransferExceedsBalance",
40+
"type": "error"
41+
},
42+
{
43+
"inputs": [],
44+
"name": "ERC20Base__TransferFromZeroAddress",
45+
"type": "error"
46+
},
47+
{
48+
"inputs": [],
49+
"name": "ERC20Base__TransferToZeroAddress",
50+
"type": "error"
51+
},
52+
{
53+
"anonymous": false,
54+
"inputs": [
55+
{
56+
"indexed": true,
57+
"internalType": "address",
58+
"name": "owner",
59+
"type": "address"
60+
},
61+
{
62+
"indexed": true,
63+
"internalType": "address",
64+
"name": "spender",
65+
"type": "address"
66+
},
67+
{
68+
"indexed": false,
69+
"internalType": "uint256",
70+
"name": "value",
71+
"type": "uint256"
72+
}
73+
],
74+
"name": "Approval",
75+
"type": "event"
76+
},
77+
{
78+
"anonymous": false,
79+
"inputs": [
80+
{
81+
"indexed": true,
82+
"internalType": "address",
83+
"name": "from",
84+
"type": "address"
85+
},
86+
{
87+
"indexed": true,
88+
"internalType": "address",
89+
"name": "to",
90+
"type": "address"
91+
},
92+
{
93+
"indexed": false,
94+
"internalType": "uint256",
95+
"name": "value",
96+
"type": "uint256"
97+
}
98+
],
99+
"name": "Transfer",
100+
"type": "event"
101+
}
102+
]

abi/IERC1404Internal.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[
2+
{
3+
"anonymous": false,
4+
"inputs": [
5+
{
6+
"indexed": true,
7+
"internalType": "address",
8+
"name": "owner",
9+
"type": "address"
10+
},
11+
{
12+
"indexed": true,
13+
"internalType": "address",
14+
"name": "spender",
15+
"type": "address"
16+
},
17+
{
18+
"indexed": false,
19+
"internalType": "uint256",
20+
"name": "value",
21+
"type": "uint256"
22+
}
23+
],
24+
"name": "Approval",
25+
"type": "event"
26+
},
27+
{
28+
"anonymous": false,
29+
"inputs": [
30+
{
31+
"indexed": true,
32+
"internalType": "address",
33+
"name": "from",
34+
"type": "address"
35+
},
36+
{
37+
"indexed": true,
38+
"internalType": "address",
39+
"name": "to",
40+
"type": "address"
41+
},
42+
{
43+
"indexed": false,
44+
"internalType": "uint256",
45+
"name": "value",
46+
"type": "uint256"
47+
}
48+
],
49+
"name": "Transfer",
50+
"type": "event"
51+
}
52+
]

abi/ISolidStateERC1404.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[
2+
{
3+
"inputs": [],
4+
"name": "ERC1404Base__ArrayLengthMismatch",
5+
"type": "error"
6+
},
27
{
38
"inputs": [],
49
"name": "ERC20Base__ApproveFromZeroAddress",

abi/SolidStateERC1404.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"name": "ECDSA__InvalidV",
1515
"type": "error"
1616
},
17+
{
18+
"inputs": [],
19+
"name": "ERC1404Base__ArrayLengthMismatch",
20+
"type": "error"
21+
},
1722
{
1823
"inputs": [],
1924
"name": "ERC20Base__ApproveFromZeroAddress",

contracts/interfaces/IERC1404.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
pragma solidity ^0.8.8;
44

55
import { IERC20 } from './IERC20.sol';
6+
import { IERC1404Internal } from './IERC1404Internal.sol';
67

78
/**
89
* @title ERC1404 interface
910
* @dev see https://github.com/ethereum/EIPs/issues/1404
1011
*/
11-
interface IERC1404 is IERC20 {
12+
interface IERC1404 is IERC1404Internal, IERC20 {
1213
/**
1314
* @notice return restriction code resulting from given transaction parameters
1415
* @return restriction code (0 if no restriction exists)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.8;
4+
5+
import { IERC20Internal } from './IERC20Internal.sol';
6+
7+
/**
8+
* @title ERC1404 interface
9+
* @dev see https://github.com/ethereum/EIPs/issues/1404
10+
*/
11+
interface IERC1404Internal is IERC20Internal {
12+
13+
}

0 commit comments

Comments
 (0)