near-indexer-for-explorer icon indicating copy to clipboard operation
near-indexer-for-explorer copied to clipboard

Remove dependency on near-sdk-rs

Open matklad opened this issue 2 years ago • 2 comments

At the moment, indexer depends on near-sdk-rs:

https://github.com/near/near-indexer-for-explorer/blob/a6dbc3c1f1f1e6a8727b588713e5ee66a6ad0519/Cargo.toml#L27-L28

This doesn't make physical sense: near-sdk-rs is essentially a wasm-only crate for writing smart contracts, it just happens to work on x86_64-unknown-linux-gnu, but this is not guaranteed.

Looking at the usages, it is only pulled for some serialization utils. These utils should be re-implemented here instead. There's very little meaningful code there, so any perceived code sharing benefits are dominated by accidental coupling between unrelated projects.

Context: https://near.zulipchat.com/#narrow/stream/295558-nearinc-protocol-core/topic/newbie.20questions.20about.20localnet

matklad avatar Oct 15 '21 09:10 matklad

cc @telezhnaya

khorolets avatar Oct 15 '21 10:10 khorolets

The idea behind it was to copy-paste the lockup contract as is with minimal modifications, but I agree that might be an overkill to justify pulling the whole near-sdk. It is not urgent or important for us at the moment, so I will mark it as good first issue for whoever will be willing to put energy into slimming the dependencies, learning more about lockup contract and circulating supply.

frol avatar Oct 15 '21 16:10 frol