Skip to content

Commit b41a857

Browse files
committed
feat: christmas 2024 event
1 parent 0644d32 commit b41a857

File tree

5 files changed

+393
-11
lines changed

5 files changed

+393
-11
lines changed

src/localServer/define.d.ts

Lines changed: 96 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,102 @@ declare type verification = 'INCORRECT_CODE'|'Err_Server_Unreachable'|'Err_Multi
164164

165165
declare type conetMiner = 'Err_Server_Unreachable'|'Err_Multiple_IP'
166166

167-
declare type WorkerCommand = 'READY'|'getRegiestNodes'|'beforeunload'|'createAccount'|'testPasscode'|'showSRP'|'unlock_cCNTP'|
168-
'encrypt_TestPasscode'|'encrypt_createPasscode'|'encrypt_lock'|'invitation'|'encrypt_deletePasscode'|'preBurnCCNTP'|
169-
'storePreferences'|'newProfile'|'storeProfile'|'urlProxy'|'saveDomain'|'getDomain'|'setRegion'|'getGuardianRegion'|
170-
'getFaucet'|'isAddress'|'syncAssetV1'|'sendAsset'|'getUSDCPrice'|'buyUSDC'|'getWorkerClientID'|'getAllOtherAssets'|
171-
'mintCoNETCash'|'getSINodes'|'getRecipientCoNETCashAddress'|'getUserProfile'|'burnCCNTP'|'showLeaderboard'|
172-
'sendMessage'|'incomeData'|'WORKER_MESSAGE'|'getCONETBalance'|'startProxy'|'registerReferrer'|'CONETianPlanPurchase'|
173-
'SaaSRegister'|'getContainer'|'ipaddress'|'startLiveness'|'stopLiveness'|'isLivenessRunning'|'importWallet'|'startMining'|'stopMining'|
174-
// from service worker
175-
'urlProxy'|'saveDomain'|'getDomain'|'getWorkerClientID'|'getRefereesList'|'getAllNodes'|'getAllProfiles'|'updateProfile'|'addProfile'|'resetPasscode'|
176-
'getAssetsPrice'|'recoverAccount'|'CONETFaucet'|'prePurchase'|'guardianPurchase'|'fx168PrePurchase'|'claimToken' | 'transferToken' | 'estimateGas' | 'estimateGasForNftContract' | 'startSilentPass' | 'isWalletAgent' | 'transferNft' | 'addMonitoredWallet' | 'removeMonitoredWallet'
167+
declare type WorkerCommand =
168+
| "READY"
169+
| "getRegiestNodes"
170+
| "beforeunload"
171+
| "createAccount"
172+
| "testPasscode"
173+
| "showSRP"
174+
| "unlock_cCNTP"
175+
| "encrypt_TestPasscode"
176+
| "encrypt_createPasscode"
177+
| "encrypt_lock"
178+
| "invitation"
179+
| "encrypt_deletePasscode"
180+
| "preBurnCCNTP"
181+
| "storePreferences"
182+
| "newProfile"
183+
| "storeProfile"
184+
| "urlProxy"
185+
| "saveDomain"
186+
| "getDomain"
187+
| "setRegion"
188+
| "getGuardianRegion"
189+
| "getFaucet"
190+
| "isAddress"
191+
| "syncAssetV1"
192+
| "sendAsset"
193+
| "getUSDCPrice"
194+
| "buyUSDC"
195+
| "getWorkerClientID"
196+
| "getAllOtherAssets"
197+
| "mintCoNETCash"
198+
| "getSINodes"
199+
| "getRecipientCoNETCashAddress"
200+
| "getUserProfile"
201+
| "burnCCNTP"
202+
| "showLeaderboard"
203+
| "sendMessage"
204+
| "incomeData"
205+
| "WORKER_MESSAGE"
206+
| "getCONETBalance"
207+
| "startProxy"
208+
| "registerReferrer"
209+
| "CONETianPlanPurchase"
210+
| "SaaSRegister"
211+
| "getContainer"
212+
| "ipaddress"
213+
| "startLiveness"
214+
| "stopLiveness"
215+
| "isLivenessRunning"
216+
| "importWallet"
217+
| "startMining"
218+
| "stopMining"
219+
// from service worker
220+
| "urlProxy"
221+
| "saveDomain"
222+
| "getDomain"
223+
| "getWorkerClientID"
224+
| "getRefereesList"
225+
| "getAllNodes"
226+
| "getAllProfiles"
227+
| "updateProfile"
228+
| "addProfile"
229+
| "resetPasscode"
230+
| "getAssetsPrice"
231+
| "recoverAccount"
232+
| "CONETFaucet"
233+
| "prePurchase"
234+
| "guardianPurchase"
235+
| "fx168PrePurchase"
236+
| "claimToken"
237+
| "transferToken"
238+
| "estimateGas"
239+
| "estimateGasForNftContract"
240+
| "startSilentPass"
241+
| "isWalletAgent"
242+
| "transferNft"
243+
| "addMonitoredWallet"
244+
| "removeMonitoredWallet"
245+
| ""
246+
| "getAssetsPrice"
247+
| "recoverAccount"
248+
| "CONETFaucet"
249+
| "prePurchase"
250+
| "guardianPurchase"
251+
| "fx168PrePurchase"
252+
| "claimToken"
253+
| "transferToken"
254+
| "estimateGas"
255+
| "estimateGasForNftContract"
256+
| "startSilentPass"
257+
| "isWalletAgent"
258+
| "transferNft"
259+
| "addMonitoredWallet"
260+
| "removeMonitoredWallet"
261+
| "getProfileAvailableCntpReward"
262+
| "claimChristmasReward" ;
177263

