From df50b32098ceccbb7c690b4ea88d334287b9ee5a Mon Sep 17 00:00:00 2001 From: cyl19970726 <15258378443@163.com> Date: Sun, 26 Feb 2023 16:00:09 +0800 Subject: [PATCH] fix permissionlessJoin bug --- contracts/v3/Hubv3.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/v3/Hubv3.sol b/contracts/v3/Hubv3.sol index 1de4ce9..904adfa 100644 --- a/contracts/v3/Hubv3.sol +++ b/contracts/v3/Hubv3.sol @@ -108,7 +108,7 @@ contract Hubv3 is AccessControl, Initializable { // permissionlessJoin can be invoked by everyone who want to join this hub function permissionlessJoin() public { require(permissionless, "permissionless join no open"); - grantRole(CONTRIBUTOR, _msgSender()); + _setupRole(CONTRIBUTOR, _msgSender()); } // ===== repository operator functions======