Mortgage.new({ from: ownerAccount, gas: defaultGas }).then(
function(loanInstance) {
loanContractAddress = loanInstance.address;
$('#sectionAAddress').html('<i class="fa fa-address-card"></i> ' +
抵押贷款是合同名称
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;
我收到了以下js错误 UI
未捕获的ReferenceError:未定义抵押贷款 在deployLoanContract(app.js:22316) 在HTMLButtonElement。 (app.js:22610) 在HTMLButtonElement.dispatch(jquery.min.js:3) 在HTMLButtonElement.r.handle(jquery.min.js:3)deployLoanContract @ app.js:22316(匿名)@ app.js:22610 dispatch @ jquery.min.js:3 r.handle @jquery.min.js:3
请在下面找到github网址以查看整个代码 https://github.com/rajivjc/mortgage-blockchain-demo/issues
答案 0 :(得分:1)
通过删除构建文件夹并重新构建
来重新解决问题