Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 6508a74

Browse files
committed
updated deployment scripts
1 parent e3c0ff3 commit 6508a74

8 files changed

Lines changed: 47 additions & 207 deletions

File tree

script/arbitrum/DeployArbitrum.s.sol

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { Script, console } from "forge-std/Script.sol";
55
import { PoolsNFT } from "src/PoolsNFT.sol";
66
import { PoolsNFTLens } from "src/PoolsNFTLens.sol";
77
import { GRETH } from "src/GRETH.sol";
8-
import { GRAI} from "src/GRAI.sol";
98
import { GrinderAI } from "src/GrinderAI.sol";
10-
import { TransparentUpgradeableProxy } from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
119
import { Agent } from "src/Agent.sol";
1210
import { AgentsNFT } from "src/AgentsNFT.sol";
1311
import { RegistryArbitrum } from "src/registries/RegistryArbitrum.sol";
@@ -25,9 +23,11 @@ import { Strategy1FactoryArbitrum } from "src/strategies/arbitrum/strategy1/Stra
2523
// $ forge script script/arbitrum/DeployArbitrum.s.sol:DeployArbitrumScript --slow --broadcast --verify --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY
2624

2725
// Verify:
28-
// $ forge verify-contract 0xfC7a86Ab7c0E48F26F3aEe7382eBc6fe313956Db src/PoolsNFT.sol:PoolsNFT --chain-id 42161 --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY
26+
// $ forge verify-contract 0x2915F020C1eAF94dfaCa576914dA829231178a13 src/PoolsNFT.sol:PoolsNFT --chain-id 42161 --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY
2927

30-
// $ forge verify-contract 0xae4312A2E0D15550B0cD9889B2aF56a520589E53 src/GRETH.sol:GRETH --chain-id 42161 --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY --constructor-args $(cast abi-encode "constructor(address,address)" "0xfC7a86Ab7c0E48F26F3aEe7382eBc6fe313956Db" "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1")
28+
// $ forge verify-contract 0x80140D46F7491C26d02938759D7Dc345e73080Ea src/PoolsNFTLens.sol:PoolsNFTLens --chain-id 42161 --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY --constructor-args $(cast abi-encode "constructor(address)" "0x2915F020C1eAF94dfaCa576914dA829231178a13")
29+
30+
// $ forge verify-contract 0x5399084C72671555D7576E2A0842b250A7C05b92 src/GRETH.sol:GRETH --chain-id 42161 --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY --constructor-args $(cast abi-encode "constructor(address,address)" "0x2915F020C1eAF94dfaCa576914dA829231178a13" "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1")
3131

3232
// $ forge verify-contract 0x8BCC8B5Cd7e9E0138896A82E6Db7b55b283EbBcB src/registries/RegistryArbitrum.sol:RegistryArbitrum --chain-id 42161 --verifier-url "https://api.arbiscan.io/api" --etherscan-api-key $ARBITRUMSCAN_API_KEY --constructor-args $(cast abi-encode "constructor(address)" "0xfC7a86Ab7c0E48F26F3aEe7382eBc6fe313956Db")
3333

