feat: add AfterCoin (AFC) private blockchain for Minecraft casino
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
Private Ethereum chain (Clique PoA, chain ID 8888) with ERC-20 token (0 decimals, 1 AFC = 1 diamond) bridging casino balances on-chain so players can view tokens in MetaMask. - Geth v1.13.15 node with 5s block time, zero gas cost - AfterCoin ERC-20 contract with owner-gated mint/burn/bridgeTransfer - Bridge API (Express + ethers.js + SQLite) with register, deposit, withdraw, balance, and wallet endpoints - Nonce queue for serial transaction safety - Auto-deploys contract on first boot - Updated mainframe Lua with diff-based on-chain sync (pcall fallback) - Updated card generator Lua with wallet info display Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,3 +24,9 @@ PUBLIC_HOST=play.yourdomain.com
|
||||
# Cloudflare API Token (create at https://dash.cloudflare.com/profile/api-tokens)
|
||||
# Permissions needed: Zone > DNS > Edit
|
||||
CF_API_TOKEN=your_cloudflare_api_token
|
||||
|
||||
# AfterCoin Blockchain (private Ethereum chain for casino tokens)
|
||||
# Generate with: node -e "const {ethers}=require('ethers');const w=ethers.Wallet.createRandom();console.log(w.address,w.privateKey)"
|
||||
AFC_ADMIN_ADDRESS=0xYOUR_ADMIN_ADDRESS
|
||||
AFC_ADMIN_PRIVATE_KEY=your_private_key_without_0x_prefix
|
||||
AFC_BRIDGE_SECRET=change_me_in_production
|
||||
|
||||
@@ -116,8 +116,47 @@ services:
|
||||
limits:
|
||||
memory: 8G
|
||||
|
||||
geth:
|
||||
build:
|
||||
context: ../blockchain
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
ADMIN_PRIVATE_KEY: ${AFC_ADMIN_PRIVATE_KEY}
|
||||
ADMIN_ADDRESS: ${AFC_ADMIN_ADDRESS}
|
||||
ports:
|
||||
- "8545:8545"
|
||||
- "8546:8546"
|
||||
volumes:
|
||||
- geth_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 1G
|
||||
|
||||
afc-bridge:
|
||||
build:
|
||||
context: ../services/afc-bridge
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- geth
|
||||
environment:
|
||||
GETH_RPC_URL: http://geth:8545
|
||||
ADMIN_PRIVATE_KEY: ${AFC_ADMIN_PRIVATE_KEY}
|
||||
BRIDGE_SECRET: ${AFC_BRIDGE_SECRET}
|
||||
PORT: 3001
|
||||
DB_PATH: /data/bridge.db
|
||||
GAS_FUND_AMOUNT: "0.01"
|
||||
ports:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- afc_bridge_data:/data
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
minio_data:
|
||||
openfusion_data:
|
||||
minecraft_ftb_data:
|
||||
geth_data:
|
||||
afc_bridge_data:
|
||||
|
||||
Reference in New Issue
Block a user