No Contract Code after deployment
I was following the steps mentioned in the ethereum to ethereum architecture section in the wiki at this link
I was able to deploy Ion.sol as well as the validation.sol but EthereumStore.sol on deployment shows "no code after deployment".

I have used a local geth blockchain and ion-cli to carry out the following procedures:
- connected ion-cli to the local blockchain
connectToClient http://localhost:<port no.>
addAccount acc <path to keystore>
addContractInstance ion <path to Ion.sol>
deployContract ion acc 1000000
- on doing the above it asks for parameter id, to which I provide the chain id of the blockchain as mentioned in the wiki and the address of the deployed contract is returned.
- providing the above address while deploying the EthereumStore.sol contract gives the message "no contract code after deployment"
please help @Shirikatsu
@Singh48
"no code after deployment".
I think this might be caused by the deployment exceeding the block gas limit or running out of gas.
Consider,
- using ganache with very high block gas limit
- increasing the amount of gas you send with the transaction
@maxrobot thanks for the quick response. Following your advice, I modified my genesis.js file, increasing the gas limit to 1012 and supplying 107 amount of gas while deploying the EthereumStorage.sol from the ion-cli and was successful in doing so.
Next, Help needed: Can you please let me know a way to call the functions of the validation contract (Clique.sol) from the ion-cli itself. The functions being the next steps (Step 3,4) in setting up the receiving end of the interoperating blockchains, namely:
function register() public returns (bool) {
ion.registerValidationModule();
return true;
}
and
function RegisterChain(bytes32 _chainId, address[] memory _validators, bytes32 _genesisBlockHash, address _storeAddr) public {
require( _chainId != ion.chainId(), "Cannot add this chain id to chain register" );
if (chains[_chainId]) {
require( !m_blockhashes[_chainId][_genesisBlockHash], "Chain already exists with identical genesis" );
} else {
chains[_chainId] = true;
ion.addChain(_storeAddr, _chainId);
}
setGenesisBlock(_chainId, _validators, _genesisBlockHash);
}
https://github.com/clearmatics/ion-cli
Take a look at the docs here.
What you're looking for is the addContractInstance command that allows you to compile an instance of a contract which then allows you to call functions.
@Shirikatsu, thanks for the reply. I have added the contract instances of the contracts following the steps provided in ion-cli's repo, which I have mentioned in my issue statement. I wanted to know whether calling functions from the ion-cli itself is possible or not after the required contract has been added and deployed. If yes how? Thanks in advance.
Use the transactionMessage command in the ion-cli to do this.