near / cargo-near

Cargo extension for building Rust smart contracts on NEAR
Apache License 2.0
34 stars 17 forks source link

Add ability to create bundle of ABI and Wasm #82

Open austinabell opened 2 years ago

austinabell commented 2 years ago

This issue was split from #21 as there are different motivations for each. The purpose of this is to have one build file which has both the ABI and Wasm within it to make sure the two are kept in sync and so that multiple files don't have to be managed when integrating with other tooling.

The context for this, copied from #21:

.: Bundle of ABI and wasm in JSON file. Wasm should probably be included in base64 (nearcore RPC accepts this, so no transformation will be required). The motivation for this is some tooling might want both to avoid having to use two separate files. What the bundle looks like may be opinionated, maybe it's the same schema as ABI except with an extra key for code, or it's a map of {"abi": ..., "code":}. The latter might be a bit redundant/confusing because ABI already has a key `abi`.
miraclx commented 2 years ago

The latter might be a bit redundant/confusing because ABI already has a key abi.

PS: ABI no longer has key abi. Since https://github.com/near/near-abi-rs/pull/3, it's been renamed to body.