How can I initialize the Item
struct and assign to a variable?
contract ArbitrableBlacklist {
enum ItemStatus {
Absent,
Cleared,
}
struct Item {
ItemStatus status;
uint lastAction;
}
}
Testing above (simplified for question) contract using Truffle but I couldn't find the way to initialize the Item
struct.
I have tried:
let x = ArbitrableBlacklist.Item({
status: 0,
lastAction: 0
});
And got
TypeError: ArbitrableBlacklist.Item is not a function
Edit: Forgot to mention, I'm writing tests from Javascript.