I'm developing smart contracts using Truffle. I got the contract's bytecode through truffle compile
. This produced a large json file and it wasn't too ahrd to find the bytecode. Now, how can I find the Contract JSON Interface for easy testing of the contract, especially those that import from multiple files and so on?
Within your truffle test, try this:
let Contract = artifacts.require('./Contract.sol');
contract('Contract', accounts => {
Contract.deployed().then(instance => {
console.log(instance.abi);
});
});