What's the difference in using new()
or deployed()
when creating a contract instance to use in Truffle unit tests? Should I use
// VERSION A
it("should work", async () => {
let instance = await MyContract.deployed();
:
});
or
// VERSION B
it("should work", async () => {
let instance = await MyContract.new();
:
});