near / near-sdk-rs

Rust library for writing NEAR smart contracts
https://near-sdk.io
Apache License 2.0
444 stars 228 forks source link

Consider Erlond cross-contract API #247

Open MaksymZavershynskyi opened 3 years ago

MaksymZavershynskyi commented 3 years ago

Our community member pointed out that they think Erlond's Rust API has a more convenient cross-contract API than ours, see: https://github.com/ElrondNetwork/elrond-wasm-rs/blob/master/examples/crowdfunding-erc20/src/lib.rs There also might be some other learnings from their approach. I agree that their approach is good, it looks closer to Solidity cross-contract DevX, because it allows to convert an account address to a callable object given contract trait.

I suggest us to discuss in this issue pros and cons of their cross-contract approach and other parts of their SDK. Then if we decide to not adopt any new ideas we should explain why and close this issue.

evgenykuzyakov commented 3 years ago

Another more complicated SC example: https://github.com/ElrondNetwork/sc-delegation-rs/blob/master/v0_5_2/src/node_activation.rs

mikedotexe commented 3 years ago

Wow, this looks very similar and readable. Really like #[callback] 👍🏼