4
0
Fork 0

Added simple mix task to compile solidity test files

contracts
hswick 7 years ago
parent f648e790c6
commit ab683eefbc
  1. 2
      README.md
  2. 10
      mix.exs

@ -26,5 +26,5 @@ solc --version
Then if you've made changes to the example contracts you can compile them like this:
```
solc -o test/examples/build --abi --bin test/examples/contracts/* --overwrite
mix solc
```

@ -56,3 +56,13 @@ defmodule ExW3.MixProject do
]
end
end
defmodule Mix.Tasks.Solc do
use Mix.Task
@shortdoc "Runs the solc compiler to create binary and abi of all contracts. Outputs to build directory"
def run(_) do
# calling our Hello.say() function from earlier
Mix.Shell.IO.cmd("solc -o test/examples/build --abi --bin test/examples/contracts/* --overwrite")
end
end
Loading…
Cancel
Save