Skip to content

Commit a731a89

Browse files
committed
fix: Update deployment documentation and contract addresses:
- Revise DEPLOYMENT_STEPS.md with new contract addresses and verification commands. - Update env.example with current deployed addresses. - Add DeploySimple script for direct contract deployment on Base network. - Modify SDK files to reflect live contract address on Base mainnet.
1 parent 9d50d5a commit a731a89

6 files changed

Lines changed: 132 additions & 20 deletions

File tree

DEPLOYMENT_STEPS.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ AgentPayy has been successfully deployed to Base network with full governance se
88

99
| Contract | Address | Description |
1010
|----------|---------|-------------|
11-
| **Factory** | `0xe91bF2679320618c472a1EdD24Fc26311c7790Dc` | Main factory for deploying ecosystem |
12-
| **AgentPayyCore** | `0x5c8d572e7dF3EE84316773280EB877c28Bd547fA` | Core payment processing |
13-
| **AttributionEngine** | `0x3327872a4ceB2E15D71dfE5a3Fd188e0acaf4726` | Revenue attribution system |
14-
| **ReceiptManager** | `0xca9961FAc8beCF986b2e56eA69165F2Cc925C7c4` | Transaction receipts |
15-
| **APIRegistry** | `0x9fe3459657817721F466f47700f7B79E18288D8f` | API provider registry |
16-
| **GovernanceTimelock** | `0xdA4B4D75071d3143d24Cc4246f384EE7fd6F0fB7` | 24h governance timelock |
11+
| **AgentPayyCore** | `0x7213E3E48D44504EEb42AF36f363Deca7C7E0565` | **Core payment processing** |
12+
| **AttributionEngine** | `0x7ec304483F5549345351A7903C3B87A653698Ac3` | Revenue attribution system |
13+
| **ReceiptManager** | `0x678f0F998D5D72f88744A298cb827264b4289D43` | Transaction receipts |
14+
| **APIRegistry** | `0x9F68C43427AC0935043624eE40189B7382AC5700` | API provider registry |
15+
| **GovernanceTimelock** | `0xF0dDb154ed6557a9c9Bcd9715fCeD7242F594814` | 24h governance timelock |
1716
| **Treasury/Gnosis Safe** | `0x53C0D26A9d000eAa2C2138497491A45e25970574` | Multi-sig governance |
1817

1918
## 🔍 Contract Verification
@@ -24,11 +23,11 @@ Run these commands to verify contracts on Basescan:
2423
cd contracts
2524

