Skip to content

Commit 41a5b77

Browse files
committed
refactor: minor internal function rename
1 parent 8ecf061 commit 41a5b77

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

contracts/src/arbitration/dispute-kits/DisputeKitGated.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ contract DisputeKitGated is DisputeKitClassicBase {
7676
/// @return tokenGate The address of the token contract used for gating access.
7777
/// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.
7878
/// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).
79-
function extraDataToTokenInfo(
79+
function _extraDataToTokenInfo(
8080
bytes memory _extraData
8181
) public pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {
8282
// Need at least 160 bytes to safely read the parameters
@@ -104,7 +104,7 @@ contract DisputeKitGated is DisputeKitClassicBase {
104104
// Get the local dispute and extract token info from extraData
105105
uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];
106106
Dispute storage dispute = disputes[localDisputeID];
107-
(address tokenGate, bool isERC1155, uint256 tokenId) = extraDataToTokenInfo(dispute.extraData);
107+
(address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);
108108

109109
// If no token gate is specified, allow all jurors
110110
if (tokenGate == address(0)) return true;

contracts/src/arbitration/dispute-kits/DisputeKitGatedShutter.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ contract DisputeKitGatedShutter is DisputeKitClassicBase {
209209
/// @return tokenGate The address of the token contract used for gating access.
210210
/// @return isERC1155 True if the token is an ERC-1155, false for ERC-20/ERC-721.
211211
/// @return tokenId The token ID for ERC-1155 tokens (ignored for ERC-20/ERC-721).
212-
function _extraDataToTokenInfo(
212+
function __extraDataToTokenInfo(
213213
bytes memory _extraData
214214
) internal pure returns (address tokenGate, bool isERC1155, uint256 tokenId) {
215215
// Need at least 160 bytes to safely read the parameters
@@ -237,7 +237,7 @@ contract DisputeKitGatedShutter is DisputeKitClassicBase {
237237
// Get the local dispute and extract token info from extraData
238238
uint256 localDisputeID = coreDisputeIDToLocal[_coreDisputeID];
239239
Dispute storage dispute = disputes[localDisputeID];
240-
(address tokenGate, bool isERC1155, uint256 tokenId) = _extraDataToTokenInfo(dispute.extraData);
240+
(address tokenGate, bool isERC1155, uint256 tokenId) = __extraDataToTokenInfo(dispute.extraData);
241241

242242
// If no token gate is specified, allow all jurors
243243
if (tokenGate == address(0)) return true;

contracts/test/arbitration/dispute-kit-gated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe("DisputeKitGated", async () => {
123123
const extraData = encodeExtraData(courtId, minJurors, disputeKitId, tokenGate, isERC1155, tokenId);
124124
// console.log("extraData", extraData);
125125

126-
const tokenInfo = await disputeKitGated.extraDataToTokenInfo(extraData);
126+
const tokenInfo = await disputeKitGated._extraDataToTokenInfo(extraData);
127127
expect(tokenInfo[0]).to.equal(tokenGate);
128128
expect(tokenInfo[1]).to.equal(isERC1155);
129129
expect(tokenInfo[2]).to.equal(tokenId);

0 commit comments

Comments
 (0)