Dynamically add refs into builder type
Dynamically add refs into builder type
With a minor change, you can. In the `while` loop, assign `qRefs.store_ref` to `qRefs`. In fact you don't need to keep references to the old builder. I would write it like this:
```
() save_data_on_update(slice destination_address) impure inline {
builder b = begin_cell();
b = b.store_slice(destination_address);
repeat (4) {
b = b.store_ref(begin_cell().store_uint(0, 1).end_cell());
}
cell c = b.end_cell();
set_data(c);
}
```
With a minor change, you can. In the `while` loop, assign `qRefs.store_ref` to `qRefs`. In fact you don't need to keep references to the old builder. I would write it like this:
```
() save_data_on_update(slice destination_address) impure inline {
builder b = begin_cell();
b~store_slice(destination_address);
repeat (4) {
b~store_ref(begin_cell().store_uint(0, 1).end_cell());
}
cell c = b.end_cell();
set_data(c);
}
```
Dynamically add refs into builder type
With a minor change, you can. In the `while` loop, assign `qRefs.store_ref` to `qRefs`. In fact you don't need to keep references to the old builder. I would write it like this:
```
() save_data_on_update(slice destination_address) impure inline {
builder b = begin_cell();
b~store_slice(destination_address);
repeat (4) {
b~store_ref(begin_cell().store_uint(0, 1).end_cell());
}
cell c = b.end_cell();
set_data(c);
}
```