starknet-hardhat-plugin: HardhatPluginError: Could not deploy contract. Check the network url in config. Is it responsive?
Hello team. I updated to the latest 0.5.2 and tried to run the tests.
I have one test passing but one not.
I get this error HardhatPluginError: Could not deploy contract. Check the network url in config. Is it responsive?
My current configuration has been for a while:
networks: {
devnet: {
url: 'http://127.0.0.1:5000/',
},
},
This is the output:
yarn hardhat test
yarn run v1.22.18
$ /Users/claudio/Dev/web3/starknet-video-network-poc/hardhat/node_modules/.bin/hardhat test
Starknet plugin using the active environment.
Using network devnet at http://127.0.0.1:5000/
...
1) VNChannel
constructor
should have stored correctly the name and symbol:
HardhatPluginError: Could not deploy contract. Check the network url in config. Is it responsive?
at StarknetContractFactory.<anonymous> (node_modules/@shardlabs/starknet-hardhat-plugin/src/types.ts:354:19)
at Generator.next (<anonymous>)
at fulfilled (node_modules/@shardlabs/starknet-hardhat-plugin/dist/types.js:24:58)
This is the test failing:
import { expect } from 'chai'
import { starknet } from 'hardhat'
import { StarknetContract, StarknetContractFactory } from 'hardhat/types/runtime'
const { getContractFactory, shortStringToBigInt } = starknet
describe('VNChannel', () => {
let contract: StarknetContract
const setupContract = async () => {
const contractFactory: StarknetContractFactory = await getContractFactory('VNChannel')
contract = await contractFactory.deploy({
name: shortStringToBigInt('VNChannel'),
symbol: shortStringToBigInt('VNChannel'),
owner: 1n,
})
}
describe('constructor', () => {
it('should have stored correctly the name and symbol', async () => {
// Given
await setupContract()
// When
const { name } = await contract.call('name')
const { symbol } = await contract.call('symbol')
// Then
expect(name).to.be.deep.equal(shortStringToBigInt('VNChannel'))
expect(symbol).to.be.deep.equal(shortStringToBigInt('VNChannel'))
})
})
})
Ideas why?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30
After a week of battles with docker, with remote VMs and other stuff, it seems that I found a way to make it work with the active environment. the only thing different this time around was that I used the latest latest version of python, the 3.10.3. I also had to downgrade
In another terminal:
And everything works!!