ethers-io / ethers-cli

Deprecated; please see the `@ethersproject/cli` package instead
https://github.com/ethers-io/ethers.js/tree/ethers-v5-beta/packages/cli
17 stars 13 forks source link

Great tool, but few questions #3

Open pkieltyka opened 6 years ago

pkieltyka commented 6 years ago

I'm using ethers-cli to deploy to a ganache-cli testrpc with the following command:

yarn ethers-deploy --gas-price 1 --gas-limit 250000000 --rpc http://localhost:8545 run deploy-contracts.js

the deploy-contracts.js file looks almost identical to: https://github.com/ethers-io/tutorial-simplestore/blob/master/deploy-contract.js except with my sol file

a few questions:

  1. the generated contract json file from saveContract(..) has the abi inside the key “interface” but in your tutorial-simplestore/simple-store.json its called “abi” which is preferable — why would it be showing up as “interface” in that file output?

  2. I noticed the "interface" value is a quoted string of the abi object, why use an escaped string instead of just the object itself? perhaps this is more convenient for other use or a mistake?

  3. it would be nice to specify --network “any_name_i_want” to ethers-deploy as the network name is set as the root "key" of the contract json. Presently, the generated contract json lists "homestead" even though I'm specifying --rpc to a ganache local server

  4. is there a way to link contract deployments..? similar to as truffle contract deployments.. or how do you recommend to deploy a contract that depends on other contracts?

  5. can the builder.saveContract(..) method that saves the contract abi json, also include the bytecode and other contract details similar to how truffle's compilation works? perhaps with an option flag to this method?

  6. during development, it would be nice to have quick iteration / rebuild, one of the slow parts is having to type the password for a test account.json keystore file between deploys, is there a way to tell ethers-deploy to use "empty-password" and skip the password request?

  7. as well it would be nice to have a --yes flag to ethers-deploy for when it asks to "Send Transaction?" it would just specify yes always, this way a single yarn deploy command could be specified to do a full deploy during development

  8. another good idea is to make "solc" a peer dependency instead of a dependency, this way users can upgrade solc on their own without having to wait for ethers-cli to publish a new version see https://nodejs.org/en/blog/npm/peer-dependencies/

  9. for testing / dev, it would be nice to pass a mnemonic phrase for an account instead of a keystore file

ricmoo commented 5 years ago

Sorry, this tool has been neglected for a while. There is a new version up as "ethers-cli@next". The ethers-space has been removed for now, but will soon be added back with an amazing new way of using IPFS. :)

I'll run over the questions quickly though. Many may have been addressed or no longer make sense... :)

  1. Any format can be passed in, a JSON string, the object, an array of ABI fragments, human-readable ABI, et al.

  2. The new CLI should allow selecting chain ID, but ethers v4 will automatically detect it for you if you use rpc. :)

  3. The linking can be done by using await... The deploy now returns the contract, so contract.address should be what you expect.

  4. I should talk to Etherlime too, to see what makes sense for this tool to still even do...

  5. I think I allow raw private keys to be used now... I'll have to look into that.

  6. This is now available! :) (also when it asks, it says "y/n/a"... "a" is for all; I had the same problem ;))

  7. Agreed... Solidity was an issue for this reason, which is also why it was removed... I have other plans in the future, but for now this tool has been stream-lined.

  8. Good idea! I'll add this to the CLI in general.

The tutorial needs to be completely re-written. :)

pkieltyka commented 5 years ago

neat :) I'm curious what you're thinking for "new ways of using IPFS"