Skip to content

Commit

Permalink
Add Deploy_jwtVerifier.s.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
wshino committed Oct 12, 2024
1 parent 008631d commit f04645d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Here is the sample verified deployed addresses on Sepolia:
```
JWTRegistry: 0x983A7B6a8b5657319078D858a303830C99761108
DKIMRegistry: 0xf3B70Dc348C7820b3026564500A7eBAc6cC4cC33
JWTVerifier: 0xac82c745AAdA7489786ed689bcc1138F27833cD7
```

## Errors
Expand Down
24 changes: 24 additions & 0 deletions packages/contracts/script/Deploy_jwtVerifier.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// script/Deploy.s.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "forge-std/Script.sol";
import "../src/utils/JwtVerifier.sol";

// 1. `source .env`
// 2. `forge script script/Deploy_jwtVerifier.s.sol:DeployScript --rpc-url $RPC_URL --verify --etherscan-api-key $ETHERSCAN_API_KEY --broadcast -vvvv`
contract DeployScript is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
bytes32 salt = keccak256(abi.encodePacked(vm.envString("DEPLOY_SALT")));

vm.startBroadcast(deployerPrivateKey);

// Deploy the contract using CREATE2
JwtVerifier jwtVerifier = new JwtVerifier{salt: salt}();

console.log("Contract deployed to:", address(jwtVerifier));

vm.stopBroadcast();
}
}

0 comments on commit f04645d

Please sign in to comment.