Giter Site home page Giter Site logo

hardhat-fireblocks's People

Contributors

a0ngo avatar dependabot[bot] avatar olich97 avatar orenyomtov avatar yoavbz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hardhat-fireblocks's Issues

Can't inject my fireblocks keys on the fly to hardhat config

Hello, I'm trying to set my apiKey and privateKey to hardhat config after I fetch them from a key management system on the fly (after I run some commands with npx hardhat run <script_path>). The problem is, I can't do await calls in the hardhat config script before module.exports statement. Hence, I can't fetch my keys and make the process wait until that happens. I tried several workarounds like immediately invoked function expressions, but even if I can run a logic to fetch keys asynchronously, config is exported way before fetch process ends hence I can't set these fields properly.

Maybe I'm missing a trick that I can handle this with node.js, but I thought this can be achieved if you can let apiKey and privateKey fields to be assigned async functions that return string values for these fields, so that I can assign async functions to these fields which will fetch the keys and return those to config fields. If this sounds weird and you know another way of doing this, I appreciate any suggestion!

Cannot deploy contract to Mumbai Polygon testnet

Hello,

I am trying to deploy a contract at Mumbai Polygon testnet. However, it returns this error:

TypeError: Cannot read properties of null (reading 'sendTransaction') at ContractFactory.<anonymous> (/Users/lucianocampagnoli/Documents/DAX/greener-hardhat/node_modules/@ethersproject/contracts/src.ts/index.ts:1247:38) at step (/Users/lucianocampagnoli/Documents/DAX/greener-hardhat/node_modules/@ethersproject/contracts/lib/index.js:48:23) at Object.next (/Users/lucianocampagnoli/Documents/DAX/greener-hardhat/node_modules/@ethersproject/contracts/lib/index.js:29:53) at fulfilled (/Users/lucianocampagnoli/Documents/DAX/greener-hardhat/node_modules/@ethersproject/contracts/lib/index.js:20:58) at processTicksAndRejections (node:internal/process/task_queues:95:5)

I configured my hardhat.config.ts file as the README.md suggests:

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@fireblocks/hardhat-fireblocks";
import * as dotenv from "dotenv";
import fs from "fs";
import path from "path";

dotenv.config();
const secretKey = fs.readFileSync(path.resolve(__dirname, "./fireblocks_secret.key"), "utf8");

const config: HardhatUserConfig = {
  solidity: "0.8.17",
  networks: {
    mumbai: {
      url: "https://rpc-mumbai.maticvigil.com",
      fireblocks: {
        privateKey: secretKey || "",
        apiKey: process.env.FIREBLOCKS_API_KEY || "",
        vaultAccountIds: process.env.FIREBLOCKS_VAULT_ACCOUNT_IDS,
      }
    }
  },
};

export default config;

Does anyone knows what could being done wrongly?

Best Regards

Luciano Augusto

Chain ID not supported when deploying to Sepolia

Trying to deploy to Sepolia testnet, using the Hardhat and Fireblocks plugin but running into this error:

hardhat: v2.14.0
@fireblocks/hardhat-fireblocks: v1.2.1

hardhat.config.js
Screenshot 2023-05-07 at 1 09 11 PM

Error: Unsupported chain id: 0xaa36a7. Supported chains ids: 1, 3, 4, 5, 10, 19, 30, 31, 42, 56, 69, 97, 137, 250, 1284, 1285, 2020, 42161, 42220, 43113, 43114, 44787, 62320, 80001, 421611, MAINNET, ROPSTEN, KOVAN, GOERLI, RINKEBY, BSC, BSC_TEST, POLYGON, POLYGON_TEST, AVALANCHE, AVALANCHE_TEST, MOONRIVER, MOONBEAM, SONGBIRD, ARBITRUM, ARBITRUM_RIN, FANTOM, RSK, RSK_TEST, CELO, CELO_BAK, CELO_ALF, OPTIMISM, OPTIMISM_KOVAN, RONIN If you're using a private blockchain, you can specify the blockchain's Fireblocks Asset ID via the "assetId" config param. at FireblocksWeb3Provider.populateAssetAndChainId (/Users/user_name/Desktop/projects/project_name/node_modules/@fireblocks/fireblocks-web3-provider/src/provider.ts:146:20) at processTicksAndRejections (node:internal/process/task_queues:95:5) at FireblocksWeb3Provider.populateAccounts (/Users/user_name/Desktop/projects/project_name/node_modules/@fireblocks/fireblocks-web3-provider/src/provider.ts:162: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.