1
0
mirror of https://github.com/Bytom/faucet.git synced 2020-06-03 17:14:40 +00:00
Bytom faucet implemented by PHP.
Go to file
2019-04-12 23:29:42 +08:00
assets add html 2018-11-08 18:54:14 +08:00
common_func.php update 2018-11-02 11:00:11 +08:00
faucet_gm.php fix commet 2018-11-18 16:27:27 +08:00
faucet.php fix commet 2018-11-18 16:27:27 +08:00
inc_gm.php modify pages 2018-11-05 18:58:04 +08:00
inc.php modify pages 2018-11-05 18:58:04 +08:00
README.md Update README.md 2019-04-12 23:29:42 +08:00

Faucet

Bytom testnet faucet implemented by PHP.

This demo using this repository:

1 Install Apache

Install Apache

$ yum -y install httpd

Start Apache:

$ systemctl start httpd.service

Set startup:

$ systemctl enable httpd.service

2 Install PHP

Install PHP:

$ yum -y install php

Edit /etc/php.ini, set short_open_tag = ON:

short_open_tag = ON

Restart Apache:

$ systemctl restart httpd.service

3 Install bytom from source

Firtly, you should install go and set correct GOPATH and PATH.

Get the source code:

$ git clone https://github.com/Bytom/bytom.git $GOPATH/src/github.com/bytom

Build source code:

$ cd $GOPATH/src/github.com/bytom
$ make install

4 Initial and launch bytom node

Initial:

$ bytomd init --chain_id testnet

Launch:

$ nohup bytomd node >> log.out &

Create key:

$ bytomcli create-key key_1 12345

Create account:

$ bytomcli create-account account_1 <xpubs-from-create-key>

Create address:

$ bytomcli create-account-receiver account_1

5 Install frontend

$ cd /var/www/html/
$ git clone https://github.com/bytom/faucet.git

6 Get testnet btm

You can get testnet btm using --mining when you launch bytom. You can also contact us to get some testnet btm.

7 Specification

Don't forget change some accounts and addresses in the code. Your account and address should replace mine. Any issues you can report in the repository.

8 Example