-
-
Notifications
You must be signed in to change notification settings - Fork 93
0x sol-compiler support. #128
Comments
@Freydal Sweet, great idea. Very interested in moving in this direction and there's been recent work here to generalize compilation artifact handling and make the tool truffle-neutral. Couple questions...
|
I do not currently have a public repo, but I will try to remember to let you know when it becomes public. I tried out sol-profiler first when I was starting to address a gas issue. I have two major complains regarding its usage:
The SubProvider architecture makes it pretty easy to use and very convenient to integrate into the test system via process flags. |
Thanks for the profiler review. Just found 0x's metacoin example project and think that should suffice. I will try to get this working, publish it in the next patch and ping you here. |
Just leaving some notes here... Artifact format// In lib/artifactor.js have something like...
_0xArtifactor(contractName){
const contract = {};
const artifact = require(`./artifacts/${contractName}.json`);
contract.abi = artifact.compilerOutput.abi;
contract.bytecode = artifact.compilerOutput.evm.bytecode.object;
contract.deployedBytecode = artifact.compilerOutput.evm.deployedBytecode;
this.config.metadata = {
compiler: {
version: artifact.compiler.version
},
settings: {
optimizer: {
enabled: artifact.compiler.settings.optimizer.enabled,
runs: artifact.compiler.settings.optimizer.runs
}
}
};
return contract;
} In-process provider0x's default provider is an in-process ganache-core instance. Unfortunately the provider needs to be shelled out (like truffle's default blockchain) or launched separately at the command line ( Obviously the provider is configurable but atm do not have an example of an 0x project that launches the client this way... |
Needs #171 |
I was finally able to address this again and kind of hacked together something that works. All the repo's are public now, so I will be able to share what I have done and why. The project is arranged in a monorepo and the tests are currently separated from solidity source. This caused an issue with your well prepared 0xProject artifactor. The artifacts are effectively a node module. To address this and other issues I converted the tests into a programatic mocha execution. This helped easily address the artifact issue by injecting the import, but the conversion was also done to attempt to address the issue with the in memory ganache subProvider and need for synchronous calls for reporters (which I haven't worked out). I roughly updated |
This is the config where I'm passing the artifacts. |
I have started using @0x/sol-compiler and other 0x tooling. I feel like this is one of the largest losses in the transition. I would like to see support for sol-compiler and non truffle test suites.
I will considering forking and attempting to address this if I am able to get something working in the future.
The text was updated successfully, but these errors were encountered: