Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 2.93 KB

README.md

File metadata and controls

61 lines (42 loc) · 2.93 KB

Tech steps

You need a vps server to deploy ctfn.

  1. Download the /contracts/ folder from the repository.
  2. Deploy /contracts/CtfnAdmin.sol from the repository to the test and main BNB networks
  3. Upload the files of the /src/ directory to the vps server
  4. Configure the domain to open /frontend/web/index.php
  5. Configure the admin subdomain to open /backend/web/index.php

Configuring the database

  1. Import all .sql files from /src/database/ into your database.
  2. To create the first administrator entry for a subdomain, run the following query in the database.
INSERT INTO `admins` (`email`, `password_hash`, `name`, `role`, `active`, `login`, `auth_key`) VALUES ('admin@example.com', '$2y$13$U5CaEB7lVkjNRVahaKA0MO69Ryy1oszINryZChIspGp.85fZ0E1Lu', 'admin', 1, 1, 'YWRtaW5AZXhhbXBsZS5jb20', 's66y2yAJfs0el_KdIqE35pNIk1Gt3MYR')

After the configuration is complete, you can log in to admin.example.com/login using admin@example.com and the password admin123

Configuring the configuration file /frontend/config/main.php

  1. In the homeUrl key specify a direct link to the domain: https://example.com
  2. In the db key specify the settings for connecting to the database
  3. In the key reCaptcha specify api keys from Google Captcha v3

Configuring the configuration file /frontend/config/main-local.php

  1. In the cookieValidationKey specify a random string md5().

Configuring the configuration file /backend/config/main.php

  1. In the homeUrl key specify a direct link to the subdomain: https://admin.example.com
  2. In the db key specify settings to connect to the database

Configuring the configuration file /backend/config/params.php

  1. Specify the administrator's email address in adminEmail

Configuring the configuration file /backend/config/main-local.php

  1. In the cookieValidationKey specify a random string md5().

Configuring the configuration file /common/config/params.php

  1. Specify the administrator's email address in the adminEmail key
  2. In the adminName key, enter the name of the administrator
  3. Specify the sender's email address in the senderEmail key
  4. In the senderName key, enter the sender name of the email
  5. In the key site specify the site: example.com
  6. In the homeUrl key, specify a direct link to the domain (as in the frontend main.php)
  7. In the adminUrl key, specify a direct link to the subdomain (as in the backend main.php)
  8. in the cert_salt key specify a random string of at least 6 characters in length
  9. Optional. You can specify settings for postman by specifying the following keys.

'postman_ip' => '', 'postman_passwd' => '', 'postman_login' => '', 'postman_domain' => '',

Setting up the /frontend/web/js/adminctfnpromainnet.js

  1. Specify the CONTRACT_ADDRESS of the contract on the main network

Setting up the /frontend/web/js/adminctfnprotestnet.js file

  1. Specify the CONTRACT_ADDRESS of the contract on the test network