Versions
VS Code version: 1.102.0
Extension version: 0.2.0
Steps to reproduce
Just create default SimpleCounter contract in Blueprint
Method save is marked as unused
tolk 1.0
struct Storage {
id: uint32
counter: uint32
}
fun Storage.load() {
return Storage.fromCell(contract.getData())
}
fun Storage.save(self) {
contract.setData(self.toCell())
}
fun onInternalMessage(in: InMessage) {
val msg = lazy AllowedMessage.fromSlice(in.body);
match (msg) {
IncreaseCounter => {
var storage = lazy Storage.load();
storage.counter += msg.increaseBy;
storage.save(); // <- Usage of save method
}
}
}