https://www.cloudflare.com/products/registrar/
$25 is recommended for a few months of service
https://fly.io/docs/flyctl/install/
You can use a bridge or a faucet to get some xDAI
You can start with 0.01 xDAI ($0.1) and fill it later
https://faucet.gnosischain.com
You can ask me for some if you have trouble
git clone https://github.com/hazae41/microserver node0 && cd ./node0Then create a fly.toml file (e.g. a 512MB node at Singapore)
app = "node0"
primary_region = "sin"
[build]
[[vm]]
memory = "512mb"
cpu_kind = "shared"
cpus = 1
[[services]]
protocol = "tcp"
internal_port = 8080
auto_stop_machines = "off"
auto_start_machines = false
[[services.ports]]
port = 80
handlers = ["http"]
[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.ports.http_options]
[services.ports.http_options.response]
[services.ports.http_options.response.headers]
Access-Control-Allow-Headers = "*"
Access-Control-Allow-Methods = "*"
Access-Control-Allow-Origin = "*"Then launch it with
fly launchThen go to fly.io to link your domain name to your server
(You can also setup a JSON-RPC proxy for any EVM chain supported by Tenderly)
Clone the JSON-RPC proxy module into a mainnet subfolder
git submodule add https://github.com/hazae41/network-json-rpc-guard.git ./mods/mainnetEdit your main.ts to route requests to your proxy
const mainnet = await Mainnet.main("MAINNET_")
const onHttpRequest = async (request: Request) => {
if (request.headers.get("host")?.startsWith("mainnet."))
return await mainnet.onHttpRequest(request)
const url = new URL(request.url)
if (url.pathname === "/mainnet")
return await mainnet.onHttpRequest(request)
return new Response("Not Found", { status: 404 })
}Create a .env.local file with wss://signal.node0.hazae41.me as the signal server
MAINNET_SIGNALER_URL_LIST=wss://signal.node0.hazae41.me
MAINNET_SIGNALED_WS_URL=wss://<MY_DOMAIN>/mainnet
MAINNET_SIGNALED_HTTP_URL=https://<MY_DOMAIN>/mainnet
MAINNET_SIGNALED_PROTOCOL_LIST=eth:1,tenderly:1
MAINNET_ENDPOINT_WS_URL=wss://mainnet.gateway.tenderly.co/<API_KEY>
MAINNET_ENDPOINT_HTTP_URL=https://mainnet.gateway.tenderly.co/<API_KEY>
MAINNET_PRIVATE_KEY_ZERO_HEX=<PRIVATE_KEY>Replace <MY_DOMAIN> by your domain name (e.g. node0.hazae41.me), <API_KEY> by your Tenderly API key, and <PRIVATE_KEY> by your Ethereum private key (starting by 0x)
Then copy the whole file content and import it in Fly
fly secrets importPaste the content into your terminal and use Ctrl+D to terminate
fly deployYour changes are now deployed to your server
https://gnosisscan.io/token/0x0a4d5EFEa910Ea5E39be428A3d57B80BFAbA52f4