Skip to content

Commit

Permalink
feat: implement callback_result annotation (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinabell committed Sep 4, 2021
1 parent d69e905 commit 072b477
Show file tree
Hide file tree
Showing 15 changed files with 3,694 additions and 47 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [unreleased]
- Introduce `#[callback_result]` annotation, which acts like `#[callback]` except that it returns `Result<T, PromiseError>` to allow error handling. [PR 554](https://github.com/near/near-sdk-rs/pull/554)
- Adds `#[callback_unwrap]` to replace `callback`
- mock: Update `method_names` field of `AddKeyWithFunctionCall` to a `Vec<String>` from `Vec<Vec<u8>>`. [PR 555](https://github.com/near/near-sdk-rs/pull/555)
- Method names were changed to be strings in `4.0.0-pre.2` but this one was missed
- env: Update the register used for temporary `env` methods to `u64::MAX - 2` from `0`. [PR 557](https://github.com/near/near-sdk-rs/pull/489).
Expand Down
2 changes: 2 additions & 0 deletions examples/callback-results/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-unknown-unknown]
rustflags = ["-C", "link-arg=-s"]
Loading

0 comments on commit 072b477

Please sign in to comment.