Skip to content

Commit f2ae2c3

Browse files
authored
feat: Make setName function as nonpayable to restore compatibility with iExec sdk (#286)
1 parent 9d5ff50 commit f2ae2c3

File tree

13 files changed

+164
-162
lines changed

13 files changed

+164
-162
lines changed

abis/contracts/registries/Registry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@
453453
],
454454
"name": "setName",
455455
"outputs": [],
456-
"stateMutability": "view",
456+
"stateMutability": "nonpayable",
457457
"type": "function"
458458
},
459459
{

abis/contracts/registries/RegistryEntry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
],
4141
"name": "setName",
4242
"outputs": [],
43-
"stateMutability": "view",
43+
"stateMutability": "nonpayable",
4444
"type": "function"
4545
}
4646
]

abis/contracts/registries/apps/App.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
],
139139
"name": "setName",
140140
"outputs": [],
141-
"stateMutability": "view",
141+
"stateMutability": "nonpayable",
142142
"type": "function"
143143
}
144144
]

abis/contracts/registries/apps/AppRegistry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@
525525
],
526526
"name": "setName",
527527
"outputs": [],
528-
"stateMutability": "view",
528+
"stateMutability": "nonpayable",
529529
"type": "function"
530530
},
531531
{

abis/contracts/registries/datasets/Dataset.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
],
103103
"name": "setName",
104104
"outputs": [],
105-
"stateMutability": "view",
105+
"stateMutability": "nonpayable",
106106
"type": "function"
107107
}
108108
]

abis/contracts/registries/datasets/DatasetRegistry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@
505505
],
506506
"name": "setName",
507507
"outputs": [],
508-
"stateMutability": "view",
508+
"stateMutability": "nonpayable",
509509
"type": "function"
510510
},
511511
{

abis/contracts/registries/workerpools/Workerpool.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
],
142142
"name": "setName",
143143
"outputs": [],
144-
"stateMutability": "view",
144+
"stateMutability": "nonpayable",
145145
"type": "function"
146146
}
147147
]

abis/contracts/registries/workerpools/WorkerpoolRegistry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@
485485
],
486486
"name": "setName",
487487
"outputs": [],
488-
"stateMutability": "view",
488+
"stateMutability": "nonpayable",
489489
"type": "function"
490490
},
491491
{

contracts/registries/Registry.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ abstract contract Registry is IRegistry, ERC721, Ownable {
4545

4646
/**
4747
* Sets the reverse registration name for a registry contract.
48-
* @dev This functionality is supported only on the Bellecour chain.
49-
* On other chains, this function will revert to maintain retrocompatibility
50-
* in the SDK.
48+
* @dev This functionality is supported only on Bellecour Sidechain, calls on other chains
49+
* will revert. The function is kept as nonpayable to maintain retrocompatibility with the
50+
* iExec SDK.
5151
*/
5252
// TODO remove this function when Bellecour is deprecated.
53-
function setName(address /* _ens */, string calldata /* _name */) external view onlyOwner {
53+
function setName(address /* _ens */, string calldata /* _name */) external onlyOwner {
54+
initialized = initialized; // Remove solidity state mutability warning.
5455
revert("Operation not supported on this chain");
5556
}
5657

contracts/registries/RegistryEntry.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ abstract contract RegistryEntry {
2323

2424
/**
2525
* Sets the reverse registration name for a registry entry contract.
26-
* @dev This functionality is supported only on the Bellecour chain.
27-
* On other chains, this function will revert to maintain retrocompatibility
28-
* in the SDK.
26+
* @dev This functionality is supported only on Bellecour Sidechain, calls on other chains
27+
* will revert. The function is kept as nonpayable to maintain retrocompatibility with the
28+
* iExec SDK.
2929
*/
3030
// TODO remove this function when Bellecour is deprecated.
31-
function setName(address /* _ens */, string calldata /* _name */) external view onlyOwner {
31+
function setName(address /* _ens */, string calldata /* _name */) external onlyOwner {
32+
registry = registry; // Remove solidity state mutability warning.
3233
revert("Operation not supported on this chain");
3334
}
3435

0 commit comments

Comments
 (0)