smartcontractkit / functions-hardhat-starter-kit

MIT License
144 stars 103 forks source link

Use default hardhat accounts when PK is not set #170

Closed imollov closed 11 months ago

imollov commented 1 year ago

I ran into this issue when trying to execute unit tests in GH Actions environment without PK set as env variable.

Here's the error thrown:

TypeError: Cannot read properties of null (reading 'sendTransaction')
   at ContractFactory.<anonymous> (node_modules/@ethersproject/contracts/src.ts/index.ts:1247:38)
   at step (node_modules/@ethersproject/contracts/lib/index.js:48:23)
   at Object.next (node_modules/@ethersproject/contracts/lib/index.js:29:53)
   at fulfilled (node_modules/@ethersproject/contracts/lib/index.js:20:58)
KuphJr commented 11 months ago

Thank you! The develop branch improves upon this concept by enabling a localFunctionsTestnet instead of using the hardhat development network. This allows for a complete end-to-end simulation of Functions requests on your local machine. Check it out!