Skip to content

Commit 558ff91

Browse files
committed
feat: update addresses.json paths and add permissions for scripts
1 parent d1de37d commit 558ff91

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

addresses.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@
4747
"deployments": {
4848
"current": {
4949
"version": "dev",
50-
"timestamp": "",
51-
"SchemaRegistry": "",
52-
"EAS": "",
50+
"timestamp": 1762702135,
51+
"SchemaRegistry": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
52+
"EAS": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
5353
"schemas": {
5454
"CubidTrust": {
55-
"uid": "",
56-
"resolver": "",
55+
"uid": "0xa519fee19287dff6c364f3eae0eb865bddcc4dba2070a3dd3c1c19395af10510",
56+
"resolver": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
5757
"revocable": true
5858
}
5959
},
60-
"FeeGate": ""
60+
"FeeGate": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
6161
},
6262
"history": []
6363
}

contracts/foundry.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ remappings = [
1515

1616
auto_detect_solc = false
1717

18+
# Allow scripts to read/write addresses.json in project root
19+
fs_permissions = [
20+
{ access = "read-write", path = "./addresses.json" },
21+
{ access = "read-write", path = "../addresses.json" }
22+
]
23+
1824
[fmt]
1925
line_length = 120
2026
tab_width = 4

contracts/script/DeployEAS.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ contract DeployEAS is Script {
4444
address easAddr
4545
) internal {
4646
string memory root = vm.projectRoot();
47-
string memory path = string.concat(root, '/addresses.json');
47+
string memory path = string.concat(root, '/../addresses.json');
4848
string memory json = vm.readFile(path);
4949

5050
// Build the path to update

contracts/script/DeployFeeGate.s.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ contract DeployFeeGate is Script {
4545

4646
function _getEASAddress(string memory network) internal view returns (address) {
4747
string memory root = vm.projectRoot();
48-
string memory path = string.concat(root, '/addresses.json');
48+
string memory path = string.concat(root, '/../addresses.json');
4949
string memory json = vm.readFile(path);
5050

5151
string memory key = string.concat('.networks.', network, '.deployments.current.EAS');
@@ -54,7 +54,7 @@ contract DeployFeeGate is Script {
5454

5555
function _getSchemaUID(string memory network) internal view returns (bytes32) {
5656
string memory root = vm.projectRoot();
57-
string memory path = string.concat(root, '/addresses.json');
57+
string memory path = string.concat(root, '/../addresses.json');
5858
string memory json = vm.readFile(path);
5959

6060
string memory key = string.concat(
@@ -67,7 +67,7 @@ contract DeployFeeGate is Script {
6767

6868
function _updateAddressesJson(string memory network, address feeGateAddress) internal {
6969
string memory root = vm.projectRoot();
70-
string memory path = string.concat(root, '/addresses.json');
70+
string memory path = string.concat(root, '/../addresses.json');
7171

7272
string memory basePath = string.concat('.networks.', network, '.deployments.current');
7373

contracts/script/RegisterSchema.s.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ contract RegisterSchema is Script {
5353

5454
function _getRegistryAddress(string memory network) internal view returns (address) {
5555
string memory root = vm.projectRoot();
56-
string memory path = string.concat(root, '/addresses.json');
56+
string memory path = string.concat(root, '/../addresses.json');
5757
string memory json = vm.readFile(path);
5858

5959
string memory key = string.concat(
@@ -66,7 +66,7 @@ contract RegisterSchema is Script {
6666

6767
function _getResolverAddress(string memory network) internal view returns (address) {
6868
string memory root = vm.projectRoot();
69-
string memory path = string.concat(root, '/addresses.json');
69+
string memory path = string.concat(root, '/../addresses.json');
7070
string memory json = vm.readFile(path);
7171

7272
string memory key = string.concat('.networks.', network, '.deployments.current.FeeGate');
@@ -86,7 +86,7 @@ contract RegisterSchema is Script {
8686
bool revocable
8787
) internal {
8888
string memory root = vm.projectRoot();
89-
string memory path = string.concat(root, '/addresses.json');
89+
string memory path = string.concat(root, '/../addresses.json');
9090

9191
string memory basePath = string.concat(
9292
'.networks.',

0 commit comments

Comments
 (0)