Closed gkaracha closed 3 years ago
The bot is acting up again so we cannot see the differences in byte counts and gas costs but I'm pretty sure they both drop.
Pasting here the stat difference myself, just for completeness.
$ diff stats-master/entrypoint-sizes.json stats-238/entrypoint-sizes.json
< "activate_burrow": 1292,
> "activate_burrow": 1274,
< "burn_kit": 1561,
> "burn_kit": 1527,
< "cancel_liquidation_slice": 12177,
> "cancel_liquidation_slice": 12157,
< "create_burrow": 1097,
> "create_burrow": 1079,
< "deactivate_burrow": 1603,
> "deactivate_burrow": 1581,
< "deposit_collateral": 1163,
> "deposit_collateral": 1145,
< "mark_for_liquidation": 17093,
> "mark_for_liquidation": 17061,
< "mint_kit": 1588,
> "mint_kit": 1550,
< "set_burrow_delegate": 1059,
> "set_burrow_delegate": 490,
< "touch": 56614,
> "touch": 56574,
< "touch_burrow": 660,
> "touch_burrow": 642,
< "touch_liquidation_slices": 14508,
> "touch_liquidation_slices": 14474,
< "withdraw_collateral": 1488
> "withdraw_collateral": 1468
$ diff stats-master/gas-costs.json stats-238/gas-costs.json
< "touch": 538767,
> "touch": 537238,
< "remove_liquidity": 73903,
> "remove_liquidity": 73590,
< "add_liquidity": 73651,
> "add_liquidity": 73337,
< "buy_kit": 69637,
> "buy_kit": 69323,
< "sell_kit": 68764,
> "sell_kit": 68450,
< "deactivate_burrow": 59288,
> "deactivate_burrow": 58783,
< "withdraw_collateral": 58284,
> "withdraw_collateral": 57802,
< "set_burrow_delegate": 54691,
> "set_burrow_delegate": 49911,
< "activate_burrow": 54542,
> "activate_burrow": 54073,
< "deposit_collateral": 53735,
> "deposit_collateral": 53270,
< "mint_kit": 51869,
> "mint_kit": 51241,
< "burn_kit": 51613,
> "burn_kit": 51014,
< "create_burrow": 48918,
> "create_burrow": 48469,
< "touch_burrow": 44409,
> "touch_burrow": 43897,
< "update_operators": 41672,
> "update_operators": 41363,
< "transfer": 39928
> "transfer": 39622
$ diff stats-master/test-coverage.json stats-238/test-coverage.json
< "TOTAL": 93.96,
> "TOTAL": 93.94,
< "burrow.ml": 96.26,
> "burrow.ml": 96.21,
< "checker.ml": 90.08,
> "checker.ml": 90.04,
LGTM! It's nice to be able to remove some extra state which we weren't using anymore.
Yeah, the less code the better! :smile:
Since
set_burrow_delegate
merely propagates requests to change the delegate to the burrow contract. On top of reducing byte counts and gas costs, I expect this change to reduce storage representation differences between FA2/tez collateral (that is, w.r.t. #213).