Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
AllFi committed Mar 26, 2024
1 parent ccc7c73 commit a41c6aa
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
10 changes: 6 additions & 4 deletions script/scripts/DeployAllowListOperatorManager.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ contract DeployAllowListOperatorManager is Script {
function run() external {
vm.startBroadcast();

address[] memory operators = new address[](1);
operators[0] = zkBobRelayer;
address[] memory operators = new address[](2);
operators[0] = zkBobProxy;
operators[1] = zkBobProver;

address[] memory feeReceivers = new address[](1);
feeReceivers[0] = zkBobRelayerFeeReceiver;
address[] memory feeReceivers = new address[](2);
feeReceivers[0] = zkBobProxyFeeReceiver;
feeReceivers[1] = zkBobProverFeeReceiver;

AllowListOperatorManager operatorManager =
new AllowListOperatorManager(operators, feeReceivers, allowListEnabled);
Expand Down
22 changes: 12 additions & 10 deletions script/scripts/Env.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ enum PoolType {
}

// common
address constant deployer = 0x39F0bD56c1439a22Ee90b4972c16b7868D161981;
address constant admin = 0xd4a3D9Ca00fa1fD8833D560F9217458E61c446d8;
address constant owner = 0xd4a3D9Ca00fa1fD8833D560F9217458E61c446d8;
address constant deployer = 0x37493bFe9c8c31fAbe8615C988e83D59D1a667a9;
address constant admin = 0x37493bFe9c8c31fAbe8615C988e83D59D1a667a9;
address constant owner = 0x37493bFe9c8c31fAbe8615C988e83D59D1a667a9;
address constant mockImpl = address(0xdead);

// bob
Expand All @@ -23,19 +23,21 @@ address constant bobVanityAddr = address(0xB0B195aEFA3650A6908f15CdaC7D92F8a5791
bytes32 constant bobSalt = bytes32(uint256(285834900769));

// zkbob
uint256 constant zkBobPoolId = 0; // 0 is reserved for Polygon MVP pool, do not use for other deployments
PoolType constant zkBobPoolType = PoolType.USDC;
string constant zkBobVerifiers = "prodV2";
address constant zkBobToken = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // USDC
uint256 constant zkBobPoolId = 0xffff0a; // 0 is reserved for Polygon MVP pool, do not use for other deployments
PoolType constant zkBobPoolType = PoolType.BOB;
string constant zkBobVerifiers = "stageV2";
address constant zkBobToken = 0x2C74B18e2f84B78ac67428d0c7a9898515f0c46f;
uint256 constant zkBobInitialRoot = 11469701942666298368112882412133877458305516134926649826543144744382391691533;
address constant zkBobRelayer = 0xc2c4AD59B78F4A0aFD0CDB8133E640Db08Fa5b90;
address constant zkBobRelayerFeeReceiver = 0x758768EC473279c4B1Aa61FA5450745340D4B17d;
address constant zkBobProxy = 0xFec49782FE8e11De9Fb3Ba645a76FE914FFfe3cb;
address constant zkBobProxyFeeReceiver = 0xFec49782FE8e11De9Fb3Ba645a76FE914FFfe3cb;
address constant zkBobProver = 0x7D2D146a7AD3F0Dc398AA718a9bFCa2Bc873a5FD;
address constant zkBobProverFeeReceiver = 0x7D2D146a7AD3F0Dc398AA718a9bFCa2Bc873a5FD;
uint256 constant zkBobDirectDepositFee = 0.1 gwei;
uint256 constant zkBobDirectDepositTimeout = 1 days;
address constant permit2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;

// decentralized
uint64 constant gracePeriod = 10 minutes; // TODO
uint64 constant gracePeriod = 3 minutes; // TODO
uint64 constant minTreeUpdateFee = 0.1 gwei;
bool constant allowListEnabled = true;

Expand Down
10 changes: 6 additions & 4 deletions script/scripts/Local.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ contract DeployLocal is Script {
}

{
address[] memory operators = new address[](1);
operators[0] = zkBobRelayer;
address[] memory operators = new address[](2);
operators[0] = zkBobProxy;
operators[1] = zkBobProver;

address[] memory feeReceivers = new address[](1);
feeReceivers[0] = zkBobRelayerFeeReceiver;
address[] memory feeReceivers = new address[](2);
feeReceivers[0] = zkBobProxyFeeReceiver;
feeReceivers[1] = zkBobProverFeeReceiver;

IOperatorManager operatorManager = new AllowListOperatorManager(operators, feeReceivers, allowListEnabled);
pool.setOperatorManager(operatorManager);
Expand Down
10 changes: 6 additions & 4 deletions script/scripts/ZkBobPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ contract DeployZkBobPool is Script {

AllowListOperatorManager operatorManager;
{
address[] memory operators = new address[](1);
operators[0] = zkBobRelayer;
address[] memory operators = new address[](2);
operators[0] = zkBobProxy;
operators[1] = zkBobProver;

address[] memory feeReceivers = new address[](1);
feeReceivers[0] = zkBobRelayerFeeReceiver;
address[] memory feeReceivers = new address[](2);
feeReceivers[0] = zkBobProxyFeeReceiver;
feeReceivers[1] = zkBobProverFeeReceiver;

operatorManager = new AllowListOperatorManager(operators, feeReceivers, allowListEnabled);
pool.setOperatorManager(operatorManager);
Expand Down

0 comments on commit a41c6aa

Please sign in to comment.