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

Compare Environment types against the node #1377

Merged
merged 24 commits into from
Oct 25, 2023
Merged

Compare Environment types against the node #1377

merged 24 commits into from
Oct 25, 2023

Conversation

SkymanOne
Copy link
Contributor

@SkymanOne SkymanOne commented Oct 20, 2023

Summary

Closes #1167

  • [n] y/n | Does it introduce breaking changes?
  • [y] y/n | Is it dependent on the specific version of ink or pallet-contracts - ink! 5.0.0-alpha & polkadot-1.2.0 ?

Introduces check for a type match between the contract environment and the target node.

Description

This PR allows checking environmental type match before execution call, upload and instantiate including dry-running.

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have added an entry to CHANGELOG.md
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@SkymanOne SkymanOne changed the title check env types Compare Environment types against the node Oct 20, 2023
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/lib.rs Outdated Show resolved Hide resolved
crates/transcode/src/lib.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/extrinsics/src/call.rs Outdated Show resolved Hide resolved
crates/extrinsics/src/upload.rs Outdated Show resolved Hide resolved
crates/transcode/Cargo.toml Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
crates/transcode/src/env_check.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM, Just a question of whether we should warn instead of error in the case below.

crates/extrinsics/src/env_check.rs Outdated Show resolved Hide resolved
@SkymanOne SkymanOne merged commit 1a1024d into master Oct 25, 2023
11 checks passed
@SkymanOne SkymanOne deleted the gn/check-env branch October 25, 2023 23:32
@smiasojed smiasojed mentioned this pull request Nov 30, 2023
@cmichi cmichi mentioned this pull request Feb 29, 2024
4 tasks
@smiasojed smiasojed mentioned this pull request Mar 4, 2024
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.

Before contract upload/instantiate: verify that node types match contract types
3 participants