chore: sync submodule state (parent ref update)
Made-with: Cursor
This commit is contained in:
23
script/DeployGenericStateChannelManager.s.sol
Normal file
23
script/DeployGenericStateChannelManager.s.sol
Normal file
@@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.19;
|
||||
|
||||
import {Script, console} from "forge-std/Script.sol";
|
||||
import {GenericStateChannelManager} from "../contracts/channels/GenericStateChannelManager.sol";
|
||||
|
||||
/**
|
||||
* @notice Optional: Deploy GenericStateChannelManager (state channels with stateHash).
|
||||
* Set CHANNEL_ADMIN, CHALLENGE_WINDOW_SECONDS. Deploy to same chain as PaymentChannelManager if desired.
|
||||
*/
|
||||
contract DeployGenericStateChannelManager is Script {
|
||||
function run() external {
|
||||
uint256 pk = vm.envUint("PRIVATE_KEY");
|
||||
address deployer = vm.addr(pk);
|
||||
address admin = vm.envOr("CHANNEL_ADMIN", deployer);
|
||||
uint256 challengeWindow = vm.envOr("CHALLENGE_WINDOW_SECONDS", uint256(86400));
|
||||
vm.startBroadcast(pk);
|
||||
GenericStateChannelManager manager = new GenericStateChannelManager(admin, challengeWindow);
|
||||
console.log("GenericStateChannelManager deployed at:", address(manager));
|
||||
console.log("Admin:", admin);
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user