near / near-cli-rs

near CLI is your human-friendly companion that helps to interact with NEAR Protocol from command line.
https://near.cli.rs
Apache License 2.0
98 stars 55 forks source link

Replace current NEAR Helper service with near-faucet.io #377

Open frol opened 2 months ago

frol commented 2 months ago

Let's standardize a Faucet Interface and switch to using near-faucet.io

@flmel Can near-faucet.io create accounts with preloaded NEAR similar to how we currently use NEAR Helper endpoint?

flmel commented 2 months ago

Hey @frol I'm not exactly familiar how the current helper works, but the faucet and its web application have proven stable so I don't see complications doing so. However, the reserve of testnet tokens will deplete so there would be allocation needed.

frol commented 2 months ago

@flmel we just make a POST call to the helper with the following JSON data:

https://github.com/near/near-cli-rs/blob/9872f3a1273d49b5f77e467d24815ea62bb352a8/src/commands/account/create_account/sponsor_by_faucet_service/mod.rs#L84-L89

Here is the URL we currently use: https://github.com/near/near-cli-rs/blob/9872f3a1273d49b5f77e467d24815ea62bb352a8/src/config/mod.rs#L53

It would be great to replace only the URL. Would it be possible to make sure that Faucet Service endpoint supports the parameters?