# How to use the Solidity compiler with TestRPC blockchain emulator

**URL:** <https://forum.soliditylang.org/t/how-to-use-the-solidity-compiler-with-testrpc-blockchain-emulator/356>\
**Category:** Tools & Infrastructure\
**Created:** [June 28, 2021, 1:08pm UTC](https://forum.soliditylang.org/t/how-to-use-the-solidity-compiler-with-testrpc-blockchain-emulator/356 "2021-06-28T13:08:34Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![cameel](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.soliditylang.org/cameel/32/34_2.png) [@cameel](https://forum.soliditylang.org/u/cameel)\
**Post date:** [June 28, 2021, 6:03pm UTC](https://forum.soliditylang.org/t/how-to-use-the-solidity-compiler-with-testrpc-blockchain-emulator/356/8 "2021-06-28T18:03:11Z")

</div>

Looking at your README, you’re using [GitHub - trufflesuite/ganache-cli-archive: Fast Ethereum RPC client for testing and development. See https://github.com/trufflesuite/ganache for current development.](https://github.com/ethereumjs/testrpc) which actually redirects to [ganache-cli](https://github.com/trufflesuite/ganache-cli). Looks like the project became Ganache:

> ### Looking for TestRPC?
> 
> If you came here expecting to find the TestRPC, you’re in the right place! Truffle has taken the TestRPC under its wing and made it part of the Truffle suite of tools. From now on you can expect better support along with tons of new features that help make Ethereum development safer, easier, and more enjoyable. Use `ganache-cli` just as you would `testrpc`.

And Ganache does not support Solidity compilation like TestRPC used to:

> ## Unsupported Methods
> 
> - `eth_compileSolidity`: If you’d like Solidity compilation in Javascript, please see the [solc-js project](https://github.com/ethereum/solc-js).

This means it won’t work the way you’re trying to do it. You need to use the compiler yourself and compile the contract into bytecode you can deploy.

If you can use JS directly from Qt, try solc-js. If not, you can invoke the native Linux binary you got with `--standard-json` option. Here’s the documentation for the input JSON the compiler accepts: [Using the compiler \> Input description](https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description).

And an example of input and compiler invocation:

`input.json`:

```auto
{
    "language": "Solidity",
    "sources": {
        "contract.sol": {
            "content": "contract C {}"
        }
    },
    "settings": {
        "outputSelection": {"*": { "*": ["evm.bytecode.object"]}},
        "optimizer": {"enabled": true}
    }
}

```

```auto
solc --standard-json input.json

```

---

_[View the full topic](https://forum.soliditylang.org/t/how-to-use-the-solidity-compiler-with-testrpc-blockchain-emulator/356)._
