Magickbase / ckb-explorer-public-issues

CKB Explorer Issues
https://explorer.nervos.org/
3 stars 2 forks source link

Allow each address to claim 30w ckb on testnet per month #310

Closed Keith-CY closed 1 year ago

Keith-CY commented 1 year ago

Now each address is allowed to claim 1w ckb per day, which is not enough to deploy a contract. Here we assume that a user will claim 1w every day, and finally it will gain 30w. Based on the assumption, we can change the strategy to allow an address to claim 30w per month.

This update can be achieved in 2 ways.

  1. allow users to select the amount from 1w to 30w, which will be accumulated within a month.
  2. allow users to claim 30w for one time, and the cooling down is one month.

Along with this feature, a small trick could be delivered together:

  1. accept a URL query address= to fill in the address field, so the workflow can be facilitated by sharing the faucet URL as https://faucet.nervos.org/?address=
Sven-TBD commented 1 year ago

Here's a proposal for the faucet rule adjustment: Claiming 10000 CKB, called a Normal Claim, on the Pudge network is available from the faucet once every 24 hours for each address, or you can do a Tweet Claim by sharing a tweet so that you could get 20 times as many as a Normal Claim. Every Twitter account can at most make 3 Tweet Claims in 24h. The tweet claim will not occupy the chance of a Normal Claim, which means you can fund your address by having 1 Normal Claim and at most 3 Tweet Claims in 24h.

Sven-TBD commented 1 year ago

Some modifications have been made to the procession of obtaining test net CKB.

The rule is that every address will be able to claim a fixed amount of 30,000 CKB in a month, which is the initial claimable amount. The claimable amount will update on the 1st of every month. And there will be no limit on the claim times in 24h, you can initialize a claim whenever you run out of your test tokens.

The prototype link is here https://vs0cjf.axshare.com/#id=456d2w&p=faucetfordev_v0_02&g=1 cc @Keith-CY

Keith-CY commented 1 year ago

Some modifications have been made to the procession of obtaining test net CKB.

The rule is that every address will be able to claim a fixed amount of 30,000 CKB in a month, which is the initial claimable amount. The claimable amount will update on the 1st of every month. And there will be no limit on the claim times in 24h, you can initialize a claim whenever you run out of your test tokens.

The prototype link is here vs0cjf.axshare.com/#id=456d2w&p=faucetfordev_v0_02&g=1 cc @Keith-CY

The PRD should be updated because the amount selection was changed from slider to radio selection

I think another detail could be added along with the auto-filled address as mentioned in the top message

Along with this feature, a small trick could be delivered together: accept a URL query address= to fill in the address field, so the workflow can be facilitated by sharing the faucet URL as https://faucet.nervos.org/?address=

The amount could be auto-checked by a URL parameter

zmcNotafraid commented 1 year ago

https://github.com/Magickbase/ckb-testnet-faucet/pull/6

FrederLu commented 1 year ago

The basic functions are now satisfied, but due to the code settings, resetting the monthly limit does not meet the test conditions for the time being, and it needs to be verified after one month. Now some optimization points related to the front end are listed as follows:

1、On the mac 13.3-inch (2560 × 1600) device, there is an abnormal adaptation of the style.

image

2、When the address is empty, click the claim button, and an abrupt prompt message will appear, causing the page to be deformed up and down. Note the bottom of the 2 screenshots.

image image

3、It cannot be selected when you click to select the quantity, and you need to click 2 times.

image

4、According to the existing reset logic, the prompt copy on the homepage needs to be updated.

image

Update to: Every address can claim a fixed amount of 300,000 CKB in a month. The claimable amount will monthly update on the first day when you claim on this site.

IronLu233 commented 1 year ago

https://github.com/Magickbase/ckb-testnet-faucet/pull/9 I make the amount radio works well. But I met a problem, https://github.com/Magickbase/ckb-testnet-faucet/blob/develop/lib/tasks/migration/create_official_account.rake 's index_lock_hash and get_capacity_by_lock_hash is outdated.