-
Notifications
You must be signed in to change notification settings - Fork 451
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
feat: improvements and testing for RLP ink! contracts #2375
Conversation
let selector = keccak_selector(b"flip"); | ||
let callee: AccountId = callee.into(); | ||
|
||
// TODO: fails due to call builder encoding with scale |
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.
more accurately, issue is coming from here:
let decoded = scale::DecodeAll::decode_all(&mut &output[..])?; |
…ion for tests to build
…ts and unused imports
This reverts commit 01e4f46.
|
||
#![cfg_attr(not(feature = "std"), no_std, no_main)] | ||
|
||
#[ink::contract(abi_encoding = "rlp")] |
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.
#[ink::contract(abi_encoding = "rlp")] | |
#[ink::contract(abi_encoding = "rlp")] |
Is it only encoding or also decoding?
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.
It's both encoding and decoding. Do you have a recommendation? Can address in the solidity ABI PR as I have to rename from rlp anyway.
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.
How about just abi
?
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.
We should also support something like abi = "all"
.
)) | ||
} | ||
|
||
if encoding.is_rlp() && !(encoding.is_all() && message.user_provided_selector().is_some()) { |
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.
just a temporary fix for compilation. Added TODO in #2401
Various improvements and fixes for RLP encoded ink! contracts.
Includes compile tests, as well as e2e tests for: