You need a vps server to deploy ctfn.
- Download the
/contracts/
folder from the repository. - Deploy
/contracts/CtfnAdmin.sol
from the repository to the test and main BNB networks - Upload the files of the
/src/
directory to the vps server - Configure the domain to open
/frontend/web/index.php
- Configure the admin subdomain to open
/backend/web/index.php
- Import all .sql files from
/src/database/
into your database. - 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
- In the
homeUrl
key specify a direct link to the domain: https://example.com - In the
db
key specify the settings for connecting to the database - In the key
reCaptcha
specify api keys from Google Captcha v3
- In the
cookieValidationKey
specify a random stringmd5()
.
- In the
homeUrl
key specify a direct link to the subdomain: https://admin.example.com - In the
db
key specify settings to connect to the database
- Specify the administrator's email address in adminEmail
- In the
cookieValidationKey
specify a random stringmd5()
.
- Specify the administrator's email address in the
adminEmail
key - In the
adminName
key, enter the name of the administrator - Specify the sender's email address in the
senderEmail
key - In the
senderName
key, enter the sender name of the email - In the key
site
specify the site: example.com - In the
homeUrl
key, specify a direct link to the domain (as in the frontend main.php) - In the
adminUrl
key, specify a direct link to the subdomain (as in the backend main.php) - in the
cert_salt
key specify a random string of at least 6 characters in length - Optional. You can specify settings for postman by specifying the following keys.
'postman_ip' => '', 'postman_passwd' => '', 'postman_login' => '', 'postman_domain' => '',
- Specify the
CONTRACT_ADDRESS
of the contract on the main network
- Specify the
CONTRACT_ADDRESS
of the contract on the test network