Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coin Dispenser #131

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions basic/coindispenser/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# CoinDispenser

A coin swap utility to swap any pair.</br>

Usage examples: </br>
- obtaining fixed price tokens for any kind of game.</br>
- redeeming won tokens for a price.</br>

This project contains a DApp and two webclients.</br>

# requirements
Nodejs/NPM needs to be installed</br>
- <b>note</b>: verify the install version is ok for use with the radix-dapp-toolkit.</br>

For the webclients it is assumed the DApp has been published and initiated.</br>
Publishing can be done at the Radix Dashboard: https://rcnet-v3-dashboard.radixdlt.com/</br>
Run an updated <b>inistantiate.rtm</b> file to run as a raw transaction</br>
Use the obtained component address to update the javascript definitions.

This project was updated for Radix RC3-net using Scrypto 0.12.0.
## Getting started: Webclients

In the `/client/src` folder edit the main.js file:</br>
- update the variables as directed

Enter the `client` folder.</br>
- start the website</br>
%-> npm install
%-> npm run dev

This will start the client webserver @localhost:3000

In the `/admin/src` folder edit the main.js file:</br>
- update the variables as directed

Enter the `admin` folder.</br>
- start the website</br>
%-> npm install
%-> npm run dev

This will start the admin webserver @localhost:3001

## Getting started: dApp
In the `/dapp/coindispenser` folder:</br>
- Source the sourceme on Linux/Bash for an easy start.</br>

%-> source sourceme

- Run the tests and obtain the RTM Radix transaction manifest files.</br>

%-> scrypto test
2 changes: 2 additions & 0 deletions basic/coindispenser/admin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/src/dist
/node_modules
Loading