@bananapus/address-registry-v6 0.0.7 → 0.0.8
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 +1 -1
- package/package.json +1 -1
- package/src/JBAddressRegistry.sol +9 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Juicebox Address Registry
|
|
2
2
|
|
|
3
|
-
Knowing who deployed a contract is the first step toward trusting it. This registry lets anyone prove a contract's deployer on-chain -- no access control
|
|
3
|
+
Knowing who deployed a contract is the first step toward trusting it. This registry lets anyone prove a contract's deployer on-chain -- no access control and no admin keys.
|
|
4
4
|
|
|
5
5
|
`JBAddressRegistry` maps contract addresses to their deployers using deterministic address computation. Provide the deployer address and deployment parameters, and the registry verifies the relationship and stores it permanently. Frontend clients can then look up any registered contract to see who deployed it, which is especially useful for vetting Juicebox pay and cash-out hooks before interacting with them.
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -77,22 +77,31 @@ contract JBAddressRegistry is IJBAddressRegistry {
|
|
|
77
77
|
if (nonce == 0x00) {
|
|
78
78
|
data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), origin, bytes1(0x80));
|
|
79
79
|
} else if (nonce <= 0x7f) {
|
|
80
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
80
81
|
data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), origin, uint8(nonce));
|
|
81
82
|
} else if (nonce <= 0xff) {
|
|
83
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
82
84
|
data = abi.encodePacked(bytes1(0xd7), bytes1(0x94), origin, bytes1(0x81), uint8(nonce));
|
|
83
85
|
} else if (nonce <= 0xffff) {
|
|
86
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
84
87
|
data = abi.encodePacked(bytes1(0xd8), bytes1(0x94), origin, bytes1(0x82), uint16(nonce));
|
|
85
88
|
} else if (nonce <= 0xffffff) {
|
|
89
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
86
90
|
data = abi.encodePacked(bytes1(0xd9), bytes1(0x94), origin, bytes1(0x83), uint24(nonce));
|
|
87
91
|
} else if (nonce <= 0xffffffff) {
|
|
92
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
88
93
|
data = abi.encodePacked(bytes1(0xda), bytes1(0x94), origin, bytes1(0x84), uint32(nonce));
|
|
89
94
|
} else if (nonce <= 0xffffffffff) {
|
|
95
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
90
96
|
data = abi.encodePacked(bytes1(0xdb), bytes1(0x94), origin, bytes1(0x85), uint40(nonce));
|
|
91
97
|
} else if (nonce <= 0xffffffffffff) {
|
|
98
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
92
99
|
data = abi.encodePacked(bytes1(0xdc), bytes1(0x94), origin, bytes1(0x86), uint48(nonce));
|
|
93
100
|
} else if (nonce <= 0xffffffffffffff) {
|
|
101
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
94
102
|
data = abi.encodePacked(bytes1(0xdd), bytes1(0x94), origin, bytes1(0x87), uint56(nonce));
|
|
95
103
|
} else {
|
|
104
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
96
105
|
data = abi.encodePacked(bytes1(0xde), bytes1(0x94), origin, bytes1(0x88), uint64(nonce));
|
|
97
106
|
}
|
|
98
107
|
bytes32 hash = keccak256(data);
|