Giter Site home page Giter Site logo

hardhat-kms-signer's People

Contributors

alcuadrado avatar denciu avatar dependabot[bot] avatar fvictorio avatar fzeoli avatar kowalski avatar paulrberg avatar scnale avatar wighawag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hardhat-kms-signer's Issues

【ERROR】 NetworkingError [NetworkingError]: Invalid character in header content ["Authorization"]

Hey!!

I tried deploy a sample Smartcontract to mumbai!!

But below error was occured when deploying smartContract.

Why?

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
NetworkingError [NetworkingError]: Invalid character in header content ["Authorization"]
    at ClientRequest.setHeader (node:_http_outgoing:648:3)
    at new ClientRequest (node:_http_client:292:14)
    at Object.request (node:https:360:10)

My hardhat.cofig.ts is here

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import 'dotenv/config';
import 'solidity-coverage';
import "hardhat-gas-reporter";
import "@nomicfoundation/hardhat-verify";
import "@rumblefishdev/hardhat-kms-signer";

const {
  REPORT_GAS,
  COINMARKETCAP_API_KEY,
  KMS_KEY_ID,
  MUMBAI_API_URL,
  POLYGONSCAN_API_KEY
} = process.env;

// const OUTPUT_PATH = "./../client/src/contracts";

const config: HardhatUserConfig = {
  solidity:  {
    compilers: [{
      version: '0.8.20',
      settings: {
        optimizer: { 
          enabled: true, 
          runs: 200
        }
      }
    }],
  },
  networks: {
    mumbai: {
      url: MUMBAI_API_URL,
      kmsKeyId: KMS_KEY_ID
    },
  },
  gasReporter: {
    enabled: REPORT_GAS ? true : false,
    currency: 'JPY',
    token: 'ETH',
    coinmarketcap: COINMARKETCAP_API_KEY,
  },
  paths: {
    sources: "./contracts",
    tests: "./tests",
    cache: "./cache",
    artifacts: "./artifacts"
  },
  etherscan: {
    apiKey: {
      scrollAlpha: '',
      polygonMumbai: `${POLYGONSCAN_API_KEY!}`
    },
  },
  sourcify: {
    enabled: true,
  }
};

export default config;

Missing AWS Region

Hi, I can't deploy my contract using AWS KMS. I got error like this. Where is the config file?

Thanks.

Uncaught Error [ConfigError]: Missing region in config
    at finish (/Users/ardiant.utomo/Code/Test/node_modules/.pnpm/[email protected]/node_modules/aws-sdk/lib/config.js:396:7)
    at /Users/ardiant.utomo/Code/Test/node_modules/.pnpm/[email protected]/node_modules/aws-sdk/lib/event_listeners.js:86:9
    at callNextListener (/Users/ardiant.utomo/Code/Test/node_modules/.pnpm/[email protected]/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
    at Request.callListeners (/Users/ardiant.utomo/Code/Test/node_modules/.pnpm/[email protected]/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.VALIDATE_REGION (/Users/ardiant.utomo/Code/Test/node_modules/.pnpm/[email protected]/node_modules/aws-sdk/lib/event_listeners.js:94:47) {
  code: 'ConfigError',
  time: 2022-07-14T08:11:40.108Z
}

Is it possible to use Polygon?

Hey, thank you for creating this library, is it possible to use Polygon network with this? I tried but I got this error:

$ npx hardhat run scripts/deploy.ts --network mumbai
No need to generate any newer typings.
πŸ’‘ Deploying
Error: Chain with ID 80001 not supported

Upgrade to aws sdk 3

Hey
Would you be ok with upgrading to aws sdk 3?
Hardhat is currently complaining about sdk v2

$ npx hardhat clean --global                                                                                                                                                                
(node:9264) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).

If you are willing to merge it i can create a PR!

HttpProviderError

Error occurs if trying to sign typed data with KmsSigner as below:

await signer._signTypedData(domain, types, message)
An unexpected error occurred:

ProviderError: HttpProviderError
    at HttpProvider.request (node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
    at KMSSigner.request (node_modules/@rumblefishdev/hardhat-kms-signer/src/provider.ts:78:34)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.