Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
feat(contracts): deployment using KMS
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Aug 23, 2023
1 parent 9436c7a commit 87210f4
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 17 deletions.
5 changes: 5 additions & 0 deletions onchain/rollups/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "@typechain/hardhat";
import "hardhat-deploy";
import "hardhat-abi-exporter";
import "hardhat-gas-reporter";
import "@rumblefishdev/hardhat-kms-signer";

import {
Chain,
Expand All @@ -26,6 +27,9 @@ import {
// read MNEMONIC from env variable
let mnemonic = process.env.MNEMONIC;

// use KMS if env variable is defined
const kmsKeyId = process.env.KMS_KEY_ID;

const ppath = (packageName: string, pathname: string) => {
return path.join(
path.dirname(require.resolve(`${packageName}/package.json`)),
Expand All @@ -47,6 +51,7 @@ const networkConfig = (chain: Chain): HttpNetworkUserConfig => {
chainId: chain.id,
url,
accounts: mnemonic ? { mnemonic } : undefined,
kmsKeyId,
};
};

Expand Down
2 changes: 2 additions & 0 deletions onchain/rollups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
"@ethersproject/providers": "^5",
"@nomicfoundation/hardhat-verify": "^1",
"@nomiclabs/hardhat-ethers": "^2",
"@rumblefishdev/hardhat-kms-signer": "^1",
"@safe-global/safe-singleton-factory": "^1",
"@typechain/ethers-v5": "^11",
"@typechain/hardhat": "^8",
"@types/chai": "^4",
"@types/mocha": "^10",
"@types/node": "^20",
"@wagmi/chains": "^1.6",
"aws-sdk": "^2",
"chai": "^4.2",
"copyfiles": "^2",
"ethers": "^5",
Expand Down
Loading

0 comments on commit 87210f4

Please sign in to comment.