Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hamster Referral #647

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public static class ActivityConstants
public const string ReceiveName = "Receive";
public const string SendName = "Send";
public const string SwapExactTokensForTokensName = "SwapExactTokensForTokens";
public const string FreeMintNftName = "MintNft";
}
8 changes: 8 additions & 0 deletions src/CAServer.Application.Contracts/Cache/ICacheProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ public interface ICacheProvider

Task<long> GetSortedSetLengthAsync(string leaderboardKey);

Task SetAddAsync(string key, string value, TimeSpan? timeSpan);

Task<RedisValue[]> SetMembersAsync(string key);





}
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ public static class CommonConstant
public const string NftToFtStartVersion = "1.18.0";

public const string ReferralKey = "Portkey:ReferralBank";
public const string HamsterRankKey = "Portkey:HamsterBank";


public const string DefaultReferralActivityStartTime = "2024-06-27 00:00:00";

public const string SingUp = " created a Portkey account";
public const string HamsterScore = " collected {0} $ACORNS";


public const int InitTokenId = 10;
public const string FreeMintTokenIdGrainId = "FreeMint-TokenId";
public const int FreeMintTotalSupply = 1;
public const int FreeMintDecimals = 0;

public const string PortkeyS3Mark = "did";
public const string ImS3Mark = "im";
}
89 changes: 89 additions & 0 deletions src/CAServer.Application.Contracts/Contracts/FreeMintContract.c.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: free_mint_contract.proto
// </auto-generated>
// Original file comments:
// the version of the language, use proto3 for contracts
#pragma warning disable 0414, 1591
#region Designer generated code

using System.Collections.Generic;
using aelf = global::AElf.CSharp.Core;

namespace Portkey.FreeMint {

#region Events
#endregion
public static partial class FreeMintContractContainer
{
static readonly string __ServiceName = "FreeMintContract";

#region Marshallers
static readonly aelf::Marshaller<global::AElf.Types.Address> __Marshaller_aelf_Address = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.Address.Parser.ParseFrom);
static readonly aelf::Marshaller<global::Google.Protobuf.WellKnownTypes.Empty> __Marshaller_google_protobuf_Empty = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.Empty.Parser.ParseFrom);
static readonly aelf::Marshaller<global::Portkey.FreeMint.MintNftInput> __Marshaller_MintNftInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Portkey.FreeMint.MintNftInput.Parser.ParseFrom);
static readonly aelf::Marshaller<global::Portkey.FreeMint.GetMyContextOutput> __Marshaller_GetMyContextOutput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Portkey.FreeMint.GetMyContextOutput.Parser.ParseFrom);
#endregion

#region Methods
static readonly aelf::Method<global::AElf.Types.Address, global::Google.Protobuf.WellKnownTypes.Empty> __Method_Initialize = new aelf::Method<global::AElf.Types.Address, global::Google.Protobuf.WellKnownTypes.Empty>(
aelf::MethodType.Action,
__ServiceName,
"Initialize",
__Marshaller_aelf_Address,
__Marshaller_google_protobuf_Empty);

static readonly aelf::Method<global::AElf.Types.Address, global::Google.Protobuf.WellKnownTypes.Empty> __Method_SetManager = new aelf::Method<global::AElf.Types.Address, global::Google.Protobuf.WellKnownTypes.Empty>(
aelf::MethodType.Action,
__ServiceName,
"SetManager",
__Marshaller_aelf_Address,
__Marshaller_google_protobuf_Empty);

static readonly aelf::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::AElf.Types.Address> __Method_GetManager = new aelf::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::AElf.Types.Address>(
aelf::MethodType.View,
__ServiceName,
"GetManager",
__Marshaller_google_protobuf_Empty,
__Marshaller_aelf_Address);

static readonly aelf::Method<global::Portkey.FreeMint.MintNftInput, global::Google.Protobuf.WellKnownTypes.Empty> __Method_MintNft = new aelf::Method<global::Portkey.FreeMint.MintNftInput, global::Google.Protobuf.WellKnownTypes.Empty>(
aelf::MethodType.Action,
__ServiceName,
"MintNft",
__Marshaller_MintNftInput,
__Marshaller_google_protobuf_Empty);

static readonly aelf::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Portkey.FreeMint.GetMyContextOutput> __Method_GetMyContextInfo = new aelf::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Portkey.FreeMint.GetMyContextOutput>(
aelf::MethodType.View,
__ServiceName,
"GetMyContextInfo",
__Marshaller_google_protobuf_Empty,
__Marshaller_GetMyContextOutput);

#endregion

#region Descriptors
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Portkey.FreeMint.FreeMintContractReflection.Descriptor.Services[0]; }
}

public static global::System.Collections.Generic.IReadOnlyList<global::Google.Protobuf.Reflection.ServiceDescriptor> Descriptors
{
get
{
return new global::System.Collections.Generic.List<global::Google.Protobuf.Reflection.ServiceDescriptor>()
{
global::AElf.Standards.ACS12.Acs12Reflection.Descriptor.Services[0],
global::Portkey.FreeMint.FreeMintContractReflection.Descriptor.Services[0],
};
}
}
#endregion


}
}
#endregion

Loading
Loading