New answers tagged

1

Currently, Truffle does not support multiple solc versions. You would have to use a workaround as WyseNinja discovered in this Github issue. What I did was to use 0x's sol-compiler package to compile 1 version (0.4.x) to Truffle artifacts, and another version (0.5.x) natively. sol-compiler allows for usage of multiple solc versions, so I suppose you could ...


2

Per this comment on solc-js issue #31, you can append this stanza to package.json. "jest": { "testEnvironment": "node" } (which I guess tells jest to run in node, which will bring in the things that solc needs).


2

You can modify the AST and generate new source code from the AST using this tool: https://github.com/chao-peng/SIF


2

This is all wrong: var result = await contractDeployed.methods.getOwner().call(); console.log('\tgetOwner: ' + result); // Works contractDeployed.methods.setTestData('testing store data').call() .then(result => { console.log('\tSet: ' + result); contractDeployed.methods.getTestData().call() ...


1

You are making a call, which will treat the function as view and it will not generate a transaction. contractDeployed.methods.setTestData('testing store data').call() You have to use send (like in deploy) contractDeployed.methods.setTestData('testing store data').send({ from: address })


Top 50 recent answers are included