File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^ 0.8.20 ;
3
+
4
+ import "forge-std/Script.sol " ;
5
+ import "../src/shutter-service/ShutterRegistry.sol " ;
6
+
7
+ contract Deploy is Script {
8
+ function run () external {
9
+ uint256 deployKey = vm.envUint ("DEPLOY_KEY " );
10
+ address deployerAddress = vm.addr (deployKey);
11
+ console.log ("Deployer: " , deployerAddress);
12
+ vm.startBroadcast (deployKey);
13
+ deploySequencer ();
14
+ vm.stopBroadcast ();
15
+ }
16
+
17
+ function deploySequencer () public returns (ShutterRegistry) {
18
+ ShutterRegistry s = new ShutterRegistry ();
19
+ console.log ("ShutterRegistry: " , address (s));
20
+ return s;
21
+ }
22
+
23
+ }
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^ 0.8.20 ;
3
+
4
+ import "forge-std/Script.sol " ;
5
+ import { ShutterRegistry } from "src/shutter-service/ShutterRegistry.sol " ;
6
+
7
+ contract SubmitTransaction is Script {
8
+ function run () external {
9
+ uint256 privateKey = vm.envUint ("TX_SENDER_KEY " );
10
+ ShutterRegistry registry = ShutterRegistry (vm.envAddress ("REGISTRY_ADDRESS " ));
11
+ uint64 eon = uint64 (vm.envUint ("EON " ));
12
+ bytes32 identityPrefix = vm.envBytes32 ("IDENTITY_PREFIX " );
13
+ uint64 ts = uint64 (vm.envUint ("TIMESTAMP " ));
14
+
15
+ vm.startBroadcast (privateKey);
16
+ registry.register (
17
+ eon,
18
+ identityPrefix,
19
+ ts
20
+ );
21
+ vm.stopBroadcast ();
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments