-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add support for ink!'s version
metadata field
#641
Merged
Merged
Changes from 19 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
a18476b
Format `transcode`'s `lib.rs`
HCastano 2f203c4
Use `InkProject` directly instead of `MetadataVersioned`
HCastano a684e1b
Patch ink dependencies to point to development branch
HCastano 02dd06c
Merge branch 'master' into hc-versioned-metadata
HCastano 7472a76
Use same nightly compiler as CI to format code
HCastano f728a5f
Use updated ink! dependences in template
HCastano 7bb61dd
Bump lockfile
HCastano e24996d
Bump expected metadata version to V4
HCastano 1cb063e
Bump to V4 in a couple more places
HCastano befcc3b
Clear cache before running tests
HCastano b797c3e
Add missing colon
HCastano 17612e2
Looks like the directory doesn't want to be cleaned
HCastano c55b719
Bump to ink! 4.0 pre-release
HCastano c98e911
Merge branch 'master' into hc-versioned-metadata
HCastano 66cf72f
Bump ink! version
HCastano a1c354b
Remove metadata version check
HCastano 636e200
Merge branch 'master' into hc-versioned-metadata
HCastano 732e9f3
Appease Clippy
HCastano cb45b64
Move away from ink!'s `hc-versioned-metadata` branch
HCastano 6655ca3
Merge branch 'master' into hc-versioned-metadata
HCastano 8f0684a
Merge branch 'master' into hc-versioned-metadata
HCastano cfdd262
Remove metadata version check (again)
HCastano ade9566
RustFmt
HCastano 227523c
Remove another irrefutable `if let`
HCastano 023bb89
Bump ink! versions to `4.0.0-alpha.1`
HCastano ed493d0
Deny `unused_crate_dependencies` again
HCastano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
extern crate contract; | ||
|
||
extern "Rust" { | ||
fn __ink_generate_metadata() -> ink_metadata::MetadataVersioned; | ||
// Note: The ink! metdata codegen generates an implementation for this function, | ||
// which is what we end up linking to here. | ||
fn __ink_generate_metadata() -> ink_metadata::InkProject; | ||
} | ||
|
||
fn main() -> Result<(), std::io::Error> { | ||
let metadata = unsafe { __ink_generate_metadata() }; | ||
let contents = serde_json::to_string_pretty(&metadata)?; | ||
print!("{}", contents); | ||
Ok(()) | ||
let metadata = unsafe { __ink_generate_metadata() }; | ||
let contents = serde_json::to_string_pretty(&metadata)?; | ||
print!("{}", contents); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nice that you fixed this example in the
README
, however it is quite brittle for the code to be here in the first place. See #705