Skip to content

Contracts: Translate .wat fixtures to rust#2654

Merged
pgherveou merged 78 commits intomasterfrom
pg/add-fixtures
Jan 12, 2024
Merged

Contracts: Translate .wat fixtures to rust#2654
pgherveou merged 78 commits intomasterfrom
pg/add-fixtures

Conversation

@pgherveou
Copy link
Copy Markdown
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-no-crate-publish-required The change does not require any crates to be re-published. 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
Copy Markdown
Contributor Author

bot fmt

@command-bot
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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 <alvicsam@gmail.com>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
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-no-crate-publish-required The change does not require any crates to be re-published.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants