Reputation: 922
Mortgage.new({ from: ownerAccount, gas: defaultGas }).then(
function(loanInstance) {
loanContractAddress = loanInstance.address;
$('#sectionAAddress').html('<i class="fa fa-address-card"></i> ' +
Mortgage is the contract name
var Mortgage = artifacts.require("./Mortgage.sol");
module.exports = function(deployer) {
deployer.deploy(Mortgage);
};
Mortgage.sol
pragma solidity ^0.4.4;
contract Mortgage {
function Mortgage()
{
loanApplicant = msg.sender;
loan.status = STATUS_INITIATED;
balances[msg.sender] = 100000000;
}
/* address of the loan applicant */
address loanApplicant;
I get the below js error in UI
Uncaught ReferenceError: Mortgage is not defined at deployLoanContract (app.js:22316) at HTMLButtonElement. (app.js:22610) at HTMLButtonElement.dispatch (jquery.min.js:3) at HTMLButtonElement.r.handle (jquery.min.js:3) deployLoanContract @ app.js:22316 (anonymous) @ app.js:22610 dispatch @ jquery.min.js:3 r.handle @ jquery.min.js:3
Please find the github url below to check the whole code https://github.com/rajivjc/mortgage-blockchain-demo/issues
Upvotes: 1
Views: 1141
Reputation: 922
issue reoslved by deleting the build folder and did build again
Upvotes: 1