178264
type SINodesSortby = 'CUSTOMER_REVIEW'|'TOTAL_ONLINE_TIME'|
179265
'STORAGE_PRICE_LOW'|'STORAGE_PRICE_HIGH'|'OUTBOUND_PRICE_HIGH'|'OUTBOUND_PRICE_LOW'

src/localServer/workers/encrypt.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,14 @@ const processCmd = async (cmd: worker_command) => {
829829
return removeMonitoredWallet(cmd);
830830
}
831831

832+
case "getProfileAvailableCntpReward": {
833+
return getProfileAvailableCntpReward(cmd);
834+
}
835+
836+
case "claimChristmasReward": {
837+
return claimChristmasReward(cmd);
838+
}
839+
832840
default: {
833841
cmd.err = "INVALID_COMMAND";
834842
responseChannel.postMessage(JSON.stringify(cmd));

src/localServer/workers/utilities/smartContractABI.ts

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6461,4 +6461,223 @@ const ticketAbi = [
64616461
stateMutability: "view",
64626462
type: "function",
64636463
},
6464+
];
6465+
6466+
const christmas2024Abi = [
6467+
{
6468+
inputs: [],
6469+
stateMutability: "nonpayable",
6470+
type: "constructor",
6471+
},
6472+
{
6473+
inputs: [
6474+
{
6475+
internalType: "address",
6476+
name: "",
6477+
type: "address",
6478+
},
6479+
],
6480+
name: "CONETianClaimed",
6481+
outputs: [
6482+
{
6483+
internalType: "uint256",
6484+
name: "",
6485+
type: "uint256",
6486+
},
6487+
],
6488+
stateMutability: "view",
6489+
type: "function",
6490+
},
6491+
{
6492+
inputs: [],
6493+
name: "CONETianNFT",
6494+
outputs: [
6495+
{
6496+
internalType: "uint256",
6497+
name: "",
6498+
type: "uint256",
6499+
},
6500+
],
6501+
stateMutability: "view",
6502+
type: "function",
6503+
},
6504+
{
6505+
inputs: [],
6506+
name: "CONETianReward",
6507+
outputs: [
6508+
{
6509+
internalType: "uint256",
6510+
name: "",
6511+
type: "uint256",
6512+
},
6513+
],
6514+
stateMutability: "view",
6515+
type: "function",
6516+
},
6517+
{
6518+
inputs: [
6519+
{
6520+
internalType: "address",
6521+
name: "user",
6522+
type: "address",
6523+
},
6524+
],
6525+
name: "ClaimReward",
6526+
outputs: [],
6527+
stateMutability: "nonpayable",
6528+
type: "function",
6529+
},
6530+
{
6531+
inputs: [],
6532+
name: "GuardianBUYER",
6533+
outputs: [
6534+
{
6535+
internalType: "uint256",
6536+
name: "",
6537+
type: "uint256",
6538+
},
6539+
],
6540+
stateMutability: "view",
6541+
type: "function",
6542+
},
6543+
{
6544+
inputs: [
6545+
{
6546+
internalType: "address",
6547+
name: "",
6548+
type: "address",
6549+
},
6550+
],
6551+
name: "GuardianClaimed",
6552+
outputs: [
6553+
{
6554+
internalType: "uint256",
6555+
name: "",
6556+
type: "uint256",
6557+
},
6558+
],
6559+
stateMutability: "view",
6560+
type: "function",
6561+
},
6562+
{
6563+
inputs: [],
6564+
name: "GuardianReward",
6565+
outputs: [
6566+
{
6567+
internalType: "uint256",
6568+
name: "",
6569+
type: "uint256",
6570+
},
6571+
],
6572+
stateMutability: "view",
6573+
type: "function",
6574+
},
6575+
{
6576+
inputs: [
6577+
{
6578+
internalType: "address",
6579+
name: "",
6580+
type: "address",
6581+
},
6582+
],
6583+
name: "adminList",
6584+
outputs: [
6585+
{
6586+
internalType: "bool",
6587+
name: "",
6588+
type: "bool",
6589+
},
6590+
],
6591+
stateMutability: "view",
6592+
type: "function",
6593+
},
6594+
{
6595+
inputs: [
6596+
{
6597+
internalType: "address",
6598+
name: "addr",
6599+
type: "address",
6600+
},
6601+
{
6602+
internalType: "bool",
6603+
name: "status",
6604+
type: "bool",
6605+
},
6606+
],
6607+
name: "changeAddressInAdminlist",
6608+
outputs: [],
6609+
stateMutability: "nonpayable",
6610+
type: "function",
6611+
},
6612+
{
6613+
inputs: [
6614+
{
6615+
internalType: "uint256",
6616+
name: "newCONETianReward",
6617+
type: "uint256",
6618+
},
6619+
],
6620+
name: "changeCONETianReward",
6621+
outputs: [],
6622+
stateMutability: "nonpayable",
6623+
type: "function",
6624+
},
6625+
{
6626+
inputs: [
6627+
{
6628+
internalType: "uint256",
6629+
name: "newGuardianReward",
6630+
type: "uint256",
6631+
},
6632+
],
6633+
name: "changeGuardianReward",
6634+
outputs: [],
6635+
stateMutability: "nonpayable",
6636+
type: "function",
6637+
},
6638+
{
6639+
inputs: [],
6640+
name: "claimedCNTP",
6641+
outputs: [
6642+
{
6643+
internalType: "uint256",
6644+
name: "",
6645+
type: "uint256",
6646+
},
6647+
],
6648+
stateMutability: "view",
6649+
type: "function",
6650+
},
6651+
{
6652+
inputs: [
6653+
{
6654+
internalType: "address",
6655+
name: "user",
6656+
type: "address",
6657+
},
6658+
],
6659+
name: "showClaimableCNTP",
6660+
outputs: [
6661+
{
6662+
internalType: "uint256",
6663+
name: "CNTPs",
6664+
type: "uint256",
6665+
},
6666+
],
6667+
stateMutability: "view",
6668+
type: "function",
6669+
},
6670+
{
6671+
inputs: [],
6672+
name: "showTotalClaimableCNTPPool",
6673+
outputs: [
6674+
{
6675+
internalType: "uint256",
6676+
name: "CNTPs",
6677+
type: "uint256",
6678+
},
6679+
],
6680+
stateMutability: "view",
6681+
type: "function",
6682+
},
64646683
];

src/localServer/workers/utilities/utilV2.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const conet_dUSDT = '0x0eD55798a8b9647f7908c72a0Ce844ad47274422'
3232
const conet_dWBNB = '0xd8b094E91c552c623bc054085871F6c1CA3E5cAd'
3333
const CONET_Guardian_Nodes1 = '0x5e4aE81285b86f35e3370B3EF72df1363DD05286'
3434
const fx168OrderContractAddress = '0x9aE6D3Bd3029C8B2A73817b9aFa1C029237E3e30'
35+
const christmas2024ContractAddress = "0xb188e707f4544835aEe28E4206C65edfF23221C0";
3536

3637
//const CNTPB_contract = '0x6056473ADD8bC89a95325845F6a431CCD7A849bb'
3738
// const Claimable_ETHUSDTv3 = '0x79E2EdE2F479fA7E44C89Bbaa721EB1f0d529b7B'.toLowerCase()

0 commit comments

Comments
 (0)