2625
# Verify all contracts
27-
forge verify-contract 0xe91bF2679320618c472a1EdD24Fc26311c7790Dc src/AgentPayyFactory.sol:AgentPayyFactory --chain-id 8453
28-
forge verify-contract 0x5c8d572e7dF3EE84316773280EB877c28Bd547fA src/AgentPayyCore.sol:AgentPayyCore --chain-id 8453
29-
forge verify-contract 0x3327872a4ceB2E15D71dfE5a3Fd188e0acaf4726 src/AttributionEngine.sol:AttributionEngine --chain-id 8453
30-
forge verify-contract 0xca9961FAc8beCF986b2e56eA69165F2Cc925C7c4 src/ReceiptManager.sol:ReceiptManager --chain-id 8453
31-
forge verify-contract 0x9fe3459657817721F466f47700f7B79E18288D8f src/APIRegistry.sol:APIRegistry --chain-id 8453
26+
forge verify-contract 0x7213E3E48D44504EEb42AF36f363Deca7C7E0565 src/AgentPayyCore.sol:AgentPayyCore --chain-id 8453
27+
forge verify-contract 0x7ec304483F5549345351A7903C3B87A653698Ac3 src/AttributionEngine.sol:AttributionEngine --chain-id 8453
28+
forge verify-contract 0x678f0F998D5D72f88744A298cb827264b4289D43 src/ReceiptManager.sol:ReceiptManager --chain-id 8453
29+
forge verify-contract 0x9F68C43427AC0935043624eE40189B7382AC5700 src/APIRegistry.sol:APIRegistry --chain-id 8453
30+
forge verify-contract 0xF0dDb154ed6557a9c9Bcd9715fCeD7242F594814 src/GovernanceTimelock.sol:GovernanceTimelock --chain-id 8453
3231
```
3332

3433
## 🏛️ Governance Setup
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.20;
3+
4+
import {Script, console} from "forge-std/Script.sol";
5+
import {AgentPayyCore} from "../src/AgentPayyCore.sol";
6+
import {AttributionEngine} from "../src/AttributionEngine.sol";
7+
import {ReceiptManager} from "../src/ReceiptManager.sol";
8+
import {APIRegistry} from "../src/APIRegistry.sol";
9+
import {GovernanceTimelock} from "../src/GovernanceTimelock.sol";
10+
11+
/**
12+
* @title DeploySimple
13+
* @notice Simple deployment script for Base network - no Factory
14+
* @dev Deploys core AgentPayy contracts directly
15+
*/
16+
contract DeploySimple is Script {
17+
function run() public {
18+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
19+
address gnosisSafe = vm.envAddress("GNOSIS_SAFE_ADDRESS");
20+
21+
console.log("=== AgentPayy Simple Deployment ===");
22+
console.log("Network: Base (Chain ID: 8453)");
23+
console.log("Deployer:", vm.addr(deployerPrivateKey));
24+
console.log("Gnosis Safe:", gnosisSafe);
25+
console.log("Treasury: Same as Gnosis Safe");
26+
27+
require(gnosisSafe != address(0), "GNOSIS_SAFE_ADDRESS must be set");
28+
require(vm.addr(deployerPrivateKey).balance > 0.005 ether, "Need at least 0.005 ETH for deployment");
29+
30+
vm.startBroadcast(deployerPrivateKey);
31+
32+
// 1. Deploy governance timelock first
33+
console.log("\n=== Deploying Governance Timelock ===");
34+
address[] memory proposers = new address[](1);
35+
address[] memory executors = new address[](1);
36+
proposers[0] = gnosisSafe;
37+
executors[0] = gnosisSafe;
38+
39+
GovernanceTimelock timelock = new GovernanceTimelock(
40+
24 hours, // 24h delay
41+
proposers,
42+
executors,
43+
gnosisSafe, // admin
44+
gnosisSafe // gnosis safe
45+
);
46+
console.log("GovernanceTimelock deployed:", address(timelock));
47+
48+
// 2. Deploy core contracts
49+
console.log("\n=== Deploying Core Contracts ===");
50+
51+
AgentPayyCore core = new AgentPayyCore(gnosisSafe); // treasury = gnosis safe
52+
console.log("AgentPayyCore deployed:", address(core));
53+
54+
AttributionEngine attribution = new AttributionEngine(address(core), gnosisSafe);
55+
console.log("AttributionEngine deployed:", address(attribution));
56+
57+
ReceiptManager receipts = new ReceiptManager(address(timelock));
58+
console.log("ReceiptManager deployed:", address(receipts));
59+
60+
APIRegistry registry = new APIRegistry();
61+
console.log("APIRegistry deployed:", address(registry));
62+
63+
// 3. Link contracts
64+
console.log("\n=== Linking Contracts ===");
65+
core.setAttributionEngine(address(attribution));
66+
core.setReceiptManager(address(receipts));
67+
68+
// 4. Transfer ownership to timelock
69+
console.log("\n=== Setting Up Governance ===");
70+
core.transferOwnership(address(timelock));
71+
attribution.transferOwnership(address(timelock));
72+
registry.transferOwnership(address(timelock));
73+
74+
vm.stopBroadcast();
75+
76+
console.log("\n=== DEPLOYMENT SUCCESSFUL ===");
77+
console.log("AgentPayyCore: ", address(core));
78+
console.log("AttributionEngine: ", address(attribution));
79+
console.log("ReceiptManager: ", address(receipts));
80+
console.log("APIRegistry: ", address(registry));
81+
console.log("GovernanceTimelock: ", address(timelock));
82+
console.log("Treasury/Gnosis Safe: ", gnosisSafe);
83+
84+
// Generate .env updates
85+
console.log("\n=== Add to your .env file ===");
86+
console.log("AGENTPAYY_BASE_CORE=", vm.toString(address(core)));
87+
console.log("AGENTPAYY_BASE_ATTRIBUTION=", vm.toString(address(attribution)));
88+
console.log("AGENTPAYY_BASE_RECEIPTS=", vm.toString(address(receipts)));
89+
console.log("AGENTPAYY_BASE_REGISTRY=", vm.toString(address(registry)));
90+
console.log("AGENTPAYY_BASE_TIMELOCK=", vm.toString(address(timelock)));
91+
92+
// Generate SDK config
93+
console.log("\n=== SDK Configuration ===");
94+
console.log("Add this to your SDK contracts file:");
95+
console.log("{");
96+
console.log(' "base": {');
97+
console.log(' "agentPayyCore": "', vm.toString(address(core)), '",');
98+
console.log(' "attributionEngine": "', vm.toString(address(attribution)), '",');
99+
console.log(' "receiptManager": "', vm.toString(address(receipts)), '",');
100+
console.log(' "apiRegistry": "', vm.toString(address(registry)), '"');
101+
console.log(" }");
102+
console.log("}");
103+
104+
// Verification commands
105+
console.log("\n=== Verification Commands ===");
106+
console.log("forge verify-contract", vm.toString(address(core)), "src/AgentPayyCore.sol:AgentPayyCore --chain-id 8453");
107+
console.log("forge verify-contract", vm.toString(address(attribution)), "src/AttributionEngine.sol:AttributionEngine --chain-id 8453");
108+
console.log("forge verify-contract", vm.toString(address(receipts)), "src/ReceiptManager.sol:ReceiptManager --chain-id 8453");
109+
console.log("forge verify-contract", vm.toString(address(registry)), "src/APIRegistry.sol:APIRegistry --chain-id 8453");
110+
console.log("forge verify-contract", vm.toString(address(timelock)), "src/GovernanceTimelock.sol:GovernanceTimelock --chain-id 8453");
111+
112+
console.log("\nAgentPayy is live on Base!");
113+
}
114+
}

env.example

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ BASE_RPC_URL=https://mainnet.base.org # Free public RPC (or u
99
BASESCAN_API_KEY=... # For contract verification (optional)
1010

1111
# ===== DEPLOYED ADDRESSES (Base Network) =====
12-
AGENTPAYY_BASE_FACTORY=0xe91bF2679320618c472a1EdD24Fc26311c7790Dc
13-
AGENTPAYY_BASE_CORE=0x5c8d572e7dF3EE84316773280EB877c28Bd547fA
14-
AGENTPAYY_BASE_ATTRIBUTION=0x3327872a4ceB2E15D71dfE5a3Fd188e0acaf4726
15-
AGENTPAYY_BASE_RECEIPTS=0xca9961FAc8beCF986b2e56eA69165F2Cc925C7c4
16-
AGENTPAYY_BASE_REGISTRY=0x9fe3459657817721F466f47700f7B79E18288D8f
17-
AGENTPAYY_BASE_TIMELOCK=0xdA4B4D75071d3143d24Cc4246f384EE7fd6F0fB7
12+
AGENTPAYY_BASE_CORE=0x7213E3E48D44504EEb42AF36f363Deca7C7E0565
13+
AGENTPAYY_BASE_ATTRIBUTION=0x7ec304483F5549345351A7903C3B87A653698Ac3
14+
AGENTPAYY_BASE_RECEIPTS=0x678f0F998D5D72f88744A298cb827264b4289D43
15+
AGENTPAYY_BASE_REGISTRY=0x9F68C43427AC0935043624eE40189B7382AC5700
16+
AGENTPAYY_BASE_TIMELOCK=0xF0dDb154ed6557a9c9Bcd9715fCeD7242F594814

sdk/python/agentpayy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AgentPayyKit:
2727
"base": {
2828
"rpc": "https://mainnet.base.org",
2929
"usdc": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
30-
"contract": "0x..." # Set after deployment
30+
"contract": "0x7213E3E48D44504EEb42AF36f363Deca7C7E0565" # Live on Base mainnet
3131
},
3232
"arbitrum": {
3333
"rpc": "https://arb1.arbitrum.io/rpc",

sdk/typescript/src/core/contracts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const CONTRACTS = {
2-
base: '0x...', // Set after deployment
2+
base: '0x7213E3E48D44504EEb42AF36f363Deca7C7E0565', // Live on Base mainnet
33
arbitrum: '0x...',
44
optimism: '0x...'
55
};

sdk/typescript/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { getContractAddress, USDC_ADDRESSES } from './core';
1616
// Types are now imported from ./core
1717

1818
const CONTRACTS = {
19-
base: '0x...', // Set after deployment
19+
base: '0x7213E3E48D44504EEb42AF36f363Deca7C7E0565', // Live on Base mainnet
2020
arbitrum: '0x...',
2121
optimism: '0x...'
2222
};

0 commit comments

Comments
 (0)