Skip to content
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

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

peterwht
Copy link
Contributor

@peterwht peterwht commented Jan 20, 2025

Various improvements and fixes for RLP encoded ink! contracts.

Includes compile tests, as well as e2e tests for:

  • ink! RLP <> ink! RLP
  • Solidity <> ink! RLP

let selector = keccak_selector(b"flip");
let callee: AccountId = callee.into();

// TODO: fails due to call builder encoding with scale
Copy link
Contributor Author

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[..])?;

Base automatically changed from aj/rlp to master January 28, 2025 08:54
@peterwht peterwht marked this pull request as ready for review February 11, 2025 18:20
@peterwht peterwht changed the title feat: improvements to RLP encoding feat: improvements and testing for RLP ink! contracts Feb 11, 2025
@@ -109,8 +109,9 @@ where
C: subxt::Config,
E: Environment,
{
api: ReviveApi<C, E>,
contracts: ContractsRegistry,
// TODO: make private once call builder supports RLP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should start adding our handles behind the TODO, so that we don't get confused who's working on what.

@@ -0,0 +1,64 @@
use contract::Contract;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
use contract::Contract;
use contract::Contract;

@@ -0,0 +1,29 @@
[package]
name = "rlp-cross-contract"
version = "5.0.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "5.0.0"
version = "6.0.0-alpha"


#![cfg_attr(not(feature = "std"), no_std, no_main)]

#[ink::contract(abi_encoding = "rlp")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[ink::contract(abi_encoding = "rlp")]
#[ink::contract(abi_encoding = "rlp")]

Is it only encoding or also decoding?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants