Skip to content

Commit d459279

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
run prettier
1 parent 1ba7a58 commit d459279

13 files changed

+40
-59
lines changed

contracts/ThirdwebContract.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import "./feature/Context.sol";
66
import "./feature/ContractMetadata.sol";
77

88
contract ThirdwebContract is Context, Ownable, ContractMetadata {
9-
109
struct ThirdwebInfo {
1110
string publishMetadataUri;
1211
string contractURI;
1312
address owner;
1413
}
15-
14+
1615
/// @dev The publish metadata of the contract of which this contract is an instance.
1716
string private publishMetadataUri;
1817

contracts/drop/SignatureDrop.sol

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,7 @@ contract SignatureDrop is
162162
}
163163

164164
/// @dev See ERC 165
165-
function supportsInterface(bytes4 interfaceId)
166-
public
167-
view
168-
virtual
169-
override(ERC721AUpgradeable)
170-
returns (bool)
171-
{
165+
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721AUpgradeable) returns (bool) {
172166
return super.supportsInterface(interfaceId) || type(IERC2981Upgradeable).interfaceId == interfaceId;
173167
}
174168

@@ -300,10 +294,11 @@ contract SignatureDrop is
300294
}
301295

302296
/// @dev Transfers the NFTs being claimed.
303-
function transferTokensOnClaim(
304-
address _to,
305-
uint256 _quantityBeingClaimed
306-
) internal override returns (uint256 startTokenId) {
297+
function transferTokensOnClaim(address _to, uint256 _quantityBeingClaimed)
298+
internal
299+
override
300+
returns (uint256 startTokenId)
301+
{
307302
startTokenId = _currentIndex;
308303
_mint(_to, _quantityBeingClaimed);
309304
}

contracts/feature/Context.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ abstract contract Context {
1919
function _msgData() internal view virtual returns (bytes calldata) {
2020
return msg.data;
2121
}
22-
}
22+
}

contracts/feature/ContractMetadata.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pragma solidity ^0.8.0;
44
import "./interface/IContractMetadata.sol";
55

66
abstract contract ContractMetadata is IContractMetadata {
7-
87
/// @dev Contract level metadata.
98
string public contractURI;
109

@@ -16,4 +15,4 @@ abstract contract ContractMetadata is IContractMetadata {
1615

1716
/// @dev Returns whether contract metadata can be set in the given execution context.
1817
function _canSetContractURI() internal virtual returns (bool);
19-
}
18+
}

contracts/feature/DropSinglePhase.sol

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import "./Context.sol";
77
import "@openzeppelin/contracts-upgradeable/utils/structs/BitMapsUpgradeable.sol";
88

99
abstract contract DropSinglePhase is IDropSinglePhase, Context {
10-
1110
using BitMapsUpgradeable for BitMapsUpgradeable.BitMap;
1211

1312
/*///////////////////////////////////////////////////////////////
@@ -36,7 +35,6 @@ abstract contract DropSinglePhase is IDropSinglePhase, Context {
3635
*/
3736
mapping(bytes32 => BitMapsUpgradeable.BitMap) private usedAllowlistSpot;
3837

39-
4038
/*///////////////////////////////////////////////////////////////
4139
Drop logic
4240
//////////////////////////////////////////////////////////////*/
@@ -97,8 +95,11 @@ abstract contract DropSinglePhase is IDropSinglePhase, Context {
9795
}
9896

9997
/// @dev Lets a contract admin set claim conditions.
100-
function setClaimConditions(ClaimCondition calldata _condition, bool _resetClaimEligibility, bytes memory) external {
101-
98+
function setClaimConditions(
99+
ClaimCondition calldata _condition,
100+
bool _resetClaimEligibility,
101+
bytes memory
102+
) external {
102103
bytes32 targetConditionId = conditionId;
103104
uint256 supplyClaimedAlready = claimCondition.supplyClaimed;
104105

@@ -213,8 +214,8 @@ abstract contract DropSinglePhase is IDropSinglePhase, Context {
213214
) internal virtual;
214215

215216
/// @dev Transfers the NFTs being claimed.
216-
function transferTokensOnClaim(
217-
address _to,
218-
uint256 _quantityBeingClaimed
219-
) internal virtual returns (uint256 startTokenId);
217+
function transferTokensOnClaim(address _to, uint256 _quantityBeingClaimed)
218+
internal
219+
virtual
220+
returns (uint256 startTokenId);
220221
}

contracts/feature/Ownable.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pragma solidity ^0.8.0;
44
import "./interface/IOwnable.sol";
55

66
abstract contract Ownable is IOwnable {
7-
87
/// @dev Owner of the contract (purpose: OpenSea compatibility)
98
address public owner;
109

@@ -20,4 +19,4 @@ abstract contract Ownable is IOwnable {
2019

2120
/// @dev Returns whether owner can be set in the given execution context.
2221
function _canSetOwner() internal virtual returns (bool);
23-
}
22+
}

contracts/feature/Permissions.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import "./Context.sol";
66
import "../lib/Strings.sol";
77

88
contract Permissions is IPermissions, Context {
9-
109
mapping(bytes32 => mapping(address => bool)) private _hasRole;
1110
mapping(bytes32 => bytes32) private _getRoleAdmin;
1211

@@ -42,10 +41,7 @@ contract Permissions is IPermissions, Context {
4241
}
4342

4443
function renounceRole(bytes32 role, address account) public virtual {
45-
require(
46-
_msgSender() == account,
47-
"Can only renounce for self"
48-
);
44+
require(_msgSender() == account, "Can only renounce for self");
4945

5046
delete _hasRole[role][account];
5147

@@ -71,4 +67,4 @@ contract Permissions is IPermissions, Context {
7167
);
7268
}
7369
}
74-
}
70+
}

contracts/feature/PermissionsEnumerable.sol

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,35 @@ pragma solidity ^0.8.0;
44
import "./interface/IPermissionsEnumerable.sol";
55
import "./Permissions.sol";
66

7-
contract PermissionsEnumerable is IPermissionsEnumerable, Permissions {
8-
7+
contract PermissionsEnumerable is IPermissionsEnumerable, Permissions {
98
struct RoleMembers {
109
uint256 index;
1110
mapping(uint256 => address) members;
1211
mapping(address => uint256) indexOf;
1312
}
1413

15-
mapping(bytes32 => RoleMembers) private roleMembers;
14+
mapping(bytes32 => RoleMembers) private roleMembers;
1615

1716
function getRoleMember(bytes32 role, uint256 index) external view returns (address member) {
1817
uint256 currentIndex = roleMembers[role].index;
1918
uint256 check;
2019

21-
for(uint256 i = 0; i < currentIndex; i += 1) {
22-
if(roleMembers[role].members[i] != address(0)) {
23-
if(check == index) {
20+
for (uint256 i = 0; i < currentIndex; i += 1) {
21+
if (roleMembers[role].members[i] != address(0)) {
22+
if (check == index) {
2423
member = roleMembers[role].members[i];
2524
}
2625
} else {
2726
check += 1;
2827
}
2928
}
30-
3129
}
3230

3331
function getRoleMemberCount(bytes32 role) external view returns (uint256 count) {
3432
uint256 currentIndex = roleMembers[role].index;
35-
36-
for(uint256 i = 0; i < currentIndex; i += 1) {
37-
if(roleMembers[role].members[i] != address(0)) {
33+
34+
for (uint256 i = 0; i < currentIndex; i += 1) {
35+
if (roleMembers[role].members[i] != address(0)) {
3836
count += 1;
3937
}
4038
}
@@ -60,18 +58,18 @@ contract PermissionsEnumerable is IPermissionsEnumerable, Permissions {
6058
_addMember(role, account);
6159
}
6260

63-
function _addMember(bytes32 role, address account) internal {
61+
function _addMember(bytes32 role, address account) internal {
6462
uint256 idx = roleMembers[role].index;
6563
roleMembers[role].index += 1;
6664

6765
roleMembers[role].members[idx] = account;
6866
roleMembers[role].indexOf[account] = idx;
6967
}
7068

71-
function _removeMember(bytes32 role, address account) internal {
69+
function _removeMember(bytes32 role, address account) internal {
7270
uint256 idx = roleMembers[role].indexOf[account];
7371

7472
delete roleMembers[role].members[idx];
7573
delete roleMembers[role].indexOf[account];
7674
}
77-
}
75+
}

contracts/feature/PlatformFee.sol

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@ pragma solidity ^0.8.0;
44
import "./interface/IPlatformFee.sol";
55

66
abstract contract PlatformFee is IPlatformFee {
7-
87
/// @dev The address that receives all platform fees from all sales.
98
address private platformFeeRecipient;
109

1110
/// @dev The % of primary sales collected as platform fees.
1211
uint16 private platformFeeBps;
13-
12+
1413
/// @dev Returns the platform fee recipient and bps.
1514
function getPlatformFeeInfo() public view returns (address, uint16) {
1615
return (platformFeeRecipient, uint16(platformFeeBps));
1716
}
1817

1918
/// @dev Lets a contract admin update the platform fee recipient and bps
20-
function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps)
21-
public
22-
{
19+
function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) public {
2320
require(_canSetPlatformFeeInfo(), "Not authorized");
2421
require(_platformFeeBps <= 10_000, "Exceeds max bps");
2522

@@ -31,4 +28,4 @@ abstract contract PlatformFee is IPlatformFee {
3128

3229
/// @dev Returns whether platform fee info can be set in the given execution context.
3330
function _canSetPlatformFeeInfo() internal virtual returns (bool);
34-
}
31+
}

contracts/feature/PrimarySale.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pragma solidity ^0.8.0;
44
import "./interface/IPrimarySale.sol";
55

66
abstract contract PrimarySale is IPrimarySale {
7-
87
/// @dev The address that receives all primary sales value.
98
address private recipient;
109

@@ -22,4 +21,4 @@ abstract contract PrimarySale is IPrimarySale {
2221

2322
/// @dev Returns whether primary sale recipient can be set in the given execution context.
2423
function _canSetPrimarySaleRecipient() internal virtual returns (bool);
25-
}
24+
}

0 commit comments

Comments
 (0)