core-contracts
                                
                                 core-contracts copied to clipboard
                                
                                    core-contracts copied to clipboard
                            
                            
                            
                        Optimize state clearing contract
Based on some comments made here: https://github.com/near/core-contracts/pull/171#pullrequestreview-767219536
There are a few things that can be done to make this smaller (without changing the interface at all):
- Update to 4.0 pre-release of SDK to avoid having to go through blockchain_interfacefor syscalls
- Replace serde/serde-json with something like https://github.com/dtolnay/miniserde. This will make the contract to deploy much smaller, but deserializing might use slightly more compute/gas. This change is likely worth it in the vast majority of cases.
- Make it no_std
- Replace unwraps with manually handled errors through syscalls to avoid putting file-specific data into wasm binary