Results 187 comments of Green Baneling

The change reduces the size of each contract except subcontracts of the `delegator` example. I will check why and how we can improve it too. The open question is: Are...

I found that all contracts from [workspace](https://github.com/paritytech/ink/blob/141673b578c74e4382753b80faf2c1594a23fe91/examples/delegator/Cargo.toml#L45) contain debug information(stuff related to `Debug` and `Display`). It increases the size of all contracts there. Removing `[workspace]` decreases the size of each...

The change is ready, so I'm waiting for your comments=) The change affects `delegator` sub-contract in a positive direction too is saves ~300 bytes.

`ink-waterfall` didn't update the sizes=)

> So the savings are alright, but they're not mindblowing either The more methods in the contract, the stronger the effect of the change. [That contract](https://github.com/prosopo-io/protocol/blob/master/contracts/lib.rs) contains a lot of...

I played with that idea, tested different implementations and cases, checked the sizes. --- First of all to reduce the size, better to avoid frequent usage of `ink_env::set_contract_storage` and `ink_env::get_contract_storage`....

> Is that somewhere reflected in the code you posted? I think it contradicts the rest you are saying: We are selecting different keys with manual or automatic keys. I...

> Seems I find the solution for that problem. https://github.com/rust-lang/rust/issues/44580#issuecomment-991782799 feature is stable now, and we can create strcutures like: >```rust >struct Test2 { > value: bool, > value2: bool,...

I managed to implement auto-incrementing of the storage key during compilation(it is a hard variant where we don't need to worry about keys)=) [Here](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d0f7916819ee34a4d4a11adb6b7723d6) is an example. It contains only...

> That solution has a problem with the derive macro because I'm adding generic Parent: NextStorageKey into the definition of the struct, and derive macro generates bounds for that generic,...