You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some rough edges when generating ABI for a low-level contract. For example it is unclear that the following function returns a promise and not a ():
Same thing with resolving callbacks: they are not a part of the signature so they will not show up in ABI. Not sure how big of a deal this is, but can be a potential foot gun as an ABI for the code will be successfully generated, but won't have the correct type. We could add some custom attributes (e.g. #[near_abi_returns(<type>)]) and/or warn user who is using cargo-near on a contract that contains env::promise_result(i) (and other similar calls).
The text was updated successfully, but these errors were encountered:
Hm, that's tricky, what if the return is inside another function that's called from this one. Shouldn't happen, but there's nothing stopping it from happening.
There are some rough edges when generating ABI for a low-level contract. For example it is unclear that the following function returns a promise and not a
()
:Same thing with resolving callbacks: they are not a part of the signature so they will not show up in ABI. Not sure how big of a deal this is, but can be a potential foot gun as an ABI for the code will be successfully generated, but won't have the correct type. We could add some custom attributes (e.g.
#[near_abi_returns(<type>)]
) and/or warn user who is usingcargo-near
on a contract that containsenv::promise_result(i)
(and other similar calls).The text was updated successfully, but these errors were encountered: