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

Contracts: Translate .wat fixtures to rust #2654

Merged
merged 78 commits into from
Jan 12, 2024
Merged

Contracts: Translate .wat fixtures to rust #2654

merged 78 commits into from
Jan 12, 2024

Conversation

pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Dec 7, 2023

  • Translate all pallet-contracts fixtures from wat to Rust files.
  • Fix read_sandbox_memory_as to not use MaxEncodedLen as this could break if used with types with a non-fixed encoded len.

@pgherveou pgherveou marked this pull request as ready for review December 8, 2023 10:43
@pgherveou pgherveou requested a review from athei as a code owner December 8, 2023 10:43
@pgherveou pgherveou requested a review from a team December 8, 2023 10:43
@pgherveou pgherveou added the R0-silent Changes should not be mentioned in any release notes label Dec 8, 2023
@pgherveou pgherveou requested a review from xermicus December 8, 2023 11:14
@pgherveou pgherveou requested a review from athei January 5, 2024 15:41
@pgherveou pgherveou requested a review from a team as a code owner January 8, 2024 17:21
@pgherveou
Copy link
Contributor Author

bot fmt

@command-bot
Copy link

command-bot bot commented Jan 9, 2024

@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4870587 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 4-ebf5d522-1865-47d9-8f94-96019f4cd2e1 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Jan 9, 2024

@pgherveou Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4870587 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4870587/artifacts/download.

Copy link
Member

@athei athei left a comment

Choose a reason for hiding this comment

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

Great work. Thank you.

@pgherveou pgherveou enabled auto-merge January 12, 2024 14:46
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable-int
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4902625

Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

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

Great work! I cross checked many of them against the WAT version without finding major issues.


if !input.is_empty() {
output!(addr, [0u8; 32], api::address,);
api::call_v1(
Copy link
Member

Choose a reason for hiding this comment

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

The WAT fixture did import seal0::call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah bumped it as I believe v0 is deprecated now. We should still work on having all of them covered by tests though

.unwrap();
} else {
// Try to terminate and give balance to django.
api::terminate_v1(&DJANGO);
Copy link
Member

Choose a reason for hiding this comment

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

The WAT fixture did import seal0::call but I don't think it matters here

@pgherveou pgherveou added this pull request to the merge queue Jan 12, 2024
Merged via the queue into master with commit bd80dcf Jan 12, 2024
125 checks passed
@pgherveou pgherveou deleted the pg/add-fixtures branch January 12, 2024 20:54
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
- Translate all pallet-contracts fixtures from `wat` to Rust files.
- Fix read_sandbox_memory_as to not use MaxEncodedLen as this could
break if used with types with a non-fixed encoded len.

---------

Co-authored-by: alvicsam <[email protected]>
Co-authored-by: Alexander Samusev <[email protected]>
Co-authored-by: Alexander Theißen <[email protected]>
Co-authored-by: command-bot <>
@athei athei mentioned this pull request Apr 8, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants