@@ -23,7 +23,7 @@ contract Campaign is ICampaign, Ownable, ERC721 {
23
23
uint256 public immutable requiredAmount;
24
24
Consts.CampaignStatus public status;
25
25
26
- bytes32 public campaignUri;
26
+ string public campaignUri;
27
27
uint256 public immutable startTime;
28
28
uint256 public immutable totalEpochsCount;
29
29
uint256 public immutable period;
@@ -60,7 +60,7 @@ contract Campaign is ICampaign, Ownable, ERC721 {
60
60
}
61
61
62
62
struct Record {
63
- bytes32 contentUri;
63
+ string contentUri;
64
64
}
65
65
66
66
constructor (
@@ -71,7 +71,7 @@ contract Campaign is ICampaign, Ownable, ERC721 {
71
71
uint256 startTime_ ,
72
72
uint256 totalPeriod_ ,
73
73
uint256 periodLength_ ,
74
- bytes32 campaignUri_
74
+ string memory campaignUri_
75
75
) ERC721 (name_, symbol_) {
76
76
require (address (token_) != address (0 ), 'Campaign: invalid token ' );
77
77
require (amount_ != 0 , 'Campaign: invalid amount ' );
@@ -84,7 +84,7 @@ contract Campaign is ICampaign, Ownable, ERC721 {
84
84
campaignUri = campaignUri_;
85
85
}
86
86
87
- function setCampaignUri (bytes32 newUri ) external override onlyOwner {
87
+ function setCampaignUri (string calldata newUri ) external override onlyOwner {
88
88
campaignUri = newUri;
89
89
emit EvCampaignUriSet (campaignUri);
90
90
}
@@ -156,8 +156,8 @@ contract Campaign is ICampaign, Ownable, ERC721 {
156
156
successTokensCount = _idx;
157
157
for (uint256 tokenId = 0 ; tokenId < _idx; tokenId++ ) {
158
158
for (uint256 j = 0 ; j < totalEpochsCount; j++ ) {
159
- bytes32 content = records[j][tokenId].contentUri;
160
- if (content == bytes32 ( 0 ) ) {
159
+ string memory content = records[j][tokenId].contentUri;
160
+ if (bytes ( content). length == 0 ) {
161
161
uint256 penalty = properties[tokenId].pendingReward;
162
162
hostReward += (penalty * Consts.HOST_REWARD) / Consts.DECIMAL;
163
163
protocolFee += (penalty * Consts.PROTOCOL_FEE) / Consts.DECIMAL;
@@ -182,9 +182,9 @@ contract Campaign is ICampaign, Ownable, ERC721 {
182
182
183
183
/**
184
184
* @dev user check in
185
- * @param contentUri bytes32 of ipfs uri or other decentralize storage
185
+ * @param contentUri string of ipfs uri or other decentralize storage
186
186
*/
187
- function checkIn (bytes32 contentUri , uint256 tokenId )
187
+ function checkIn (string calldata contentUri , uint256 tokenId )
188
188
external
189
189
override
190
190
onlyTokenHolder (tokenId)
0 commit comments