Skip to content

Commit

Permalink
add SetCollectionListTotalCount
Browse files Browse the repository at this point in the history
  • Loading branch information
fyannch committed Jul 30, 2024
1 parent 44b6ab1 commit ea016d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contract/Forest/ForestContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,14 @@ public override Empty SetMaxBatchCancelListCount(Int32Value input)
State.MaxBatchCancelListCount.Value = input.Value;
return new Empty();
}

public override Empty SetCollectionListTotalCount(SetCollectionListTotalCountInput input)
{
AssertSenderIsAdmin();
Assert(input != null && input.Address != null && !string.IsNullOrEmpty(input.Symbol) && input.Count >=0, "Invalid input.");

State.ListedNFTTotalAmountMap[input.Symbol][input.Address] = input.Count.ToString();
return new Empty();
}
}
}
9 changes: 9 additions & 0 deletions protobuf/forest_contract.proto
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ service ForestContract {

rpc SetMaxBatchCancelListCount(google.protobuf.Int32Value) returns (google.protobuf.Empty){
}

rpc SetCollectionListTotalCount(SetCollectionListTotalCountInput) returns (google.protobuf.Empty){
}

// Views.
rpc GetListedNFTInfoList (GetListedNFTInfoListInput) returns (ListedNFTInfoList) {
Expand Down Expand Up @@ -418,6 +421,12 @@ message SetAIServiceFeeInput {
aelf.Address service_fee_receiver = 2;
}

message SetCollectionListTotalCountInput {
aelf.Address address = 1;
int64 count = 2;
string symbol = 3;
}

message CreateArtInput {
string promt = 1;
string negative_prompt = 2;
Expand Down

0 comments on commit ea016d8

Please sign in to comment.