New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix trait lookup #1817
Fix trait lookup #1817
Conversation
will try the code with @friedger examples some time today, but I'm fairly optimistic this will work |
I applied the patch and verified it was running fine with the original contracts from @friedger |
"(define-trait trait-1 ( | ||
(get-1 (uint) (response uint uint)))) | ||
(define-public (wrapped-get-1 (contract <trait-1>)) | ||
(let ((val u0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps you could add a test with multiple let
levels, just to be sure it works in that case as well (it should!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @lgalabru !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM!
Address #1815
When optimising for O(1) retrieval in 084ec6e, I should have cascade the fact that the
lookup_callable_contract
method should be used, instead of accessing the hashmap directly.