Development Stack
DAO.Casino provides a comprehensive gamedev kit with a sample viable game in it.
Note that you still have to install the bankroller application (see below) to have a comprehensive SDK.
The DAO.Casino SDK contains:
- a set of files to implement the game logic and a sample of viable game for front-end developers
- bankroller application (casino backend)
- integrated smart contracts (protocol, game back-end)
- dc-cli for smooth installation, integration and training
Below you can find detailed deployment guidelines.
Note on Code
Our solution uses Solidity for smart contracts, TypeScript for core components and game logic. You may also use JavaScript in your projects.
Deployment
Preconditions
For all platfroms you need:
- installed DC-CLI (DCI-CLI "wizard" )
- node.js (10 or newer)
- npm.js
For Windows you need Bash Terminal with installed windows-build-tools; call: npm install --global windows-build-tools
, npm i-g cross-env
andnpm i -g node-gyp
to compile node.js addons. Depending on your Windows version, you may need to use PowerShell as the local administrator to launch these commands. Switch to Bash Terminal, when start working with the local environment (example). See also https://github.com/nodejs/node-gyp.
Note that only Windows 10, 64x supported.
For Mac OS install:xcode-select --install
, npm i-g cross-env
For Linux install gcc utility by calling: sudo apt install gcc
and call npm i-g cross-env
DC-CLI Deployment
Install the DCI-CLI. To do it, call (wizard installation):
npm i -g dc-cli
For Linux call (npm installation is not supported for this OS):
Sudo yarn global add dc-cli
When the wizard starts, it displays the list (menu) of commands you have to call in order to successfully deploy the SDK and use it.
The recommended procedure and command particularities are covered in a separate chapter.
See tutorials here:https://support.dao.casino/ru/knowledge-bases/4-sandbox-for-developers/categories/37-participants-guideline/articles.
Bankroller App Deployment
Clone the repository. Then call:
npm i -g bankroller-core
To start the application, call:
bankroller-core start <privateKey> [options]
Optional Procedure for Windows
- Install GIT Bash. Call all commands in this console. Launch it as the local administrator.
- Install Node.js (version 10 or newer).
- Install Docker. If your OS is not from the Pro/Enterprise family or its version is below Windows 10, install the Docker Toolbox.
- Clone the DAO.Casino repository.
- Navigate to the core repository directory and call
npm install --global windows-build-tools.
This command installs components necessary for Windows. - Call npm i-g cross-env and npm i -g node-gyp.
- Call
yarn install
in the same directory. In case of conflicts, install manually. - Once complete, call
yarn build
.
All parameters are specified at ../src/bin/deamon.ts.
Troubleshooting
Overall, the deployment kit is very solid and error-proof, but, If you have problems deploying the SDK, check the following:
- node.js version
- npm status
- conflicts with other networks deployed on your PC
- Internet access
- browser plugins, Windows antivirus software blocking the process
- etc.
After a series of tests, you are likely to exhaust test balances available for each account. To reset the test accounts:
in the DC-CLI call:
reset
or call:
npm run reset
Сервис поддержки клиентов работает на платформе UserEcho