Error - Gas required exceeds allowance or always failing transaction

5 days ago

I'm just starting to program in solidity and deploy smart contracts in a local created blockchain.

I'm trying to deploy a simple smart contract using remix and web3 provider and this error is killing me all time.

Here is my code. I'm simply trying to parse a json file to save it as structs. If you know a better way to do it, it would be great! I'm now using a library from github that I think is usefull for my use case, but I need some help with the code.

pragma solidity ^0.4.21;

import '';

contract MusicalContract {

struct parameters {

string name;

string mr_share;

string pr_share;

string sr_share;

string country;

string walletDir;


//event debugStr(string str);

//event debugInt(uint i);

parameters[] public params;

string public json = '[{"name":"Martin","pr_share":"2","mr_share":"2","sr_share":"2","country":"2101","walletDir":"12345"},{"name":"Ahoj","share":"","walletDir":"2589","pr_