smartcontractkit / foundry-starter-kit-old

GNU Affero General Public License v3.0
204 stars 26 forks source link

[Bug]: ZSH shell on linux deploy scripts not working #19

Open shankars99 opened 2 years ago

shankars99 commented 2 years ago

Describe the bug

So there's 3 different bugs that I'm facing

What I did is run the script and also echo out the command from the deploy script

  1. No constructor Contract isn't deploying as it expects --constructor-args forge create ./src/${Test}.sol:${Test} -i --rpc-url $rpc --constructor-args

  2. Constructor present 1 parameter This works perfectly forge create ./src/${Test}.sol:${Test} -i --rpc-url $rpc --constructor-args 10

  3. Constructor present >1 parameters Only the first parameter gets passed forge create ./src/${Test}.sol:${Test} -i --rpc-url $rpc --constructor-args 10

To Reproduce

in the describe the bug

Expected behavior

Deployed contracts

Additional context

I think it could be due to read -ra args

and adding a length check for args to differentiate error case 1 from 2 and 3

shankars99 commented 2 years ago

alright i got it to work for me, not sure if this is a me problem or not i had the same error on gitpod and on my local repository with the fix (https://github.com/shankars99/foundry-starter-kit)

the other change required to reproduce would be

npm i hardhat npx hardhat node

and then

url: "https://localhost:8545" in hardhat.config.js

can i make a PR for it?

PatrickAlphaC commented 2 years ago

Please!