@@ -53,9 +53,7 @@ contract DeployArbitrumScript is Script {
5353

5454
GRETH public grETH;
5555

56-
GRAI public grAI;
5756
GrinderAI public grinderAI;
58-
TransparentUpgradeableProxy public proxyGrinderAI;
5957

6058
RegistryArbitrum public registry;
6159

@@ -79,14 +77,9 @@ contract DeployArbitrumScript is Script {
7977

8078
grETH = new GRETH(address(poolsNFT), wethArbitrum);
8179

82-
grinderAI = new GrinderAI();
83-
grAI = new GRAI(lzEndpointArbitrum, address(grinderAI));
80+
grinderAI = new GrinderAI(address(poolsNFT));
8481

8582
poolsNFT.init(address(poolsNFTLens), address(grETH), address(grinderAI));
86-
grinderAI.init(address(poolsNFT), address(grAI));
87-
88-
agent = new Agent();
89-
agentsNFT = new AgentsNFT(address(poolsNFT), address(agent));
9083

9184
registry = new RegistryArbitrum(address(poolsNFT));
9285

@@ -95,18 +88,52 @@ contract DeployArbitrumScript is Script {
9588

9689
poolsNFT.setStrategyFactory(address(factory1));
9790

91+
// agent = new Agent();
92+
// agentsNFT = new AgentsNFT(address(poolsNFT), address(agent));
9893

9994
console.log("PoolsNFT: ", address(poolsNFT));
10095
console.log("PoolsNFTLens: ", address(poolsNFTLens));
10196
console.log("GRETH: ", address(grETH));
10297
console.log("GrinderAI: ", address(grinderAI));
103-
console.log("GRAI: ", address(grAI));
10498
console.log("RegistryArbitrum: ", address(registry));
10599
console.log("Strategy1: ", address(strategy1));
106100
console.log("Strategy1Factory: ", address(factory1));
101+
// console.log("Agent: ", address(agent));
102+
// console.log("AgentsNFT: ", address(agentsNFT));
103+
104+
vm.stopBroadcast();
105+
}
106+
}
107+
108+
// Test purposes:
109+
// $ forge script script/arbitrum/DeployArbitrum.s.sol:DeployAgentsArbitrumScript
110+
111+
// Mainnet deploy command: (without verification)
112+
// $ forge script script/arbitrum/DeployArbitrum.s.sol:DeployAgentsArbitrumScript --slow --broadcast
113+
114+
contract DeployAgentsArbitrumScript is Script {
115+
116+
PoolsNFT public poolsNFT = PoolsNFT(payable(address(0)));
117+
118+
Agent public agent;
119+
AgentsNFT public agentsNFT;
120+
121+
function run() public {
122+
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
123+
124+
address deployer = vm.addr(deployerPrivateKey);
125+
console.log("Deployer: ", deployer);
126+
127+
vm.createSelectFork("arbitrum");
128+
vm.startBroadcast(deployerPrivateKey);
129+
130+
require(address(poolsNFT) != address(0), "NOT INSTANTIATED POOLSNFT");
131+
agent = new Agent();
132+
agentsNFT = new AgentsNFT(address(poolsNFT), address(agent));
133+
107134
console.log("Agent: ", address(agent));
108135
console.log("AgentsNFT: ", address(agentsNFT));
109-
136+
110137
vm.stopBroadcast();
111138
}
112139
}

script/arbitrum/manual/4_GrinderAI.s.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pragma solidity =0.8.28;
33

44
import { Script, console } from "forge-std/Script.sol";
5+
import { PoolsNFT } from "src/PoolsNFT.sol";
56
import { GrinderAI } from "src/GrinderAI.sol";
67

78
// Test purposes:
@@ -13,6 +14,8 @@ import { GrinderAI } from "src/GrinderAI.sol";
1314

1415
contract GrinderAIScript is Script {
1516

17+
PoolsNFT public poolsNFT = PoolsNFT(payable(address(0))); // address can be changed
18+
1619
GrinderAI public grinderAI;
1720

1821
function run() public {
@@ -24,7 +27,7 @@ contract GrinderAIScript is Script {
2427
vm.createSelectFork("arbitrum");
2528
vm.startBroadcast(deployerPrivateKey);
2629

27-
grinderAI = new GrinderAI();
30+
grinderAI = new GrinderAI(address(poolsNFT));
2831

2932
vm.stopBroadcast();
3033
}

script/arbitrum/manual/5_GRAI.s.sol

Lines changed: 0 additions & 40 deletions
This file was deleted.

script/arbitrum/manual/6_PoolsNFT_init.s.sol

Lines changed: 0 additions & 42 deletions
This file was deleted.

script/arbitrum/manual/7_GrinderAI_init.s.sol

Lines changed: 0 additions & 39 deletions
This file was deleted.

script/arbitrum/manual/8_Agent.s.sol

Lines changed: 0 additions & 30 deletions
This file was deleted.

script/arbitrum/manual/9_AgentsNFT.s.sol

Lines changed: 0 additions & 35 deletions
This file was deleted.

script/base/DeployBase.s.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script, console } from "forge-std/Script.sol";
55
import { PoolsNFT } from "src/PoolsNFT.sol";
66
import { PoolsNFTLens } from "src/PoolsNFTLens.sol";
77
import { GRETH } from "src/GRETH.sol";
8-
import { GRAI } from "src/GRAI.sol";
98
import { GrinderAI } from "src/GrinderAI.sol";
109
import { TransparentUpgradeableProxy } from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
1110
import { Agent } from "src/Agent.sol";
@@ -77,7 +76,7 @@ contract DeployBaseScript is Script {
7776
PoolsNFTLens public poolsNFTLens;
7877
GRETH public grETH;
7978

80-
GRAI public grAI;
79+
// GRAI public grAI;
8180
GrinderAI public grinderAI;
8281
TransparentUpgradeableProxy public proxyGrinderAI;
8382

@@ -103,11 +102,9 @@ contract DeployBaseScript is Script {
103102

104103
grETH = new GRETH(address(poolsNFT), wethBase);
105104

106-
grinderAI = new GrinderAI();
107-
grAI = new GRAI(lzEndpointBase, address(grinderAI));
105+
grinderAI = new GrinderAI(address(poolsNFT));
108106

109107
poolsNFT.init(address(poolsNFTLens), address(grETH), address(grinderAI));
110-
grinderAI.init(address(poolsNFT), address(grAI));
111108

112109
agent = new Agent();
113110
agentsNFT = new AgentsNFT(address(poolsNFT), address(agent));
@@ -124,7 +121,6 @@ contract DeployBaseScript is Script {
124121
console.log("PoolsNFTLens: ", address(poolsNFTLens));
125122
console.log("GRETH: ", address(grETH));
126123
console.log("GrinderAI: ", address(grinderAI));
127-
console.log("GRAI: ", address(grAI));
128124
console.log("RegistryBase: ", address(registry));
129125
console.log("Strategy1: ", address(strategy1));
130126
console.log("Strategy1Factory: ", address(factory1));

0 commit comments

Comments
 (0)