From f04645d2a6abb569e60d46354a44c936b4db53d1 Mon Sep 17 00:00:00 2001 From: wshino Date: Sun, 13 Oct 2024 00:48:20 +0900 Subject: [PATCH] Add Deploy_jwtVerifier.s.sol --- packages/contracts/README.md | 1 + .../contracts/script/Deploy_jwtVerifier.s.sol | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 packages/contracts/script/Deploy_jwtVerifier.s.sol diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 2ec515d..0f3d556 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -12,6 +12,7 @@ Here is the sample verified deployed addresses on Sepolia: ``` JWTRegistry: 0x983A7B6a8b5657319078D858a303830C99761108 DKIMRegistry: 0xf3B70Dc348C7820b3026564500A7eBAc6cC4cC33 +JWTVerifier: 0xac82c745AAdA7489786ed689bcc1138F27833cD7 ``` ## Errors diff --git a/packages/contracts/script/Deploy_jwtVerifier.s.sol b/packages/contracts/script/Deploy_jwtVerifier.s.sol new file mode 100644 index 0000000..f1c9ace --- /dev/null +++ b/packages/contracts/script/Deploy_jwtVerifier.s.sol @@ -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(); + } +} \ No newline at end of file