Is it possible to manually add functions to the ABI, specifically the getProduct and addProductToStore functions? Does it make a difference? Have already tried deleting build + recompiling + remigrating, same issue. Believe it to be an problem with Truffle's build process corrupting the artifacts?
Similar to this issue: https://github.com/trufflesuite/truffle/issues/685
Remix :
[
{
"constant": true,
"inputs": [],
"name": "productIndex",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_productId",
"type": "uint256"
}
],
"name": "getProduct",
"outputs": [
{
"name": "",
"type": "uint256"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "string"
},
{
"name": "",
"type": "uint256"
},
{
"name": "",
"type": "uint256"
},
{
"name": "",
"type": "uint256"
},
{
"name": "",
"type": "uint8"
},
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_name",
"type": "string"
},
{
"name": "_category",
"type": "string"
},
{
"name": "_imageLink",
"type": "string"
},
{
"name": "_descLink",
"type": "string"
},
{
"name": "_auctionStartTime",
"type": "uint256"
},
{
"name": "_auctionEndTime",
"type": "uint256"
},
{
"name": "_startPrice",
"type": "uint256"
},
{
"name": "_productCondition",
"type": "uint256"
}
],
"name": "addProductToStore",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
]
Local Json file:
"abi": [
{
"constant": true,
"inputs": [],
"name": "productIndex",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
]