Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

npx oz deploy hangs when deploying regular contract to Rinkeby #1469

Closed
abcoathup opened this issue Feb 18, 2020 · 2 comments · Fixed by #1477
Closed

npx oz deploy hangs when deploying regular contract to Rinkeby #1469

abcoathup opened this issue Feb 18, 2020 · 2 comments · Fixed by #1477
Labels
Milestone

Comments

@abcoathup
Copy link
Contributor

abcoathup commented Feb 18, 2020

npx oz deploy hangs when deploying regular contract to Rinkeby

Deploying Box.sol as a regular contract to Rinkeby hangs. ctrl-c after five minutes to end.

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment regular
? Pick a network rinkeby
? Pick a contract to deploy Box
0xd2990A11ad5AE856059d89bf982B4a83C0E21942

cli: 2.8.0-rc.1
node: v10.19.0
npm: 6.13.7
Operating System: Windows 10 - WSL
@truffle/hdwallet-provider: 1.0.31

networks.js

const { projectId, mnemonic } = require('./secrets.json');
const HDWalletProvider = require('@truffle/hdwallet-provider');

module.exports = {
  networks: {
    development: {
      protocol: 'http',
      host: 'localhost',
      port: 8545,
      gas: 5000000,
      gasPrice: 5e9,
      networkId: '*',
    },
    rinkeby: {
      provider: () => new HDWalletProvider(
        mnemonic, `https://rinkeby.infura.io/v3/${projectId}`
      ),
      networkId: 4,
      gasPrice: 10e9
    }
  },
};

Contract appears to be deployed successfully:
https://rinkeby.etherscan.io/address/0xd2990A11ad5AE856059d89bf982B4a83C0E21942

Can interact with contract:

$ npx oz send-tx
? Pick a network rinkeby
? Pick an instance Box at 0xd2990A11ad5AE856059d89bf982B4a83C0E21942
? Select which function store(newValue: uint256)
? newValue: uint256: 23
✓ Transaction successful. Transaction hash: 0xf19bcee329d8883872d8929e7737783b5c7efd00fd9d61231fd38ae0ee52ca21
Events emitted:
 - ValueChanged(23)

Can deploy upgradeable version successfully:

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment upgradeable
? Pick a network rinkeby
? Pick a contract to deploy Box
All implementations are up to date
? Call a function to initialize the instance after creating it? No
✓ Instance created at 0x2551BB7C13425aCaf9CAA17Ae0EA8caEfdbE734c
0x2551BB7C13425aCaf9CAA17Ae0EA8caEfdbE734c

Can deploy minimal version successfully:

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment minimal
? Pick a network rinkeby
? Pick a contract to deploy Box
Minimal proxy support is still experimental.
All implementations are up to date
? Call a function to initialize the instance after creating it? No
✓ Instance created at 0xD3b254165746FDf47a17A707d3e8eC7c5F89e7bC
✓ Deployed ProxyFactory at 0x9306995E929a0615D06f7f20687C667115cfbaE3
0xD3b254165746FDf47a17A707d3e8eC7c5F89e7bC

Can deploy regular version to development network:

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment regular
? Pick a network development
? Pick a contract to deploy Box
0x2612Af3A521c2df9EAF28422Ca335b04AdF3ac66
@frangio
Copy link
Contributor

frangio commented Feb 18, 2020

I didn't have time to debug this today or even try to reproduce it, but I've added in #1473 a spinner while the deployment transaction is being sent.

@spalladino
Copy link
Contributor

spalladino commented Feb 19, 2020

This is caused by a missing exit(0) in the new spec command framework, used by deploy, since truffle-hdwallet-provider does not allow the process to exit.

@frangio note that this would have been caught by an integration test using the geth-hdwallet-provider network setting (and yes, I recall I told you 2 days ago that it was not necessary to set up that test!).

@spalladino spalladino added this to the v2.8 milestone Feb 19, 2020
spalladino added a commit that referenced this issue Feb 19, 2020
spalladino added a commit that referenced this issue Feb 19, 2020
frangio pushed a commit that referenced this issue Feb 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants