mirror of
https://github.com/averel10/crypto_clash.git
synced 2026-03-12 10:58:11 +01:00
docs: update README and config.json for production API_URL and deployment instructions
This commit is contained in:
28
README.md
28
README.md
@@ -1 +1,27 @@
|
||||
Deployed URL: https://averel10.github.io/crypto_clash/
|
||||
URL: https://averel10.github.io/crypto_clash/
|
||||
=> The live env uses a Reverse-Proxy-Setup to interact with the RPC endpoint: https://rpc.hasrv.averel10.app/, this is needed because we use https in prod so we can't use an http rpc endpoint. This is not an issue in local setup
|
||||
|
||||
|
||||
# Local Setup
|
||||
- Add a .env-File into crypto_clash_contract containing the following data:
|
||||
API_URL="http://185.48.228.49:8545"
|
||||
WALLET_PRIVATE_KEY=REDACTED
|
||||
|
||||
=> Wallet will be used to deploy contracts
|
||||
|
||||
## Deploy Contract (crypto_clash_contract)
|
||||
- Use npm run compile to compile all solid files
|
||||
- Use npm run deploy to deploy all contracts
|
||||
|
||||
=> Contract information is written to config.json in root (ABI, Adresses)
|
||||
|
||||
## Run Frontend locally
|
||||
- Use npm run dev. It is accessible under localhost:3000/crypto_clash
|
||||
|
||||
=> This will copy the config.json file into the public assets (where it can be used by the frontend)
|
||||
=> The whole site is hosted on a subpath /crypto_clash. Use paths accordingly
|
||||
|
||||
# GH Actions
|
||||
=> All actions run on main push
|
||||
=> On Contract-Changes, the contracts are rebuilt and redeployed and the new config.json is commited
|
||||
=> This triggers also a frontend build to deploy a new Version to GH Pages
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"API_URL": "http://185.48.228.49:8545",
|
||||
"API_URL": "https://rpc.hasrv.averel10.app",
|
||||
"CONTRACT_ADDRESS": "0x62A3a88E7D5021AD960426206BD05Ef09eee02a0",
|
||||
"ABI": [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"API_URL": "http://185.48.228.49:8545",
|
||||
"API_URL": "https://rpc.hasrv.averel10.app",
|
||||
"CONTRACT_ADDRESS": "0x62A3a88E7D5021AD960426206BD05Ef09eee02a0",
|
||||
"ABI": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user