Test Code:
let pim = await PassiveIncomeMethod.new(
u.admin.address,
"Test Method",
sf.host.address,
sf.agreements.cfa.address,
daix.address
);
app = await Proposal.new(
"Test project",
"Test description.",
1000000,
10000,
pim.address,
3600 * 3 // deadline of 3 days in seconds
);
I am using truffle to try and test a contract “Proposal” that needs the address of another contract “PassiveIncomeMethod”. I’m trying to create a PassiveIncomeMethod contract and then hand off the address to Proposal but I’m unsure of how to correctly pass the address. I’m currently getting the error:
TypeError: Cannot read properties of undefined (reading 'address')
at appStatus (test/Proposal.test.js:137:49)
at Context.<anonymous> (test/Proposal.test.js:168:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)