This document provides standardized deployment commands for the PayNode Protocol.
- Compiler Version: v0.8.20
- Optimizer: Enabled (200 runs)
- Protocol Treasury:
0x598bF63F5449876efafa7b36b77Deb2070621C0E
Deploy using the specialized deployment script for the testnet.
- Current v1.4 Address:
0x24cD8b68aaC209217ff5a6ef1Bf55a59f2c8Ca6F
cd packages/contracts && \
...
forge script script/DeploySepolia.s.sol:DeploySepolia \
--rpc-url https://sepolia.base.org \
--private-key <YOUR_PRIVATE_KEY> \
--broadcast \
-vvvvTo test M2M payments with USDC on Base Sepolia, you can deploy a mock token for sandbox testing.
- Mock USDC Address:
<NEWLY_DEPLOYED_ADDRESS>(Base Sepolia)
cd packages/contracts && \
forge script script/DeployMockUSDC.s.sol:DeployMockUSDC \
--rpc-url https://sepolia.base.org \
--private-key <YOUR_PRIVATE_KEY> \
--broadcast \
-vvvvTip: After deployment, verify the contract on Basescan to enable easy mint calls via the web UI:
forge verify-contract <DEPLOYED_ADDRESS> src/MockUSDC.sol:MockUSDC --rpc-url https://sepolia.base.orgDeploy using the specialized deployment script for the production environment.
cd packages/contracts && \
forge script script/DeployPOM.s.sol:DeployPOM \
--rpc-url https://mainnet.base.org \
--private-key <YOUR_PRIVATE_KEY> \
--broadcast \
-vvvv-
Verify on Basescan:
- After deployment, note the
PayNodeRouter Deployed to:address in the console output. - Go to Basescan and search for the address.
- Click "Contract" -> "Verify and Publish".
- Use
Solidity (Single File)mode. If you need a flattened file, run:forge flatten src/PayNodeRouter.sol > Flattened.sol
- After deployment, note the
-
Update & Sync Ecosystem Config: After deployment, update the
ROUTER_ADDRESSandUSDC_ADDRESS(Sandbox) in each sub-package.Option A: Manual Update (Legacy Locations) Ensure the following locations are updated if necessary:
packages/sdk-js/src/index.tspackages/sdk-python/paynode_sdk/client.pyapps/paynode-web/.env(NEXT_PUBLIC_PAYNODE_ROUTER_ADDRESS)
Option B: Automated Sync (Recommended) The project now uses a central
paynode-config.json. To sync new addresses across the Web app and SDKs automatically:- Update
routerandtokens.USDCentries inpaynode-config.json. - Run the sync script from the project root:
python3 scripts/sync-config.py
-
Transfer Ownership (Optional): If deploying with a hot wallet, consider transferring ownership to a multisig (Gnosis Safe) using
transferOwnership.