Tools installed by the deployment script don't work with the generated files #11

Closed
opened 2019-08-22 21:12:24 +00:00 by philippgille · 3 comments
philippgille commented 2019-08-22 21:12:24 +00:00 (Migrated from github.com)

deploy.sh does for example npm install -g truffle, which installs the latest truffle version. But the latest truffle version comes with a newer web3 version than the one used in the createRealAccount.js for example.
Or the contracts are for Solidity 0.4.24, but the installed solc is 0.5.something.

You should either run your tools with freshly generated contracts (generated by fondu.io), check what works and what doesn't and change everything so it works again.
Or make all scripts and configs so that they use a fixed version that will also work in a year, even if it's not the latest version in a year anymore (for example, with truffle-config.js containing the following, solc 0.4.24 will be used by default:

compilers: {
    solc: {
      version: "0.4.24"
    }
},

)

`deploy.sh` does for example `npm install -g truffle`, which installs the latest truffle version. But the latest truffle version comes with a newer web3 version than the one used in the `createRealAccount.js` for example. Or the contracts are for Solidity `0.4.24`, but the installed `solc` is `0.5.something`. You should *either* run your tools with freshly generated contracts (generated by fondu.io), check what works and what doesn't and change everything so it works again. *Or* make all scripts and configs so that they use a fixed version that will also work in a year, even if it's not the latest version in a year anymore (for example, with `truffle-config.js` containing the following, `solc 0.4.24` will be used by default: ``` compilers: { solc: { version: "0.4.24" } }, ``` )
philippgille commented 2019-08-23 19:09:43 +00:00 (Migrated from github.com)

Another option would be to provider a Docker image with all the right dependencies and tools installed, so only the generated contract files would have to be volume mapped into the container and that's it. That would actually be the easiest solution.

Another option would be to provider a Docker image with all the right dependencies and tools installed, so only the generated contract files would have to be volume mapped into the container and that's it. That would actually be the easiest solution.
backmeupplz commented 2019-09-05 14:44:33 +00:00 (Migrated from github.com)

I'll probably just update the dependencies, installing Docker for such a small script might be an overkill for a general user

I'll probably just update the dependencies, installing Docker for such a small script might be an overkill for a general user
backmeupplz commented 2019-09-05 15:20:15 +00:00 (Migrated from github.com)

Looks like I've fixed it. Thank you for the report!

Looks like I've fixed it. Thank you for the report!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Borodutch/fondu#11
No description provided.