I've created a smart contract in solidity which I've compiled with solc into a .bin & a .abi file. However, when I run the generator on the .abi and .bin files it returns a JSONParseException citing an unexpected character.
io
This is my smart contract:
pragma solidity ^0.4.9;
contract Contract {
address public creator;
event Log(uint256 id);
function Contract() {
creator = msg.sender;
}
function kill() {
selfdestruct(creator);
}
function add(uint256 id) {
Log(id);
}
}
Best Answer
Just tried your contract. It seems correct and I was able to create a wrapper successfully. Here is what I did:
Put a
ContractName.sol
file wilth you source intod:\tmp>
then in that directory executed the following from the command line:Which generated .abi and .sol files in that same directory. Then:
Generated me a wrapper under the folloring directoty (according to the package structure provided in command line):
Everything seems fine, you should be able to create yours. I installed
colc
andweb3j
tools like described here: solc, web3j