This repository was archived by the owner on Sep 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
331 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: npx pm2-runtime start --name relayer npm -- run server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "Linkdrop x Binance Chain Server", | ||
"description": "Relay service to distribute BEP2 tokens", | ||
"repository": "https://github.com/LinkdropHQ/linkdrop-binance-x/tree/dev", | ||
"env": { | ||
"VERIFIER_ADDRESS": { | ||
"description": "Public Ethereum address corresponding to private key the links have been signed with", | ||
"value": "0xbF0e4036BF968dD007F9B4A1BFdA4e54C042F612" | ||
}, | ||
"SENDER_PRIVATE_KEY": { | ||
"description": "Binance chain private key that holds BEP2 tokens to be distributed", | ||
"value": "" | ||
} | ||
}, | ||
"keywords": ["node", "express"], | ||
"addons": ["mongolab"], | ||
"scripts": { | ||
"postdeploy": "yarn global add pm2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Linkdrop x Binance Chain Server | ||
|
||
## Deployment | ||
|
||
[](https://heroku.com/deploy?template=https://github.com/LinkdropHQ/linkdrop-binance-x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"SENDER_PRIVATE_KEY": "", // Private key of the account holding tokens to be distributed | ||
"VERIFIER_ADDRESS": "" // Address corresponding to `VERIFIER_PRIVATE_KEY` that signed links | ||
"SENDER_PRIVATE_KEY": "", | ||
"VERIFIER_ADDRESS": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import path from 'path' | ||
import fs from 'fs' | ||
const configPath = path.resolve(__dirname, './config.json') | ||
|
||
// If config file does not exist, create it and fill with sample config content | ||
if (!fs.existsSync(configPath)) { | ||
fs.copyFileSync(`${configPath}.sample`, configPath, err => { | ||
if (err) throw new Error(err) | ||
}) | ||
} | ||
|
||
const config = require(configPath) | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.