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

Custom Asset Scale and Asset Code on Heroku #107

Open
wants to merge 8 commits into
base: master
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
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

If you already have an XRP account with 35 XRP or more, use the [Livenet](#live-network) instructions.
Otherwise, you can still follow the [Testnet](#test-network) instructions. For development in an offline
environment, you can run your own [Local Testnet](#local-test-network).
environment, you can run your own [Local Testnet](#local-test-network).

### Test Network

Expand Down Expand Up @@ -94,20 +94,20 @@ port will only be able to pay other applications on the same machine.
### Cloud Test Network

A publically accessible test network can be created by deploying moneyd to Heroku. Use the button below to deploy
an instance of moneyd running in local mode.
an instance of moneyd running in local mode. Prior to completing the app deployment, Heroku will ask for three required fields: Setting the asset code (i.e, XRP, USD), setting the asset scale, and setting the listening port.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

Once deployed, Heroku will provide you with a url to connect to your cloud moneyd which has the form heroku-app-name.herokuapp.com

A local moneyd instance can then be set up to connect to the Heroku instance using the following commands:
A local moneyd instance can then be set up to connect to the Heroku instance using the following commands:

```sh
moneyd --testnet btp:configure
```

Follow the command-line prompts to configure the connection. When prompted for the `BTP host of parent connector`, enter the url provided by Heroku (heroku-app-name.herokuapp.com without the https://).
Once the uplink has been configured, run the local moneyd instance
Once the uplink has been configured, run the local moneyd instance

```sh
moneyd --testnet btp:start
Expand Down Expand Up @@ -236,6 +236,8 @@ variables](https://en.wikipedia.org/wiki/Environment_variable#Unix).
- `MONEYD_ASSET_CODE` - A string specifying the ASSET CODE that moneyd is configured with when running in LOCAL mode. Default: `XRP`.
- `MONEYD_ASSET_SCALE` - A number specifying the ASSET SCALE that moneyd is configured with when running in LOCAL mode. Default: `9`.
- `MONEYD_ILP_ADDRESS` - A string specifying the ilp address that moneyd is configured with when running in LOCAL mode. Default: `private.moneyd`.
- `SET_ASSET_CODE` - A string specifying which Moneyd asset code to use
- `SET_ASSET_SCALE` - A number specifying the Moneyd asset scale to be configured with
### Remote Deploy

If you did the previous step on your remote server, then you don't need to run any
Expand Down
18 changes: 16 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,19 @@
"description": "A barebones Interledger connector",
"repository": "https://github.com/interledgerjs/moneyd",
"logo": "https://github.com/interledgerjs/ilp/raw/master/ilp_logo.png",
"keywords": ["interledger", "moneyd"]
}
"keywords": ["interledger", "moneyd"],
"env": {
"SET_ASSET_CODE": {
"description": "What asset code do you want to use?",
"value": ""
},
"SET_ASSET_SCALE": {
"description": "What asset scale do you want to use?",
"value": ""
},
"SET_PORT": {
"description": "What port do you want to connect to?",
"value": ""
}
}
}