application icon indicating copy to clipboard operation
application copied to clipboard

apply is not a constant function

Open sevenb opened this issue 7 years ago • 0 comments

myContract { abi: [{ constant: false, inputs: [{...}], name: "apply", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: true, inputs: [{...}], name: "getApplicationID", outputs: [{...}], payable: false, stateMutability: "view", type: "function" }], eth: {}, at: function(address, callback), getData: function(), new: function() }

var abi = [{"constant": false,"inputs":[{"name": "hash","type": "bytes32"}],"name": "apply","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "email","type": "string"}],"name": "getApplicationID","outputs":[{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"}]

var myContract = web3.eth.contract(abi);

var myContractInstance = myContract.at("0xcbbfbafedb0eb83016d2a96a4e80d30b20fa3e30");

var result = myContractInstance.apply("4183f3a48d92d7b874e0e2dc0353e29aee0031b0a174be6f6a2e7a289e9febca"); console.log(result)

sevenb avatar Jan 14 '18 15:01 sevenb