BeamX: A Step by Step Guide to Creating your own Beam Faucet using Beam CLI

Niran
Beam Africa
Published in
5 min readJan 26, 2021

One of the awesome features of BeamX is that it allows you to do interesting things with its amazing features. One of those features is the ability to create your own faucet on the Beam blockchain.

Beam Faucet allows anyone who uses it to own some amount of Beam for free usually within a specified timeframe, all you have to do is to submit your wallet address. This method serves as an opportunity to own Beam, experience how cryptocurrency works or even use it as a form of payment for a product or services (depending on the price of the product or service).

In the article, I will be illustrating a step-by-step guide on how to create your own Beam Faucet using the BeamX CLI wallet. The guide will be simple enough for both amateur and experienced CLI users to use.

  1. The first step is to download the Beam CLI node and wallet here.
Download page for BeamX CLI Wallet and Node (Linux user)

2. Extract the content into a location you can easily access.

Beam CLI Node, Wallet, Node and Wallet Configuration file and Shader folder

3. Launch your Terminal and navigate to the folder where you extracted the Node and wallet to.

BeamX CLI Node and Wallet

4. Initialize the wallet by typing beam-wallet-beamx.exe init (for Windows) ./beam-wallet-beamx init (for Linux or Mac) into the terminal.

Running this command will:

  1. Create a new wallet database in the same folder
  2. Print out your seed phrase (which you should copy and keep somewhere, just in case)
  3. Prompt you to set up a wallet password.

Once you are done, move to the next step.

Please note that I renamed the beam-node-beamx and beam-wallet-beamx to beam-node and beam-wallet respectively, this is to reduce my typing time. You can choose to leave it as it were.

5. After copying out your seed phrase in a safe and secure location ( I strongly recommend offline storage), the next step is to get the owner’s key. To get the owner’s key, we enter the command

./beam-wallet export_owner_key

Owner’s Key

6. Now we launch the BeamX Node and allow it to sync with the Beam blockchain. To do this, we launch a separate terminal and navigate to the folder where the node and wallet were extracted. Then we enter the command.

 beam-node -port=8501 -owner_key=<put here the owner key from the previous step without the brackets> -peer=us-node01.beamx.beam.mw:8100,us-node02.beamx.beam.mw:8100,us-node03.beamx.beam.mw:8100Replace the owner_key=<put here the owner key from the previous step without the brackets> with owner_key=Yf6WH63i9L+23dBSj/qPVXSYLbdHxHJnJ5SKEGeNGtpMPb113Mv/UQQBskBr6mAGARCeXD3QEj3OI558Xv6/s5SpZjgol+plXajFE536Znl6gu+c6B5jb2rtNPnrroV7zE3IIQbj9FcMrzij.

so the code looks like this

beam-node -port=8501 -owner_key= Yf6WH63i9L+23dBSj/qPVXSYLbdHxHJnJ5SKEGeNGtpMPb113Mv/UQQBskBr6mAGARCeXD3QEj3OI558Xv6/s5SpZjgol+plXajFE536Znl6gu+c6B5jb2rtNPnrroV7zE3IIQbj9FcMrzij -peer=us-node01.beamx.beam.mw:8100,us-node02.beamx.beam.mw:8100,us-node03.beamx.beam.mw:8100
Node Synchronizing with the Beam Blockchain

Allow the node to synchronize to the current blockchain height before moving to the next step. you can see the current block here: http://beamx.explorer.beam.mw

Node fully Synchronized.

7. Once the node is fully synchronized with the blockchain, go to the wallet terminal and type in this.

./beam-wallet shader — shader_app_file shaders/faucet/app.wasm -n 127.0.0.1:8501 — shader_args=”role=manager,action=create,backlogPeriod=7,withdrawLimit=70000000" — shader_contract_file shaders/faucet/contract.wasm
Faucet created.

We have now successfully created a faucet that pays 0.7 Beams every 7 blocks.

Note: When creating your faucet, make sure your faucet parameters (backlogPeriod and withdrawaLimit) is not the same with an already existing faucet.

8. The next step now is to fund the faucet with some Beam. In this case, I’ll be funding mine with 100 Beams. You will be needing the contract ID(cid) for this operation.

./beam-wallet shader — shader_app_file shaders\faucet\app.wasm — shader_args=”role=my_account,action=deposit,cid=2b105519ee7e170d92abffbc1eb5426d4e20910af2f54bcee43eb84c74dcfa4b,amount=10000000000" -n 127.0.0.1:8501

9. Now that we’ve successfully funded the faucet, all you have to do now is to share the cid with your friends for them to get some beam coin from the faucet.

10. To receive from the faucet, we must first set your wallet to listen for incoming transactions. For this, you’ll have to open another terminal, navigated to the Beamx fold and then type in

./beam-wallet listen -n 127.0.0.1:8501
Wallet listening for all incoming transaction.

then we type in

./beam-wallet shader — shader_app_file shaders/faucet/app.wasm — shader_args=”role=my_account,action=withdraw,cid=2b105519ee7e170d92abffbc1eb5426d4e20910af2f54bcee43eb84c74dcfa4b,amount=30000000" -n 127.0.0.1:8501

into the other wallet terminal. The result will produce what you have in the terminal below.

Getting 0.7 beam out of the faucet

So we’ve been able to successfully create a faucet, add some beam coin into it and also withdraw some beam from it.

I hope you find this article helpful. Please drop your comment, suggestions and feedback in the comment section.

Be A Part Of Our Community.

We are a growing community of investors, students, founders, and professionals, who are learning about Privacy, Blockchain technology and cryptocurrencies every day.

And we want you to be a part of our community if you aren’t already. We are inviting you to join us on our social media platforms, and on Telegram too. Check out some of our official links below.
Follow us on Twitter | Join us on Telegram | See our official website:

You can also download our mobile apps to start sending and receiving cryptocurrency more securely and privately.
Downloads: Beam Android Wallet | Beam iOS Wallet | Beam Desktop Wallet

--

--